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 2: MedicationDispense

Note: This example below is a draft and requires clinical verification.

Actors

Provider System = Hospital pharmacy system

Consumer System = Ward EPMA system

Example

<!--     This xml example is for illustrative purposes only and has not been clinically verified.     -->
<Bundle xmlns="http://hl7.org/fhir">
    <id value="830a2a41-cca8-46a3-a35c-3237cb9828e4" />
    <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="http://hl7.org/fhir/message-events" />
                    <code value="dispense-notification" />
                    <display value="Dispense Notification" />
                </eventCoding>
                <source>
                    <name value="ACME Clinical Systems" />
                    <software value="ACME Pharmacy" />
                    <version value="4.1.15" />
                    <endpoint value="urn:nhs-uk:addressing:ods:T48NT" />
                </source>
                <focus>
                    <reference value="urn:med-disp-324234234" />
                </focus>
            </MessageHeader>
        </resource>
    </entry>
    <!--    Patient associated with the encounter.    -->
    <entry>
        <fullUrl value="urn:patient-113582401" />
        <resource>
            <Patient>
                <id value="urn:patient-113582401" />
                <identifier>
                    <system value="https://fhir.nhs.uk/Id/nhs-number" />
                    <value value="113582401" />
                </identifier>
                <name>
                    <use value="official" />
                    <text value="Ms Anne Teak" />
                    <family value="Teak" />
                    <given value="Anna" />
                    <prefix value="Ms" />
                </name>
                <gender value="female" />
                <birthDate value="1987-03-29" />
            </Patient>
        </resource>
    </entry>
    <!--      Performer associated with the encounter.      -->
    <entry>
        <fullUrl value="urn:staff-0002" />
        <resource>
            <Practitioner>
                <id value="urn:staff-0002" />
                <name>
                    <text value="Dr Allo Kate" />
                    <family value="Kate" />
                    <given value="Allo" />
                    <prefix value="Dr" />
                </name>
                <qualification>
                    <code>
                        <coding>
                            <system value="https://fhir.hl7.org.uk/Id/gpc-number" />
                            <code value="123543" />
                            <display value="General Pharmaceutical Council" />
                        </coding>
                    </code>
                </qualification>
            </Practitioner>
        </resource>
    </entry>
    <!--     Medication      -->
    <entry>
        <fullUrl value="urn:medication-39732411000001106" />
        <resource>
            <Medication>
                <id value="urn:medication-39732411000001106" />
                <code>
                    <coding>
                        <system value="http://snomed.info/sct" />
                        <code value="39732411000001106" />
                        <display value="Amoxicillin 500mg capsules" />
                    </coding>
                </code>
            </Medication>
        </resource>
    </entry>
    <!--      Medication Dispense      -->
    <entry>
        <fullUrl value="urn:med-disp-324234234" />
        <resource>
            <MedicationDispense>
                <id value="urn:med-disp-324234234" />
                <identifier>
                    <system value="urn:[organisation_name]:[system_name]" />
                    <value value="urn:16099e16-2494-4a2b-b0e6-93eabd00c41b" />
                </identifier>
                <status value="in-progress" />
                <medicationReference>
                    <reference value="urn:medication-39732411000001106" />
                    <display value="Amoxicillin 500mg capsules" />
                </medicationReference>
                <subject>
                    <reference value="urn:patient-113582401" />
                    <display value="Ms Anne Teak" />
                </subject>
                <performer>
                    <actor>
                        <reference value="urn:staff-0002" />
                        <display value="Dr Allo Kate" />
                    </actor>
                </performer>
                <authorizingPrescription>
                    <reference value="urn:med-req-1023938" />
                </authorizingPrescription>
                <quantity>
                    <value value="21" />
                    <unit value="tablet" />
                    <system value="http://snomed.info/sct" />
                    <code value="428673006" />
                </quantity>
                <whenPrepared value="2021-05-07T16:15:32Z" />
                <dosageInstruction>
                    <timing>
                        <repeat>
                            <frequency value="3" />
                            <period value="1" />
                            <periodUnit value="d" />
                        </repeat>
                    </timing>
                    <route>
                        <coding>
                            <system value="http://snomed.info/sct" />
                            <code value="428673006" />
                            <display value="oral" />
                        </coding>
                    </route>
                    <doseAndRate>
                        <doseQuantity>
                            <value value="1" />
                            <unit value="tablet" />
                            <system value="http://snomed.info/sct" />
                            <code value="428673006" />
                        </doseQuantity>
                    </doseAndRate>
                </dosageInstruction>
            </MedicationDispense>
        </resource>
    </entry>
</Bundle>
{
    "resourceType": "Bundle",
    "id": "830a2a41-cca8-46a3-a35c-3237cb9828e4",
    "type": "message",
    "timestamp": "2021-05-07T16:15:32Z",
    "entry":  [
        {
            "fullUrl": "urn:message-header-167434",
            "resource": {
                "resourceType": "MessageHeader",
                "id": "urn:message-header-167434",
                "eventCoding": {
                    "system": "http://hl7.org/fhir/message-events",
                    "code": "dispense-notification",
                    "display": "Dispense Notification"
                },
                "source": {
                    "name": "ACME Clinical Systems",
                    "software": "ACME Pharmacy",
                    "version": "4.1.15",
                    "endpoint": "urn:nhs-uk:addressing:ods:T48NT"
                },
                "focus":  [
                    {
                        "reference": "urn:med-disp-324234234"
                    }
                ]
            }
        },
        {
            "fullUrl": "urn:patient-113582401",
            "resource": {
                "resourceType": "Patient",
                "id": "urn:patient-113582401",
                "identifier":  [
                    {
                        "system": "https://fhir.nhs.uk/Id/nhs-number",
                        "value": "113582401"
                    }
                ],
                "name":  [
                    {
                        "use": "official",
                        "text": "Ms Anne Teak",
                        "family": "Teak",
                        "given":  [
                            "Anna"
                        ],
                        "prefix":  [
                            "Ms"
                        ]
                    }
                ],
                "gender": "female",
                "birthDate": "1987-03-29"
            }
        },
        {
            "fullUrl": "urn:staff-0002",
            "resource": {
                "resourceType": "Practitioner",
                "id": "urn:staff-0002",
                "name":  [
                    {
                        "text": "Dr Allo Kate",
                        "family": "Kate",
                        "given":  [
                            "Allo"
                        ],
                        "prefix":  [
                            "Dr"
                        ]
                    }
                ],
                "qualification":  [
                    {
                        "code": {
                            "coding":  [
                                {
                                    "system": "https://fhir.hl7.org.uk/Id/gpc-number",
                                    "code": "123543",
                                    "display": "General Pharmaceutical Council"
                                }
                            ]
                        }
                    }
                ]
            }
        },
        {
            "fullUrl": "urn:medication-39732411000001106",
            "resource": {
                "resourceType": "Medication",
                "id": "urn:medication-39732411000001106",
                "code": {
                    "coding":  [
                        {
                            "system": "http://snomed.info/sct",
                            "code": "39732411000001106",
                            "display": "Amoxicillin 500mg capsules"
                        }
                    ]
                }
            }
        },
        {
            "fullUrl": "urn:med-disp-324234234",
            "resource": {
                "resourceType": "MedicationDispense",
                "id": "urn:med-disp-324234234",
                "identifier":  [
                    {
                        "system": "urn:[organisation_name]:[system_name]",
                        "value": "urn:16099e16-2494-4a2b-b0e6-93eabd00c41b"
                    }
                ],
                "status": "in-progress",
                "medicationReference": {
                    "reference": "urn:medication-39732411000001106",
                    "display": "Amoxicillin 500mg capsules"
                },
                "subject": {
                    "reference": "urn:patient-113582401",
                    "display": "Ms Anne Teak"
                },
                "performer":  [
                    {
                        "actor": {
                            "reference": "urn:staff-0002",
                            "display": "Dr Allo Kate"
                        }
                    }
                ],
                "authorizingPrescription":  [
                    {
                        "reference": "urn:med-req-1023938"
                    }
                ],
                "quantity": {
                    "value": 21,
                    "unit": "tablet",
                    "system": "http://snomed.info/sct",
                    "code": "428673006"
                },
                "whenPrepared": "2021-05-07T16:15:32Z",
                "dosageInstruction":  [
                    {
                        "timing": {
                            "repeat": {
                                "frequency": 3,
                                "period": 1,
                                "periodUnit": "d"
                            }
                        },
                        "route": {
                            "coding":  [
                                {
                                    "system": "http://snomed.info/sct",
                                    "code": "428673006",
                                    "display": "oral"
                                }
                            ]
                        },
                        "doseAndRate":  [
                            {
                                "doseQuantity": {
                                    "value": 1,
                                    "unit": "tablet",
                                    "system": "http://snomed.info/sct",
                                    "code": "428673006"
                                }
                            }
                        ]
                    }
                ]
            }
        }
    ]
}
Bundle.id[0]830a2a41-cca8-46a3-a35c-3237cb9828e4
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]http://hl7.org/fhir/message-events
Bundle.entry[0].resource[0].event[0].code[0]dispense-notification
Bundle.entry[0].resource[0].event[0].display[0]Dispense Notification
Bundle.entry[0].resource[0].source[0].name[0]ACME Clinical Systems
Bundle.entry[0].resource[0].source[0].software[0]ACME Pharmacy
Bundle.entry[0].resource[0].source[0].version[0]4.1.15
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-disp-324234234
Bundle.entry[1].fullUrl[0]urn:patient-113582401
Bundle.entry[1].resource[0].id[0]urn:patient-113582401
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]113582401
Bundle.entry[1].resource[0].name[0].use[0]official
Bundle.entry[1].resource[0].name[0].text[0]Ms Anne Teak
Bundle.entry[1].resource[0].name[0].family[0]Teak
Bundle.entry[1].resource[0].name[0].given[0]Anna
Bundle.entry[1].resource[0].name[0].prefix[0]Ms
Bundle.entry[1].resource[0].gender[0]female
Bundle.entry[1].resource[0].birthDate[0]1987-03-29
Bundle.entry[2].fullUrl[0]urn:staff-0002
Bundle.entry[2].resource[0].id[0]urn:staff-0002
Bundle.entry[2].resource[0].name[0].text[0]Dr Allo Kate
Bundle.entry[2].resource[0].name[0].family[0]Kate
Bundle.entry[2].resource[0].name[0].given[0]Allo
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/gpc-number
Bundle.entry[2].resource[0].qualification[0].code[0].coding[0].code[0]123543
Bundle.entry[2].resource[0].qualification[0].code[0].coding[0].display[0]General Pharmaceutical Council
Bundle.entry[3].fullUrl[0]urn:medication-39732411000001106
Bundle.entry[3].resource[0].id[0]urn:medication-39732411000001106
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]39732411000001106
Bundle.entry[3].resource[0].code[0].coding[0].display[0]Amoxicillin 500mg capsules
Bundle.entry[4].fullUrl[0]urn:med-disp-324234234
Bundle.entry[4].resource[0].id[0]urn:med-disp-324234234
Bundle.entry[4].resource[0].identifier[0].system[0]urn:[organisation_name]:[system_name]
Bundle.entry[4].resource[0].identifier[0].value[0]urn:16099e16-2494-4a2b-b0e6-93eabd00c41b
Bundle.entry[4].resource[0].status[0]in-progress
Bundle.entry[4].resource[0].medication[0].reference[0]urn:medication-39732411000001106
Bundle.entry[4].resource[0].medication[0].display[0]Amoxicillin 500mg capsules
Bundle.entry[4].resource[0].subject[0].reference[0]urn:patient-113582401
Bundle.entry[4].resource[0].subject[0].display[0]Ms Anne Teak
Bundle.entry[4].resource[0].performer[0].actor[0].reference[0]urn:staff-0002
Bundle.entry[4].resource[0].performer[0].actor[0].display[0]Dr Allo Kate
Bundle.entry[4].resource[0].authorizingPrescription[0].reference[0]urn:med-req-1023938
Bundle.entry[4].resource[0].quantity[0].value[0]21
Bundle.entry[4].resource[0].quantity[0].unit[0]tablet
Bundle.entry[4].resource[0].quantity[0].system[0]http://snomed.info/sct
Bundle.entry[4].resource[0].quantity[0].code[0]428673006
Bundle.entry[4].resource[0].whenPrepared[0]2021-05-07T16:15:32Z
Bundle.entry[4].resource[0].dosageInstruction[0].timing[0].repeat[0].frequency[0]3
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].route[0].coding[0].system[0]http://snomed.info/sct
Bundle.entry[4].resource[0].dosageInstruction[0].route[0].coding[0].code[0]428673006
Bundle.entry[4].resource[0].dosageInstruction[0].route[0].coding[0].display[0]oral
Bundle.entry[4].resource[0].dosageInstruction[0].doseAndRate[0].dose[0].value[0]1
Bundle.entry[4].resource[0].dosageInstruction[0].doseAndRate[0].dose[0].unit[0]tablet
Bundle.entry[4].resource[0].dosageInstruction[0].doseAndRate[0].dose[0].system[0]http://snomed.info/sct
Bundle.entry[4].resource[0].dosageInstruction[0].doseAndRate[0].dose[0].code[0]428673006
Bundle

back to top