From 42340eb604071dbfa799ee26e7bc083e5f73b440 Mon Sep 17 00:00:00 2001 From: Adam Page Date: Thu, 1 Feb 2024 14:03:31 +0000 Subject: [PATCH 1/3] draft of extensions for digimeds --- .../Extension-UKCore-CourseOfTherapyType.xml | 57 ++++++++++++++++++ .../Extension-UKCore-LocationReference.xml | 58 +++++++++++++++++++ .../UKCore-MedicationRequest.xml | 11 ++++ .../UKCore-MedicationStatement.xml | 9 +++ 4 files changed, 135 insertions(+) create mode 100644 structuredefinitions/Extension-UKCore-CourseOfTherapyType.xml create mode 100644 structuredefinitions/Extension-UKCore-LocationReference.xml diff --git a/structuredefinitions/Extension-UKCore-CourseOfTherapyType.xml b/structuredefinitions/Extension-UKCore-CourseOfTherapyType.xml new file mode 100644 index 00000000..f42d483e --- /dev/null +++ b/structuredefinitions/Extension-UKCore-CourseOfTherapyType.xml @@ -0,0 +1,57 @@ + + + + + + + + <status value="draft"/> + <date value="2024-02-01"/> + <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="An extension to record an overall pattern of medication administration."/> + <purpose value="This extension is an Interoperable Medicines use case to record the course of therpay type - e.g. Repeat, Acute etc, at a MedicationStatement level."/> + <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."/> + <fhirVersion value="4.0.1"/> + <kind value="complex-type"/> + <abstract value="false"/> + <context> + <type value="element"/> + <expression value="MedicationStatement"/> + </context> + <type value="Extension"/> + <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> + <derivation value="constraint"/> + <differential> + <element id="Extension"> + <path value="Extension"/> + <short value="Pattern of medication administration"/> + <definition value="An extension to support communication of the pattern of medication administration at the MedicationStatement level."/> + </element> + <element id="Extension.url"> + <path value="Extension.url"/> + <fixedUri value="https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-CourseOfTherapyType"/> + </element> + <element id="Extension.value[x]"> + <path value="Extension.value[x]"/> + <short value="Medication course of therapy type"/> + <definition value="A code to represent the medication course of therapy type"/> + <min value="1"/> + <type> + <code value="CodeableConcept"/> + </type> + <binding> + <strength value="extensible"/> + <valueSet value="https://fhir.hl7.org.uk/ValueSet/UKCore-MedicationRequestCourseOfTherapy"/> + </binding> + </element> + </differential> +</StructureDefinition> diff --git a/structuredefinitions/Extension-UKCore-LocationReference.xml b/structuredefinitions/Extension-UKCore-LocationReference.xml new file mode 100644 index 00000000..291d1dff --- /dev/null +++ b/structuredefinitions/Extension-UKCore-LocationReference.xml @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="utf-8"?> +<StructureDefinition xmlns="http://hl7.org/fhir"> + <id value="Extension-UKCore-LocationReference" /> + <url value="https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-LocationReference" /> + <version value="0.0.1" /> + <name value="ExtensionUKCoreLocationReference" /> + <title value="Extension UKCore Location Reference" /> + <status value="draft" /> + <date value="2024-02-01" /> + <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="This extension is used to reference a Location." /> + <purpose value="This is a Interoperable Medicines use case to record the location a medication request should be dispensed to." /> + <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." /> + <fhirVersion value="4.0.1" /> + <mapping> + <identity value="rim" /> + <uri value="http://hl7.org/v3" /> + <name value="RIM Mapping" /> + </mapping> + <kind value="complex-type" /> + <abstract value="false" /> + <context> + <type value="element" /> + <expression value="MedicationRequest.dispenseRequest" /> + </context> + <type value="Extension" /> + <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension" /> + <derivation value="constraint" /> + <differential> + <element id="Extension"> + <path value="Extension" /> + <short value="A location reference." /> + <definition value="A location reference." /> + <max value="1" /> + </element> + <element id="Extension.url"> + <path value="Extension.url" /> + <fixedUri value="https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-LocationReference" /> + </element> + <element id="Extension.value[x]"> + <path value="Extension.value[x]" /> + <min value="1" /> + <type> + <code value="Reference" /> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/Location" /> + </type> + </element> + </differential> +</StructureDefinition> \ No newline at end of file diff --git a/structuredefinitions/UKCore-MedicationRequest.xml b/structuredefinitions/UKCore-MedicationRequest.xml index 0c5adffc..0eb1885a 100644 --- a/structuredefinitions/UKCore-MedicationRequest.xml +++ b/structuredefinitions/UKCore-MedicationRequest.xml @@ -139,6 +139,17 @@ <path value="MedicationRequest.dispenseRequest" /> <mustSupport value="true" /> </element> + <element id="MedicationRequest.dispenseRequest.extension:dispenseTo"> + <path value="MedicationRequest.dispenseRequest.extension" /> + <sliceName value="dispenseTo" /> + <short value="A Location where this request should be dispensed to." /> + <definition value="A reference to a Location where this request should be dispensed to." /> + <type> + <code value="Extension" /> + <profile value="https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-LocationReference" /> + </type> + <isModifier value="false" /> + </element> <element id="MedicationRequest.dispenseRequest.quantity"> <path value="MedicationRequest.dispenseRequest.quantity" /> <mustSupport value="true" /> diff --git a/structuredefinitions/UKCore-MedicationStatement.xml b/structuredefinitions/UKCore-MedicationStatement.xml index 6fa34562..77a6c14f 100644 --- a/structuredefinitions/UKCore-MedicationStatement.xml +++ b/structuredefinitions/UKCore-MedicationStatement.xml @@ -52,6 +52,15 @@ <profile value="https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-MedicationStatementLastIssueDate" /> </type> </element> + <element id="MedicationStatement.extension:courseOfTherapyType"> + <path value="MedicationStatement.extension" /> + <sliceName value="courseOfTherapyType" /> + <type> + <code value="Extension" /> + <profile value="https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-MedicationCourseOfTherapyType" /> + </type> + <isModifier value="false" /> + </element> <element id="MedicationStatement.identifier"> <path value="MedicationStatement.identifier" /> <mustSupport value="true" /> From 6ac26ba25faa701c97c8bf3c161b733f1f024ff7 Mon Sep 17 00:00:00 2001 From: Adam Page <adam.page2@nhs.net> Date: Thu, 1 Feb 2024 14:06:01 +0000 Subject: [PATCH 2/3] file rename to match id --- ...ype.xml => Extension-UKCore-MedicationCourseOfTherapyType.xml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename structuredefinitions/{Extension-UKCore-CourseOfTherapyType.xml => Extension-UKCore-MedicationCourseOfTherapyType.xml} (100%) diff --git a/structuredefinitions/Extension-UKCore-CourseOfTherapyType.xml b/structuredefinitions/Extension-UKCore-MedicationCourseOfTherapyType.xml similarity index 100% rename from structuredefinitions/Extension-UKCore-CourseOfTherapyType.xml rename to structuredefinitions/Extension-UKCore-MedicationCourseOfTherapyType.xml From fee81757d40b6b539ccb7157be159e3d61100176 Mon Sep 17 00:00:00 2001 From: Ryan May <112563297+ryma2fhir@users.noreply.github.com> Date: Thu, 1 Feb 2024 14:13:05 +0000 Subject: [PATCH 3/3] GitHub Action: Find and Replace --- ...n-UKCore-MedicationCourseOfTherapyType.xml | 72 +++++++++---------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/structuredefinitions/Extension-UKCore-MedicationCourseOfTherapyType.xml b/structuredefinitions/Extension-UKCore-MedicationCourseOfTherapyType.xml index f42d483e..9581b029 100644 --- a/structuredefinitions/Extension-UKCore-MedicationCourseOfTherapyType.xml +++ b/structuredefinitions/Extension-UKCore-MedicationCourseOfTherapyType.xml @@ -1,56 +1,56 @@ <?xml version="1.0" encoding="utf-8"?> <StructureDefinition xmlns="http://hl7.org/fhir"> - <id value="Extension-UKCore-MedicationCourseOfTherapyType"/> - <url value="https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-MedicationCourseOfTherapyType"/> - <version value="0.0.1"/> - <name value="ExtensionUKCoreMedicationCourseOfTherapyType"/> - <title value="Extension UK Core Medication Course Of Therapy Type"/> - <status value="draft"/> - <date value="2024-02-01"/> - <publisher value="HL7 UK"/> + <id value="Extension-UKCore-MedicationCourseOfTherapyType" /> + <url value="https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-MedicationCourseOfTherapyType" /> + <version value="0.0.1" /> + <name value="ExtensionUKCoreMedicationCourseOfTherapyType" /> + <title value="Extension UK Core Medication Course Of Therapy Type" /> + <status value="draft" /> + <date value="2024-02-01" /> + <publisher value="HL7 UK" /> <contact> - <name value="HL7 UK"/> + <name value="HL7 UK" /> <telecom> - <system value="email"/> - <value value="ukcore@hl7.org.uk"/> - <use value="work"/> - <rank value="1"/> + <system value="email" /> + <value value="ukcore@hl7.org.uk" /> + <use value="work" /> + <rank value="1" /> </telecom> </contact> - <description value="An extension to record an overall pattern of medication administration."/> - <purpose value="This extension is an Interoperable Medicines use case to record the course of therpay type - e.g. Repeat, Acute etc, at a MedicationStatement level."/> - <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."/> - <fhirVersion value="4.0.1"/> - <kind value="complex-type"/> - <abstract value="false"/> + <description value="An extension to record an overall pattern of medication administration." /> + <purpose value="This extension is an Interoperable Medicines use case to record the course of therpay type - e.g. Repeat, Acute etc, at a MedicationStatement level." /> + <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." /> + <fhirVersion value="4.0.1" /> + <kind value="complex-type" /> + <abstract value="false" /> <context> - <type value="element"/> - <expression value="MedicationStatement"/> + <type value="element" /> + <expression value="MedicationStatement" /> </context> - <type value="Extension"/> - <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/> - <derivation value="constraint"/> + <type value="Extension" /> + <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension" /> + <derivation value="constraint" /> <differential> <element id="Extension"> - <path value="Extension"/> - <short value="Pattern of medication administration"/> - <definition value="An extension to support communication of the pattern of medication administration at the MedicationStatement level."/> + <path value="Extension" /> + <short value="Pattern of medication administration" /> + <definition value="An extension to support communication of the pattern of medication administration at the MedicationStatement level." /> </element> <element id="Extension.url"> - <path value="Extension.url"/> - <fixedUri value="https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-CourseOfTherapyType"/> + <path value="Extension.url" /> + <fixedUri value="https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-CourseOfTherapyType" /> </element> <element id="Extension.value[x]"> - <path value="Extension.value[x]"/> - <short value="Medication course of therapy type"/> - <definition value="A code to represent the medication course of therapy type"/> - <min value="1"/> + <path value="Extension.value[x]" /> + <short value="Medication course of therapy type" /> + <definition value="A code to represent the medication course of therapy type" /> + <min value="1" /> <type> - <code value="CodeableConcept"/> + <code value="CodeableConcept" /> </type> <binding> - <strength value="extensible"/> - <valueSet value="https://fhir.hl7.org.uk/ValueSet/UKCore-MedicationRequestCourseOfTherapy"/> + <strength value="extensible" /> + <valueSet value="https://fhir.hl7.org.uk/ValueSet/UKCore-MedicationRequestCourseOfTherapy" /> </binding> </element> </differential>