EPS — NHS Electronic Prescription System

Laravel 12
Livewire 3 + Volt
PostgreSQL
DomPDF
Google 2FA (TOTP)

The Brief

An NHS hospital trust needed to digitise their outpatient prescription workflow. The existing paper-based system created delays, legibility issues, and made controlled drug tracking labour-intensive. The replacement needed to meet NHS clinical safety standards, support mandatory multi-factor authentication, and maintain a complete audit trail for regulatory compliance.

Controlled drug management was a specific priority. Schedule 2 and 3 drugs require meticulous tracking of receipts, supplies, destructions, and stock levels — a process that was handled through physical registers prone to transcription errors.

The Approach

Security was the architectural foundation, not a layer added afterwards. Every clinical route requires MFA via Google Authenticator (TOTP). The role system distinguishes between Prescribers, Pharmacists, Pharmacy Technicians, Ward Clerks, Superintendents, and Administrators — each with precisely scoped permissions reflecting their clinical authority.

We used Laravel 12 with Livewire 3 and Volt for a reactive but server-rendered interface. This was a deliberate choice: clinical environments need fast, reliable interfaces that work on existing hospital hardware without heavy JavaScript client requirements.

The Build

The prescription workflow follows a clinically validated path: a Prescriber creates a prescription, selecting medications from a formulary with dose, frequency, and duration. The system validates against known interactions and flags controlled drug requirements. The Prescriber digitally signs the prescription.

Signed prescriptions enter a pharmacy dispensing queue. Pharmacists review, perform clinical checks, dispense, and record the action. For controlled drugs, the system enforces the additional recording requirements — witness fields, running balance calculations, batch tracking.

The controlled drug register is the most critical module. It tracks every movement of Schedule 2 and 3 drugs: receipts from suppliers, supplies to patients (linked to prescriptions), destructions (with witness records), and regular stock checks with discrepancy flagging. The register maintains a perpetual running balance and generates compliance reports for the Superintendent Pharmacist.

User management includes an approval workflow — new accounts require Superintendent or Admin approval before activation, preventing unauthorised access. The audit log records every clinically significant action with timestamp, user, IP address, and before/after state.

Prescription PDFs are generated via DomPDF with formatting that meets NHS documentation standards, including barcodes for tracking and all required legal fields.

The Result

The system replaced a paper-based process with a fully digital workflow that maintains regulatory compliance while significantly reducing the time from prescribing to dispensing. Controlled drug tracking moved from manual registers to an automated system with real-time balance visibility and automated compliance reporting.

The audit trail gives the trust complete visibility into every prescription and every controlled drug movement — information that was previously reconstructed manually for inspections. MFA compliance is 100% by design rather than by policy.

Let's build something great

Tell us about your project and we'll get back to you within one working day. No hard sell, just a straight conversation about what you need.

Start a conversation