Electronic Prescription Service (EPS) Implementation Guide

Prescription Return

FHIR Exchange API endpoint FHIR Definition
FHIR RESTful POST /Task#return NHSDigital-Task

A prescription-order may be downloaded, but never dispensed by the pharmacy, for example if the pharmacy cannot supply the prescribed medication items. To allow the patient to visit a different dispenser the prescription must be returned to the EPS using a Task resource. Once returned, the prescription record should be removed from the local system.

The identifier from the release response message which released the prescription must be provided within the focus.identifier.value of the Task resource. The groupIdentifier.value (prescription id) for the prescription must also be provided.

The Task resource requires references to a PractitionerRole and Organization resources and as this is a RESTful endpoint, these must be included within the Task resource as contained resources.

Only a complete prescription-order can be returned. It is not possible to return just one of the prescribed medication items on a multi-item prescription.

When returning a repeat dispensing prescription the Extension-EPS-RepeatInformation extension identifies which issue is being returned, and the Extension-EPS-Prescription extension identifies the prescription as repeat dispensing (i.e. continuous-repeat-dispensing).

The response will be an OperationOutcome resource which indicate success or failure.

image-dispenser-return

Here is an incomplete example containing comments to aid readability:

{
  "resourceType": "Task",
  "id": "ee1b55f8-113c-4725-99a3-25fbad366dd6",
  "contained": [
    {
      "resourceType": "PractitionerRole",
      "id": "requester",
... a PractitionerRole resource
    },
    {
      "resourceType": "Organization",
... an Organization resource
    }
  ],
  "identifier": [
    {
      "system": "https://tools.ietf.org/html/rfc4122",
      "value": "ee1b55f8-113c-4725-99a3-25fbad366dd6"
    }
  ],
  "status": "rejected",
  "statusReason": {
    "coding": [
      {
        "system": "https://fhir.nhs.uk/CodeSystem/EPS-task-dispense-return-status-reason",
        "code": "0003",
        "display": "Patient requested release"
      }
    ]
  },
  "intent": "order",
  "code": {
    "coding": [
      {
        "system": "http://hl7.org/fhir/CodeSystem/task-code",
        "code": "fulfill",
        "display": "Fulfill the focal request"
      }
    ]
  },
  "groupIdentifier": {
    "system": "https://fhir.nhs.uk/Id/prescription-order-number",
    "value": "24F5DA-A83008-7EFE6Z" ... groupIdentifier from the prescription-order
  },
  "focus": {
    "identifier": {
      "system": "https://tools.ietf.org/html/rfc4122",
      "value": "a5d77265-8ba5-4c74-b8ce-ea0dbaafbdb8" ... identifier from the $release response which released the prescription that is being returned
    }
  },
  "for": {
    "identifier": {
      "system": "https://fhir.nhs.uk/Id/nhs-number",
      "value": "9449304130"
    }
  },
  "authoredOn": "2022-11-21T14:30:00+00:00",
  "requester": {
    "reference": "#requester"
  },
  "reasonCode": {
    "coding": [
      {
        "system": "http://snomed.info/sct",
        "code": "33633005",
        "display": "Prescription of drug"
      }
    ]
  }
}

back to top