<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="il-core-vital-signs" />
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
    <valueCode value="draft" />
  </extension>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm">
    <valueInteger value="0" />
  </extension>
  <url value="http://fhir.health.gov.il/StructureDefinition/il-core-vital-signs" />
  <version value="0.21.0" />
  <name value="ILCoreVitalSigns" />
  <title value="ILCore Vital Signs Profile" />
  <status value="active" />
  <date value="2026-03-23" />
  <publisher value="Israel Core Team" />
  <contact>
    <telecom>
      <system value="email" />
      <value value="tal.primak@moh.gov.il" />
    </telecom>
  </contact>
  <description value="Israel Core proposed constraints and extensions on the Observation Resource for use in querying and retrieving Vital Signs information." />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Observation" />
  <baseDefinition value="http://fhir.health.gov.il/StructureDefinition/il-core-observation" />
  <derivation value="constraint" />
  <differential>
    <element id="Observation">
      <path value="Observation" />
      <short value="ILCore Vital Signs Profile" />
      <constraint>
        <key value="il-vs2" />
        <severity value="error" />
        <human value="If there is no component or hasMember element then either a value[x] or a data absent reason must be present." />
        <expression value="(component.empty() and hasMember.empty()) implies (dataAbsentReason.exists() or value.exists())" />
        <source value="http://fhir.health.gov.il/StructureDefinition/il-core-vital-signs" />
      </constraint>
    </element>
    <element id="Observation.extension">
      <path value="Observation.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <ordered value="false" />
        <rules value="open" />
      </slicing>
    </element>
    <element id="Observation.extension:body-position">
      <path value="Observation.extension" />
      <sliceName value="body-position" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org/fhir/StructureDefinition/observation-bodyPosition" />
      </type>
    </element>
    <element id="Observation.extension:body-position.value[x]">
      <path value="Observation.extension.value[x]" />
      <binding>
        <strength value="example" />
        <valueSet value="http://fhir.health.gov.il/ValueSet/il-core-body-position" />
      </binding>
    </element>
    <element id="Observation.category">
      <path value="Observation.category" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="coding.code" />
        </discriminator>
        <discriminator>
          <type value="value" />
          <path value="coding.system" />
        </discriminator>
        <ordered value="false" />
        <rules value="open" />
      </slicing>
      <min value="1" />
    </element>
    <element id="Observation.category:VSCat">
      <path value="Observation.category" />
      <sliceName value="VSCat" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Observation.category:VSCat.coding">
      <path value="Observation.category.coding" />
      <min value="1" />
    </element>
    <element id="Observation.category:VSCat.coding.system">
      <path value="Observation.category.coding.system" />
      <min value="1" />
      <fixedUri value="http://terminology.hl7.org/CodeSystem/observation-category" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.category:VSCat.coding.code">
      <path value="Observation.category.coding.code" />
      <min value="1" />
      <fixedCode value="vital-signs" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.code">
      <path value="Observation.code" />
      <definition value="Code specifying Vital Sign measurement type" />
      <binding>
        <strength value="extensible" />
        <valueSet value="http://hl7.org/fhir/ValueSet/observation-vitalsignresult" />
      </binding>
    </element>
    <element id="Observation.subject">
      <path value="Observation.subject" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://fhir.health.gov.il/StructureDefinition/il-core-patient" />
      </type>
    </element>
    <element id="Observation.effective[x]">
      <path value="Observation.effective[x]" />
      <short value="Often just a dateTime for Vital Signs" />
      <min value="1" />
      <constraint>
        <key value="il-vs1" />
        <severity value="error" />
        <human value="if Observation.effective[x] is dateTime and has a value then that value shall be precise to the day" />
        <expression value="($this as dateTime).exists() implies (($this as dateTime).toString().length() &gt;= 10)" />
        <source value="http://fhir.health.gov.il/StructureDefinition/il-core-vital-signs" />
      </constraint>
    </element>
    <element id="Observation.value[x]">
      <path value="Observation.value[x]" />
      <short value="Vital Signs value are recorded using the Quantity data type." />
      <definition value="Vital Signs value are recorded using the Quantity data type. For supporting observations such as Cuff size could use other datatypes such as CodeableConcept, as well as String." />
      <type>
        <code value="Quantity" />
      </type>
      <type>
        <code value="CodeableConcept" />
      </type>
      <type>
        <code value="string" />
      </type>
    </element>
    <element id="Observation.value[x]:valueQuantity">
      <path value="Observation.value[x]" />
      <sliceName value="valueQuantity" />
      <short value="Vital Signs values are recorded with UCUM" />
      <definition value="Vital Signs values are recorded with UCUM" />
      <type>
        <code value="Quantity" />
      </type>
      <binding>
        <strength value="required" />
        <valueSet value="http://hl7.org/fhir/ValueSet/ucum-vitals-common" />
      </binding>
    </element>
    <element id="Observation.dataAbsentReason">
      <path value="Observation.dataAbsentReason" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.hasMember">
      <path value="Observation.hasMember" />
      <definition value="Used when reporting vital signs panel components" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://fhir.health.gov.il/StructureDefinition/il-core-vital-signs" />
      </type>
    </element>
    <element id="Observation.derivedFrom">
      <path value="Observation.derivedFrom" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://fhir.health.gov.il/StructureDefinition/il-core-document-reference" />
        <targetProfile value="http://fhir.health.gov.il/StructureDefinition/il-core-imaging-study" />
        <targetProfile value="http://fhir.health.gov.il/StructureDefinition/il-core-media" />
        <targetProfile value="http://fhir.health.gov.il/StructureDefinition/il-core-questionnaire-response" />
        <targetProfile value="http://fhir.health.gov.il/StructureDefinition/il-core-vital-signs" />
        <targetProfile value="http://fhir.health.gov.il/StructureDefinition/il-core-molecular-sequence" />
      </type>
    </element>
    <element id="Observation.component">
      <path value="Observation.component" />
      <constraint>
        <key value="il-vs3" />
        <severity value="error" />
        <human value="If there is no a value a data absent reason must be present" />
        <expression value="value.exists() or dataAbsentReason.exists()" />
        <source value="http://fhir.health.gov.il/StructureDefinition/il-core-vital-signs" />
      </constraint>
      <mustSupport value="true" />
    </element>
    <element id="Observation.component.code">
      <path value="Observation.component.code" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.component.value[x]">
      <path value="Observation.component.value[x]" />
      <type>
        <code value="Quantity" />
      </type>
      <type>
        <code value="CodeableConcept" />
      </type>
      <type>
        <code value="string" />
      </type>
      <condition value="il-vs3" />
    </element>
    <element id="Observation.component.value[x]:valueQuantity">
      <path value="Observation.component.value[x]" />
      <sliceName value="valueQuantity" />
      <short value="BP values are recorded with UCUM" />
      <definition value="Blood pressuer values are recorded with UCUM" />
      <type>
        <code value="Quantity" />
      </type>
      <binding>
        <strength value="extensible" />
        <valueSet value="http://fhir.health.gov.il/ValueSet/bp-unit" />
      </binding>
    </element>
    <element id="Observation.component.dataAbsentReason">
      <path value="Observation.component.dataAbsentReason" />
      <condition value="il-vs3" />
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>