<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="cyehr-sd-sleep" />
  <url value="http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-sd-sleep" />
  <name value="CYEHRSDSleep" />
  <title value="Cyprus EHR Sleep profile" />
  <status value="draft" />
  <date value="2022-05-19" />
  <publisher value="eHealth4U" />
  <contact>
    <name value="eHealth Lab (University of Cyprus)" />
    <telecom>
      <system value="email" />
      <value value="ehealthl@ucy.ac.cy" />
      <use value="work" />
    </telecom>
  </contact>
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Observation" />
  <baseDefinition value="http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-sd-socialhistory" />
  <derivation value="constraint" />
  <differential>
    <element id="Observation.meta">
      <path value="Observation.meta" />
    </element>
    <element id="Observation.meta.profile">
      <path value="Observation.meta.profile" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
    </element>
    <element id="Observation.meta.profile:CyprusEHRProfile">
      <path value="Observation.meta.profile" />
      <sliceName value="CyprusEHRProfile" />
      <min value="1" />
      <max value="1" />
      <fixedCanonical value="http://ig.ehealth4u.eu/fhir/StructureDefinition/cyehr-sd-sleep" />
    </element>
    <element id="Observation.code">
      <path value="Observation.code" />
      <short value="Sleep pattern finding." />
      <comment value="Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.&#xD;&#xA;&#xD;&#xA;CyprusEHR: display: &quot;Sleep pattern finding&quot;" />
      <patternCodeableConcept>
        <coding>
          <system value="http://snomed.info/sct" />
          <code value="401175000" />
        </coding>
      </patternCodeableConcept>
    </element>
    <element id="Observation.code.coding.code">
      <path value="Observation.code.coding.code" />
      <short value="Loinc code of sleep duration" />
    </element>
    <element id="Observation.effective[x]">
      <path value="Observation.effective[x]" />
      <min value="1" />
      <type>
        <code value="Period" />
      </type>
    </element>
    <element id="Observation.value[x]">
      <path value="Observation.value[x]" />
      <min value="1" />
      <type>
        <code value="CodeableConcept" />
        <profile value="http://hl7.org/fhir/uv/ips/StructureDefinition/CodeableConcept-uv-ips" />
      </type>
      <binding>
        <strength value="required" />
        <description value="Sleep pattern finding - snomed (401175000)" />
        <valueSet value="http://ig.ehealth4u.eu/fhir/ValueSet/cyehr-vs-findingrelatedtosleep" />
      </binding>
    </element>
    <element id="Observation.value[x].coding.system">
      <path value="Observation.value[x].coding.system" />
      <min value="1" />
    </element>
    <element id="Observation.value[x].coding.code">
      <path value="Observation.value[x].coding.code" />
      <min value="1" />
    </element>
    <element id="Observation.value[x].coding.display">
      <path value="Observation.value[x].coding.display" />
      <min value="1" />
    </element>
  </differential>
</StructureDefinition>