MessageDefinition
prescription-order
This message definition describes the rules for a Prescription Order interactions used in a FHIR Messaging exchange.
The FHIR Message Bundle MUST contain one MessageHeader resource conforming to NHSDigital-MessageHeader.
"eventCoding": {
"system": "https://fhir.nhs.uk/CodeSystem/message-event",
"code": "prescription-order",
"display": "Prescription Order"
}
| Profile |
Min |
Max |
Notes |
NHSDigital-MedicationRequest See note below |
1 |
4 |
The following elements must be the same for each MedicationRequest in the Bundle: - extension:NHSBSAprescriptionType - status - intent - category - subject - requester - groupIdentifier - courseOfTherapyType, when the value is continuous-repeat-dispensing - dispenseRequest.validityPeriod |
| NHSDigital-CommunicationRequest |
0 |
* |
This is for legacy support of patient messages (e.g. surgery opening times and repeat medication lists) that would of been printed on the right hand side of paper prescriptions. |
| NHSDigital-Provenance |
0 |
1 |
MUST for $process-message endpoint. This holds the Advanced Electronic Signature (AES) for the prescription. |
<id value="prescription-order" />
<url value="https://fhir.nhs.uk/MessageDefinition/prescription-order" />
<system value="https://tools.ietf.org/html/rfc4122" />
<value value="c81b88dc-760e-4b1e-9cdb-c5f853630664" />
</identifier>
<name value="NHSDigitalPrescriptionOrder" />
<title value="Pharmacy/Treatment Order" />
<date value="2020-05-27" />
<base value="https://fhir.hl7.org.uk/MessageDefinition/prescription-order" />
<system value="https://fhir.nhs.uk/CodeSystem/message-event" />
<code value="prescription-order" />
<display value="Prescription Order" />
</eventCoding>
<code value="MedicationRequest" />
<profile value="https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationRequest-Message" />
</focus>
<code value="CommunicationRequest" />
<profile value="https://fhir.nhs.uk/StructureDefinition/NHSDigital-CommunicationRequest" />
</focus>
<message value="https://fhir.nhs.uk/MessageDefinition/prescription-order-update" />
</allowedResponse>
</MessageDefinition>
{
"id": "prescription-order",
"url": "https://fhir.nhs.uk/MessageDefinition/prescription-order",
{
"system": "https://tools.ietf.org/html/rfc4122",
"value": "c81b88dc-760e-4b1e-9cdb-c5f853630664"
}
],
"name": "NHSDigitalPrescriptionOrder",
"title": "Pharmacy/Treatment Order",
"base": "https://fhir.hl7.org.uk/MessageDefinition/prescription-order",
"system": "https://fhir.nhs.uk/CodeSystem/message-event",
"code": "prescription-order",
},
{
"code": "MedicationRequest",
"profile": "https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationRequest-Message",
},
{
"code": "CommunicationRequest",
"profile": "https://fhir.nhs.uk/StructureDefinition/NHSDigital-CommunicationRequest",
}
],
{
"message": "https://fhir.nhs.uk/MessageDefinition/prescription-order-update"
}
]
}
Note
The underlying conformance profile for the NHSDigital-MedicationRequest is https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationRequest-Message. This profile mandates the use of a referenced resources for subject and requester.
prescription-order-update
This message definition describes the rules for a Prescription Order Update interactions used in a FHIR Messaging exchange. It is used to cancel a single prescribed medication item.
The FHIR Message Bundle MUST contain one MessageHeader resource conforming to NHSDigital-MessageHeader.
"eventCoding": {
"system": "https://fhir.nhs.uk/CodeSystem/message-event",
"code": "prescription-order-update",
"display": "Prescription Order Update"
}
The MessageHeader.reason should be cancel.
"reason": {
"coding": [
{
"system": "https://fhir.nhs.uk/CodeSystem/message-reason-prescription",
"code": "cancel",
"display": "Cancel"
}
]
}
| Profile |
Min |
Max |
Notes |
| NHSDigital-MedicationRequest |
1 |
1 |
The NHSDigital-Provenance and NHSDigital-CommunicationRequest resources do not need to be included in the Bundle. |
<id value="prescription-order-update" />
<url value="https://fhir.nhs.uk/MessageDefinition/prescription-order-update" />
<system value="https://tools.ietf.org/html/rfc4122" />
<value value="c81b88dc-760e-4b1e-9cdb-c5f853630664" />
</identifier>
<name value="NHSDigitalPrescriptionOrderUpdate" />
<title value="Pharmacy/Treatment Order Update" />
<date value="2020-08-28" />
<description value="An update to a prescription-order message" />
<system value="https://fhir.nhs.uk/CodeSystem/message-event" />
<code value="prescription-order-update" />
<display value="Prescription Order Update" />
</eventCoding>
<code value="MedicationRequest" />
<profile value="https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationRequest" />
</focus>
<message value="https://fhir.nhs.uk/MessageDefinition/prescription-order-response" />
</allowedResponse>
</MessageDefinition>
{
"id": "prescription-order-update",
"url": "https://fhir.nhs.uk/MessageDefinition/prescription-order-update",
{
"system": "https://tools.ietf.org/html/rfc4122",
"value": "c81b88dc-760e-4b1e-9cdb-c5f853630664"
}
],
"name": "NHSDigitalPrescriptionOrderUpdate",
"title": "Pharmacy/Treatment Order Update",
"description": "An update to a prescription-order message",
"system": "https://fhir.nhs.uk/CodeSystem/message-event",
"code": "prescription-order-update",
"display": "Prescription Order Update"
},
{
"code": "MedicationRequest",
"profile": "https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationRequest",
}
],
{
"message": "https://fhir.nhs.uk/MessageDefinition/prescription-order-response"
}
]
}
prescription-order-response
This message definition describes the rules for a Prescription Order Response interactions used in a FHIR Messaging exchange. This is used as a response to the prescription-order-update message. As this relates to a single MedicationRequest, this response will only ever contain a single MedicationRequest.
The FHIR Message Bundle MUST contain one MessageHeader resource conforming to NHSDigital-MessageHeader.
"eventCoding": {
"system": "https://fhir.nhs.uk/CodeSystem/message-event",
"code": "prescription-order-response",
"display": "Prescription Order Response"
}
<id value="prescription-order-response" />
<url value="https://fhir.nhs.uk/MessageDefinition/prescription-order-response" />
<system value="https://tools.ietf.org/html/rfc4122" />
<value value="c81b88dc-760e-4b1e-9cdb-c5f853630664" />
</identifier>
<name value="NHSDigitalPrescriptionOrderResponse" />
<title value="Pharmacy/Treatment Order Response" />
<date value="2025-10-14" />
<description value="response to a prescription-order-update message" />
<system value="https://fhir.nhs.uk/CodeSystem/message-event" />
<code value="prescription-order-response" />
<display value="Prescription Order Response" />
</eventCoding>
<code value="MedicationRequest" />
<profile value="https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationRequest" />
</focus>
</MessageDefinition>
{
"id": "prescription-order-response",
"url": "https://fhir.nhs.uk/MessageDefinition/prescription-order-response",
{
"system": "https://tools.ietf.org/html/rfc4122",
"value": "c81b88dc-760e-4b1e-9cdb-c5f853630664"
}
],
"name": "NHSDigitalPrescriptionOrderResponse",
"title": "Pharmacy/Treatment Order Response",
"description": "response to a prescription-order-update message",
"system": "https://fhir.nhs.uk/CodeSystem/message-event",
"code": "prescription-order-response",
"display": "Prescription Order Response"
},
{
"code": "MedicationRequest",
"profile": "https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationRequest",
}
]
}
dispense-notification
This message definition describes the rules for a Dispense Notification interactions used in a FHIR Messaging exchange.
The FHIR Message Bundle MUST contain one MessageHeader resource conforming to NHSDigital-MessageHeader.
"eventCoding": {
"system": "https://fhir.nhs.uk/CodeSystem/message-event",
"code": "dispense-notification",
"display": "Dispense Notification"
}
Mandatory UUID from the prescription release response Parameters.id that contained the prescription being dispensed.
"response": {
"identifier": "a5d77265-8ba5-4c74-b8ce-ea0dbaafbdb8",
"code": "ok"
}
| Profile |
Min |
Max |
Notes |
NHSDigital-MedicationDispense See note below |
1 |
* |
Multiple instances of this resource are used when more than one product have been dispensed for the single prescribed medication. For example different brands (AMP/AMPP) of the same generic drug (VMP). |
<id value="bf729ea8-280b-4109-b2f5-02ce8e51d870" />
<url value="https://fhir.nhs.uk/MessageDefinition/dispense-notification" />
<system value="https://tools.ietf.org/html/rfc4122" />
<value value="bf729ea8-280b-4109-b2f5-02ce8e51d870" />
</identifier>
<name value="NHSDigitalDispenseNotification" />
<title value="Pharmacy/Treatment Dispense" />
<date value="2020-10-02" />
<description value="Notification of dispensed medication" />
<system value="https://fhir.nhs.uk/CodeSystem/message-event" />
<code value="dispense-notification" />
<display value="Dispense Notification" />
</eventCoding>
<code value="MedicationDispense" />
<profile value="https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationDispense-Message" />
</focus>
</MessageDefinition>
{
"id": "bf729ea8-280b-4109-b2f5-02ce8e51d870",
"url": "https://fhir.nhs.uk/MessageDefinition/dispense-notification",
{
"system": "https://tools.ietf.org/html/rfc4122",
"value": "bf729ea8-280b-4109-b2f5-02ce8e51d870"
}
],
"name": "NHSDigitalDispenseNotification",
"title": "Pharmacy/Treatment Dispense",
"system": "https://fhir.nhs.uk/CodeSystem/message-event",
"code": "dispense-notification",
},
{
"code": "MedicationDispense",
"profile": "https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationDispense-Message",
}
]
}
Note
The underlying conformance profile for the NHSDigital-MedicationDispense is https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationDispense-Message. This profile mandates the use of a contained resource for authorizingPrescription.