From f9d9780f2c30d5246eb407046c8d028354c5d2db Mon Sep 17 00:00:00 2001 From: Ryan May Date: Tue, 7 Apr 2026 13:53:22 +0100 Subject: [PATCH 01/15] updated to include ig tools needed for Forge --- fhirpkg.lock.json | 6 ++++-- package.json | 9 +++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/fhirpkg.lock.json b/fhirpkg.lock.json index 1be829a78..15b352d3e 100644 --- a/fhirpkg.lock.json +++ b/fhirpkg.lock.json @@ -1,8 +1,10 @@ { - "updated": "2025-08-14T14:55:55.4607406+01:00", + "updated": "2026-04-07T13:17:09.3887142+01:00", "dependencies": { "hl7.fhir.r4.core": "4.0.1", - "hl7.fhir.r5.core": "5.0.0" + "hl7.fhir.uv.tools.r4": "1.1.2", + "hl7.terminology.r4": "7.1.0", + "hl7.fhir.uv.extensions.r4": "5.2.0" }, "missing": {} } diff --git a/package.json b/package.json index 76f30d6a4..f8586d550 100644 --- a/package.json +++ b/package.json @@ -3,10 +3,11 @@ "version": "2.0.0", "description": "UK Core FHIR profiles and Assets", "author": "NHS Digital", + "dependencies": { + "hl7.fhir.r4.core": "4.0.1", + "hl7.fhir.uv.tools.r4": "1.1.2" + }, "fhirVersions": [ "4.0.1" - ], - "dependencies": { - "hl7.fhir.r4.core": "4.0.1" - } + ] } From 3a5a629c8c04fc901a1b54389a80f404bc61610d Mon Sep 17 00:00:00 2001 From: Ryan May Date: Tue, 7 Apr 2026 13:54:33 +0100 Subject: [PATCH 02/15] changed base profile to hl7, added sct ValueSet as per previous iteration --- ...e-Observation-VitalSigns-BloodPressure.xml | 75 ++++++++++++++----- 1 file changed, 57 insertions(+), 18 deletions(-) diff --git a/structuredefinitions/UKCore-Observation-VitalSigns-BloodPressure.xml b/structuredefinitions/UKCore-Observation-VitalSigns-BloodPressure.xml index 813be8bae..accc324a0 100644 --- a/structuredefinitions/UKCore-Observation-VitalSigns-BloodPressure.xml +++ b/structuredefinitions/UKCore-Observation-VitalSigns-BloodPressure.xml @@ -2,11 +2,11 @@ - + <status value="draft" /> - <date value="2025-11-06" /> + <date value="2026-04-07" /> <publisher value="HL7 UK" /> <contact> <name value="HL7 UK" /> @@ -24,19 +24,30 @@ <kind value="resource" /> <abstract value="false" /> <type value="Observation" /> - <baseDefinition value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Observation-VitalSigns" /> + <baseDefinition value="http://hl7.org/fhir/StructureDefinition/bp" /> <derivation value="constraint" /> <differential> - <element id="Observation.code"> - <path value="Observation.code" /> + <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:BPCodeSnomedct"> + <path value="Observation.code.coding" /> + <sliceName value="BPCodeSnomedct" /> <binding> <strength value="preferred" /> <valueSet value="https://fhir.hl7.org.uk/ValueSet/UKCore-BloodPressure" /> </binding> </element> - <element id="Observation.value[x]"> - <path value="Observation.value[x]" /> - <max value="0" /> + <element id="Observation.code.coding:BPCodeSnomedct.system"> + <path value="Observation.code.coding.system" /> + <fixedUri value="http://snomed.info/sct" /> </element> <element id="Observation.method"> <path value="Observation.method" /> @@ -61,27 +72,39 @@ <path value="Observation.component" /> <slicing> <discriminator> - <type value="value" /> - <path value="code.text" /> + <type value="pattern" /> + <path value="$this" /> </discriminator> <rules value="closed" /> </slicing> - <min value="1" /> <max value="2" /> </element> <element id="Observation.component:SystolicBP"> <path value="Observation.component" /> <sliceName value="SystolicBP" /> - <min value="1" /> - <max value="1" /> </element> - <element id="Observation.component:SystolicBP.code"> - <path value="Observation.component.code" /> + <element id="Observation.component:SystolicBP.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:SystolicBP.code.coding:SBPCodeSnomedCT"> + <path value="Observation.component.code.coding" /> + <sliceName value="SBPCodeSnomedCT" /> <binding> <strength value="preferred" /> <valueSet value="https://fhir.hl7.org.uk/ValueSet/UKCore-BloodPressure-Systolic" /> </binding> </element> + <element id="Observation.component:SystolicBP.code.coding:SBPCodeSnomedCT.system"> + <path value="Observation.component.code.coding.system" /> + <fixedUri value="http://snomed.info/sct" /> + </element> <element id="Observation.component:SystolicBP.value[x]"> <path value="Observation.component.value[x]" /> <min value="1" /> @@ -104,15 +127,31 @@ <element id="Observation.component:DiastolicBP"> <path value="Observation.component" /> <sliceName value="DiastolicBP" /> - <max value="1" /> </element> - <element id="Observation.component:DiastolicBP.code"> - <path value="Observation.component.code" /> + <element id="Observation.component:DiastolicBP.code.coding:diastolicbp-code-loinc"> + <path value="Observation.component.code.coding" /> + <sliceName value="diastolicbp-code-loinc" /> + </element> + <element id="Observation.component:DiastolicBP.code.coding:diastolicbp-code-loinc.system"> + <path value="Observation.component.code.coding.system" /> + <fixedUri value="http://loinc.org" /> + </element> + <element id="Observation.component:DiastolicBP.code.coding:diastolicbp-code-loinc.code"> + <path value="Observation.component.code.coding.code" /> + <fixedCode value="8462-4" /> + </element> + <element id="Observation.component:DiastolicBP.code.coding:diastolic-code-snomedct"> + <path value="Observation.component.code.coding" /> + <sliceName value="diastolic-code-snomedct" /> <binding> <strength value="preferred" /> <valueSet value="https://fhir.hl7.org.uk/ValueSet/UKCore-BloodPressure-Diastolic" /> </binding> </element> + <element id="Observation.component:DiastolicBP.code.coding:diastolic-code-snomedct.system"> + <path value="Observation.component.code.coding.system" /> + <fixedUri value="http://snomed.info/sct" /> + </element> <element id="Observation.component:DiastolicBP.value[x]"> <path value="Observation.component.value[x]" /> <min value="1" /> From 9158c3c2f285817cf102f98967df3baacae5aa81 Mon Sep 17 00:00:00 2001 From: Ryan May <ryan.may2@nhs.net> Date: Tue, 7 Apr 2026 14:34:26 +0100 Subject: [PATCH 03/15] changed baseDefinition to hl7 vitalsigns to ensure compliance. fixed any issues and duplications --- .../UKCore-Observation-VitalSigns-BMI.xml | 29 ++++++--------- ...Core-Observation-VitalSigns-BodyHeight.xml | 26 ++++++++------ ...Observation-VitalSigns-BodyTemperature.xml | 28 ++++++++------- ...Core-Observation-VitalSigns-BodyWeight.xml | 15 +++++--- ...servation-VitalSigns-HeadCircumference.xml | 23 ++++++------ ...KCore-Observation-VitalSigns-HeartRate.xml | 32 ++++++++--------- ...bservation-VitalSigns-OxygenSaturation.xml | 36 ++++++++----------- ...Observation-VitalSigns-RespirationRate.xml | 34 ++++++------------ .../UKCore-Observation-VitalSigns.xml | 27 ++++++++++---- 9 files changed, 124 insertions(+), 126 deletions(-) diff --git a/structuredefinitions/UKCore-Observation-VitalSigns-BMI.xml b/structuredefinitions/UKCore-Observation-VitalSigns-BMI.xml index 304c47f3c..e7b08fcad 100644 --- a/structuredefinitions/UKCore-Observation-VitalSigns-BMI.xml +++ b/structuredefinitions/UKCore-Observation-VitalSigns-BMI.xml @@ -2,11 +2,11 @@ <StructureDefinition xmlns="http://hl7.org/fhir"> <id value="UKCore-Observation-VitalSigns-BMI" /> <url value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Observation-VitalSigns-BMI" /> - <version value="0.1.1" /> + <version value="0.2.0" /> <name value="UKCoreObservationVitalSignsBMI" /> <title value="UK Core Observation Vital Signs BMI" /> <status value="draft" /> - <date value="2025-11-06" /> + <date value="2026-04-07" /> <publisher value="HL7 UK" /> <contact> <name value="HL7 UK" /> @@ -24,16 +24,21 @@ <kind value="resource" /> <abstract value="false" /> <type value="Observation" /> - <baseDefinition value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Observation-VitalSigns" /> + <baseDefinition value="http://hl7.org/fhir/StructureDefinition/bmi" /> <derivation value="constraint" /> <differential> - <element id="Observation.code"> - <path value="Observation.code" /> + <element id="Observation.code.coding:BMICodeSnomedCT"> + <path value="Observation.code.coding" /> + <sliceName value="BMICodeSnomedCT" /> <binding> <strength value="preferred" /> <valueSet value="https://fhir.hl7.org.uk/ValueSet/UKCore-BMI" /> </binding> </element> + <element id="Observation.code.coding:BMICodeSnomedCT.system"> + <path value="Observation.code.coding.system" /> + <fixedUri value="http://snomedct.info/sct" /> + </element> <element id="Observation.value[x]"> <path value="Observation.value[x]" /> <min value="1" /> @@ -41,19 +46,5 @@ <code value="Quantity" /> </type> </element> - <element id="Observation.value[x].value"> - <path value="Observation.value[x].value" /> - <min value="1" /> - </element> - <element id="Observation.value[x].system"> - <path value="Observation.value[x].system" /> - <min value="1" /> - <fixedUri value="http://unitsofmeasure.org" /> - </element> - <element id="Observation.value[x].code"> - <path value="Observation.value[x].code" /> - <min value="1" /> - <fixedCode value="kg/m2" /> - </element> </differential> </StructureDefinition> \ No newline at end of file diff --git a/structuredefinitions/UKCore-Observation-VitalSigns-BodyHeight.xml b/structuredefinitions/UKCore-Observation-VitalSigns-BodyHeight.xml index a1b56af6d..a1fc0f55d 100644 --- a/structuredefinitions/UKCore-Observation-VitalSigns-BodyHeight.xml +++ b/structuredefinitions/UKCore-Observation-VitalSigns-BodyHeight.xml @@ -2,11 +2,11 @@ <StructureDefinition xmlns="http://hl7.org/fhir"> <id value="UKCore-Observation-VitalSigns-BodyHeight" /> <url value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Observation-VitalSigns-BodyHeight" /> - <version value="0.1.1" /> + <version value="0.2.0" /> <name value="UKCoreObservationVitalSignsBodyHeight" /> <title value="UK Core Observation Vital Signs Body Height" /> <status value="draft" /> - <date value="2025-11-06" /> + <date value="2026-04-07" /> <publisher value="HL7 UK" /> <contact> <name value="HL7 UK" /> @@ -24,14 +24,15 @@ <kind value="resource" /> <abstract value="false" /> <type value="Observation" /> - <baseDefinition value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Observation-VitalSigns" /> + <baseDefinition value="http://hl7.org/fhir/StructureDefinition/bodyheight" /> <derivation value="constraint" /> <differential> - <element id="Observation.code"> - <path value="Observation.code" /> + <element id="Observation.code.coding:BodyHeightSnomedCT"> + <path value="Observation.code.coding" /> + <sliceName value="BodyHeightSnomedCT" /> <binding> <strength value="preferred" /> - <valueSet value="https://fhir.hl7.org.uk/ValueSet/UKCore-BodyHeightMeasurements" /> + <description value="https://fhir.hl7.org.uk/ValueSet/UKCore-BodyHeightMeasurements" /> </binding> </element> <element id="Observation.value[x]"> @@ -40,11 +41,14 @@ <type> <code value="Quantity" /> </type> - <binding> - <strength value="required" /> - <description value="Include codes from http://unitsofmeasure.org where canonical = m" /> - <valueSet value="http://hl7.org/fhir/ValueSet/all-distance-units" /> - </binding> + </element> + <element id="Observation.value[x]:valueQuantity"> + <path value="Observation.value[x]" /> + <sliceName value="valueQuantity" /> + </element> + <element id="Observation.value[x]:valueQuantity.code"> + <path value="Observation.value[x].code" /> + <fixedCode value="cm" /> </element> </differential> </StructureDefinition> \ No newline at end of file diff --git a/structuredefinitions/UKCore-Observation-VitalSigns-BodyTemperature.xml b/structuredefinitions/UKCore-Observation-VitalSigns-BodyTemperature.xml index af90bd2de..c29fc7b9b 100644 --- a/structuredefinitions/UKCore-Observation-VitalSigns-BodyTemperature.xml +++ b/structuredefinitions/UKCore-Observation-VitalSigns-BodyTemperature.xml @@ -2,11 +2,11 @@ <StructureDefinition xmlns="http://hl7.org/fhir"> <id value="UKCore-Observation-VitalSigns-BodyTemperature" /> <url value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Observation-VitalSigns-BodyTemperature" /> - <version value="0.1.1" /> + <version value="0.2.0" /> <name value="UKCoreObservationVitalSignsBodyTemperature" /> <title value="UK Core Observation Vital Signs Body Temperature" /> <status value="draft" /> - <date value="2025-11-06" /> + <date value="2026-04-07" /> <publisher value="HL7 UK" /> <contact> <name value="HL7 UK" /> @@ -24,16 +24,21 @@ <kind value="resource" /> <abstract value="false" /> <type value="Observation" /> - <baseDefinition value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Observation-VitalSigns" /> + <baseDefinition value="http://hl7.org/fhir/StructureDefinition/bodytemp" /> <derivation value="constraint" /> <differential> - <element id="Observation.code"> - <path value="Observation.code" /> + <element id="Observation.code.coding:BodyTempCodeSnomedCT"> + <path value="Observation.code.coding" /> + <sliceName value="BodyTempCodeSnomedCT" /> <binding> <strength value="preferred" /> <valueSet value="https://fhir.hl7.org.uk/ValueSet/UKCore-BodyTemperature" /> </binding> </element> + <element id="Observation.code.coding:BodyTempCodeSnomedCT.system"> + <path value="Observation.code.coding.system" /> + <fixedUri value="http://snomed.info/sct" /> + </element> <element id="Observation.value[x]"> <path value="Observation.value[x]" /> <min value="1" /> @@ -41,16 +46,15 @@ <code value="Quantity" /> </type> </element> - <element id="Observation.value[x].unit"> + <element id="Observation.value[x]:valueQuantity"> + <path value="Observation.value[x]" /> + <sliceName value="valueQuantity" /> + </element> + <element id="Observation.value[x]:valueQuantity.unit"> <path value="Observation.value[x].unit" /> - <min value="1" /> <fixedString value="degree Celsius" /> </element> - <element id="Observation.value[x].system"> - <path value="Observation.value[x].system" /> - <fixedUri value="http://unitsofmeasure.org" /> - </element> - <element id="Observation.value[x].code"> + <element id="Observation.value[x]:valueQuantity.code"> <path value="Observation.value[x].code" /> <fixedCode value="Cel" /> </element> diff --git a/structuredefinitions/UKCore-Observation-VitalSigns-BodyWeight.xml b/structuredefinitions/UKCore-Observation-VitalSigns-BodyWeight.xml index 6c94e1eaa..c38a1210f 100644 --- a/structuredefinitions/UKCore-Observation-VitalSigns-BodyWeight.xml +++ b/structuredefinitions/UKCore-Observation-VitalSigns-BodyWeight.xml @@ -2,11 +2,11 @@ <StructureDefinition xmlns="http://hl7.org/fhir"> <id value="UKCore-Observation-VitalSigns-BodyWeight" /> <url value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Observation-VitalSigns-BodyWeight" /> - <version value="0.1.1" /> + <version value="0.2.0" /> <name value="UKCoreObservationVitalSignsBodyWeight" /> <title value="UK Core Observation Vital Signs Body Weight" /> <status value="draft" /> - <date value="2025-11-06" /> + <date value="2026-04-07" /> <publisher value="HL7 UK" /> <contact> <name value="HL7 UK" /> @@ -24,16 +24,21 @@ <kind value="resource" /> <abstract value="false" /> <type value="Observation" /> - <baseDefinition value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Observation-VitalSigns" /> + <baseDefinition value="http://hl7.org/fhir/StructureDefinition/bodyweight" /> <derivation value="constraint" /> <differential> - <element id="Observation.code"> - <path value="Observation.code" /> + <element id="Observation.code.coding:BodyWeightCodeSnomedCT"> + <path value="Observation.code.coding" /> + <sliceName value="BodyWeightCodeSnomedCT" /> <binding> <strength value="preferred" /> <valueSet value="https://fhir.hl7.org.uk/ValueSet/UKCore-BodyWeightMeasurements" /> </binding> </element> + <element id="Observation.code.coding:BodyWeightCodeSnomedCT.system"> + <path value="Observation.code.coding.system" /> + <fixedUri value="http://snomed.info/sct" /> + </element> <element id="Observation.value[x]"> <path value="Observation.value[x]" /> <min value="1" /> diff --git a/structuredefinitions/UKCore-Observation-VitalSigns-HeadCircumference.xml b/structuredefinitions/UKCore-Observation-VitalSigns-HeadCircumference.xml index 5e8c736f7..ebd03d18b 100644 --- a/structuredefinitions/UKCore-Observation-VitalSigns-HeadCircumference.xml +++ b/structuredefinitions/UKCore-Observation-VitalSigns-HeadCircumference.xml @@ -2,11 +2,11 @@ <StructureDefinition xmlns="http://hl7.org/fhir"> <id value="UKCore-Observation-VitalSigns-HeadCircumference" /> <url value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Observation-VitalSigns-HeadCircumference" /> - <version value="0.1.1" /> + <version value="0.2.0" /> <name value="UKCoreObservationVitalSignsHeadCircumference" /> <title value="UK Core Observation Vital Signs Head Circumference" /> <status value="draft" /> - <date value="2025-11-06" /> + <date value="2026-04-07" /> <publisher value="HL7 UK" /> <contact> <name value="HL7 UK" /> @@ -24,11 +24,12 @@ <kind value="resource" /> <abstract value="false" /> <type value="Observation" /> - <baseDefinition value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Observation-VitalSigns" /> + <baseDefinition value="http://hl7.org/fhir/StructureDefinition/headcircum" /> <derivation value="constraint" /> <differential> - <element id="Observation.code"> - <path value="Observation.code" /> + <element id="Observation.code.coding:HeadCircumCodeSnomedCT"> + <path value="Observation.code.coding" /> + <sliceName value="HeadCircumCodeSnomedCT" /> <binding> <strength value="preferred" /> <valueSet value="https://fhir.hl7.org.uk/ValueSet/UKCore-HeadCircumferenceMeasurements" /> @@ -41,15 +42,15 @@ <code value="Quantity" /> </type> </element> - <element id="Observation.value[x].unit"> + <element id="Observation.value[x]:valueQuantity"> + <path value="Observation.value[x]" /> + <sliceName value="valueQuantity" /> + </element> + <element id="Observation.value[x]:valueQuantity.unit"> <path value="Observation.value[x].unit" /> <fixedString value="centimeter" /> </element> - <element id="Observation.value[x].system"> - <path value="Observation.value[x].system" /> - <fixedUri value="http://unitsofmeasure.org" /> - </element> - <element id="Observation.value[x].code"> + <element id="Observation.value[x]:valueQuantity.code"> <path value="Observation.value[x].code" /> <fixedCode value="cm" /> </element> diff --git a/structuredefinitions/UKCore-Observation-VitalSigns-HeartRate.xml b/structuredefinitions/UKCore-Observation-VitalSigns-HeartRate.xml index 70d848629..ab29cc301 100644 --- a/structuredefinitions/UKCore-Observation-VitalSigns-HeartRate.xml +++ b/structuredefinitions/UKCore-Observation-VitalSigns-HeartRate.xml @@ -2,11 +2,11 @@ <StructureDefinition xmlns="http://hl7.org/fhir"> <id value="UKCore-Observation-VitalSigns-HeartRate" /> <url value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Observation-VitalSigns-HeartRate" /> - <version value="0.1.1" /> + <version value="0.2.0" /> <name value="UKCoreObservationVitalSignsHeartRate" /> <title value="UK Core Observation Vital Signs Heart Rate" /> <status value="draft" /> - <date value="2025-11-06" /> + <date value="2026-04-07" /> <publisher value="HL7 UK" /> <contact> <name value="HL7 UK" /> @@ -24,16 +24,21 @@ <kind value="resource" /> <abstract value="false" /> <type value="Observation" /> - <baseDefinition value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Observation-VitalSigns" /> + <baseDefinition value="http://hl7.org/fhir/StructureDefinition/heartrate" /> <derivation value="constraint" /> <differential> - <element id="Observation.code"> - <path value="Observation.code" /> + <element id="Observation.code.coding:HeartRateCodeSnomedCT"> + <path value="Observation.code.coding" /> + <sliceName value="HeartRateCodeSnomedCT" /> <binding> <strength value="preferred" /> <valueSet value="https://fhir.hl7.org.uk/ValueSet/UKCore-HeartRate" /> </binding> </element> + <element id="Observation.code.coding:HeartRateCodeSnomedCT.system"> + <path value="Observation.code.coding.system" /> + <fixedUri value="http://snomed.info/sct" /> + </element> <element id="Observation.value[x]"> <path value="Observation.value[x]" /> <min value="1" /> @@ -41,20 +46,13 @@ <code value="Quantity" /> </type> </element> - <element id="Observation.value[x].unit"> + <element id="Observation.value[x]:valueQuantity"> + <path value="Observation.value[x]" /> + <sliceName value="valueQuantity" /> + </element> + <element id="Observation.value[x]:valueQuantity.unit"> <path value="Observation.value[x].unit" /> - <min value="1" /> <fixedString value="per minute" /> </element> - <element id="Observation.value[x].system"> - <path value="Observation.value[x].system" /> - <min value="1" /> - <fixedUri value="http://unitsofmeasure.org" /> - </element> - <element id="Observation.value[x].code"> - <path value="Observation.value[x].code" /> - <min value="1" /> - <fixedCode value="/min" /> - </element> </differential> </StructureDefinition> \ No newline at end of file diff --git a/structuredefinitions/UKCore-Observation-VitalSigns-OxygenSaturation.xml b/structuredefinitions/UKCore-Observation-VitalSigns-OxygenSaturation.xml index 99092928e..16fe590de 100644 --- a/structuredefinitions/UKCore-Observation-VitalSigns-OxygenSaturation.xml +++ b/structuredefinitions/UKCore-Observation-VitalSigns-OxygenSaturation.xml @@ -2,11 +2,11 @@ <StructureDefinition xmlns="http://hl7.org/fhir"> <id value="UKCore-Observation-VitalSigns-OxygenSaturation" /> <url value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Observation-VitalSigns-OxygenSaturation" /> - <version value="0.1.1" /> + <version value="0.2.0" /> <name value="UKCoreObservationVitalSignsOxygenSaturation" /> <title value="UK Core Observation Vital Signs Oxygen Saturation" /> <status value="draft" /> - <date value="2025-11-06" /> + <date value="2026-04-07" /> <publisher value="HL7 UK" /> <contact> <name value="HL7 UK" /> @@ -24,16 +24,21 @@ <kind value="resource" /> <abstract value="false" /> <type value="Observation" /> - <baseDefinition value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Observation-VitalSigns" /> + <baseDefinition value="http://hl7.org/fhir/StructureDefinition/oxygensat" /> <derivation value="constraint" /> <differential> - <element id="Observation.code"> - <path value="Observation.code" /> + <element id="Observation.code.coding:OxygenSatCodeSnomedCT"> + <path value="Observation.code.coding" /> + <sliceName value="OxygenSatCodeSnomedCT" /> <binding> <strength value="preferred" /> - <valueSet value="https://fhir.hl7.org.uk/ValueSet/UKCore-OxygenSaturation" /> + <description value="https://fhir.hl7.org.uk/ValueSet/UKCore-OxygenSaturation" /> </binding> </element> + <element id="Observation.code.coding:OxygenSatCodeSnomedCT.system"> + <path value="Observation.code.coding.system" /> + <fixedUri value="http://snomed.info/sct" /> + </element> <element id="Observation.value[x]"> <path value="Observation.value[x]" /> <min value="1" /> @@ -41,24 +46,13 @@ <code value="Quantity" /> </type> </element> - <element id="Observation.value[x].value"> - <path value="Observation.value[x].value" /> - <min value="1" /> + <element id="Observation.value[x]:valueQuantity"> + <path value="Observation.value[x]" /> + <sliceName value="valueQuantity" /> </element> - <element id="Observation.value[x].unit"> + <element id="Observation.value[x]:valueQuantity.unit"> <path value="Observation.value[x].unit" /> - <min value="1" /> <fixedString value="percent" /> </element> - <element id="Observation.value[x].system"> - <path value="Observation.value[x].system" /> - <min value="1" /> - <fixedUri value="http://unitsofmeasure.org" /> - </element> - <element id="Observation.value[x].code"> - <path value="Observation.value[x].code" /> - <min value="1" /> - <fixedCode value="%" /> - </element> </differential> </StructureDefinition> \ No newline at end of file diff --git a/structuredefinitions/UKCore-Observation-VitalSigns-RespirationRate.xml b/structuredefinitions/UKCore-Observation-VitalSigns-RespirationRate.xml index a3f733d71..c5ff4fa9c 100644 --- a/structuredefinitions/UKCore-Observation-VitalSigns-RespirationRate.xml +++ b/structuredefinitions/UKCore-Observation-VitalSigns-RespirationRate.xml @@ -2,11 +2,11 @@ <StructureDefinition xmlns="http://hl7.org/fhir"> <id value="UKCore-Observation-VitalSigns-RespirationRate" /> <url value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Observation-VitalSigns-RespirationRate" /> - <version value="0.1.1" /> + <version value="0.2.0" /> <name value="UKCoreObservationVitalSignsRespirationRate" /> <title value="UK Core Observation Vital Signs Respiration Rate" /> <status value="draft" /> - <date value="2025-11-06" /> + <date value="2026-04-07" /> <publisher value="HL7 UK" /> <contact> <name value="HL7 UK" /> @@ -24,16 +24,21 @@ <kind value="resource" /> <abstract value="false" /> <type value="Observation" /> - <baseDefinition value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Observation-VitalSigns" /> + <baseDefinition value="http://hl7.org/fhir/StructureDefinition/resprate" /> <derivation value="constraint" /> <differential> - <element id="Observation.code"> - <path value="Observation.code" /> + <element id="Observation.code.coding:RespRateCodeSnomedCT"> + <path value="Observation.code.coding" /> + <sliceName value="RespRateCodeSnomedCT" /> <binding> <strength value="preferred" /> <valueSet value="https://fhir.hl7.org.uk/ValueSet/UKCore-RespirationRate" /> </binding> </element> + <element id="Observation.code.coding:RespRateCodeSnomedCT.system"> + <path value="Observation.code.coding.system" /> + <fixedUri value="http://snomed.info/sct" /> + </element> <element id="Observation.value[x]"> <path value="Observation.value[x]" /> <min value="1" /> @@ -41,24 +46,5 @@ <code value="Quantity" /> </type> </element> - <element id="Observation.value[x].value"> - <path value="Observation.value[x].value" /> - <min value="1" /> - </element> - <element id="Observation.value[x].unit"> - <path value="Observation.value[x].unit" /> - <min value="1" /> - <fixedString value="per minute" /> - </element> - <element id="Observation.value[x].system"> - <path value="Observation.value[x].system" /> - <min value="1" /> - <fixedUri value="http://unitsofmeasure.org" /> - </element> - <element id="Observation.value[x].code"> - <path value="Observation.value[x].code" /> - <min value="1" /> - <fixedCode value="/min" /> - </element> </differential> </StructureDefinition> \ No newline at end of file diff --git a/structuredefinitions/UKCore-Observation-VitalSigns.xml b/structuredefinitions/UKCore-Observation-VitalSigns.xml index f7cccabe6..f4db52fe4 100644 --- a/structuredefinitions/UKCore-Observation-VitalSigns.xml +++ b/structuredefinitions/UKCore-Observation-VitalSigns.xml @@ -1,11 +1,11 @@ <StructureDefinition xmlns="http://hl7.org/fhir"> <id value="UKCore-Observation-VitalSigns" /> <url value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Observation-VitalSigns" /> - <version value="0.1.1" /> + <version value="0.2.0" /> <name value="UKCoreObservationVitalSigns" /> <title value="UK Core Observation Vital Signs" /> <status value="draft" /> - <date value="2025-11-06" /> + <date value="2026-04-07" /> <publisher value="HL7 UK" /> <contact> <name value="HL7 UK" /> @@ -23,7 +23,7 @@ <kind value="resource" /> <abstract value="false" /> <type value="Observation" /> - <baseDefinition value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Observation" /> + <baseDefinition value="http://hl7.org/fhir/StructureDefinition/vitalsigns" /> <derivation value="constraint" /> <differential> <element id="Observation"> @@ -68,7 +68,6 @@ <element id="Observation.category"> <path value="Observation.category" /> <short value="A category of `vital-signs` SHALL be present." /> - <min value="1" /> <max value="1" /> </element> <element id="Observation.category.coding.system"> @@ -82,20 +81,36 @@ <element id="Observation.code"> <path value="Observation.code" /> <short value="The type of vital signs observation (code / type)." /> + </element> + <element id="Observation.code.coding"> + <path value="Observation.code.coding" /> + <slicing> + <discriminator> + <type value="pattern" /> + <path value="$this" /> + </discriminator> + <rules value="open" /> + </slicing> + </element> + <element id="Observation.code.coding:VSCodeSnomedCT"> + <path value="Observation.code.coding" /> + <sliceName value="VSCodeSnomedCT" /> <binding> <strength value="preferred" /> <valueSet value="https://fhir.hl7.org.uk/ValueSet/UKCore-ObservationVitalSignsType" /> </binding> </element> + <element id="Observation.code.coding:VSCodeSnomedCT.system"> + <path value="Observation.code.coding.system" /> + <fixedUri value="http://snomed.info/sct" /> + </element> <element id="Observation.subject"> <path value="Observation.subject" /> <short value="Who or what the observation relates to SHALL be present." /> - <min value="1" /> </element> <element id="Observation.effective[x]"> <path value="Observation.effective[x]" /> <short value="A clinically relevant time / time-period for observation SHALL be present." /> - <min value="1" /> </element> </differential> </StructureDefinition> \ No newline at end of file From 623a97e51c0bd33bf22dc4c3a350cdeb763d31a5 Mon Sep 17 00:00:00 2001 From: Ryan May <ryan.may2@nhs.net> Date: Tue, 7 Apr 2026 14:45:16 +0100 Subject: [PATCH 04/15] restricted valueQuantity to metric ucum codes only --- ...Core-Observation-VitalSigns-BodyWeight.xml | 11 +++++++ ...t-UKCore-BodyWeightMeasurements - Copy.xml | 32 +++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 valuesets/ValueSet-UKCore-BodyWeightMeasurements - Copy.xml diff --git a/structuredefinitions/UKCore-Observation-VitalSigns-BodyWeight.xml b/structuredefinitions/UKCore-Observation-VitalSigns-BodyWeight.xml index c38a1210f..f40e096b1 100644 --- a/structuredefinitions/UKCore-Observation-VitalSigns-BodyWeight.xml +++ b/structuredefinitions/UKCore-Observation-VitalSigns-BodyWeight.xml @@ -58,5 +58,16 @@ <path value="Observation.value[x].code" /> <fixedCode value="kg" /> </element> + <element id="Observation.value[x]:valueQuantity"> + <path value="Observation.value[x]" /> + <sliceName value="valueQuantity" /> + </element> + <element id="Observation.value[x]:valueQuantity.code"> + <path value="Observation.value[x].code" /> + <binding> + <strength value="required" /> + <valueSet value="https://fhir.hl7.org.uk/ValueSet/UKCore-BodyWeightUCUM" /> + </binding> + </element> </differential> </StructureDefinition> \ No newline at end of file diff --git a/valuesets/ValueSet-UKCore-BodyWeightMeasurements - Copy.xml b/valuesets/ValueSet-UKCore-BodyWeightMeasurements - Copy.xml new file mode 100644 index 000000000..18f8cc068 --- /dev/null +++ b/valuesets/ValueSet-UKCore-BodyWeightMeasurements - Copy.xml @@ -0,0 +1,32 @@ +<ValueSet xmlns="http://hl7.org/fhir"> + <id value="UKCore-BodyWeightMeasurements" /> + <url value="https://fhir.hl7.org.uk/ValueSet/UKCore-BodyWeightUCUM" /> + <version value="0.1.0" /> + <name value="UKCoreBodyWeightUCUM" /> + <title value="UK Core UCUM" /> + <status value="draft" /> + <date value="2026-04-07" /> + <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="UCUM metric units for recording Body Weight. This is based on https://hl7.org/fhir/R4/valueset-ucum-bodyweight.html" /> + <copyright value="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." /> + <compose> + <include> + <system value="http://unitsofmeasure.org"/> + <concept> + <code value="kg"/> + </concept> + <concept> + <code value="g"/> + </concept> + </include> + </compose> +</ValueSet> \ No newline at end of file From 479f4d3f4b5abf71c1f1e9402ca4e42e57c72e05 Mon Sep 17 00:00:00 2001 From: Ryan May <112563297+ryma2fhir@users.noreply.github.com> Date: Tue, 7 Apr 2026 14:50:01 +0100 Subject: [PATCH 05/15] GitHub Action: Find and Replace --- valuesets/ValueSet-UKCore-BodyWeightMeasurements - Copy.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/valuesets/ValueSet-UKCore-BodyWeightMeasurements - Copy.xml b/valuesets/ValueSet-UKCore-BodyWeightMeasurements - Copy.xml index 18f8cc068..4e046fc6f 100644 --- a/valuesets/ValueSet-UKCore-BodyWeightMeasurements - Copy.xml +++ b/valuesets/ValueSet-UKCore-BodyWeightMeasurements - Copy.xml @@ -20,12 +20,12 @@ <copyright value="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." /> <compose> <include> - <system value="http://unitsofmeasure.org"/> + <system value="http://unitsofmeasure.org" /> <concept> - <code value="kg"/> + <code value="kg" /> </concept> <concept> - <code value="g"/> + <code value="g" /> </concept> </include> </compose> From 452676de27af90d3279e5079611c6a58219ee840 Mon Sep 17 00:00:00 2001 From: Ryan May <ryan.may2@nhs.net> Date: Tue, 7 Apr 2026 14:55:04 +0100 Subject: [PATCH 06/15] try fix for slicing disciminator --- .../UKCore-Observation-VitalSigns-BloodPressure.xml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/structuredefinitions/UKCore-Observation-VitalSigns-BloodPressure.xml b/structuredefinitions/UKCore-Observation-VitalSigns-BloodPressure.xml index accc324a0..6e4674e3e 100644 --- a/structuredefinitions/UKCore-Observation-VitalSigns-BloodPressure.xml +++ b/structuredefinitions/UKCore-Observation-VitalSigns-BloodPressure.xml @@ -40,15 +40,18 @@ <element id="Observation.code.coding:BPCodeSnomedct"> <path value="Observation.code.coding" /> <sliceName value="BPCodeSnomedct" /> - <binding> - <strength value="preferred" /> - <valueSet value="https://fhir.hl7.org.uk/ValueSet/UKCore-BloodPressure" /> - </binding> </element> <element id="Observation.code.coding:BPCodeSnomedct.system"> <path value="Observation.code.coding.system" /> <fixedUri value="http://snomed.info/sct" /> </element> + <element id="Observation.code.coding:BPCodeSnomedct.code"> + <path value="Observation.code.coding.code" /> + <binding> + <strength value="preferred" /> + <valueSet value="https://fhir.hl7.org.uk/ValueSet/UKCore-BloodPressure" /> + </binding> + </element> <element id="Observation.method"> <path value="Observation.method" /> <binding> From 101dc0608e57c1552097ecea90ba62fc522def09 Mon Sep 17 00:00:00 2001 From: Ryan May <ryan.may2@nhs.net> Date: Tue, 7 Apr 2026 15:05:16 +0100 Subject: [PATCH 07/15] fix minor errors --- .../UKCore-Observation-VitalSigns-BloodPressure.xml | 10 ---------- ...s - Copy.xml => ValueSet-UKCore-BodyWeightUCUM.xml} | 8 ++++---- 2 files changed, 4 insertions(+), 14 deletions(-) rename valuesets/{ValueSet-UKCore-BodyWeightMeasurements - Copy.xml => ValueSet-UKCore-BodyWeightUCUM.xml} (91%) diff --git a/structuredefinitions/UKCore-Observation-VitalSigns-BloodPressure.xml b/structuredefinitions/UKCore-Observation-VitalSigns-BloodPressure.xml index 6e4674e3e..8f5617b67 100644 --- a/structuredefinitions/UKCore-Observation-VitalSigns-BloodPressure.xml +++ b/structuredefinitions/UKCore-Observation-VitalSigns-BloodPressure.xml @@ -27,16 +27,6 @@ <baseDefinition value="http://hl7.org/fhir/StructureDefinition/bp" /> <derivation value="constraint" /> <differential> - <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:BPCodeSnomedct"> <path value="Observation.code.coding" /> <sliceName value="BPCodeSnomedct" /> diff --git a/valuesets/ValueSet-UKCore-BodyWeightMeasurements - Copy.xml b/valuesets/ValueSet-UKCore-BodyWeightUCUM.xml similarity index 91% rename from valuesets/ValueSet-UKCore-BodyWeightMeasurements - Copy.xml rename to valuesets/ValueSet-UKCore-BodyWeightUCUM.xml index 4e046fc6f..dba9b37af 100644 --- a/valuesets/ValueSet-UKCore-BodyWeightMeasurements - Copy.xml +++ b/valuesets/ValueSet-UKCore-BodyWeightUCUM.xml @@ -1,5 +1,5 @@ <ValueSet xmlns="http://hl7.org/fhir"> - <id value="UKCore-BodyWeightMeasurements" /> + <id value="UKCore-BodyWeightUCUM" /> <url value="https://fhir.hl7.org.uk/ValueSet/UKCore-BodyWeightUCUM" /> <version value="0.1.0" /> <name value="UKCoreBodyWeightUCUM" /> @@ -20,12 +20,12 @@ <copyright value="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." /> <compose> <include> - <system value="http://unitsofmeasure.org" /> + <system value="http://unitsofmeasure.org"/> <concept> - <code value="kg" /> + <code value="kg"/> </concept> <concept> - <code value="g" /> + <code value="g"/> </concept> </include> </compose> From 0129d0009d103c6a4f3ed620ae14390547bd1a09 Mon Sep 17 00:00:00 2001 From: Ryan May <112563297+ryma2fhir@users.noreply.github.com> Date: Tue, 7 Apr 2026 15:05:46 +0100 Subject: [PATCH 08/15] GitHub Action: Find and Replace --- valuesets/ValueSet-UKCore-BodyWeightUCUM.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/valuesets/ValueSet-UKCore-BodyWeightUCUM.xml b/valuesets/ValueSet-UKCore-BodyWeightUCUM.xml index dba9b37af..44cced4c4 100644 --- a/valuesets/ValueSet-UKCore-BodyWeightUCUM.xml +++ b/valuesets/ValueSet-UKCore-BodyWeightUCUM.xml @@ -20,12 +20,12 @@ <copyright value="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." /> <compose> <include> - <system value="http://unitsofmeasure.org"/> + <system value="http://unitsofmeasure.org" /> <concept> - <code value="kg"/> + <code value="kg" /> </concept> <concept> - <code value="g"/> + <code value="g" /> </concept> </include> </compose> From b5b8d704fe39e5b7ebecf80d741d552328283188 Mon Sep 17 00:00:00 2001 From: Ryan May <ryan.may2@nhs.net> Date: Tue, 7 Apr 2026 15:24:16 +0100 Subject: [PATCH 09/15] fix minor errors --- ...e-Observation-VitalSigns-BloodPressure.xml | 35 +++---------------- valuesets/ValueSet-UKCore-BodyWeightUCUM.xml | 2 +- 2 files changed, 6 insertions(+), 31 deletions(-) diff --git a/structuredefinitions/UKCore-Observation-VitalSigns-BloodPressure.xml b/structuredefinitions/UKCore-Observation-VitalSigns-BloodPressure.xml index 8f5617b67..41458fc89 100644 --- a/structuredefinitions/UKCore-Observation-VitalSigns-BloodPressure.xml +++ b/structuredefinitions/UKCore-Observation-VitalSigns-BloodPressure.xml @@ -61,31 +61,10 @@ <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Device-BloodPressure" /> </type> </element> - <element id="Observation.component"> - <path value="Observation.component" /> - <slicing> - <discriminator> - <type value="pattern" /> - <path value="$this" /> - </discriminator> - <rules value="closed" /> - </slicing> - <max value="2" /> - </element> <element id="Observation.component:SystolicBP"> <path value="Observation.component" /> <sliceName value="SystolicBP" /> </element> - <element id="Observation.component:SystolicBP.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:SystolicBP.code.coding:SBPCodeSnomedCT"> <path value="Observation.component.code.coding" /> <sliceName value="SBPCodeSnomedCT" /> @@ -152,17 +131,13 @@ <code value="Quantity" /> </type> </element> - <element id="Observation.component:DiastolicBP.value[x].unit"> + <element id="Observation.component:DiastolicBP.value[x]:valueQuantity"> + <path value="Observation.component.value[x]" /> + <sliceName value="valueQuantity" /> + </element> + <element id="Observation.component:DiastolicBP.value[x]:valueQuantity.unit"> <path value="Observation.component.value[x].unit" /> <fixedString value="millimeter of mercury" /> </element> - <element id="Observation.component:DiastolicBP.value[x].system"> - <path value="Observation.component.value[x].system" /> - <fixedUri value="http://unitsofmeasure.org" /> - </element> - <element id="Observation.component:DiastolicBP.value[x].code"> - <path value="Observation.component.value[x].code" /> - <fixedCode value="mm[Hg]" /> - </element> </differential> </StructureDefinition> \ No newline at end of file diff --git a/valuesets/ValueSet-UKCore-BodyWeightUCUM.xml b/valuesets/ValueSet-UKCore-BodyWeightUCUM.xml index dba9b37af..8fa3f9e0d 100644 --- a/valuesets/ValueSet-UKCore-BodyWeightUCUM.xml +++ b/valuesets/ValueSet-UKCore-BodyWeightUCUM.xml @@ -3,7 +3,7 @@ <url value="https://fhir.hl7.org.uk/ValueSet/UKCore-BodyWeightUCUM" /> <version value="0.1.0" /> <name value="UKCoreBodyWeightUCUM" /> - <title value="UK Core UCUM" /> + <title value="UK Core Body Weight UCUM" /> <status value="draft" /> <date value="2026-04-07" /> <publisher value="HL7 UK" /> From 7d57ac0322804f38eddbba1c2b4f4217b1cafaa4 Mon Sep 17 00:00:00 2001 From: Ryan May <112563297+ryma2fhir@users.noreply.github.com> Date: Wed, 8 Apr 2026 11:40:38 +0100 Subject: [PATCH 10/15] Fix casing in BPCodeSnomedct identifier --- .../UKCore-Observation-VitalSigns-BloodPressure.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/structuredefinitions/UKCore-Observation-VitalSigns-BloodPressure.xml b/structuredefinitions/UKCore-Observation-VitalSigns-BloodPressure.xml index 41458fc89..9486a24fe 100644 --- a/structuredefinitions/UKCore-Observation-VitalSigns-BloodPressure.xml +++ b/structuredefinitions/UKCore-Observation-VitalSigns-BloodPressure.xml @@ -27,7 +27,7 @@ <baseDefinition value="http://hl7.org/fhir/StructureDefinition/bp" /> <derivation value="constraint" /> <differential> - <element id="Observation.code.coding:BPCodeSnomedct"> + <element id="Observation.code.coding:BPCodeSnomedCT"> <path value="Observation.code.coding" /> <sliceName value="BPCodeSnomedct" /> </element> @@ -140,4 +140,4 @@ <fixedString value="millimeter of mercury" /> </element> </differential> -</StructureDefinition> \ No newline at end of file +</StructureDefinition> From ab1e97006be0f8ff8d0fcedc4b0311a0edf66c59 Mon Sep 17 00:00:00 2001 From: Ryan May <ryan.may2@nhs.net> Date: Wed, 8 Apr 2026 14:31:00 +0100 Subject: [PATCH 11/15] fixed issues raised by review --- .../UKCore-Observation-VitalSigns-BMI.xml | 10 ++-- ...e-Observation-VitalSigns-BloodPressure.xml | 56 +++++++------------ ...Core-Observation-VitalSigns-BodyHeight.xml | 19 ++++--- ...Observation-VitalSigns-BodyTemperature.xml | 9 ++- ...Core-Observation-VitalSigns-BodyWeight.xml | 21 ++----- ...servation-VitalSigns-HeadCircumference.xml | 12 ++-- ...KCore-Observation-VitalSigns-HeartRate.xml | 9 ++- ...bservation-VitalSigns-OxygenSaturation.xml | 11 ++-- ...Observation-VitalSigns-RespirationRate.xml | 15 +++-- .../UKCore-Observation-VitalSigns.xml | 20 ++----- 10 files changed, 73 insertions(+), 109 deletions(-) diff --git a/structuredefinitions/UKCore-Observation-VitalSigns-BMI.xml b/structuredefinitions/UKCore-Observation-VitalSigns-BMI.xml index e7b08fcad..1543372e1 100644 --- a/structuredefinitions/UKCore-Observation-VitalSigns-BMI.xml +++ b/structuredefinitions/UKCore-Observation-VitalSigns-BMI.xml @@ -37,14 +37,12 @@ </element> <element id="Observation.code.coding:BMICodeSnomedCT.system"> <path value="Observation.code.coding.system" /> - <fixedUri value="http://snomedct.info/sct" /> + <min value="1" /> + <fixedUri value="http://snomed.info/sct" /> </element> - <element id="Observation.value[x]"> - <path value="Observation.value[x]" /> + <element id="Observation.code.coding:BMICodeSnomedCT.code"> + <path value="Observation.code.coding.code" /> <min value="1" /> - <type> - <code value="Quantity" /> - </type> </element> </differential> </StructureDefinition> \ No newline at end of file diff --git a/structuredefinitions/UKCore-Observation-VitalSigns-BloodPressure.xml b/structuredefinitions/UKCore-Observation-VitalSigns-BloodPressure.xml index 9486a24fe..8ffdfcfbd 100644 --- a/structuredefinitions/UKCore-Observation-VitalSigns-BloodPressure.xml +++ b/structuredefinitions/UKCore-Observation-VitalSigns-BloodPressure.xml @@ -29,13 +29,13 @@ <differential> <element id="Observation.code.coding:BPCodeSnomedCT"> <path value="Observation.code.coding" /> - <sliceName value="BPCodeSnomedct" /> + <sliceName value="BPCodeSnomedCT" /> </element> - <element id="Observation.code.coding:BPCodeSnomedct.system"> + <element id="Observation.code.coding:BPCodeSnomedCT.system"> <path value="Observation.code.coding.system" /> <fixedUri value="http://snomed.info/sct" /> </element> - <element id="Observation.code.coding:BPCodeSnomedct.code"> + <element id="Observation.code.coding:BPCodeSnomedCT.code"> <path value="Observation.code.coding.code" /> <binding> <strength value="preferred" /> @@ -75,69 +75,51 @@ </element> <element id="Observation.component:SystolicBP.code.coding:SBPCodeSnomedCT.system"> <path value="Observation.component.code.coding.system" /> + <min value="1" /> <fixedUri value="http://snomed.info/sct" /> </element> - <element id="Observation.component:SystolicBP.value[x]"> + <element id="Observation.component:SystolicBP.code.coding:SBPCodeSnomedCT.code"> + <path value="Observation.component.code.coding.code" /> + <min value="1" /> + </element> + <element id="Observation.component:SystolicBP.value[x]:valueQuantity"> <path value="Observation.component.value[x]" /> + <sliceName value="valueQuantity" /> <min value="1" /> - <type> - <code value="Quantity" /> - </type> </element> - <element id="Observation.component:SystolicBP.value[x].unit"> + <element id="Observation.component:SystolicBP.value[x]:valueQuantity.unit"> <path value="Observation.component.value[x].unit" /> <fixedString value="millimeter of mercury" /> </element> - <element id="Observation.component:SystolicBP.value[x].system"> - <path value="Observation.component.value[x].system" /> - <fixedUri value="http://unitsofmeasure.org" /> - </element> - <element id="Observation.component:SystolicBP.value[x].code"> - <path value="Observation.component.value[x].code" /> - <fixedCode value="mm[Hg]" /> - </element> <element id="Observation.component:DiastolicBP"> <path value="Observation.component" /> <sliceName value="DiastolicBP" /> </element> - <element id="Observation.component:DiastolicBP.code.coding:diastolicbp-code-loinc"> + <element id="Observation.component:DiastolicBP.code.coding:DBPCodeSnomedCT"> <path value="Observation.component.code.coding" /> - <sliceName value="diastolicbp-code-loinc" /> - </element> - <element id="Observation.component:DiastolicBP.code.coding:diastolicbp-code-loinc.system"> - <path value="Observation.component.code.coding.system" /> - <fixedUri value="http://loinc.org" /> - </element> - <element id="Observation.component:DiastolicBP.code.coding:diastolicbp-code-loinc.code"> - <path value="Observation.component.code.coding.code" /> - <fixedCode value="8462-4" /> - </element> - <element id="Observation.component:DiastolicBP.code.coding:diastolic-code-snomedct"> - <path value="Observation.component.code.coding" /> - <sliceName value="diastolic-code-snomedct" /> + <sliceName value="DBPCodeSnomedCT" /> <binding> <strength value="preferred" /> <valueSet value="https://fhir.hl7.org.uk/ValueSet/UKCore-BloodPressure-Diastolic" /> </binding> </element> - <element id="Observation.component:DiastolicBP.code.coding:diastolic-code-snomedct.system"> + <element id="Observation.component:DiastolicBP.code.coding:DBPCodeSnomedCT.system"> <path value="Observation.component.code.coding.system" /> + <min value="1" /> <fixedUri value="http://snomed.info/sct" /> </element> - <element id="Observation.component:DiastolicBP.value[x]"> - <path value="Observation.component.value[x]" /> + <element id="Observation.component:DiastolicBP.code.coding:DBPCodeSnomedCT.code"> + <path value="Observation.component.code.coding.code" /> <min value="1" /> - <type> - <code value="Quantity" /> - </type> </element> <element id="Observation.component:DiastolicBP.value[x]:valueQuantity"> <path value="Observation.component.value[x]" /> <sliceName value="valueQuantity" /> + <min value="1" /> </element> <element id="Observation.component:DiastolicBP.value[x]:valueQuantity.unit"> <path value="Observation.component.value[x].unit" /> <fixedString value="millimeter of mercury" /> </element> </differential> -</StructureDefinition> +</StructureDefinition> \ No newline at end of file diff --git a/structuredefinitions/UKCore-Observation-VitalSigns-BodyHeight.xml b/structuredefinitions/UKCore-Observation-VitalSigns-BodyHeight.xml index a1fc0f55d..28f6f451b 100644 --- a/structuredefinitions/UKCore-Observation-VitalSigns-BodyHeight.xml +++ b/structuredefinitions/UKCore-Observation-VitalSigns-BodyHeight.xml @@ -27,24 +27,27 @@ <baseDefinition value="http://hl7.org/fhir/StructureDefinition/bodyheight" /> <derivation value="constraint" /> <differential> - <element id="Observation.code.coding:BodyHeightSnomedCT"> + <element id="Observation.code.coding:BodyHeightCodeSnomedCT"> <path value="Observation.code.coding" /> - <sliceName value="BodyHeightSnomedCT" /> + <sliceName value="BodyHeightCodeSnomedCT" /> <binding> <strength value="preferred" /> - <description value="https://fhir.hl7.org.uk/ValueSet/UKCore-BodyHeightMeasurements" /> + <valueSet value="https://fhir.hl7.org.uk/ValueSet/UKCore-BodyHeightMeasurements" /> </binding> </element> - <element id="Observation.value[x]"> - <path value="Observation.value[x]" /> + <element id="Observation.code.coding:BodyHeightCodeSnomedCT.system"> + <path value="Observation.code.coding.system" /> + <min value="1" /> + <fixedUri value="http://snomed.info/sct" /> + </element> + <element id="Observation.code.coding:BodyHeightCodeSnomedCT.code"> + <path value="Observation.code.coding.code" /> <min value="1" /> - <type> - <code value="Quantity" /> - </type> </element> <element id="Observation.value[x]:valueQuantity"> <path value="Observation.value[x]" /> <sliceName value="valueQuantity" /> + <min value="1" /> </element> <element id="Observation.value[x]:valueQuantity.code"> <path value="Observation.value[x].code" /> diff --git a/structuredefinitions/UKCore-Observation-VitalSigns-BodyTemperature.xml b/structuredefinitions/UKCore-Observation-VitalSigns-BodyTemperature.xml index c29fc7b9b..7ab8fb03a 100644 --- a/structuredefinitions/UKCore-Observation-VitalSigns-BodyTemperature.xml +++ b/structuredefinitions/UKCore-Observation-VitalSigns-BodyTemperature.xml @@ -37,18 +37,17 @@ </element> <element id="Observation.code.coding:BodyTempCodeSnomedCT.system"> <path value="Observation.code.coding.system" /> + <min value="1" /> <fixedUri value="http://snomed.info/sct" /> </element> - <element id="Observation.value[x]"> - <path value="Observation.value[x]" /> + <element id="Observation.code.coding:BodyTempCodeSnomedCT.code"> + <path value="Observation.code.coding.code" /> <min value="1" /> - <type> - <code value="Quantity" /> - </type> </element> <element id="Observation.value[x]:valueQuantity"> <path value="Observation.value[x]" /> <sliceName value="valueQuantity" /> + <min value="1" /> </element> <element id="Observation.value[x]:valueQuantity.unit"> <path value="Observation.value[x].unit" /> diff --git a/structuredefinitions/UKCore-Observation-VitalSigns-BodyWeight.xml b/structuredefinitions/UKCore-Observation-VitalSigns-BodyWeight.xml index f40e096b1..b8b952e33 100644 --- a/structuredefinitions/UKCore-Observation-VitalSigns-BodyWeight.xml +++ b/structuredefinitions/UKCore-Observation-VitalSigns-BodyWeight.xml @@ -37,30 +37,17 @@ </element> <element id="Observation.code.coding:BodyWeightCodeSnomedCT.system"> <path value="Observation.code.coding.system" /> + <min value="1" /> <fixedUri value="http://snomed.info/sct" /> </element> - <element id="Observation.value[x]"> - <path value="Observation.value[x]" /> + <element id="Observation.code.coding:BodyWeightCodeSnomedCT.code"> + <path value="Observation.code.coding.code" /> <min value="1" /> - <type> - <code value="Quantity" /> - </type> - </element> - <element id="Observation.value[x].unit"> - <path value="Observation.value[x].unit" /> - <fixedString value="kilogram" /> - </element> - <element id="Observation.value[x].system"> - <path value="Observation.value[x].system" /> - <fixedUri value="http://unitsofmeasure.org" /> - </element> - <element id="Observation.value[x].code"> - <path value="Observation.value[x].code" /> - <fixedCode value="kg" /> </element> <element id="Observation.value[x]:valueQuantity"> <path value="Observation.value[x]" /> <sliceName value="valueQuantity" /> + <min value="1" /> </element> <element id="Observation.value[x]:valueQuantity.code"> <path value="Observation.value[x].code" /> diff --git a/structuredefinitions/UKCore-Observation-VitalSigns-HeadCircumference.xml b/structuredefinitions/UKCore-Observation-VitalSigns-HeadCircumference.xml index ebd03d18b..784bdfa7a 100644 --- a/structuredefinitions/UKCore-Observation-VitalSigns-HeadCircumference.xml +++ b/structuredefinitions/UKCore-Observation-VitalSigns-HeadCircumference.xml @@ -35,16 +35,18 @@ <valueSet value="https://fhir.hl7.org.uk/ValueSet/UKCore-HeadCircumferenceMeasurements" /> </binding> </element> - <element id="Observation.value[x]"> - <path value="Observation.value[x]" /> + <element id="Observation.code.coding:HeadCircumCodeSnomedCT.system"> + <path value="Observation.code.coding.system" /> + <min value="1" /> + </element> + <element id="Observation.code.coding:HeadCircumCodeSnomedCT.code"> + <path value="Observation.code.coding.code" /> <min value="1" /> - <type> - <code value="Quantity" /> - </type> </element> <element id="Observation.value[x]:valueQuantity"> <path value="Observation.value[x]" /> <sliceName value="valueQuantity" /> + <min value="1" /> </element> <element id="Observation.value[x]:valueQuantity.unit"> <path value="Observation.value[x].unit" /> diff --git a/structuredefinitions/UKCore-Observation-VitalSigns-HeartRate.xml b/structuredefinitions/UKCore-Observation-VitalSigns-HeartRate.xml index ab29cc301..55dbeffdb 100644 --- a/structuredefinitions/UKCore-Observation-VitalSigns-HeartRate.xml +++ b/structuredefinitions/UKCore-Observation-VitalSigns-HeartRate.xml @@ -37,18 +37,17 @@ </element> <element id="Observation.code.coding:HeartRateCodeSnomedCT.system"> <path value="Observation.code.coding.system" /> + <min value="1" /> <fixedUri value="http://snomed.info/sct" /> </element> - <element id="Observation.value[x]"> - <path value="Observation.value[x]" /> + <element id="Observation.code.coding:HeartRateCodeSnomedCT.code"> + <path value="Observation.code.coding.code" /> <min value="1" /> - <type> - <code value="Quantity" /> - </type> </element> <element id="Observation.value[x]:valueQuantity"> <path value="Observation.value[x]" /> <sliceName value="valueQuantity" /> + <min value="1" /> </element> <element id="Observation.value[x]:valueQuantity.unit"> <path value="Observation.value[x].unit" /> diff --git a/structuredefinitions/UKCore-Observation-VitalSigns-OxygenSaturation.xml b/structuredefinitions/UKCore-Observation-VitalSigns-OxygenSaturation.xml index 16fe590de..22ca82cfb 100644 --- a/structuredefinitions/UKCore-Observation-VitalSigns-OxygenSaturation.xml +++ b/structuredefinitions/UKCore-Observation-VitalSigns-OxygenSaturation.xml @@ -32,23 +32,22 @@ <sliceName value="OxygenSatCodeSnomedCT" /> <binding> <strength value="preferred" /> - <description value="https://fhir.hl7.org.uk/ValueSet/UKCore-OxygenSaturation" /> + <valueSet value="https://fhir.hl7.org.uk/ValueSet/UKCore-OxygenSaturation" /> </binding> </element> <element id="Observation.code.coding:OxygenSatCodeSnomedCT.system"> <path value="Observation.code.coding.system" /> + <min value="1" /> <fixedUri value="http://snomed.info/sct" /> </element> - <element id="Observation.value[x]"> - <path value="Observation.value[x]" /> + <element id="Observation.code.coding:OxygenSatCodeSnomedCT.code"> + <path value="Observation.code.coding.code" /> <min value="1" /> - <type> - <code value="Quantity" /> - </type> </element> <element id="Observation.value[x]:valueQuantity"> <path value="Observation.value[x]" /> <sliceName value="valueQuantity" /> + <min value="1" /> </element> <element id="Observation.value[x]:valueQuantity.unit"> <path value="Observation.value[x].unit" /> diff --git a/structuredefinitions/UKCore-Observation-VitalSigns-RespirationRate.xml b/structuredefinitions/UKCore-Observation-VitalSigns-RespirationRate.xml index c5ff4fa9c..90a51df2e 100644 --- a/structuredefinitions/UKCore-Observation-VitalSigns-RespirationRate.xml +++ b/structuredefinitions/UKCore-Observation-VitalSigns-RespirationRate.xml @@ -37,14 +37,21 @@ </element> <element id="Observation.code.coding:RespRateCodeSnomedCT.system"> <path value="Observation.code.coding.system" /> + <min value="1" /> <fixedUri value="http://snomed.info/sct" /> </element> - <element id="Observation.value[x]"> + <element id="Observation.code.coding:RespRateCodeSnomedCT.code"> + <path value="Observation.code.coding.code" /> + <min value="1" /> + </element> + <element id="Observation.value[x]:valueQuantity"> <path value="Observation.value[x]" /> + <sliceName value="valueQuantity" /> <min value="1" /> - <type> - <code value="Quantity" /> - </type> + </element> + <element id="Observation.value[x]:valueQuantity.unit"> + <path value="Observation.value[x].unit" /> + <fixedString value="per minute" /> </element> </differential> </StructureDefinition> \ No newline at end of file diff --git a/structuredefinitions/UKCore-Observation-VitalSigns.xml b/structuredefinitions/UKCore-Observation-VitalSigns.xml index f4db52fe4..502f2a4a9 100644 --- a/structuredefinitions/UKCore-Observation-VitalSigns.xml +++ b/structuredefinitions/UKCore-Observation-VitalSigns.xml @@ -67,21 +67,12 @@ </element> <element id="Observation.category"> <path value="Observation.category" /> - <short value="A category of `vital-signs` SHALL be present." /> <max value="1" /> </element> <element id="Observation.category.coding.system"> <path value="Observation.category.coding.system" /> <fixedUri value="http://terminology.hl7.org/CodeSystem/observation-category" /> </element> - <element id="Observation.category.coding.code"> - <path value="Observation.category.coding.code" /> - <fixedCode value="vital-signs" /> - </element> - <element id="Observation.code"> - <path value="Observation.code" /> - <short value="The type of vital signs observation (code / type)." /> - </element> <element id="Observation.code.coding"> <path value="Observation.code.coding" /> <slicing> @@ -102,15 +93,12 @@ </element> <element id="Observation.code.coding:VSCodeSnomedCT.system"> <path value="Observation.code.coding.system" /> + <min value="1" /> <fixedUri value="http://snomed.info/sct" /> </element> - <element id="Observation.subject"> - <path value="Observation.subject" /> - <short value="Who or what the observation relates to SHALL be present." /> - </element> - <element id="Observation.effective[x]"> - <path value="Observation.effective[x]" /> - <short value="A clinically relevant time / time-period for observation SHALL be present." /> + <element id="Observation.code.coding:VSCodeSnomedCT.code"> + <path value="Observation.code.coding.code" /> + <min value="1" /> </element> </differential> </StructureDefinition> \ No newline at end of file From bb1e8511003b9e1d0d94af6c387869330f871e7b Mon Sep 17 00:00:00 2001 From: Ryan May <ryan.may2@nhs.net> Date: Wed, 8 Apr 2026 15:23:57 +0100 Subject: [PATCH 12/15] fix validation errors --- .../UKCore-Observation-VitalSigns-BloodPressure.xml | 13 ++++++++++++- .../UKCore-Observation-VitalSigns.xml | 4 ++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/structuredefinitions/UKCore-Observation-VitalSigns-BloodPressure.xml b/structuredefinitions/UKCore-Observation-VitalSigns-BloodPressure.xml index 8ffdfcfbd..aa8c2fe7d 100644 --- a/structuredefinitions/UKCore-Observation-VitalSigns-BloodPressure.xml +++ b/structuredefinitions/UKCore-Observation-VitalSigns-BloodPressure.xml @@ -82,6 +82,12 @@ <path value="Observation.component.code.coding.code" /> <min value="1" /> </element> + <element id="Observation.component:SystolicBP.value[x]"> + <path value="Observation.component.value[x]" /> + <type> + <code value="Quantity" /> + </type> + </element> <element id="Observation.component:SystolicBP.value[x]:valueQuantity"> <path value="Observation.component.value[x]" /> <sliceName value="valueQuantity" /> @@ -112,10 +118,15 @@ <path value="Observation.component.code.coding.code" /> <min value="1" /> </element> + <element id="Observation.component:DiastolicBP.value[x]"> + <path value="Observation.component.value[x]" /> + <type> + <code value="Quantity" /> + </type> + </element> <element id="Observation.component:DiastolicBP.value[x]:valueQuantity"> <path value="Observation.component.value[x]" /> <sliceName value="valueQuantity" /> - <min value="1" /> </element> <element id="Observation.component:DiastolicBP.value[x]:valueQuantity.unit"> <path value="Observation.component.value[x].unit" /> diff --git a/structuredefinitions/UKCore-Observation-VitalSigns.xml b/structuredefinitions/UKCore-Observation-VitalSigns.xml index 502f2a4a9..68223a769 100644 --- a/structuredefinitions/UKCore-Observation-VitalSigns.xml +++ b/structuredefinitions/UKCore-Observation-VitalSigns.xml @@ -77,8 +77,8 @@ <path value="Observation.code.coding" /> <slicing> <discriminator> - <type value="pattern" /> - <path value="$this" /> + <type value="value" /> + <path value="pattern[x]" /> </discriminator> <rules value="open" /> </slicing> From 7d53fd507a0ca7d504049adb159512ae502f051f Mon Sep 17 00:00:00 2001 From: Ryan May <ryan.may2@nhs.net> Date: Wed, 8 Apr 2026 15:31:38 +0100 Subject: [PATCH 13/15] added short value to see if validation issue is fixed --- structuredefinitions/UKCore-Observation-VitalSigns.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/structuredefinitions/UKCore-Observation-VitalSigns.xml b/structuredefinitions/UKCore-Observation-VitalSigns.xml index 68223a769..e162b3419 100644 --- a/structuredefinitions/UKCore-Observation-VitalSigns.xml +++ b/structuredefinitions/UKCore-Observation-VitalSigns.xml @@ -82,6 +82,7 @@ </discriminator> <rules value="open" /> </slicing> + <short value="Code defined by a terminology system." /> </element> <element id="Observation.code.coding:VSCodeSnomedCT"> <path value="Observation.code.coding" /> From a78b0da41a8bc35b22fc0f215eb8f9ed2c406a49 Mon Sep 17 00:00:00 2001 From: Ryan May <ryan.may2@nhs.net> Date: Wed, 8 Apr 2026 15:40:37 +0100 Subject: [PATCH 14/15] readded slice --- structuredefinitions/UKCore-Observation-VitalSigns.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/structuredefinitions/UKCore-Observation-VitalSigns.xml b/structuredefinitions/UKCore-Observation-VitalSigns.xml index e162b3419..68223a769 100644 --- a/structuredefinitions/UKCore-Observation-VitalSigns.xml +++ b/structuredefinitions/UKCore-Observation-VitalSigns.xml @@ -82,7 +82,6 @@ </discriminator> <rules value="open" /> </slicing> - <short value="Code defined by a terminology system." /> </element> <element id="Observation.code.coding:VSCodeSnomedCT"> <path value="Observation.code.coding" /> From 41cea0daa319a35267bc78b2a134bdaed78a03bf Mon Sep 17 00:00:00 2001 From: Ryan May <ryan.may2@nhs.net> Date: Wed, 8 Apr 2026 16:02:41 +0100 Subject: [PATCH 15/15] changed disciminator --- structuredefinitions/UKCore-Observation-VitalSigns.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/structuredefinitions/UKCore-Observation-VitalSigns.xml b/structuredefinitions/UKCore-Observation-VitalSigns.xml index 68223a769..cce7d5985 100644 --- a/structuredefinitions/UKCore-Observation-VitalSigns.xml +++ b/structuredefinitions/UKCore-Observation-VitalSigns.xml @@ -78,7 +78,7 @@ <slicing> <discriminator> <type value="value" /> - <path value="pattern[x]" /> + <path value="system" /> </discriminator> <rules value="open" /> </slicing>