NHS Digital FHIR Medicines

Task

Returning a Presription

Cancelling/Removing a Dispense Notificationh

Prescription Tracker

Task EPS Prescription Tracker 1

{
    "resourceType": "Task",
    "id": "bd1ca5c4-ff49-4f2a-9db4-f5dda0112084",
    "meta": {
        "lastUpdated": "2016-07-11T11:07:22+00:00"
    },
    "extension":  [
        {
            "url": "https://fhir.nhs.uk/StructureDefinition/Extension-EPS-Prescription",
            "extension":  [
                {
                    "url": "courseOfTherapyType",
                    "valueCoding": {
                        "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-course-of-therapy",
                        "code": "acute",
                        "display": "Acute"
                    }
                }
            ]
        }
    ],
    "contained":  [
        {
            "resourceType": "PractitionerRole",
            "id": "requester",
            "identifier":  [
                {
                    "system": "https://fhir.nhs.uk/Id/sds-role-profile-id",
                    "value": "641555508106"
                }
            ],
            "code":  [
                {
                    "coding":  [
                        {
                            "system": "https://fhir.nhs.uk/CodeSystem/NHSDigital-SDS-JobRoleCode",
                            "code": "S0030:G0100:R0620"
                        }
                    ]
                }
            ],
            "practitioner": {
                "identifier": {
                    "system": "https://fhir.nhs.uk/Id/sds-user-id",
                    "value": "7654321"
                },
                "display": "DR AA BHATIA"
            },
            "organization": {
                "reference": "Organization/3b4b03a5-52ba-4ba6-9b82-70350aa109d8",
                "identifier": {
                    "system": "https://fhir.nhs.uk/Id/ods-organization-code",
                    "value": "C81007"
                },
                "display": "VERNON STREET MEDICAL CTR"
            },
            "telecom":  [
                {
                    "system": "phone",
                    "use": "work",
                    "value": "01234567890"
                }
            ]
        }
    ],
    "identifier":  [
        {
            "system": "https://tools.ietf.org/html/rfc4122",
            "value": "bd1ca5c4-ff49-4f2a-9db4-f5dda0112084"
        }
    ],
    "status": "in-progress",
    "businessStatus": {
        "coding":  [
            {
                "system": "https://fhir.nhs.uk/CodeSystem/EPS-task-business-status",
                "code": "0002",
                "display": "With Dispenser"
            }
        ]
    },
    "intent": "order",
    "code": {
        "coding":  [
            {
                "system": "http://hl7.org/fhir/CodeSystem/task-code",
                "code": "fulfill",
                "display": "Fulfill the focal request"
            }
        ]
    },
    "focus": {
        "type": "Task",
        "identifier": {
            "system": "https://fhir.nhs.uk/Id/prescription-order-number",
            "value": "A3B4D9-Z42475-11E6B+"
        }
    },
    "for": {
        "identifier": {
            "system": "https://fhir.nhs.uk/Id/nhs-number",
            "value": "9912003489"
        }
    },
    "requester": {
        "reference": "#requester"
    },
    "owner": {
        "identifier": {
            "system": "https://fhir.nhs.uk/Id/ods-organization-code",
            "value": "FA666"
        },
        "display": "CROYDON PHARMACY"
    },
    "reasonCode": {
        "coding":  [
            {
                "system": "http://snomed.info/sct",
                "code": "33633005",
                "display": "Prescription of drug"
            }
        ]
    },
    "authoredOn": "2016-07-11T11:07:21+00:00",
    "input":  [
        {
            "type": {
                "coding":  [
                    {
                        "system": "http://snomed.info/sct",
                        "code": "16076005",
                        "display": "Prescription"
                    }
                ]
            },
            "valueReference": {
                "identifier": {
                    "system": "https://tools.ietf.org/html/rfc4122",
                    "value": "ee86a018-779c-4809-999f-a9d89cdfd30f"
                }
            }
        }
    ],
    "output":  [
        {
            "extension":  [
                {
                    "url": "https://fhir.nhs.uk/StructureDefinition/ExtensionRepeatDispensingInformation",
                    "extension":  [
                        {
                            "url": "dateLastDispensed",
                            "valueDateTime": "2014-05-07"
                        }
                    ]
                }
            ],
            "type": {
                "coding":  [
                    {
                        "system": "http://snomed.info/sct",
                        "code": "373784005",
                        "display": "Dispensing medication"
                    }
                ]
            },
            "valueReference": {
                "identifier": {
                    "system": "https://tools.ietf.org/html/rfc4122",
                    "value": "334a3195-1f6c-497a-8efe-d272ca9c4e38"
                }
            }
        }
    ]
}
<Task xmlns="http://hl7.org/fhir">
    <id value="bd1ca5c4-ff49-4f2a-9db4-f5dda0112084" />
    <meta>
        <lastUpdated value="2016-07-11T11:07:22+00:00" />
    </meta>
    <contained>
        <PractitionerRole>
            <id value="requester" />
            <identifier>
                <system value="https://fhir.nhs.uk/Id/sds-role-profile-id" />
                <value value="641555508106" />
            </identifier>
            <practitioner>
                <identifier>
                    <system value="https://fhir.nhs.uk/Id/sds-user-id" />
                    <value value="7654321" />
                </identifier>
                <display value="DR AA BHATIA" />
            </practitioner>
            <organization>
                <reference value="Organization/3b4b03a5-52ba-4ba6-9b82-70350aa109d8" />
                <identifier>
                    <system value="https://fhir.nhs.uk/Id/ods-organization-code" />
                    <value value="C81007" />
                </identifier>
                <display value="VERNON STREET MEDICAL CTR" />
            </organization>
            <code>
                <coding>
                    <system value="https://fhir.nhs.uk/CodeSystem/NHSDigital-SDS-JobRoleCode" />
                    <code value="S0030:G0100:R0620" />
                </coding>
            </code>
            <telecom>
                <system value="phone" />
                <value value="01234567890" />
                <use value="work" />
            </telecom>
        </PractitionerRole>
    </contained>
    <extension url="https://fhir.nhs.uk/StructureDefinition/Extension-EPS-Prescription">
        <extension url="courseOfTherapyType">
            <valueCoding>
                <system value="http://terminology.hl7.org/CodeSystem/medicationrequest-course-of-therapy" />
                <code value="acute" />
                <display value="Acute" />
            </valueCoding>
        </extension>
    </extension>
    <identifier>
        <system value="https://tools.ietf.org/html/rfc4122" />
        <value value="bd1ca5c4-ff49-4f2a-9db4-f5dda0112084" />
    </identifier>
    <status value="in-progress" />
    <businessStatus>
        <coding>
            <system value="https://fhir.nhs.uk/CodeSystem/EPS-task-business-status" />
            <code value="0002" />
            <display value="With Dispenser" />
        </coding>
    </businessStatus>
    <intent value="order" />
    <code>
        <coding>
            <system value="http://hl7.org/fhir/CodeSystem/task-code" />
            <code value="fulfill" />
            <display value="Fulfill the focal request" />
        </coding>
    </code>
    <focus>
        <type value="Task" />
        <identifier>
            <system value="https://fhir.nhs.uk/Id/prescription-order-number" />
            <value value="A3B4D9-Z42475-11E6B+" />
        </identifier>
    </focus>
    <for>
        <identifier>
            <system value="https://fhir.nhs.uk/Id/nhs-number" />
            <value value="9912003489" />
        </identifier>
    </for>
    <authoredOn value="2016-07-11T11:07:21+00:00" />
    <requester>
        <reference value="#requester" />
    </requester>
    <owner>
        <identifier>
            <system value="https://fhir.nhs.uk/Id/ods-organization-code" />
            <value value="FA666" />
        </identifier>
        <display value="CROYDON PHARMACY" />
    </owner>
    <reasonCode>
        <coding>
            <system value="http://snomed.info/sct" />
            <code value="33633005" />
            <display value="Prescription of drug" />
        </coding>
    </reasonCode>
    <input>
        <type>
            <coding>
                <system value="http://snomed.info/sct" />
                <code value="16076005" />
                <display value="Prescription" />
            </coding>
        </type>
        <valueReference>
            <identifier>
                <system value="https://tools.ietf.org/html/rfc4122" />
                <value value="ee86a018-779c-4809-999f-a9d89cdfd30f" />
            </identifier>
        </valueReference>
    </input>
    <output>
        <extension url="https://fhir.nhs.uk/StructureDefinition/ExtensionRepeatDispensingInformation">
            <extension url="dateLastDispensed">
                <valueDateTime value="2014-05-07" />
            </extension>
        </extension>
        <type>
            <coding>
                <system value="http://snomed.info/sct" />
                <code value="373784005" />
                <display value="Dispensing medication" />
            </coding>
        </type>
        <valueReference>
            <identifier>
                <system value="https://tools.ietf.org/html/rfc4122" />
                <value value="334a3195-1f6c-497a-8efe-d272ca9c4e38" />
            </identifier>
        </valueReference>
    </output>
</Task>
Task

Task EPS Prescription Tracker 2

{
    "resourceType": "Task",
    "id": "1828584c-55cb-4888-9529-c85499888188",
    "meta": {
        "lastUpdated": "2018-04-22T09:57:03+00:00"
    },
    "extension":  [
        {
            "url": "https://fhir.nhs.uk/StructureDefinition/Extension-EPS-RepeatInformation",
            "extension":  [
                {
                    "url": "numberOfRepeatsAllowed",
                    "valueInteger": 6
                },
                {
                    "url": "numberOfRepeatsIssued",
                    "valueInteger": 2
                }
            ]
        },
        {
            "url": "https://fhir.nhs.uk/StructureDefinition/Extension-EPS-Prescription",
            "extension":  [
                {
                    "url": "courseOfTherapyType",
                    "valueCoding": {
                        "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-course-of-therapy",
                        "code": "acute",
                        "display": "Acute"
                    }
                }
            ]
        }
    ],
    "contained":  [
        {
            "resourceType": "PractitionerRole",
            "id": "requester",
            "identifier":  [
                {
                    "system": "https://fhir.nhs.uk/Id/sds-role-profile-id",
                    "value": "641555508105"
                }
            ],
            "code":  [
                {
                    "coding":  [
                        {
                            "system": "https://fhir.nhs.uk/CodeSystem/NHSDigital-SDS-JobRoleCode",
                            "code": "S0030:G0100:R0620"
                        }
                    ]
                }
            ],
            "practitioner": {
                "identifier": {
                    "system": "https://fhir.nhs.uk/Id/sds-user-id",
                    "value": "7654321"
                },
                "display": "Dr Sarah Sunshine"
            },
            "organization": {
                "reference": "Organization/3b4b03a5-52ba-4ba6-9b82-70350aa109d8",
                "identifier": {
                    "system": "https://fhir.nhs.uk/Id/ods-organization-code",
                    "value": "M12345"
                },
                "display": "EveryDay Surgery"
            },
            "telecom":  [
                {
                    "system": "phone",
                    "use": "work",
                    "value": "01234567890"
                }
            ]
        }
    ],
    "identifier":  [
        {
            "system": "https://tools.ietf.org/html/rfc4122",
            "value": "1828584c-55cb-4888-9529-c85499888188"
        }
    ],
    "status": "completed",
    "businessStatus": {
        "coding":  [
            {
                "system": "https://fhir.nhs.uk/CodeSystem/EPS-task-business-status",
                "code": "0002",
                "display": "Dispensed"
            }
        ]
    },
    "intent": "order",
    "code": {
        "coding":  [
            {
                "system": "http://hl7.org/fhir/CodeSystem/task-code",
                "code": "fulfill",
                "display": "Fulfill the focal request"
            }
        ]
    },
    "focus": {
        "identifier": {
            "system": "https://fhir.nhs.uk/Id/prescription-order-number",
            "value": "2D35F7-ZA0448-11E88Z"
        }
    },
    "for": {
        "identifier": {
            "system": "https://fhir.nhs.uk/Id/nhs-number",
            "value": "9912003489"
        }
    },
    "requester": {
        "reference": "#requester"
    },
    "owner": {
        "identifier": {
            "system": "https://fhir.nhs.uk/Id/ods-organization-code",
            "value": "FB444"
        },
        "display": "Freds Pharmacy"
    },
    "reasonCode": {
        "coding":  [
            {
                "system": "http://snomed.info/sct",
                "code": "33633005",
                "display": "Prescription of drug"
            }
        ]
    },
    "authoredOn": "2016-07-11T11:07:21+00:00",
    "input":  [
        {
            "extension":  [
                {
                    "url": "https://fhir.nhs.uk/StructureDefinition/Extension-EPS-DispensingInformation",
                    "extension":  [
                        {
                            "url": "dispenseStatus",
                            "valueCoding": {
                                "system": "https://fhir.nhs.uk/CodeSystem/medicationdispense-type",
                                "code": "0001",
                                "display": "Item fully dispensed"
                            }
                        },
                        {
                            "url": "dateLastDispensed",
                            "valueDateTime": "2018-04-22T09:57:03+00:00"
                        }
                    ]
                }
            ],
            "type": {
                "coding":  [
                    {
                        "system": "http://snomed.info/sct",
                        "code": "16076005",
                        "display": "Prescription"
                    }
                ]
            },
            "valueReference": {
                "reference": "https://prescriptions.spineservices.nhs.uk/FHIR/R4/MedicationRequest/30b7e9cf-6f42-40a8-84c1-e61ef638eee2",
                "identifier": {
                    "system": "https://fhir.nhs.uk/Id/prescription-order-item-number",
                    "value": "30b7e9cf-6f42-40a8-84c1-e61ef638eee2"
                },
                "display": "Perindopril erbumine 2mg tablets"
            }
        },
        {
            "extension":  [
                {
                    "url": "https://fhir.nhs.uk/StructureDefinition/Extension-EPS-DispensingInformation",
                    "extension":  [
                        {
                            "url": "dispenseStatus",
                            "valueCoding": {
                                "system": "https://fhir.nhs.uk/CodeSystem/medicationdispense-type",
                                "code": "0001",
                                "display": "Item fully dispensed"
                            }
                        },
                        {
                            "url": "dateLastDispensed",
                            "valueDateTime": "2018-04-22T09:57:03+00:00"
                        }
                    ]
                }
            ],
            "type": {
                "coding":  [
                    {
                        "system": "http://snomed.info/sct",
                        "code": "16076005",
                        "display": "Prescription"
                    }
                ]
            },
            "valueReference": {
                "reference": "https://prescriptions.spineservices.nhs.uk/FHIR/R4/MedicationRequest/636f1b57-e18c-4f45-acae-2d7db86b6e1e",
                "identifier": {
                    "system": "https://fhir.nhs.uk/Id/prescription-order-item-number",
                    "value": "636f1b57-e18c-4f45-acae-2d7db86b6e1e"
                },
                "display": "Metformin 500mg modified-release tablets"
            }
        }
    ],
    "output":  [
        {
            "extension":  [
                {
                    "url": "https://fhir.nhs.uk/StructureDefinition/Extension-EPS-DispensingReleaseInformation",
                    "extension":  [
                        {
                            "url": "dateLastIssuedDispensed",
                            "valueDateTime": "2018-04-22T09:57:03+00:00"
                        },
                        {
                            "url": "dateDownloaded",
                            "valueDateTime": "2018-04-22T09:57:03+00:00"
                        }
                    ]
                }
            ],
            "type": {
                "coding":  [
                    {
                        "system": "http://snomed.info/sct",
                        "code": "373784005",
                        "display": "Dispensing medication"
                    }
                ]
            },
            "valueReference": {
                "identifier": {
                    "system": "https://tools.ietf.org/html/rfc4122",
                    "value": "334a3195-1f6c-497a-8efe-d272ca9c4e38"
                }
            }
        }
    ]
}
<Task xmlns="http://hl7.org/fhir">
    <id value="1828584c-55cb-4888-9529-c85499888188" />
    <meta>
        <lastUpdated value="2018-04-22T09:57:03+00:00" />
    </meta>
    <contained>
        <PractitionerRole>
            <id value="requester" />
            <identifier>
                <system value="https://fhir.nhs.uk/Id/sds-role-profile-id" />
                <value value="641555508105" />
            </identifier>
            <practitioner>
                <identifier>
                    <system value="https://fhir.nhs.uk/Id/sds-user-id" />
                    <value value="7654321" />
                </identifier>
                <display value="Dr Sarah Sunshine" />
            </practitioner>
            <organization>
                <reference value="Organization/3b4b03a5-52ba-4ba6-9b82-70350aa109d8" />
                <identifier>
                    <system value="https://fhir.nhs.uk/Id/ods-organization-code" />
                    <value value="M12345" />
                </identifier>
                <display value="EveryDay Surgery" />
            </organization>
            <code>
                <coding>
                    <system value="https://fhir.nhs.uk/CodeSystem/NHSDigital-SDS-JobRoleCode" />
                    <code value="S0030:G0100:R0620" />
                </coding>
            </code>
            <telecom>
                <system value="phone" />
                <value value="01234567890" />
                <use value="work" />
            </telecom>
        </PractitionerRole>
    </contained>
    <extension url="https://fhir.nhs.uk/StructureDefinition/Extension-EPS-RepeatInformation">
        <extension url="numberOfRepeatsAllowed">
            <valueInteger value="6" />
        </extension>
        <extension url="numberOfRepeatsIssued">
            <valueInteger value="2" />
        </extension>
    </extension>
    <extension url="https://fhir.nhs.uk/StructureDefinition/Extension-EPS-Prescription">
        <extension url="courseOfTherapyType">
            <valueCoding>
                <system value="http://terminology.hl7.org/CodeSystem/medicationrequest-course-of-therapy" />
                <code value="acute" />
                <display value="Acute" />
            </valueCoding>
        </extension>
    </extension>
    <identifier>
        <system value="https://tools.ietf.org/html/rfc4122" />
        <value value="1828584c-55cb-4888-9529-c85499888188" />
    </identifier>
    <status value="completed" />
    <businessStatus>
        <coding>
            <system value="https://fhir.nhs.uk/CodeSystem/EPS-task-business-status" />
            <code value="0002" />
            <display value="Dispensed" />
        </coding>
    </businessStatus>
    <intent value="order" />
    <code>
        <coding>
            <system value="http://hl7.org/fhir/CodeSystem/task-code" />
            <code value="fulfill" />
            <display value="Fulfill the focal request" />
        </coding>
    </code>
    <focus>
        <identifier>
            <system value="https://fhir.nhs.uk/Id/prescription-order-number" />
            <value value="2D35F7-ZA0448-11E88Z" />
        </identifier>
    </focus>
    <for>
        <identifier>
            <system value="https://fhir.nhs.uk/Id/nhs-number" />
            <value value="9912003489" />
        </identifier>
    </for>
    <authoredOn value="2016-07-11T11:07:21+00:00" />
    <requester>
        <reference value="#requester" />
    </requester>
    <owner>
        <identifier>
            <system value="https://fhir.nhs.uk/Id/ods-organization-code" />
            <value value="FB444" />
        </identifier>
        <display value="Freds Pharmacy" />
    </owner>
    <reasonCode>
        <coding>
            <system value="http://snomed.info/sct" />
            <code value="33633005" />
            <display value="Prescription of drug" />
        </coding>
    </reasonCode>
    <input>
        <extension url="https://fhir.nhs.uk/StructureDefinition/Extension-EPS-DispensingInformation">
            <extension url="dispenseStatus">
                <valueCoding>
                    <system value="https://fhir.nhs.uk/CodeSystem/medicationdispense-type" />
                    <code value="0001" />
                    <display value="Item fully dispensed" />
                </valueCoding>
            </extension>
            <extension url="dateLastDispensed">
                <valueDateTime value="2018-04-22T09:57:03+00:00" />
            </extension>
        </extension>
        <type>
            <coding>
                <system value="http://snomed.info/sct" />
                <code value="16076005" />
                <display value="Prescription" />
            </coding>
        </type>
        <valueReference>
            <reference value="https://prescriptions.spineservices.nhs.uk/FHIR/R4/MedicationRequest/30b7e9cf-6f42-40a8-84c1-e61ef638eee2" />
            <identifier>
                <system value="https://fhir.nhs.uk/Id/prescription-order-item-number" />
                <value value="30b7e9cf-6f42-40a8-84c1-e61ef638eee2" />
            </identifier>
            <display value="Perindopril erbumine 2mg tablets" />
        </valueReference>
    </input>
    <input>
        <extension url="https://fhir.nhs.uk/StructureDefinition/Extension-EPS-DispensingInformation">
            <extension url="dispenseStatus">
                <valueCoding>
                    <system value="https://fhir.nhs.uk/CodeSystem/medicationdispense-type" />
                    <code value="0001" />
                    <display value="Item fully dispensed" />
                </valueCoding>
            </extension>
            <extension url="dateLastDispensed">
                <valueDateTime value="2018-04-22T09:57:03+00:00" />
            </extension>
        </extension>
        <type>
            <coding>
                <system value="http://snomed.info/sct" />
                <code value="16076005" />
                <display value="Prescription" />
            </coding>
        </type>
        <valueReference>
            <reference value="https://prescriptions.spineservices.nhs.uk/FHIR/R4/MedicationRequest/636f1b57-e18c-4f45-acae-2d7db86b6e1e" />
            <identifier>
                <system value="https://fhir.nhs.uk/Id/prescription-order-item-number" />
                <value value="636f1b57-e18c-4f45-acae-2d7db86b6e1e" />
            </identifier>
            <display value="Metformin 500mg modified-release tablets" />
        </valueReference>
    </input>
    <output>
        <extension url="https://fhir.nhs.uk/StructureDefinition/Extension-EPS-DispensingReleaseInformation">
            <extension url="dateLastIssuedDispensed">
                <valueDateTime value="2018-04-22T09:57:03+00:00" />
            </extension>
            <extension url="dateDownloaded">
                <valueDateTime value="2018-04-22T09:57:03+00:00" />
            </extension>
        </extension>
        <type>
            <coding>
                <system value="http://snomed.info/sct" />
                <code value="373784005" />
                <display value="Dispensing medication" />
            </coding>
        </type>
        <valueReference>
            <identifier>
                <system value="https://tools.ietf.org/html/rfc4122" />
                <value value="334a3195-1f6c-497a-8efe-d272ca9c4e38" />
            </identifier>
        </valueReference>
    </output>
</Task>
Task

Task Cancel Dispense Notification

On HL7v3 EPS this is called ETPWithdraw. This Task can cancel a previous dispense-notification message.

{
    "resourceType": "Task",
    "id": "6a2624a2-321b-470e-91a6-8ae7a065e2f0",
    "extension":  [
        {
            "url": "https://fhir.nhs.uk/StructureDefinition/Extension-Provenance-agent",
            "valueReference": {
                "identifier": {
                    "system": "https://fhir.nhs.uk/Id/sds-user-id",
                    "value": "7654321"
                }
            }
        }
    ],
    "contained":  [
        {
            "resourceType": "PractitionerRole",
            "id": "requester",
            "identifier":  [
                {
                    "system": "https://fhir.nhs.uk/Id/sds-role-profile-id",
                    "value": "641555508105"
                }
            ],
            "code":  [
                {
                    "coding":  [
                        {
                            "system": "https://fhir.nhs.uk/CodeSystem/NHSDigital-SDS-JobRoleCode",
                            "code": "S0030:G0100:R0620"
                        }
                    ]
                }
            ],
            "practitioner": {
                "identifier": {
                    "system": "https://fhir.nhs.uk/Id/sds-user-id",
                    "value": "7654321"
                },
                "display": "Mrs Anna Kanfeld"
            },
            "organization": {
                "reference": "#organisation"
            },
            "telecom":  [
                {
                    "system": "phone",
                    "use": "work",
                    "value": "01234567890"
                }
            ]
        },
        {
            "resourceType": "Organization",
            "id": "organisation",
            "identifier":  [
                {
                    "system": "https://fhir.nhs.uk/Id/ods-organization-code",
                    "value": "VNE51"
                }
            ],
            "address":  [
                {
                    "city": "West Yorkshire",
                    "use": "work",
                    "line":  [
                        "17 Austhorpe Road",
                        "Crossgates",
                        "Leeds"
                    ],
                    "postalCode": "LS15 8BA"
                }
            ],
            "active": true,
            "type":  [
                {
                    "coding":  [
                        {
                            "system": "https://fhir.nhs.uk/CodeSystem/organisation-role",
                            "code": "182",
                            "display": "PHARMACY"
                        }
                    ]
                }
            ],
            "name": "The Simple Pharmacy",
            "telecom":  [
                {
                    "system": "phone",
                    "use": "work",
                    "value": "0113 3180277"
                }
            ]
        }
    ],
    "identifier":  [
        {
            "system": "https://tools.ietf.org/html/rfc4122",
            "value": "5AC84C11-DB8B-44DA-8FCF-8980B3D13596"
        }
    ],
    "status": "cancelled",
    "statusReason": {
        "coding":  [
            {
                "system": "https://fhir.nhs.uk/CodeSystem/EPS-task-dispense-withdraw-reason",
                "code": "DA",
                "display": "Dosage Amendments"
            }
        ]
    },
    "intent": "order",
    "groupIdentifier": {
        "system": "https://fhir.nhs.uk/Id/prescription-order-number",
        "value": "88AF6C-C81007-00001C"
    },
    "code": {
        "coding":  [
            {
                "system": "http://hl7.org/fhir/CodeSystem/task-code",
                "code": "abort",
                "display": "Mark the focal resource as no longer active"
            }
        ]
    },
    "focus": {
        "type": "Bundle",
        "identifier": {
            "system": "https://tools.ietf.org/html/rfc4122",
            "value": "334a3195-1f6c-497a-8efe-d272ca9c4e38"
        }
    },
    "for": {
        "identifier": {
            "system": "https://fhir.nhs.uk/Id/nhs-number",
            "value": "9446368138"
        }
    },
    "authoredOn": "2020-12-21T17:03:20-00:00",
    "owner": {
        "identifier": {
            "system": "https://fhir.nhs.uk/Id/ods-organization-code",
            "value": "VNE51"
        }
    },
    "requester": {
        "reference": "#requester"
    },
    "reasonCode": {
        "coding":  [
            {
                "system": "http://snomed.info/sct",
                "code": "373784005",
                "display": "Dispensing medication"
            }
        ]
    }
}
<Task xmlns="http://hl7.org/fhir">
    <id value="6a2624a2-321b-470e-91a6-8ae7a065e2f0" />
    <contained>
        <PractitionerRole>
            <id value="requester" />
            <identifier>
                <system value="https://fhir.nhs.uk/Id/sds-role-profile-id" />
                <value value="641555508105" />
            </identifier>
            <practitioner>
                <identifier>
                    <system value="https://fhir.nhs.uk/Id/sds-user-id" />
                    <value value="7654321" />
                </identifier>
                <display value="Mrs Anna Kanfeld" />
            </practitioner>
            <organization>
                <reference value="#organisation" />
            </organization>
            <code>
                <coding>
                    <system value="https://fhir.nhs.uk/CodeSystem/NHSDigital-SDS-JobRoleCode" />
                    <code value="S0030:G0100:R0620" />
                </coding>
            </code>
            <telecom>
                <system value="phone" />
                <value value="01234567890" />
                <use value="work" />
            </telecom>
        </PractitionerRole>
    </contained>
    <contained>
        <Organization>
            <id value="organisation" />
            <identifier>
                <system value="https://fhir.nhs.uk/Id/ods-organization-code" />
                <value value="VNE51" />
            </identifier>
            <active value="true" />
            <type>
                <coding>
                    <system value="https://fhir.nhs.uk/CodeSystem/organisation-role" />
                    <code value="182" />
                    <display value="PHARMACY" />
                </coding>
            </type>
            <name value="The Simple Pharmacy" />
            <telecom>
                <system value="phone" />
                <value value="0113 3180277" />
                <use value="work" />
            </telecom>
            <address>
                <use value="work" />
                <line value="17 Austhorpe Road" />
                <line value="Crossgates" />
                <line value="Leeds" />
                <city value="West Yorkshire" />
                <postalCode value="LS15 8BA" />
            </address>
        </Organization>
    </contained>
    <extension url="https://fhir.nhs.uk/StructureDefinition/Extension-Provenance-agent">
        <valueReference>
            <identifier>
                <system value="https://fhir.nhs.uk/Id/sds-user-id" />
                <value value="7654321" />
            </identifier>
        </valueReference>
    </extension>
    <identifier>
        <system value="https://tools.ietf.org/html/rfc4122" />
        <value value="5AC84C11-DB8B-44DA-8FCF-8980B3D13596" />
    </identifier>
    <groupIdentifier>
        <system value="https://fhir.nhs.uk/Id/prescription-order-number" />
        <value value="88AF6C-C81007-00001C" />
    </groupIdentifier>
    <status value="cancelled" />
    <statusReason>
        <coding>
            <system value="https://fhir.nhs.uk/CodeSystem/EPS-task-dispense-withdraw-reason" />
            <code value="DA" />
            <display value="Dosage Amendments" />
        </coding>
    </statusReason>
    <intent value="order" />
    <code>
        <coding>
            <system value="http://hl7.org/fhir/CodeSystem/task-code" />
            <code value="abort" />
            <display value="Mark the focal resource as no longer active" />
        </coding>
    </code>
    <focus>
        <type value="Bundle" />
        <identifier>
            <system value="https://tools.ietf.org/html/rfc4122" />
            <value value="334a3195-1f6c-497a-8efe-d272ca9c4e38" />
        </identifier>
    </focus>
    <for>
        <identifier>
            <system value="https://fhir.nhs.uk/Id/nhs-number" />
            <value value="9446368138" />
        </identifier>
    </for>
    <authoredOn value="2020-12-21T17:03:20-00:00" />
    <requester>
        <reference value="#requester" />
    </requester>
    <owner>
        <identifier>
            <system value="https://fhir.nhs.uk/Id/ods-organization-code" />
            <value value="VNE51" />
        </identifier>
    </owner>
    <reasonCode>
        <coding>
            <system value="http://snomed.info/sct" />
            <code value="373784005" />
            <display value="Dispensing medication" />
        </coding>
    </reasonCode>
</Task>
Task

Task Return Prescription Order

A return prescription order, returns the prescription to the prescription-tracker (EPS). Medications will not have been dispensed.

{
    "resourceType": "Task",
    "id": "ee1b55f8-113c-4725-99a3-25fbad366dd6",
    "extension":  [
        {
            "url": "https://fhir.nhs.uk/StructureDefinition/Extension-Provenance-agent",
            "valueReference": {
                "identifier": {
                    "system": "https://fhir.nhs.uk/Id/sds-user-id",
                    "value": "7654321"
                }
            }
        }
    ],
    "contained":  [
        {
            "resourceType": "PractitionerRole",
            "id": "requester",
            "identifier":  [
                {
                    "system": "https://fhir.nhs.uk/Id/sds-role-profile-id",
                    "value": "641555508105"
                }
            ],
            "practitioner": {
                "identifier": {
                    "system": "https://fhir.nhs.uk/Id/sds-user-id",
                    "value": "7654321"
                },
                "display": "Ms Lottie Maifeld"
            },
            "organization": {
                "reference": "#organisation"
            },
            "code":  [
                {
                    "coding":  [
                        {
                            "system": "https://fhir.nhs.uk/CodeSystem/NHSDigital-SDS-JobRoleCode",
                            "code": "S0030:G0100:R0620"
                        }
                    ]
                }
            ],
            "telecom":  [
                {
                    "system": "phone",
                    "use": "work",
                    "value": "01234567890"
                }
            ]
        },
        {
            "resourceType": "Organization",
            "id": "organisation",
            "identifier":  [
                {
                    "system": "https://fhir.nhs.uk/Id/ods-organization-code",
                    "value": "VNE51"
                }
            ],
            "address":  [
                {
                    "city": "West Yorkshire",
                    "use": "work",
                    "line":  [
                        "17 Austhorpe Road",
                        "Crossgates",
                        "Leeds"
                    ],
                    "postalCode": "LS15 8BA"
                }
            ],
            "active": true,
            "type":  [
                {
                    "coding":  [
                        {
                            "system": "https://fhir.nhs.uk/CodeSystem/organisation-role",
                            "code": "182",
                            "display": "PHARMACY"
                        }
                    ]
                }
            ],
            "name": "The Simple Pharmacy",
            "telecom":  [
                {
                    "system": "phone",
                    "use": "work",
                    "value": "0113 3180277"
                }
            ]
        }
    ],
    "identifier":  [
        {
            "system": "https://tools.ietf.org/html/rfc4122",
            "value": "ADD2E9DD-DA0A-C266-A4E3-447C68239525"
        }
    ],
    "status": "rejected",
    "statusReason": {
        "coding":  [
            {
                "system": "https://fhir.nhs.uk/CodeSystem/EPS-task-dispense-return-status-reason",
                "code": "0002",
                "display": "Unable to dispense medication on prescriptions"
            }
        ]
    },
    "intent": "order",
    "groupIdentifier": {
        "system": "https://fhir.nhs.uk/Id/prescription-order-number",
        "value": "83C40E-A23856-00123C"
    },
    "code": {
        "coding":  [
            {
                "system": "http://hl7.org/fhir/CodeSystem/task-code",
                "code": "fulfill",
                "display": "Fulfill the focal request"
            }
        ]
    },
    "focus": {
        "identifier": {
            "system": "https://fhir.nhs.uk/Id/prescription-order-number",
            "value": "83C40E-A23856-00123C"
        }
    },
    "for": {
        "identifier": {
            "system": "https://fhir.nhs.uk/Id/nhs-number",
            "value": "9446368138"
        }
    },
    "authoredOn": "2016-03-10T22:39:32-04:00",
    "requester": {
        "reference": "#requester"
    },
    "reasonCode": {
        "coding":  [
            {
                "system": "http://snomed.info/sct",
                "code": "33633005",
                "display": "Prescription of drug"
            }
        ]
    },
    "input":  [
        {
            "type": {
                "coding":  [
                    {
                        "system": "http://snomed.info/sct",
                        "code": "16076005",
                        "display": "Prescription"
                    }
                ]
            },
            "valueReference": {
                "type": "MedicationRequest",
                "identifier": {
                    "system": "https://fhir.nhs.uk/Id/prescription-order-item-number",
                    "value": "1e34ee53-397a-2e70-e97c-67b1bd95014d"
                }
            }
        }
    ]
}
<Task xmlns="http://hl7.org/fhir">
    <id value="ee1b55f8-113c-4725-99a3-25fbad366dd6" />
    <contained>
        <PractitionerRole>
            <id value="requester" />
            <identifier>
                <system value="https://fhir.nhs.uk/Id/sds-role-profile-id" />
                <value value="641555508105" />
            </identifier>
            <practitioner>
                <identifier>
                    <system value="https://fhir.nhs.uk/Id/sds-user-id" />
                    <value value="7654321" />
                </identifier>
                <display value="Ms Lottie Maifeld" />
            </practitioner>
            <organization>
                <reference value="#organisation" />
            </organization>
            <code>
                <coding>
                    <system value="https://fhir.nhs.uk/CodeSystem/NHSDigital-SDS-JobRoleCode" />
                    <code value="S0030:G0100:R0620" />
                </coding>
            </code>
            <telecom>
                <system value="phone" />
                <value value="01234567890" />
                <use value="work" />
            </telecom>
        </PractitionerRole>
    </contained>
    <contained>
        <Organization>
            <id value="organisation" />
            <identifier>
                <system value="https://fhir.nhs.uk/Id/ods-organization-code" />
                <value value="VNE51" />
            </identifier>
            <active value="true" />
            <type>
                <coding>
                    <system value="https://fhir.nhs.uk/CodeSystem/organisation-role" />
                    <code value="182" />
                    <display value="PHARMACY" />
                </coding>
            </type>
            <name value="The Simple Pharmacy" />
            <telecom>
                <system value="phone" />
                <value value="0113 3180277" />
                <use value="work" />
            </telecom>
            <address>
                <use value="work" />
                <line value="17 Austhorpe Road" />
                <line value="Crossgates" />
                <line value="Leeds" />
                <city value="West Yorkshire" />
                <postalCode value="LS15 8BA" />
            </address>
        </Organization>
    </contained>
    <extension url="https://fhir.nhs.uk/StructureDefinition/Extension-Provenance-agent">
        <valueReference>
            <identifier>
                <system value="https://fhir.nhs.uk/Id/sds-user-id" />
                <value value="7654321" />
            </identifier>
        </valueReference>
    </extension>
    <identifier>
        <system value="https://tools.ietf.org/html/rfc4122" />
        <value value="ADD2E9DD-DA0A-C266-A4E3-447C68239525" />
    </identifier>
    <groupIdentifier>
        <system value="https://fhir.nhs.uk/Id/prescription-order-number" />
        <value value="83C40E-A23856-00123C" />
    </groupIdentifier>
    <status value="rejected" />
    <statusReason>
        <coding>
            <system value="https://fhir.nhs.uk/CodeSystem/EPS-task-dispense-return-status-reason" />
            <code value="0002" />
            <display value="Unable to dispense medication on prescriptions" />
        </coding>
    </statusReason>
    <intent value="order" />
    <code>
        <coding>
            <system value="http://hl7.org/fhir/CodeSystem/task-code" />
            <code value="fulfill" />
            <display value="Fulfill the focal request" />
        </coding>
    </code>
    <focus>
        <identifier>
            <system value="https://fhir.nhs.uk/Id/prescription-order-number" />
            <value value="83C40E-A23856-00123C" />
        </identifier>
    </focus>
    <for>
        <identifier>
            <system value="https://fhir.nhs.uk/Id/nhs-number" />
            <value value="9446368138" />
        </identifier>
    </for>
    <authoredOn value="2016-03-10T22:39:32-04:00" />
    <requester>
        <reference value="#requester" />
    </requester>
    <reasonCode>
        <coding>
            <system value="http://snomed.info/sct" />
            <code value="33633005" />
            <display value="Prescription of drug" />
        </coding>
    </reasonCode>
    <input>
        <type>
            <coding>
                <system value="http://snomed.info/sct" />
                <code value="16076005" />
                <display value="Prescription" />
            </coding>
        </type>
        <valueReference>
            <type value="MedicationRequest" />
            <identifier>
                <system value="https://fhir.nhs.uk/Id/prescription-order-item-number" />
                <value value="1e34ee53-397a-2e70-e97c-67b1bd95014d" />
            </identifier>
        </valueReference>
    </input>
</Task>
Task

Task Prescription Cancel

A cancel prescription order, cancels the prescription fulfilment request.

{
    "resourceType": "Task",
    "id": "1291fcca-902b-48f3-9d07-1be9ea30d7a0",
    "contained":  [
        {
            "resourceType": "PractitionerRole",
            "id": "requester",
            "identifier":  [
                {
                    "system": "https://fhir.nhs.uk/Id/sds-role-profile-id",
                    "value": "741555508105"
                }
            ],
            "code":  [
                {
                    "coding":  [
                        {
                            "system": "https://fhir.nhs.uk/CodeSystem/NHSDigital-SDS-JobRoleCode",
                            "code": "S0030:G0100:R0620"
                        }
                    ]
                }
            ],
            "practitioner": {
                "identifier": {
                    "system": "https://fhir.nhs.uk/Id/sds-user-id",
                    "value": "2238910010"
                },
                "display": "Dr Liz Scott"
            },
            "organization": {
                "reference": "Organization/3b4b03a5-52ba-4ba6-9b82-70350aa109d8",
                "identifier": {
                    "system": "https://fhir.nhs.uk/Id/ods-organization-code",
                    "value": "RBA"
                },
                "display": "The Acute Trust"
            },
            "telecom":  [
                {
                    "system": "phone",
                    "use": "work",
                    "value": "01234567890"
                }
            ]
        }
    ],
    "identifier":  [
        {
            "system": "https://tools.ietf.org/html/rfc4122",
            "value": "ADD2E9DD-DA0A-C266-A4E3-447C68239525"
        }
    ],
    "status": "cancelled",
    "statusReason": {
        "coding":  [
            {
                "system": "https://fhir.nhs.uk/CodeSystem/medicationrequest-status-reason",
                "code": "0001",
                "display": "Prescribing Error"
            }
        ]
    },
    "intent": "order",
    "code": {
        "coding":  [
            {
                "system": "http://hl7.org/fhir/CodeSystem/task-code",
                "code": "abort",
                "display": "Mark the focal resource as no longer active"
            }
        ]
    },
    "focus": {
        "reference": "MedicationRequest/ee86a018-779c-4809-999f-a9d89cdfd30f"
    },
    "for": {
        "identifier": {
            "system": "https://fhir.nhs.uk/Id/nhs-number",
            "value": "9453740519"
        },
        "display": "MISS ETTA CORY"
    },
    "authoredOn": "2019-12-30T12:00:00+00:00",
    "requester": {
        "reference": "#requester"
    },
    "note":  [
        {
            "text": "Prescription cancellation reason - missing in nextgen"
        }
    ]
}
<Task xmlns="http://hl7.org/fhir">
    <id value="1291fcca-902b-48f3-9d07-1be9ea30d7a0" />
    <contained>
        <PractitionerRole>
            <id value="requester" />
            <identifier>
                <system value="https://fhir.nhs.uk/Id/sds-role-profile-id" />
                <value value="741555508105" />
            </identifier>
            <practitioner>
                <identifier>
                    <system value="https://fhir.nhs.uk/Id/sds-user-id" />
                    <value value="2238910010" />
                </identifier>
                <display value="Dr Liz Scott" />
            </practitioner>
            <organization>
                <reference value="Organization/3b4b03a5-52ba-4ba6-9b82-70350aa109d8" />
                <identifier>
                    <system value="https://fhir.nhs.uk/Id/ods-organization-code" />
                    <value value="RBA" />
                </identifier>
                <display value="The Acute Trust" />
            </organization>
            <code>
                <coding>
                    <system value="https://fhir.nhs.uk/CodeSystem/NHSDigital-SDS-JobRoleCode" />
                    <code value="S0030:G0100:R0620" />
                </coding>
            </code>
            <telecom>
                <system value="phone" />
                <value value="01234567890" />
                <use value="work" />
            </telecom>
        </PractitionerRole>
    </contained>
    <identifier>
        <system value="https://tools.ietf.org/html/rfc4122" />
        <value value="ADD2E9DD-DA0A-C266-A4E3-447C68239525" />
    </identifier>
    <status value="cancelled" />
    <statusReason>
        <coding>
            <system value="https://fhir.nhs.uk/CodeSystem/medicationrequest-status-reason" />
            <code value="0001" />
            <display value="Prescribing Error" />
        </coding>
    </statusReason>
    <intent value="order" />
    <code>
        <coding>
            <system value="http://hl7.org/fhir/CodeSystem/task-code" />
            <code value="abort" />
            <display value="Mark the focal resource as no longer active" />
        </coding>
    </code>
    <focus>
        <reference value="MedicationRequest/ee86a018-779c-4809-999f-a9d89cdfd30f" />
    </focus>
    <for>
        <identifier>
            <system value="https://fhir.nhs.uk/Id/nhs-number" />
            <value value="9453740519" />
        </identifier>
        <display value="MISS ETTA CORY" />
    </for>
    <authoredOn value="2019-12-30T12:00:00+00:00" />
    <requester>
        <reference value="#requester" />
    </requester>
    <note>
        <text value="Prescription cancellation reason - missing in nextgen" />
    </note>
</Task>
Task
back to top