NHS Digital FHIR Medicines

MessageDefinition

prescription-order

This message definition describes the rules for a Prescription Order interactions used in a FHIR Messaging exchange.


Event Coding

System Code
Message Events prescription-order
Category
consequence

MessageHeader

The FHIR Message Bundle MUST contain one MessageHeader resource conforming to NHSDigital-MessageHeader


Focus

Profile Min Max Notes
NHSDigital-MedicationRequest 1 4 MedicationRequest.requester MUST conform to the NHSDigital-PractitionerRoleEPSLegal profile for Prescription Order messages
NHSDigital-Patient 1 1
NHSDigital-PractitionerRole 1 * GMC Reference Number MUST NOT be used as a Practitioner identifier
NHSDigital-CommunicationRequest 0 * This is for legacy support of patient messages (e.g. surgery opening times and repeat medication lists) as would appear on printed prescriptions. It is also used in primary care to communicate repeat medication lists.
NHSDigital-Provenance 0 1 MUST for $process-message API. This holds the electronic prescription signature.
NHSDigital-Location 0 * Prescription Address
Response Required
on-error
Allowed Responses
prescription-order-update
Prescription Order Homecare Prepare homecare example (used with `prepare` endpoint to obtain digital signature
Prescription Order Homecare Repeat Medication homecare repeat medication example with digital signature
Prescription Order Homecare using Medication resource homecare example using a Medication resource instead of a CodeableConcept.
Prescription Order Outpatient Acute Medication Outpatient example with acute medication.
Prescription Order Outpatient Multiple Medications Outpatient acute four item prescription, including one Schedule 2 controlled drug
Prescription Order Outpatient Endorsement Outpatient example with endorsed acute medication.
Prescription Order Community No Nominated Pharmacy Community repeat dispensing prescription with no nominated pharmacy.
Prescription Order Community Nurse Prescriber Community acute prescription, nurse prescriber with legal authenticator.
Prescription Order GP with patient notes GP acutue prescription with patient notes and repeat medications list.
<MessageDefinition xmlns="http://hl7.org/fhir">
    <id value="prescription-order" />
    <url value="https://fhir.nhs.uk/MessageDefinition/prescription-order" />
    <identifier>
        <system value="https://tools.ietf.org/html/rfc4122" />
        <value value="c81b88dc-760e-4b1e-9cdb-c5f853630664" />
    </identifier>
    <version value="1.0.0" />
    <name value="NHSDigitalPrescriptionOrder" />
    <title value="Pharmacy/Treatment Order" />
    <status value="active" />
    <date value="2020-05-27" />
    <description value="Ordering of medications" />
    <base value="https://fhir.hl7.org.uk/MessageDefinition/prescription-order" />
    <eventCoding>
        <system value="https://fhir.nhs.uk/CodeSystem/message-event" />
        <code value="prescription-order" />
        <display value="Prescription Order" />
    </eventCoding>
    <category value="consequence" />
    <focus>
        <code value="MedicationRequest" />
        <profile value="https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationRequest-Message" />
        <min value="1" />
        <max value="4" />
    </focus>
    <focus>
        <code value="CommunicationRequest" />
        <profile value="https://fhir.nhs.uk/StructureDefinition/NHSDigital-CommunicationRequest" />
        <min value="0" />
        <max value="*" />
    </focus>
    <responseRequired value="on-error" />
    <allowedResponse>
        <message value="https://fhir.nhs.uk/MessageDefinition/prescription-order-update" />
    </allowedResponse>
</MessageDefinition>
{
    "resourceType": "MessageDefinition",
    "id": "prescription-order",
    "url": "https://fhir.nhs.uk/MessageDefinition/prescription-order",
    "identifier":  [
        {
            "system": "https://tools.ietf.org/html/rfc4122",
            "value": "c81b88dc-760e-4b1e-9cdb-c5f853630664"
        }
    ],
    "version": "1.0.0",
    "name": "NHSDigitalPrescriptionOrder",
    "title": "Pharmacy/Treatment Order",
    "status": "active",
    "date": "2020-05-27",
    "description": "Ordering of medications",
    "base": "https://fhir.hl7.org.uk/MessageDefinition/prescription-order",
    "eventCoding": {
        "system": "https://fhir.nhs.uk/CodeSystem/message-event",
        "code": "prescription-order",
        "display": "Prescription Order"
    },
    "category": "consequence",
    "focus":  [
        {
            "code": "MedicationRequest",
            "profile": "https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationRequest-Message",
            "min": 1,
            "max": "4"
        },
        {
            "code": "CommunicationRequest",
            "profile": "https://fhir.nhs.uk/StructureDefinition/NHSDigital-CommunicationRequest",
            "min": 0,
            "max": "*"
        }
    ],
    "responseRequired": "on-error",
    "allowedResponse":  [
        {
            "message": "https://fhir.nhs.uk/MessageDefinition/prescription-order-update"
        }
    ]
}

prescription-order-update

This message definition describes the rules for a Prescription Order Update interactions used in a FHIR Messaging exchange. It us used to cancel a prescription.


Event Coding

System Code
Message Events prescription-order-update
Category
consequence

Reason


Any code from Message Reason Code Prescription.


Prescription - Cancel

The MessageHeader.reason should be cancel


MessageHeader

The FHIR Message Bundle MUST contain one MessageHeader resource conforming to NHSDigital-MessageHeader


Focus

Profile Min Max
NHSDigital-MedicationRequest 1 1 MedicationRequest.requester MUST conform to the NHSDigital-PractitionerRole-SDS profile for Prescription Cancellation messages
NHSDigital-Patient 1 1
NHSDigital-PractitionerRole 1 * GMC Reference Number MUST NOT be used as a Practitioner identifier
Response Required
always
Allowed Responses
prescription-order-response
<MessageDefinition xmlns="http://hl7.org/fhir">
    <id value="prescription-order-update" />
    <url value="https://fhir.nhs.uk/MessageDefinition/prescription-order-update" />
    <identifier>
        <system value="https://tools.ietf.org/html/rfc4122" />
        <value value="c81b88dc-760e-4b1e-9cdb-c5f853630664" />
    </identifier>
    <version value="1.0.0" />
    <name value="NHSDigitalPrescriptionOrderUpdate" />
    <title value="Pharmacy/Treatment Order Update" />
    <status value="active" />
    <date value="2020-08-28" />
    <description value="An update to a prescription-order message" />
    <eventCoding>
        <system value="https://fhir.nhs.uk/CodeSystem/message-event" />
        <code value="prescription-order-update" />
        <display value="Prescription Order Update" />
    </eventCoding>
    <category value="consequence" />
    <focus>
        <code value="MedicationRequest" />
        <profile value="https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationRequest" />
        <min value="1" />
        <max value="1" />
    </focus>
    <responseRequired value="always" />
    <allowedResponse>
        <message value="https://fhir.nhs.uk/MessageDefinition/prescription-order-response" />
    </allowedResponse>
</MessageDefinition>
{
    "resourceType": "MessageDefinition",
    "id": "prescription-order-update",
    "url": "https://fhir.nhs.uk/MessageDefinition/prescription-order-update",
    "identifier":  [
        {
            "system": "https://tools.ietf.org/html/rfc4122",
            "value": "c81b88dc-760e-4b1e-9cdb-c5f853630664"
        }
    ],
    "version": "1.0.0",
    "name": "NHSDigitalPrescriptionOrderUpdate",
    "title": "Pharmacy/Treatment Order Update",
    "status": "active",
    "date": "2020-08-28",
    "description": "An update to a prescription-order message",
    "eventCoding": {
        "system": "https://fhir.nhs.uk/CodeSystem/message-event",
        "code": "prescription-order-update",
        "display": "Prescription Order Update"
    },
    "category": "consequence",
    "focus":  [
        {
            "code": "MedicationRequest",
            "profile": "https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationRequest",
            "min": 1,
            "max": "1"
        }
    ],
    "responseRequired": "always",
    "allowedResponse":  [
        {
            "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.


Event Coding

System Code
Message Events prescription-order-response
Category
consequence

MessageHeader

The FHIR Message Bundle MUST contain one MessageHeader resource conforming to NHSDigital-MessageHeader


Focus

Profile Min Max
DM-MedicationRequest-Outcome 1 4
<MessageDefinition xmlns="http://hl7.org/fhir">
    <id value="prescription-order-response" />
    <url value="https://fhir.nhs.uk/MessageDefinition/prescription-order-response" />
    <identifier>
        <system value="https://tools.ietf.org/html/rfc4122" />
        <value value="c81b88dc-760e-4b1e-9cdb-c5f853630664" />
    </identifier>
    <version value="1.0.1" />
    <name value="NHSDigitalPrescriptionOrderResponse" />
    <title value="Pharmacy/Treatment Order Response" />
    <status value="retired" />
    <date value="2022-03-01" />
    <description value="response to a prescription-order-update message" />
    <eventCoding>
        <system value="https://fhir.nhs.uk/CodeSystem/message-event" />
        <code value="prescription-order-response" />
        <display value="Prescription Order Response" />
    </eventCoding>
    <category value="notification" />
    <focus>
        <code value="MedicationRequest" />
        <profile value="https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationRequest-Outcome" />
        <min value="1" />
        <max value="4" />
    </focus>
</MessageDefinition>
{
    "resourceType": "MessageDefinition",
    "id": "prescription-order-response",
    "url": "https://fhir.nhs.uk/MessageDefinition/prescription-order-response",
    "identifier":  [
        {
            "system": "https://tools.ietf.org/html/rfc4122",
            "value": "c81b88dc-760e-4b1e-9cdb-c5f853630664"
        }
    ],
    "version": "1.0.1",
    "name": "NHSDigitalPrescriptionOrderResponse",
    "title": "Pharmacy/Treatment Order Response",
    "status": "retired",
    "date": "2022-03-01",
    "description": "response to a prescription-order-update message",
    "eventCoding": {
        "system": "https://fhir.nhs.uk/CodeSystem/message-event",
        "code": "prescription-order-response",
        "display": "Prescription Order Response"
    },
    "category": "notification",
    "focus":  [
        {
            "code": "MedicationRequest",
            "profile": "https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationRequest-Outcome",
            "min": 1,
            "max": "4"
        }
    ]
}

dispense-notification

This message definition describes the rules for a Dispense Notification interactions used in a FHIR Messaging exchange.


Event Coding

System Code
Message Events dispense-notification
Category
notification

MessageHeader

The FHIR Message Bundle MUST contain one MessageHeader resource conforming to NHSDigital-MessageHeader


Focus

Profile Min Max Notes
NHSDigital-MedicationDispense 1 *
NHSDigital-Patient 0 1 A traced NHS Number identifier MUST be present, untraced NHS Numbers are not permitted. This can be conveyed in two ways, as identifier reference in the subject element of the MedicationDispense resource or as an identifier in a Patient resource. If a NHS Number identifier is referenced in the MedicationDispense resources then a Patient resource SHOULD NOT be present in the Bundle.
<MessageDefinition xmlns="http://hl7.org/fhir">
    <id value="bf729ea8-280b-4109-b2f5-02ce8e51d870" />
    <url value="https://fhir.nhs.uk/MessageDefinition/dispense-notification" />
    <identifier>
        <system value="https://tools.ietf.org/html/rfc4122" />
        <value value="bf729ea8-280b-4109-b2f5-02ce8e51d870" />
    </identifier>
    <version value="1.0.0" />
    <name value="NHSDigitalDispenseNotification" />
    <title value="Pharmacy/Treatment Dispense" />
    <status value="active" />
    <date value="2020-10-02" />
    <description value="Notification of dispensed medication" />
    <eventCoding>
        <system value="https://fhir.nhs.uk/CodeSystem/message-event" />
        <code value="dispense-notification" />
        <display value="Dispense Notification" />
    </eventCoding>
    <category value="notification" />
    <focus>
        <code value="MedicationDispense" />
        <profile value="https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationDispense-Message" />
        <min value="1" />
        <max value="*" />
    </focus>
</MessageDefinition>
{
    "resourceType": "MessageDefinition",
    "id": "bf729ea8-280b-4109-b2f5-02ce8e51d870",
    "url": "https://fhir.nhs.uk/MessageDefinition/dispense-notification",
    "identifier":  [
        {
            "system": "https://tools.ietf.org/html/rfc4122",
            "value": "bf729ea8-280b-4109-b2f5-02ce8e51d870"
        }
    ],
    "version": "1.0.0",
    "name": "NHSDigitalDispenseNotification",
    "title": "Pharmacy/Treatment Dispense",
    "status": "active",
    "date": "2020-10-02",
    "description": "Notification of dispensed medication",
    "eventCoding": {
        "system": "https://fhir.nhs.uk/CodeSystem/message-event",
        "code": "dispense-notification",
        "display": "Dispense Notification"
    },
    "category": "notification",
    "focus":  [
        {
            "code": "MedicationDispense",
            "profile": "https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationDispense-Message",
            "min": 1,
            "max": "*"
        }
    ]
}

dispense-notification-update

This message definition describes the rules for a Dispense Notification Update interactions used in a FHIR Messaging exchange.


Event Coding

System Code
Message Events dispense-notification-update
Category
notification

MessageHeader

The FHIR Message Bundle MUST contain one MessageHeader resource conforming to NHSDigital-MessageHeader

The structure on this message is exactly the same as dispense-notification with the extension Extension-replacementOf mandatory, this points to the Bundle.identifier of the updated dispense-notification Message.


Focus

Profile Min Max Notes
NHSDigital-MedicationDispense 1 4
NHSDigital-Patient 0 1 A traced NHS Number identifier MUST be present, untraced NHS Numbers are not permitted. This can be conveyed in two ways, as identifier reference in the subject element of the MedicationDispense resource or as an identifier in a Patient resource. If a NHS Number identifier is referenced in the MedicationDispense resources then a Patient resource SHOULD NOT be present in the Bundle.
NHSDigital-Practitioner 0 0 MUST NOT be present in the Bundle. References to Practitioner MUST use identifier refernces, acceptable identifiers are listed in the NHSDigital-Practitioner profile. GMC Reference Number MUST NOT be used as a Practitioner identifier
NHSDigital-PractitionerRole 0 0 MUST NOT be present in the Bundle. References to PractitionerRole MUST use identifier refernces, acceptable identifiers are listed in the NHSDigital-PractitionerRole profile
NHSDigital-Organization 0 0 MUST NOT be present in the Bundle. References to Practitioner MUST use identifier refernces (ODS/ANANA Codes), acceptable identifiers are listed in the NHSDigital-Organization profile
<MessageDefinition xmlns="http://hl7.org/fhir">
    <id value="dispense-notification-update" />
    <url value="https://fhir.nhs.uk/MessageDefinition/dispense-notification-update" />
    <identifier>
        <system value="https://tools.ietf.org/html/rfc4122" />
        <value value="16aa190c-9ef3-49b3-b323-a40148f0f072" />
    </identifier>
    <version value="1.0.1" />
    <name value="NHSDigitalDispenseNotificationUpdate" />
    <title value="Pharmacy/Treatment Dispense Update" />
    <status value="retired" />
    <date value="2022-03-01" />
    <description value="Notification of medication dispenses." />
    <eventCoding>
        <system value="https://fhir.nhs.uk/CodeSystem/message-event" />
        <code value="dispense-notification-update" />
        <display value="Dispense Notification Update" />
    </eventCoding>
    <category value="notification" />
    <focus>
        <code value="MedicationDispense" />
        <profile value="https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationDispense-Message" />
        <min value="1" />
        <max value="*" />
    </focus>
</MessageDefinition>
{
    "resourceType": "MessageDefinition",
    "id": "dispense-notification-update",
    "url": "https://fhir.nhs.uk/MessageDefinition/dispense-notification-update",
    "identifier":  [
        {
            "system": "https://tools.ietf.org/html/rfc4122",
            "value": "16aa190c-9ef3-49b3-b323-a40148f0f072"
        }
    ],
    "version": "1.0.1",
    "name": "NHSDigitalDispenseNotificationUpdate",
    "title": "Pharmacy/Treatment Dispense Update",
    "status": "retired",
    "date": "2022-03-01",
    "description": "Notification of medication dispenses.",
    "eventCoding": {
        "system": "https://fhir.nhs.uk/CodeSystem/message-event",
        "code": "dispense-notification-update",
        "display": "Dispense Notification Update"
    },
    "category": "notification",
    "focus":  [
        {
            "code": "MedicationDispense",
            "profile": "https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationDispense-Message",
            "min": 1,
            "max": "*"
        }
    ]
}
back to top