Electronic Prescription Service (EPS) Implementation Guide

Dispense Notification Withdraw

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

A submitted Dispense Notification can be withdrawn (deleted) using a Task resource if it was sent in error and cannot be corrected by a Dispense Notification Update.

The identifier of the dispense-notification message being withdrawn must be provided within the focus.identifier.value of the Task resource. The groupIdentifier.value (prescription id) for the prescription must also be provided.

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

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.

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

image-dispenser-withdraw

Here is an incomplete example containing comments to aid readability.

{
  "resourceType": "Task",
  "id": "6a2624a2-321b-470e-91a6-8ae7a065e2f0",
  "contained": [
    {
      "resourceType": "PractitionerRole",
      "id": "requester",
... a PractitionerRole resource
    },
    {
      "resourceType": "Organization",
... an Organization resource
    }
  ],
  "extension": [
    {
      "url": "https://fhir.nhs.uk/StructureDefinition/Extension-Provenance-agent",
      "valueReference": {
        "identifier": {
          "system": "https://fhir.nhs.uk/Id/sds-user-id",
          "value": "7654321"
        }
      }
    }
  ],
  "identifier": [
    {
      "system": "https://tools.ietf.org/html/rfc4122",
      "value": "5AC84C11-DB8B-44DA-8FCF-8980B3D13596"
    }
  ],
  "groupIdentifier": {
    "system": "https://fhir.nhs.uk/Id/prescription-order-number",
    "value": "24F5DA-A83008-7EFE6Z" ... groupIdentifier from the prescription-order
  },
  "status": "in-progress",
  "statusReason": {
    "coding": [
      {
        "system": "https://fhir.nhs.uk/CodeSystem/EPS-task-dispense-withdraw-reason",
        "code": "MU",
        "display": "Medication Update"
      }
    ]
  },
  "intent": "order",
  "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": "a14d4fc1-82a2-4a82-aae2-50e212e7b907" ... identifier from the dispense-notification message being withdrawn
    }
  },
  "for": {
    "identifier": {
      "system": "https://fhir.nhs.uk/Id/nhs-number",
      "value": "9449304130"
    }
  },
  "authoredOn": "2022-11-29T11:45:00+00:00",
  "requester": {
    "reference": "#requester"
  },
  "owner": {
    "identifier": {
      "system": "https://fhir.nhs.uk/Id/ods-organization-code",
      "value": "VNE51"
    }
  },
  "reasonCode": {
    "coding": [
      {
        "system": "http://snomed.info/sct",
        "code": "373784005",
        "display": "Dispensing medication"
      }
    ]
  }
}


back to top