NHS Digital FHIR Medicines

Download Prescription from EPS


nominatedreleaserequest

The prescription needs to be collected by the pharmacy, this is achieved by calling the FHIR Operation release with either to release all prescriptions for a pharmacy NominatedPharmacyReleaseRequest or to release a specified prescription PatientPrescriptionReleaseRequest

Example - Nominated Pharmacy

POST /Task/$release

Payload to download all uncollected prescriptions for pharmacy with ODS Code of VNE51.

{
    "resourceType": "Parameters",
    "parameter":  [
        {
            "name": "owner",
            "valueIdentifier": {
                "system": "https://fhir.nhs.uk/Id/ods-organization-code",
                "value": "VNE51"
            }
        },
        {
            "name": "status",
            "valueCode": "accepted"
        }
    ]
}

Example - Patient Prescription Release Request

POST /Task/$release

Payload to download a Patients prescription with token 82D996-C81010-11DB12

{
    "resourceType": "Parameters",
    "parameter":  [
        {
            "name": "owner",
            "valueIdentifier": {
                "system": "https://fhir.nhs.uk/Id/ods-organization-code",
                "value": "VNE51"
            }
        },
        {
            "name": "group-identifier",
            "valueIdentifier": {
                "system": "https://fhir.nhs.uk/Id/prescription-order-number",
                "value": "82D996-C81010-11DB12"
            }
        },
        {
            "name": "status",
            "valueCode": "accepted"
        }
    ]
}

Response Payload

The response from the $release will be a FHIR Bundle with a Http status code of 200 OK.

The total number of prescription-order messages returned will be in the total element. The identifier.value is the release reference number and is used for reference in dispense messages.

The prescription-order is carried in the entry[].resource array. If no prescription-orders are found total and the number of entries will be zero. The number of entries and the total will match, paging is not supported in this API.

The $release is not a stateless operation. The $release operation only returns prescriptions that have not been downloaded, when the operation $release is called, EPS marks the the prescriptions as downloaded. So when $release is called again, any remaining prescriptions not marked as downloaded will be returned. The downloaded status corresponds to a FHIR Task status of accepted and businessStatus of 0002 With Dispenser, prescriptions undownloaded are deemed to have status of requested and businessStatus of 0001 To be Dispensed.

prescription-order examples and documentation can be found here prescription-order

{
    "resourceType": "Bundle",
    "id": "E9DDBBC4-DA9A-C223-A2E3-909534332C69",
    "meta": {
        "lastUpdated": "2004-09-20T10:30:00.000+00:00"
    },
    "identifier": {
        "system": "https://tools.ietf.org/html/rfc4122",
        "value": "BBC4E9DD-DA9A-C223-A2E3-332C69909534"
    },
    "type": "searchset",
    "total": 0
}

back to top