Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions MedicationRequest/MedicationRequest-WithoutGroupID-Example.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<MedicationRequest xmlns="http://hl7.org/fhir">
<id value="MedicationRequest-WithoutGroupID-Example" />
<extension url="https://fhir.nhs.uk/StructureDefinition/Extension-PendingCancellation">
<valueBoolean value="false" />
</extension>
<extension
url="https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-MedicationRepeatInformation">
<extension url="numberOfPrescriptionsIssued">
<valueUnsignedInt value="3" />
</extension>
<extension url="authorisationExpiryDate">
<valueDateTime value="2026-12-31" />
</extension>
</extension>
<extension url="https://fhir.nhs.uk/StructureDefinition/Extension-EPS-DispensingInformation">
<extension url="dispenseStatus">
<valueCoding>
<system value="https://fhir.nhs.uk/CodeSystem/medicationdispense-type" />
<code value="0008" />
<display value="Item with dispenser" />
</valueCoding>
</extension>
</extension>
<identifier>
<system value="https://fhir.nhs.uk/Id/prescription-order-item-number" />
<value value="a54219b8-f741-4c47-b662-e4f8dfa49ab6" />
</identifier>
<status value="active" />
<intent value="reflex-order" />
<medicationCodeableConcept>
<coding>
<system value="http://snomed.info/sct" />
<code value="39720311000001101" />
<display value="Paracetamol 500mg soluble tablets" />
</coding>
</medicationCodeableConcept>
<subject>
<reference value="Patient/Patient-StaceyTwitchett-Example" />
<identifier>
<system value="https://fhir.nhs.uk/Id/nhs-number" />
<value value="5839945242" />
</identifier>
</subject>
<courseOfTherapyType>
<coding>
<system value="https://fhir.nhs.uk/CodeSystem/medicationrequest-course-of-therapy" />
<code value="continuous-repeat-dispensing" />
<display value="Continuous long term (repeat dispensing)" />
</coding>
</courseOfTherapyType>
<dosageInstruction>
<text value="Take two tablets three times a day." />
</dosageInstruction>
<dispenseRequest>
<extension url="https://fhir.nhs.uk/StructureDefinition/Extension-DM-PerformerSiteType">
<valueCoding>
<system value="https://fhir.nhs.uk/CodeSystem/dispensing-site-preference" />
<code value="P1" />
</valueCoding>
</extension>
<quantity>
<value value="30" />
<unit value="dose" />
<system value="http://snomed.info/sct" />
<code value="3317411000001100" />
</quantity>
</dispenseRequest>
<substitution>
<allowedBoolean value="false" />
</substitution>
</MedicationRequest>
11 changes: 2 additions & 9 deletions StructureDefinition/NHSDigital-MedicationRequest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="NHSDigital-MedicationRequest" />
<url value="https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationRequest" />
<version value="1.1.2" />
<version value="1.2.0" />
<name value="NHSDigitalMedicationRequest" />
<title value="NHS Digital MedicationRequest" />
<status value="draft" />
<date value="2025-12-15T00:00:00+00:00" />
<date value="2026-04-07T00:00:00+00:00" />
<publisher value="NHS England" />
<contact>
<name value="NHS England" />
Expand Down Expand Up @@ -59,12 +59,6 @@
<human value="dispenseRequest.numberOfRepeatsAllowed should be populated for continuous-repeat-dispensing MedicationRequests." />
<expression value="(courseOfTherapyType.coding.code.startsWith('acute') or courseOfTherapyType.coding.code = 'continuous') or (courseOfTherapyType.coding.code.startsWith('continuous-repeat-dispensing') and dispenseRequest.exists() and dispenseRequest.numberOfRepeatsAllowed.exists())" />
</constraint>
<constraint>
<key value="eps-10" />
<severity value="error" />
<human value="For continuous-repeat-dispensing (intent=reflex-order) basedOn must be populated" />
<expression value="(courseOfTherapyType.coding.code = 'acute') or (courseOfTherapyType.coding.code = 'continuous') or (courseOfTherapyType.coding.code = 'continuous-repeat-dispensing' and intent !='reflex-order') or (courseOfTherapyType.coding.code = 'continuous-repeat-dispensing' and intent ='reflex-order' and dispenseRequest.exists() and basedOn.exists())" />
</constraint>
<constraint>
<key value="eps-11" />
<severity value="error" />
Expand Down Expand Up @@ -383,7 +377,6 @@
<short value="groupIdentifier (Short Form Prescription ID)" />
<definition value="The purpose of the Short Form Prescription ID is to identify the prescription during its lifecycle within the Spine (i.e. prescribe, dispense &amp; claim). The prescription UUID is retained to provide the link through to the Spine medication record within the PSIS and must be included as the first identifier within the prescription message.&#xD;&#xA;The format of the Short Form Prescription ID is as follows;&#xD;&#xA;&#xD;&#xA;`&lt;RandomNumber&gt;-&lt;PracticeODSCode/ClinicODSCode&gt;-&lt;PracticeSequence/ClinicSequence&gt;&lt;CheckDigit&gt;`&#xD;&#xA;&#xD;&#xA;Where;&#xD;&#xA;&#xD;&#xA;`&lt;RandomNumber&gt;` is a locally generated random number each time a Prescription ID is generated of length 6 hexadecimal characters.&#xD;&#xA;&#xD;&#xA;`&lt;PracticeODSCode/ClinicODSCode&gt;` is the unique ODS code for the practice or clinic code (aka cost centre) as defined within the Spine SDS of length 6 characters. Where the prescriber ODS code is shorter than 6 characters it must be zero-padded up to six characters from the start of the ODS code, e.g. “0A1B2C”.&#xD;&#xA;&#xD;&#xA;`&lt;PracticeSequence/ClinicSequence&gt;` is an incremental sequence number starting from 00000 that is reset after FFFFF back to zero of length 5 hexadecimal characters. For systems that support multiple practices or clinics, a sequence number per practice/clinic is required. This is to ensure uniqueness of prescriptions within the Spine EPS component during the prescription lifecycle.&#xD;&#xA;&#xD;&#xA;`&lt;CheckDigit&gt;` is calculated on the entire ID using the ISO/IEC 7064:2003 MOD 37-2 standard. The check digit algorithm is identical to that using for EPS Release 1.&#xD;&#xA;&#xD;&#xA;Note. Hyphens are always included to separate the ID into 3 blocks of 6 characters.&#xD;&#xA;&#xD;&#xA;Note. The implementation of the MOD 37-2 standard uses a “+” character for char 36 opposed to a “*” character.&#xD;&#xA;&#xD;&#xA;Short Form Prescription ID example (for illustration purposes only);&#xD;&#xA;&#xD;&#xA;**83C40E-A23856-00123W**&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;&quot;groupIdentifier&quot;: {&#xD;&#xA; ...&#xD;&#xA; &quot;system&quot;: &quot;https://fhir.nhs.uk/Id/prescription-order-number&quot;,&#xD;&#xA; &quot;value&quot;: &quot;DC2C66-A1B2C3-23407B&quot;&#xD;&#xA;},&#xD;&#xA;```" />
<comment value="ITK HL7v3 Mapping = The groupIdentifier is equivalent to ParentPrescription.id (prescription-order-number). The extension is used to carry the ParentPrescription.id (UUID)." />
<min value="1" />
<mustSupport value="true" />
</element>
<element id="MedicationRequest.groupIdentifier.extension">
Expand Down
2 changes: 1 addition & 1 deletion fhirpkg.lock.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"updated": "2025-07-25T17:27:50.0661131+01:00",
"updated": "2026-04-07T12:57:28.4297209+01:00",
"dependencies": {
"hl7.fhir.r4.core": "4.0.1",
"fhir.r4.ukcore.stu3.currentbuild": "0.0.3-pre-release"
Expand Down
Loading