Prescription Orders Overview
1. Create the prescription-order message
Detailed instructions can be found Developing Prescription Order Message
2. Add the Digital Signature
The order message prescription-order is sent to the EPS $prepare
endpoint to generate the digitial signature.
Example message Prescription Order Homecare Prepare
This is added to the prescription-order
message in a FHIR DM-Provenance resource and the amended prescription-order
is then sent to the $process-message
endpoint.
3. Send the prescription-order message
The $process-message
endpoint follows FHIR Messaging standards and the operation definition for this can be found here process-message. The response to this call will be a FHIR Bundle containing OperationOutcome which indicate success or failure, this is also known as application-acknowledgement
in existing EPS documentation.
Example message Prescription Order Homecare using Medication resource
4. Cancel the prescription-order (if required)
Changes such as a cancelling a prescription item (MedicationRequest) are sent within a prescription-order-update message to the same $process-message
endpoint the intial order was sent to and will respond with an application-acknowledement
. This does not indicate the prescription items have been cancelled just the request has been accepted.
Conformation the prescription has been updated is returned via a prescription-order-response message.
Example update message Prescription Order Homecare Update
4a. Cancellation Response Messages
Example update response message Prescription Order Homecare Response
Multiple responses to the prescription-order-update may be received.
At present the delivery method for responses responses has not been defined.
Developing Prescription Order Message
Overview
The FHIR Message Bundle that is sent to EPS MUST following the rules in this MessageDefinition prescription-order
This Bundle consists of several resources and is designed to allow reuse of resources from other services.
- Patient from PDS
- Practitioner from SDS (not currently a FHIR enabled service)
- PractitonerRole from SDS (not currently a FHIR enabled service)
- Organization from SDS or ODS (STU3)
- Signature from EPS Signing Services
MedicationRequest has to be constructed but this resource should be forward compatible with other UK Core based system, i.e. it can be reused.
The use of these services to source these resources is not necessary and any UK Core can be used. However the resources MUST also follow the rules within this ImplementationGuide. In other words the EPS will not accept FHIR resources that don't meet the data requirements of EPS.
Important |
---|
EPS will not not reject messages that exceed EPS requirements, it will not process them and these will NOT be pass onto downstream systems (e.g. pharmacists). |
Use of Meta
The tolerant principle outlined above is a change in the use of the meta elements in FHIR resources. Previous UK Implementation Guides mandated/suggested profile conformance within the meta section, e.g.
{ "resourceType": "MedicationRequest", "meta": { "profile": [ "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-MedicationRequest-1" ] } }
This example states the resource conforms to the https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-MedicationRequest-1 profile. In EPS this is not necessary, the EPS API's will check all resources against EPS profiles. If you wish to include a meta section it SHOULD state the relevant UK-Core profile, e.g.
{ "resourceType": "MedicationRequest", "meta": { "profile": [ "https://fhir.nhs.uk/StructureDefinition/UKCore-MedicationRequest" ] } }
Resource Validation |
---|
Unlike STU3 where profile complinace was stated in resources, R4 focuses on the receiving service checking compliance according to the rules it needs to follow |
Prescription Cancellations
1. Prescriber - Send Prescription
This is sent to FHIR Operation process-message as a prescription-order Message.
The example outpatient prescription Prescription Order Outpatient Multiple Medications consists of four Medications and has nominated pharmacy FX478
Medication ID (SNOMED) | Medication Name | Prescribed Quantity | Unit of Measure |
---|---|---|---|
321196004 | Diazepam 2mg tablets | 28 | Tablet |
322236009 | Paracetamol 500mg tablets | 100 | Tablet |
321152004 | Temazepam 10mg tablets | 14 | Tablet |
36126511000001106 | Morphine 10mg modified-release tablets | 28 | Tablet |
2. Dispenser - Release Prescription.
The Pharmacy releases the prescription by calling the FHIR Operation release
POST /Task/$release
Example of the payload NominatedPharmacyReleaseRequest FX478
3. Prescriber - Prescription MedicationRequest Cancellation
An electronic prescription MedicationRequest can be cancelled after submission to EPS provided the prescription has not been downloaded or processed by a dispenser.
To cancel a prescription the prescribing system is required to send a prescription-order-update cancellation message to the FHIR Operation process-message. A cancellation is at individual item level. Cancellation is applicable to all types of electronic prescriptions (i.e. acute, continuous prescribing and continuous dispensing prescriptions).
Example cancellation message Prescription Order Outpatient Cancel which cancels the Morphine medication.
Medication ID (SNOMED) | Medication Name | Prescribed Quantity | Unit of Measure |
---|---|---|---|
36126511000001106 | Morphine 10mg modified-release tablets | 28 | Tablet |
Note: this prescription is being cancelled by a clerical worker and the original prescriber is now down as the responsible party.
4. Prescriber - Prescription Cancellation Response
The immediate response to a cancellation messge is a prescription-order-response FHIR Message. Example message Prescription Order Outpatient Response
5 Prescriber - Contact Pharmacy
Prescriptions sent to a nominated pharmacy are likely to be collected before they have been cancelled. This has happened in the above example and the prescriber SHOULD contact the pharmacy to cancel the prescription.
6 Dispenser - Dispense Proposal Withdrawal
As no Medications have been dispensed, the pharmacy can return the entire prescription back to EPS. This is performed sending a FHIR Task to EPS Task endpoint. Note the full prescription must be returned to allow a single MedicationRequest to be cancelled.
PUT /Task
Example payload Task Return Prescription Order
7 Prescriber - Subsequent Cancellation Response
As the prescription has now been returned to EPS, EPS can now send a prescription-order-response message to the prescriber. This is sent via MESH and example payload:
Prescription Order Outpatient Subsequent Response
8 Dispenser - Re-Release Prescription
The dispenser can now download the modified prescription for dispensing. This is similar to step 2.