NHS Digital FHIR Medicines (Retired - 2.1.14)

This guidance is under active development by NHS Digital and content may be added or updated on a regular basis.

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
NHSDigital-Patient 1 1
NHSDigital-PractitionerRole 1 *
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 1 * 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" />
    <title value="Pharmacy/Treatment Order" />
    <status value="active" />
    <date value="2020-05-27" />
    <eventCoding>
        <system value="https://fhir.nhs.uk/CodeSystem/message-event" />
        <code value="prescription-order" />
        <display value="Prescription Order" />
    </eventCoding>
    <category value="notification" />
    <focus>
        <code value="MedicationRequest" />
        <profile value="https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationRequest" />
        <min value="1" />
        <max value="4" />
    </focus>
    <focus>
        <code value="Patient" />
        <profile value="https://fhir.nhs.uk/StructureDefinition/NHSDigital-Patient" />
        <min value="1" />
        <max value="1" />
    </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",
    "title": "Pharmacy/Treatment Order",
    "status": "active",
    "date": "2020-05-27",
    "eventCoding": {
        "system": "https://fhir.nhs.uk/CodeSystem/message-event",
        "code": "prescription-order",
        "display": "Prescription Order"
    },
    "category": "notification",
    "focus":  [
        {
            "code": "MedicationRequest",
            "profile": "https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationRequest",
            "min": 1,
            "max": "4"
        },
        {
            "code": "Patient",
            "profile": "https://fhir.nhs.uk/StructureDefinition/NHSDigital-Patient",
            "min": 1,
            "max": "1"
        },
        {
            "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
NHSDigital-Patient 1 1
NHSDigital-PractitionerRole 1 *
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" />
    <title value="Pharmacy/Treatment Order Update" />
    <status value="active" />
    <date value="2020-08-28" />
    <eventCoding>
        <system value="https://fhir.nhs.uk/CodeSystem/message-event" />
        <code value="prescription-order-update" />
        <display value="Prescription Order Update" />
    </eventCoding>
    <category value="notification" />
    <focus>
        <code value="MessageHeader" />
        <profile value="https://fhir.nhs.uk/StructureDefinition/NHSDigital-MessageHeader" />
        <min value="1" />
        <max value="1" />
    </focus>
    <focus>
        <code value="MedicationRequest" />
        <profile value="https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationRequest" />
        <min value="1" />
        <max value="1" />
    </focus>
    <focus>
        <code value="Patient" />
        <profile value="https://fhir.nhs.uk/StructureDefinition/NHSDigital-Patient" />
        <min value="1" />
        <max value="1" />
    </focus>
    <focus>
        <code value="Practitioner" />
        <profile value="https://fhir.nhs.uk/StructureDefinition/NHSDigital-Practitioner" />
        <min value="1" />
        <max value="*" />
    </focus>
    <focus>
        <code value="PractitionerRole" />
        <profile value="https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole" />
        <min value="1" />
        <max value="*" />
    </focus>
    <focus>
        <code value="Organization" />
        <profile value="https://fhir.nhs.uk/StructureDefinition/NHSDigital-Organization" />
        <min value="1" />
        <max value="*" />
    </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",
    "title": "Pharmacy/Treatment Order Update",
    "status": "active",
    "date": "2020-08-28",
    "eventCoding": {
        "system": "https://fhir.nhs.uk/CodeSystem/message-event",
        "code": "prescription-order-update",
        "display": "Prescription Order Update"
    },
    "category": "notification",
    "focus":  [
        {
            "code": "MessageHeader",
            "profile": "https://fhir.nhs.uk/StructureDefinition/NHSDigital-MessageHeader",
            "min": 1,
            "max": "1"
        },
        {
            "code": "MedicationRequest",
            "profile": "https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationRequest",
            "min": 1,
            "max": "1"
        },
        {
            "code": "Patient",
            "profile": "https://fhir.nhs.uk/StructureDefinition/NHSDigital-Patient",
            "min": 1,
            "max": "1"
        },
        {
            "code": "Practitioner",
            "profile": "https://fhir.nhs.uk/StructureDefinition/NHSDigital-Practitioner",
            "min": 1,
            "max": "*"
        },
        {
            "code": "PractitionerRole",
            "profile": "https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole",
            "min": 1,
            "max": "*"
        },
        {
            "code": "Organization",
            "profile": "https://fhir.nhs.uk/StructureDefinition/NHSDigital-Organization",
            "min": 1,
            "max": "*"
        }
    ],
    "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
NHSDigital-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.0" />
    <title value="Pharmacy/Treatment Order Response" />
    <status value="active" />
    <date value="2020-08-28" />
    <eventCoding>
        <system value="https://fhir.nhs.uk/CodeSystem/message-event" />
        <code value="prescription-order-response" />
        <display value="Prescription Order Response" />
    </eventCoding>
    <category value="consequence" />
    <focus>
        <code value="MessageHeader" />
        <profile value="https://fhir.nhs.uk/StructureDefinition/NHSDigital-MessageHeader" />
        <min value="1" />
        <max value="1" />
    </focus>
    <focus>
        <code value="MedicationRequest" />
        <profile value="https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationRequest-Outcome" />
        <min value="1" />
        <max value="4" />
    </focus>
    <focus>
        <code value="Patient" />
        <profile value="https://fhir.nhs.uk/StructureDefinition/NHSDigital-Patient" />
        <min value="1" />
        <max value="1" />
    </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.0",
    "title": "Pharmacy/Treatment Order Response",
    "status": "active",
    "date": "2020-08-28",
    "eventCoding": {
        "system": "https://fhir.nhs.uk/CodeSystem/message-event",
        "code": "prescription-order-response",
        "display": "Prescription Order Response"
    },
    "category": "consequence",
    "focus":  [
        {
            "code": "MessageHeader",
            "profile": "https://fhir.nhs.uk/StructureDefinition/NHSDigital-MessageHeader",
            "min": 1,
            "max": "1"
        },
        {
            "code": "MedicationRequest",
            "profile": "https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationRequest-Outcome",
            "min": 1,
            "max": "4"
        },
        {
            "code": "Patient",
            "profile": "https://fhir.nhs.uk/StructureDefinition/NHSDigital-Patient",
            "min": 1,
            "max": "1"
        }
    ]
}

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="pharmacy-dispense" />
    <url value="https://fhir.nhs.uk/MessageDefinition/pharmacy-dispense" />
    <identifier>
        <system value="https://tools.ietf.org/html/rfc4122" />
        <value value="bf729ea8-280b-4109-b2f5-02ce8e51d870" />
    </identifier>
    <version value="1.0.0" />
    <title value="Pharmacy/Treatment Dispense" />
    <status value="active" />
    <date value="2020-10-02" />
    <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" />
        <min value="1" />
        <max value="*" />
    </focus>
</MessageDefinition>
{
    "resourceType": "MessageDefinition",
    "id": "pharmacy-dispense",
    "url": "https://fhir.nhs.uk/MessageDefinition/pharmacy-dispense",
    "identifier":  [
        {
            "system": "https://tools.ietf.org/html/rfc4122",
            "value": "bf729ea8-280b-4109-b2f5-02ce8e51d870"
        }
    ],
    "version": "1.0.0",
    "title": "Pharmacy/Treatment Dispense",
    "status": "active",
    "date": "2020-10-02",
    "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",
            "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
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.0" />
    <title value="Pharmacy/Treatment Dispense Update" />
    <status value="active" />
    <date value="2021-05-15" />
    <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" />
        <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.0",
    "title": "Pharmacy/Treatment Dispense Update",
    "status": "active",
    "date": "2021-05-15",
    "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",
            "min": 1,
            "max": "*"
        }
    ]
}
back to top