Implementation guide for interoperable medicines

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

Example 1: MedicationRequest

Actors

Provider System = Ward EPMA system

Consumer System = Hospital pharmacy system

Example

<Bundle xmlns="http://hl7.org/fhir">
    <id value="c19fac1e-7fb8-4acb-87a8-9cf05cf90ec9" />
    <type value="message" />
    <timestamp value="2021-05-07T16:15:32Z" />
    <!--    Message Header    -->
    <entry>
        <fullUrl value="urn:message-header-167434" />
        <resource>
            <MessageHeader>
                <id value="urn:message-header-167434" />
                <eventCoding>
                    <system value="https://fhir.hl7.org.uk//CodeSystem/message-event" />
                    <code value="prescription-order" />
                    <display value="Prescription Order" />
                </eventCoding>
                <source>
                    <name value="ACME Clinical Systems" />
                    <software value="ACME ePMA" />
                    <version value="3.5.68" />
                    <endpoint value="urn:nhs-uk:addressing:ods:T48NT" />
                </source>
                <focus>
                    <reference value="urn:med-req-12312312" />
                </focus>
            </MessageHeader>
        </resource>
    </entry>
    <!-- Patient associated with the encounter. -->
    <entry>
        <fullUrl value="urn:patient-4738562854" />
        <resource>
            <Patient>
                <id value="urn:patient-4738562854" />
                <identifier>
                    <system value="https://fhir.nhs.uk/Id/nhs-number" />
                    <value value="4738562854" />
                </identifier>
                <name>
                    <use value="official" />
                    <text value="Mr Toby Lerone" />
                    <family value="Lerone" />
                    <given value="Toby" />
                    <prefix value="Mr" />
                </name>
                <gender value="male" />
                <birthDate value="1973-02-20" />
            </Patient>
        </resource>
    </entry>
    <!-- Prescribing clinician associated with the encounter.  -->
    <entry>
        <fullUrl value="urn:staff-0001" />
        <resource>
            <Practitioner>
                <id value="urn:staff-0001" />
                <name>
                    <text value="Dr S Quirrel" />
                    <family value="Quirrel" />
                    <given value="S" />
                    <prefix value="Dr" />
                </name>
                <qualification>
                    <code>
                        <coding>
                            <system value="https://fhir.hl7.org.uk/Id/gmc-number" />
                            <code value="2145879" />
                            <display value="General Medical Council" />
                        </coding>
                    </code>
                </qualification>
            </Practitioner>
        </resource>
    </entry>
    <!-- Medication  -->
    <entry>
        <fullUrl value="urn:medication-27658006" />
        <resource>
            <Medication>
                <id value="urn:medication-27658006" />
                <code>
                    <coding>
                        <system value="http://snomed.info/sct" />
                        <code value="321987003" />
                        <display value="Citalopram 20mg tablets" />
                    </coding>
                </code>
            </Medication>
        </resource>
    </entry>
    <!--  Medication Request  -->
    <entry>
        <fullUrl value="urn:med-req-12312312" />
        <resource>
            <MedicationRequest>
                <id value="urn:med-req-12312312" />
                <status value="active" />
                <intent value="order" />
                <category>
                    <coding>
                        <system value="http://terminology.hl7.org/CodeSystem/medicationrequest-category" />
                        <code value="leave" />
                        <display value="leave" />
                    </coding>
                </category>
                <priority value="routine" />
                <medicationReference>
                    <reference value="urn:medication-27658006" />
                </medicationReference>
                <subject>
                    <reference value="urn:patient-4738562854" />
                    <display value="Mr Toby Lerone" />
                </subject>
                <authoredOn value="2020-05-20T10:34:00Z" />
                <requester>
                    <reference value="urn:staff-0001" />
                    <display value="Dr S Quirrel" />
                </requester>
                <recorder>
                    <reference value="urn:staff-0001" />
                    <display value="Dr S Quirrel" />
                </recorder>
                <dosageInstruction>
                    <timing>
                        <repeat>
                            <frequency value="1" />
                            <period value="1" />
                            <periodUnit value="d" />
                            <when value="MORN" />
                        </repeat>
                    </timing>
                    <route>
                        <coding>
                            <system value="http://snomed.info/sct" />
                            <code value="26643006" />
                            <display value="oral" />
                        </coding>
                    </route>
                </dosageInstruction>
                <dispenseRequest>
                    <quantity>
                        <value value="3" />
                        <unit value="day" />
                        <system value="http://unitsofmeasure.org" />
                        <code value="d" />
                    </quantity>
                </dispenseRequest>
                <substitution>
                    <allowedBoolean value="false" />
                </substitution>
            </MedicationRequest>
        </resource>
    </entry>
</Bundle>
{
    "resourceType": "Bundle",
    "id": "c19fac1e-7fb8-4acb-87a8-9cf05cf90ec9",
    "type": "message",
    "timestamp": "2021-05-07T16:15:32+00:00",
    "entry":  [
        {
            "fullUrl": "urn:message-header-167434",
            "resource": {
                "resourceType": "MessageHeader",
                "id": "urn:message-header-167434",
                "eventCoding": {
                    "system": "https://fhir.hl7.org.uk//CodeSystem/message-event",
                    "code": "prescription-order",
                    "display": "Prescription Order"
                },
                "source": {
                    "name": "ACME Clinical Systems",
                    "software": "ACME ePMA",
                    "version": "3.5.68",
                    "endpoint": "urn:nhs-uk:addressing:ods:T48NT"
                },
                "focus":  [
                    {
                        "reference": "urn:med-req-12312312"
                    }
                ]
            }
        },
        {
            "fullUrl": "urn:patient-4738562854",
            "resource": {
                "resourceType": "Patient",
                "id": "urn:patient-4738562854",
                "identifier":  [
                    {
                        "system": "https://fhir.nhs.uk/Id/nhs-number",
                        "value": "4738562854"
                    }
                ],
                "name":  [
                    {
                        "use": "official",
                        "text": "Mr Toby Lerone",
                        "family": "Lerone",
                        "given":  [
                            "Toby"
                        ],
                        "prefix":  [
                            "Mr"
                        ]
                    }
                ],
                "gender": "male",
                "birthDate": "1973-02-20"
            }
        },
        {
            "fullUrl": "urn:staff-0001",
            "resource": {
                "resourceType": "Practitioner",
                "id": "urn:staff-0001",
                "name":  [
                    {
                        "text": "Dr S Quirrel",
                        "family": "Quirrel",
                        "given":  [
                            "S"
                        ],
                        "prefix":  [
                            "Dr"
                        ]
                    }
                ],
                "qualification":  [
                    {
                        "code": {
                            "coding":  [
                                {
                                    "system": "https://fhir.hl7.org.uk/Id/gmc-number",
                                    "code": "2145879",
                                    "display": "General Medical Council"
                                }
                            ]
                        }
                    }
                ]
            }
        },
        {
            "fullUrl": "urn:medication-27658006",
            "resource": {
                "resourceType": "Medication",
                "id": "urn:medication-27658006",
                "code": {
                    "coding":  [
                        {
                            "system": "http://snomed.info/sct",
                            "code": "321987003",
                            "display": "Citalopram 20mg tablets"
                        }
                    ]
                }
            }
        },
        {
            "fullUrl": "urn:med-req-12312312",
            "resource": {
                "resourceType": "MedicationRequest",
                "id": "urn:med-req-12312312",
                "status": "active",
                "intent": "order",
                "category":  [
                    {
                        "coding":  [
                            {
                                "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-category",
                                "code": "leave",
                                "display": "leave"
                            }
                        ]
                    }
                ],
                "priority": "routine",
                "medicationReference": {
                    "reference": "urn:medication-27658006"
                },
                "subject": {
                    "reference": "urn:patient-4738562854",
                    "display": "Mr Toby Lerone"
                },
                "authoredOn": "2020-05-20T10:34:00Z",
                "requester": {
                    "reference": "urn:staff-0001",
                    "display": "Dr S Quirrel"
                },
                "recorder": {
                    "reference": "urn:staff-0001",
                    "display": "Dr S Quirrel"
                },
                "dosageInstruction":  [
                    {
                        "timing": {
                            "repeat": {
                                "frequency": 1,
                                "period": 1,
                                "periodUnit": "d",
                                "when":  [
                                    "MORN"
                                ]
                            }
                        },
                        "route": {
                            "coding":  [
                                {
                                    "system": "http://snomed.info/sct",
                                    "code": "26643006",
                                    "display": "oral"
                                }
                            ]
                        }
                    }
                ],
                "dispenseRequest": {
                    "quantity": {
                        "value": 3,
                        "unit": "day",
                        "system": "http://unitsofmeasure.org",
                        "code": "d"
                    }
                },
                "substitution": {
                    "allowedBoolean": false
                }
            }
        }
    ]
}
Bundle.id[0]c19fac1e-7fb8-4acb-87a8-9cf05cf90ec9
Bundle.type[0]message
Bundle.timestamp[0]2021-05-07T16:15:32+00:00
Bundle.entry[0].fullUrl[0]urn:message-header-167434
Bundle.entry[0].resource[0].id[0]urn:message-header-167434
Bundle.entry[0].resource[0].event[0].system[0]https://fhir.hl7.org.uk//CodeSystem/message-event
Bundle.entry[0].resource[0].event[0].code[0]prescription-order
Bundle.entry[0].resource[0].event[0].display[0]Prescription Order
Bundle.entry[0].resource[0].source[0].name[0]ACME Clinical Systems
Bundle.entry[0].resource[0].source[0].software[0]ACME ePMA
Bundle.entry[0].resource[0].source[0].version[0]3.5.68
Bundle.entry[0].resource[0].source[0].endpoint[0]urn:nhs-uk:addressing:ods:T48NT
Bundle.entry[0].resource[0].focus[0].reference[0]urn:med-req-12312312
Bundle.entry[1].fullUrl[0]urn:patient-4738562854
Bundle.entry[1].resource[0].id[0]urn:patient-4738562854
Bundle.entry[1].resource[0].identifier[0].system[0]https://fhir.nhs.uk/Id/nhs-number
Bundle.entry[1].resource[0].identifier[0].value[0]4738562854
Bundle.entry[1].resource[0].name[0].use[0]official
Bundle.entry[1].resource[0].name[0].text[0]Mr Toby Lerone
Bundle.entry[1].resource[0].name[0].family[0]Lerone
Bundle.entry[1].resource[0].name[0].given[0]Toby
Bundle.entry[1].resource[0].name[0].prefix[0]Mr
Bundle.entry[1].resource[0].gender[0]male
Bundle.entry[1].resource[0].birthDate[0]1973-02-20
Bundle.entry[2].fullUrl[0]urn:staff-0001
Bundle.entry[2].resource[0].id[0]urn:staff-0001
Bundle.entry[2].resource[0].name[0].text[0]Dr S Quirrel
Bundle.entry[2].resource[0].name[0].family[0]Quirrel
Bundle.entry[2].resource[0].name[0].given[0]S
Bundle.entry[2].resource[0].name[0].prefix[0]Dr
Bundle.entry[2].resource[0].qualification[0].code[0].coding[0].system[0]https://fhir.hl7.org.uk/Id/gmc-number
Bundle.entry[2].resource[0].qualification[0].code[0].coding[0].code[0]2145879
Bundle.entry[2].resource[0].qualification[0].code[0].coding[0].display[0]General Medical Council
Bundle.entry[3].fullUrl[0]urn:medication-27658006
Bundle.entry[3].resource[0].id[0]urn:medication-27658006
Bundle.entry[3].resource[0].code[0].coding[0].system[0]http://snomed.info/sct
Bundle.entry[3].resource[0].code[0].coding[0].code[0]321987003
Bundle.entry[3].resource[0].code[0].coding[0].display[0]Citalopram 20mg tablets
Bundle.entry[4].fullUrl[0]urn:med-req-12312312
Bundle.entry[4].resource[0].id[0]urn:med-req-12312312
Bundle.entry[4].resource[0].status[0]active
Bundle.entry[4].resource[0].intent[0]order
Bundle.entry[4].resource[0].category[0].coding[0].system[0]http://terminology.hl7.org/CodeSystem/medicationrequest-category
Bundle.entry[4].resource[0].category[0].coding[0].code[0]leave
Bundle.entry[4].resource[0].category[0].coding[0].display[0]leave
Bundle.entry[4].resource[0].priority[0]routine
Bundle.entry[4].resource[0].medication[0].reference[0]urn:medication-27658006
Bundle.entry[4].resource[0].subject[0].reference[0]urn:patient-4738562854
Bundle.entry[4].resource[0].subject[0].display[0]Mr Toby Lerone
Bundle.entry[4].resource[0].authoredOn[0]2020-05-20T10:34:00Z
Bundle.entry[4].resource[0].requester[0].reference[0]urn:staff-0001
Bundle.entry[4].resource[0].requester[0].display[0]Dr S Quirrel
Bundle.entry[4].resource[0].recorder[0].reference[0]urn:staff-0001
Bundle.entry[4].resource[0].recorder[0].display[0]Dr S Quirrel
Bundle.entry[4].resource[0].dosageInstruction[0].timing[0].repeat[0].frequency[0]1
Bundle.entry[4].resource[0].dosageInstruction[0].timing[0].repeat[0].period[0]1
Bundle.entry[4].resource[0].dosageInstruction[0].timing[0].repeat[0].periodUnit[0]d
Bundle.entry[4].resource[0].dosageInstruction[0].timing[0].repeat[0].when[0]MORN
Bundle.entry[4].resource[0].dosageInstruction[0].route[0].coding[0].system[0]http://snomed.info/sct
Bundle.entry[4].resource[0].dosageInstruction[0].route[0].coding[0].code[0]26643006
Bundle.entry[4].resource[0].dosageInstruction[0].route[0].coding[0].display[0]oral
Bundle.entry[4].resource[0].dispenseRequest[0].quantity[0].value[0]3
Bundle.entry[4].resource[0].dispenseRequest[0].quantity[0].unit[0]day
Bundle.entry[4].resource[0].dispenseRequest[0].quantity[0].system[0]http://unitsofmeasure.org
Bundle.entry[4].resource[0].dispenseRequest[0].quantity[0].code[0]d
Bundle.entry[4].resource[0].substitution[0].allowed[0]False
Bundle

back to top