{
  "resourceType": "StructureDefinition",
  "id": "UKCore-Observation-VitalSigns",
  "url": "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Observation-VitalSigns",
  "version": "1.1.0",
  "name": "UKCoreObservationVitalSigns",
  "title": "UK Core Observation Vital Signs",
  "status": "draft",
  "date": "2023-08-10",
  "publisher": "HL7 UK",
  "contact": [
    {
      "name": "HL7 UK",
      "telecom": [
        {
          "system": "email",
          "value": "ukcore@hl7.org.uk",
          "use": "work",
          "rank": 1
        }
      ]
    }
  ],
  "description": "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": "This profile allows exchange of information of Measurements and simple assertions made about an individual, device or other subject.",
  "copyright": "Copyright © 2021+ HL7 UK Licensed under the Apache License, Version 2.0 (the \"License\"); 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 \"AS IS\" 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": "4.0.1",
  "mapping": [
    {
      "identity": "workflow",
      "uri": "http://hl7.org/fhir/workflow",
      "name": "Workflow Pattern"
    },
    {
      "identity": "sct-concept",
      "uri": "http://snomed.info/conceptdomain",
      "name": "SNOMED CT Concept Domain Binding"
    },
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2 Mapping"
    },
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    },
    {
      "identity": "sct-attr",
      "uri": "http://snomed.org/attributebinding",
      "name": "SNOMED CT Attribute Binding"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Observation",
  "baseDefinition": "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Observation",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Observation",
        "path": "Observation",
        "constraint": [
          {
            "key": "ukcore-obs-vs-001",
            "severity": "error",
            "human": "Where the category is Vital Signs the code.coding SHALL include a LOINC \"magic code\"",
            "expression": "category.where(code='vital-signs') implies code.coding.where(system='http://loinc.org').exists()"
          }
        ]
      },
      {
        "id": "Observation.status",
        "path": "Observation.status",
        "fixedCode": "final"
      },
      {
        "id": "Observation.category",
        "path": "Observation.category",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "coding.code"
            }
          ],
          "rules": "closed"
        },
        "min": 1,
        "max": "1"
      },
      {
        "id": "Observation.category:vitalSigns",
        "path": "Observation.category",
        "sliceName": "vitalSigns",
        "max": "1"
      },
      {
        "id": "Observation.category:vitalSigns.coding.system",
        "path": "Observation.category.coding.system",
        "fixedUri": "http://terminology.hl7.org/CodeSystem/observation-category"
      },
      {
        "id": "Observation.category:vitalSigns.coding.code",
        "path": "Observation.category.coding.code",
        "fixedCode": "vital-signs"
      },
      {
        "id": "Observation.category:vitalSigns.coding.display",
        "path": "Observation.category.coding.display",
        "fixedString": "Vital Signs"
      },
      {
        "id": "Observation.category:survey",
        "path": "Observation.category",
        "sliceName": "survey",
        "max": "1"
      },
      {
        "id": "Observation.category:survey.coding.system",
        "path": "Observation.category.coding.system",
        "fixedUri": "http://terminology.hl7.org/CodeSystem/observation-category"
      },
      {
        "id": "Observation.category:survey.coding.code",
        "path": "Observation.category.coding.code",
        "fixedCode": "survey"
      },
      {
        "id": "Observation.category:survey.coding.display",
        "path": "Observation.category.coding.display",
        "fixedString": "Survey"
      },
      {
        "id": "Observation.code.coding",
        "path": "Observation.code.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Observation.code.coding:loinc",
        "path": "Observation.code.coding",
        "sliceName": "loinc",
        "binding": {
          "strength": "extensible",
          "valueSet": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult"
        }
      },
      {
        "id": "Observation.code.coding:loinc.system",
        "path": "Observation.code.coding.system",
        "fixedUri": "http://loinc.org"
      },
      {
        "id": "Observation.code.coding:snomedCT",
        "path": "Observation.code.coding",
        "sliceName": "snomedCT",
        "binding": {
          "strength": "preferred",
          "description": "A code from the SNOMED Clinical Terminology UK coding system describing a type of observation",
          "valueSet": "https://fhir.hl7.org.uk/ValueSet/UKCore-ObservationVitalSignsType"
        }
      },
      {
        "id": "Observation.code.coding:snomedCT.system",
        "path": "Observation.code.coding.system",
        "fixedUri": "http://snomed.info/sct"
      },
      {
        "id": "Observation.subject",
        "path": "Observation.subject",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient"
            ]
          }
        ]
      },
      {
        "id": "Observation.effective[x]",
        "path": "Observation.effective[x]",
        "min": 1
      },
      {
        "id": "Observation.hasMember",
        "path": "Observation.hasMember",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-QuestionnaireResponse",
              "http://hl7.org/fhir/StructureDefinition/MolecularSequence",
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Observation-VitalSigns",
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Observation"
            ]
          }
        ]
      },
      {
        "id": "Observation.derivedFrom",
        "path": "Observation.derivedFrom",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-ImagingStudy",
              "http://hl7.org/fhir/StructureDefinition/Media",
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-QuestionnaireResponse",
              "http://hl7.org/fhir/StructureDefinition/MolecularSequence",
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Observation-VitalSigns",
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-DocumentReference",
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Observation"
            ]
          }
        ]
      },
      {
        "id": "Observation.component.code",
        "path": "Observation.component.code",
        "binding": {
          "strength": "preferred",
          "description": "A code from the SNOMED Clinical Terminology UK coding system describing a type of vital sign.",
          "valueSet": "https://fhir.hl7.org.uk/ValueSet/UKCore-ObservationVitalSignsType"
        }
      },
      {
        "id": "Observation.component.code.coding",
        "path": "Observation.component.code.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Observation.component.code.coding:loinc",
        "path": "Observation.component.code.coding",
        "sliceName": "loinc",
        "binding": {
          "strength": "extensible",
          "valueSet": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult"
        }
      },
      {
        "id": "Observation.component.code.coding:loinc.system",
        "path": "Observation.component.code.coding.system",
        "fixedUri": "http://loinc.org"
      },
      {
        "id": "Observation.component.code.coding:snomedCT",
        "path": "Observation.component.code.coding",
        "sliceName": "snomedCT",
        "binding": {
          "strength": "preferred",
          "description": "A code from the SNOMED Clinical Terminology UK coding system describing a type of observation for vital-signs",
          "valueSet": "https://fhir.hl7.org.uk/ValueSet/UKCore-ObservationVitalSignsType"
        }
      },
      {
        "id": "Observation.component.code.coding:snomedCT.system",
        "path": "Observation.component.code.coding.system",
        "fixedUri": "http://snomed.info/sct"
      }
    ]
  }
}