<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="UKCore-Observation-VitalSigns" />
  <url value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Observation-VitalSigns" />
  <version value="1.1.0" />
  <name value="UKCoreObservationVitalSigns" />
  <title value="UK Core Observation Vital Signs" />
  <status value="draft" />
  <date value="2023-08-10" />
  <publisher value="HL7 UK" />
  <contact>
    <name value="HL7 UK" />
    <telecom>
      <system value="email" />
      <value value="ukcore@hl7.org.uk" />
      <use value="work" />
      <rank value="1" />
    </telecom>
  </contact>
  <description value="Defines the observation constraints and extensions on the UK Core observation resource for the minimal set of data to query and retrieve clinical observation  vital signs information." />
  <purpose value="This profile allows exchange of information of Measurements and simple assertions made about an individual, device or other subject." />
  <copyright value="Copyright © 2021+ HL7 UK Licensed under the Apache License, Version 2.0 (the &quot;License&quot;); you may not use this file except in compliance with the License. You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. HL7® FHIR® standard Copyright © 2011+ HL7 The HL7® FHIR® standard is used under the FHIR license. You may obtain a copy of the FHIR license at  https://www.hl7.org/fhir/license.html." />
  <fhirVersion value="4.0.1" />
  <mapping>
    <identity value="workflow" />
    <uri value="http://hl7.org/fhir/workflow" />
    <name value="Workflow Pattern" />
  </mapping>
  <mapping>
    <identity value="sct-concept" />
    <uri value="http://snomed.info/conceptdomain" />
    <name value="SNOMED CT Concept Domain Binding" />
  </mapping>
  <mapping>
    <identity value="v2" />
    <uri value="http://hl7.org/v2" />
    <name value="HL7 v2 Mapping" />
  </mapping>
  <mapping>
    <identity value="rim" />
    <uri value="http://hl7.org/v3" />
    <name value="RIM Mapping" />
  </mapping>
  <mapping>
    <identity value="w5" />
    <uri value="http://hl7.org/fhir/fivews" />
    <name value="FiveWs Pattern Mapping" />
  </mapping>
  <mapping>
    <identity value="sct-attr" />
    <uri value="http://snomed.org/attributebinding" />
    <name value="SNOMED CT Attribute Binding" />
  </mapping>
  <kind value="resource" />
  <abstract value="false" />
  <type value="Observation" />
  <baseDefinition value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Observation" />
  <derivation value="constraint" />
  <differential>
    <element id="Observation">
      <path value="Observation" />
      <constraint>
        <key value="ukcore-obs-vs-001" />
        <severity value="error" />
        <human value="Where the category is Vital Signs the code.coding SHALL include a LOINC &quot;magic code&quot;" />
        <expression value="category.where(code='vital-signs') implies code.coding.where(system='http://loinc.org').exists()" />
      </constraint>
    </element>
    <element id="Observation.status">
      <path value="Observation.status" />
      <fixedCode value="final" />
    </element>
    <element id="Observation.category">
      <path value="Observation.category" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="coding.code" />
        </discriminator>
        <rules value="closed" />
      </slicing>
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Observation.category:vitalSigns">
      <path value="Observation.category" />
      <sliceName value="vitalSigns" />
      <max value="1" />
    </element>
    <element id="Observation.category:vitalSigns.coding.system">
      <path value="Observation.category.coding.system" />
      <fixedUri value="http://terminology.hl7.org/CodeSystem/observation-category" />
    </element>
    <element id="Observation.category:vitalSigns.coding.code">
      <path value="Observation.category.coding.code" />
      <fixedCode value="vital-signs" />
    </element>
    <element id="Observation.category:vitalSigns.coding.display">
      <path value="Observation.category.coding.display" />
      <fixedString value="Vital Signs" />
    </element>
    <element id="Observation.category:survey">
      <path value="Observation.category" />
      <sliceName value="survey" />
      <max value="1" />
    </element>
    <element id="Observation.category:survey.coding.system">
      <path value="Observation.category.coding.system" />
      <fixedUri value="http://terminology.hl7.org/CodeSystem/observation-category" />
    </element>
    <element id="Observation.category:survey.coding.code">
      <path value="Observation.category.coding.code" />
      <fixedCode value="survey" />
    </element>
    <element id="Observation.category:survey.coding.display">
      <path value="Observation.category.coding.display" />
      <fixedString value="Survey" />
    </element>
    <element id="Observation.code.coding">
      <path value="Observation.code.coding" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="system" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="Observation.code.coding:loinc">
      <path value="Observation.code.coding" />
      <sliceName value="loinc" />
      <binding>
        <strength value="extensible" />
        <valueSet value="http://hl7.org/fhir/ValueSet/observation-vitalsignresult" />
      </binding>
    </element>
    <element id="Observation.code.coding:loinc.system">
      <path value="Observation.code.coding.system" />
      <fixedUri value="http://loinc.org" />
    </element>
    <element id="Observation.code.coding:snomedCT">
      <path value="Observation.code.coding" />
      <sliceName value="snomedCT" />
      <binding>
        <strength value="preferred" />
        <description value="A code from the SNOMED Clinical Terminology UK coding system describing a type of observation" />
        <valueSet value="https://fhir.hl7.org.uk/ValueSet/UKCore-ObservationVitalSignsType" />
      </binding>
    </element>
    <element id="Observation.code.coding:snomedCT.system">
      <path value="Observation.code.coding.system" />
      <fixedUri value="http://snomed.info/sct" />
    </element>
    <element id="Observation.subject">
      <path value="Observation.subject" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient" />
      </type>
    </element>
    <element id="Observation.effective[x]">
      <path value="Observation.effective[x]" />
      <min value="1" />
    </element>
    <element id="Observation.hasMember">
      <path value="Observation.hasMember" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-QuestionnaireResponse" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/MolecularSequence" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Observation-VitalSigns" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Observation" />
      </type>
    </element>
    <element id="Observation.derivedFrom">
      <path value="Observation.derivedFrom" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-ImagingStudy" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Media" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-QuestionnaireResponse" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/MolecularSequence" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Observation-VitalSigns" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-DocumentReference" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Observation" />
      </type>
    </element>
    <element id="Observation.component.code">
      <path value="Observation.component.code" />
      <binding>
        <strength value="preferred" />
        <description value="A code from the SNOMED Clinical Terminology UK coding system describing a type of vital sign." />
        <valueSet value="https://fhir.hl7.org.uk/ValueSet/UKCore-ObservationVitalSignsType" />
      </binding>
    </element>
    <element id="Observation.component.code.coding">
      <path value="Observation.component.code.coding" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="system" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="Observation.component.code.coding:loinc">
      <path value="Observation.component.code.coding" />
      <sliceName value="loinc" />
      <binding>
        <strength value="extensible" />
        <valueSet value="http://hl7.org/fhir/ValueSet/observation-vitalsignresult" />
      </binding>
    </element>
    <element id="Observation.component.code.coding:loinc.system">
      <path value="Observation.component.code.coding.system" />
      <fixedUri value="http://loinc.org" />
    </element>
    <element id="Observation.component.code.coding:snomedCT">
      <path value="Observation.component.code.coding" />
      <sliceName value="snomedCT" />
      <binding>
        <strength value="preferred" />
        <description value="A code from the SNOMED Clinical Terminology UK coding system describing a type of observation for vital-signs" />
        <valueSet value="https://fhir.hl7.org.uk/ValueSet/UKCore-ObservationVitalSignsType" />
      </binding>
    </element>
    <element id="Observation.component.code.coding:snomedCT.system">
      <path value="Observation.component.code.coding.system" />
      <fixedUri value="http://snomed.info/sct" />
    </element>
  </differential>
</StructureDefinition>