<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="biobankcy-sd-sleep" />
  <url value="http://ig.biobank.cy/fhir/StructureDefinition/biobankcy-sd-sleep" />
  <name value="BIOBANKCYSDSleep" />
  <title value="Profile: Sleep (biobank.cy)" />
  <status value="draft" />
  <date value="2022-05-19" />
  <publisher value="biobank.cy" />
  <contact>
    <name value="Molecular Medicine Research Center (MMRC)" />
    <telecom>
      <system value="email" />
      <value value="biobank@ucy.ac.cy" />
      <use value="work" />
    </telecom>
  </contact>
  <description value="Represents the sleep habits of a donor (research subject) or citizen (patient) of the biobank.cy. The sleep habits can be self-reported by the patient or reporeted by a medical doctor or nurse." />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Observation" />
  <baseDefinition value="http://ig.biobank.cy/fhir/StructureDefinition/biobankcy-sd-socialhistory" />
  <derivation value="constraint" />
  <differential>
    <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;biobank.cy: 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]" />
      <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>