Explore development tutorials, how-tos and case studies


Key Words

Electronic Prescription Service (EPS) For Dummies Part II: A deeper look

Useful References

Please first read Part I – Electronic Prescription Service (EPS) For Dummies.


Let’s get a little deeper into the EPS with three technical architecture models. These come from a modelling tool used by the technical architecture team within NHS Digital.

The first is a Data Flow Model. This will highlight which data flows are supported by the EPS and which continue as per paper prescribing processes.

Next is a State Transition Diagram for a prescription record. This highlights many of the logic complexities that exist within the English primary care prescribing service.

Finally a technical Component View Model that highlights the different systems and interfaces that make up the service.

Data Flow Model

Flows that apply to both paper and electronic prescription processes are in orange. These include clinical decision support and the legal reimbursement invoice to the NHSBSA, the FP34C paper invoice form. The FP34C should be replaced by the NHSBSA with a paperless solution in due course.

EPS Data Flow Model

EPS Data Flow Model

State Transition Diagram

The state transition diagram for a prescription record can look daunting. It becomes more manageable if viewed as three separate diagrams.

Note. The medication items within a prescription are also subject to state transition logic. In many ways the item state transition diagram mirrors that for the prescription.

Normal Transitions

The path shown in blue is the normal workflow for a prescription. A prescription is created by a prescribing system and uploaded to the EPS [Status = To Be Dispensed]. A dispensing system downloads the prescription [Status = With Dispenser]. The medication items within the prescription are dispensed and recorded within a message going back up to the EPS [Status = Dispensed]. Before the end of the claim month period (timescales defined by the NHSBSA) the dispensing system submits a message to the EPS containing information the NHSBSA require to process the reimbursement claim for the prescription [Status = Claimed].

EPS State Transition Diagram

EPS State Transition Diagram

Now comes the complexities…

Repeat Dispensing Transitions

The path in green are additional workflow steps that apply to repeat dispensing prescriptions. A repeat dispensing prescription is a repeatable prescription, for the same medication items, for a given number of issues over the period of up to one year. Most common would be a repeat dispensing prescription for 6 or 12 issues of a month’s supply of medication.

The EPS creates all the future issues of a repeat dispensing prescription on receipt of the signed master prescription. Each issue is identical, and guaranteed to be so because of the advanced electronic signature. The repeat issue number, an attribute of the prescription record, is excluded from the signature hash thus this increments for each issue without invalidating the signature. When the previous issue is completed, the next issue is made available to be downloaded.

Alternative Dispensing Transitions

Prescribed medication items within a prescription may not all be dispensed, or may not all be dispensed at the same time. In some cases the patient may not want all the medication. In other cases stock issues may require the patient to come back another time after the next re-up by the pharmacy wholesaler.

The path in black supports these processes. “Partial dispensing” is when only part of the required quantity is dispensed, i.e. 14 tablets out of 28 required, with the remainder to be supplied at another time. “Owings” are when an entire medication item is not supplied, but will be at another time.

Humans make mistakes so the messages sent back to the EPS from dispensing systems can be corrected via the Amend Dispense and Amend Claim process.

Finally, if a prescription is recorded as “Dispensed” but, after a long period of time, it is not followed by a claim message, the EPS marks the prescription as “No Claim Notified” and notifies the NHSBSA of this fact.

Exception Transitions

Numerous exception workflows turn the state transition diagram into spaghetti and these are shown in red.

Prescriptions or individual items within the prescription can be cancelled by the prescribing system.

UK medicines law defines the lifetime of a prescription; 6 months for most prescriptions, 28 days for Schedule 2 & 3 controlled drug medication items and 12 months for repeat dispensing prescriptions. One important limitation of the EPS today is that it only enforces the 6 month and 12 month expiry rules. The EPS does not calculate or enforce the 28 day expiry rules. This is the responsibility of EPS-compliant dispensing systems.

Prescriptions can be returned to the EPS so that another dispenser can download them. Only whole prescriptions can be returned so only applies if no dispensing activities have started.

Component View Model

The component view model does not need much additional narrative, so I’m not going to provide any.

EPS Component View Model

EPS Component View Model