Work MSc coursework · 2026-05
Simulating an NHS hospital pharmacy unit
Where does patient delay in a hospital Clinical Pharmacy Unit actually accumulate, and which staffing or automation changes would reduce it most?
In one line97.7% of a 38-hour patient pathway is queueing, not care. Every recommendation is a simulation projection, not a measured outcome.
The question
Lancashire Teaching Hospitals NHS Foundation Trust set the brief: operational delays inside the Clinical Pharmacy Unit (CPU) directly inhibit bed clearance and can lead to backlogs, so where does the delay actually sit and what would move it?
The unit processes roughly 126 patients a week — about 18 a day across three wards — with three people on shift: a senior pharmacist, a junior pharmacist and a technician. Patients arrive on a 24/7 profile but the CPU works mainly 09:00–17:00, so the system opens each morning already behind.
The diagnostic question underneath matters: slow clinical work implies investing in faster tasks, whereas waiting implies investing in capacity.
The data
Demand came from 11 months of HIS admissions logs. Arrivals are strongly time-dependent: 17.81 in the Mon–Fri 09:00–17:00 window against 3.56 overnight, and 6.25 versus 3.46 at weekends. Service times came from time-motion studies and observational audits.
Sample sizes were inconsistent across tasks: Patient Counselling had extensive raw observations, Discrepancy Resolution only the figures the client supplied. Where raw variance was missing, the team estimated standard deviation as (Max − Min) / 6 rather than measuring it. Discharge Prescription Resolution was derived by scaling prescription-writing parameters to 70%. Weekend availability was assumed, not observed: 33% on Saturdays, 25% on Sundays.
Task durations are heavily right-skewed — Drug History 2.51, Med Rec 2.43, Patient Counselling 3.08 — so the team fitted lognormals to those and gammas to the moderately skewed discharge tasks (0.25–1.0), each bounded at its observed maximum to stop unrealistic outliers.
Approach
Discrete-event simulation in Simul8 was chosen because the problem is queueing under variability, not average throughput. A deterministic capacity check gets you part of the way: 7,820 minutes of weekly demand against 6,968 minutes of capacity is 112% utilisation, which never reaches steady state. Filtering out the 20% of patients classed low-risk after Drug History closes the arithmetic — 52.05 minutes of clinical work per patient, 6,558 minutes weekly demand, 94.1% utilisation. That tells you the system is saturated; it cannot tell you where the queue forms, which is what the stochastic model adds.
Two wards were modelled because the binding constraint differs: Ward A's MMPT technician cannot verify discharge prescriptions, Ward B's CPT can. Scenario testing used Ward B as the baseline deliberately — the discharge constraint there is already partly relieved, so the remaining bottleneck is exposed rather than masked.
Validation ran in three stages (face, white-box, black-box) over 50 runs with a two-month warm-up (87,600 minutes) and a six-month run. Routing reproduced — triage came out at 19.68% against an expected 20%, medic error at 11.60% against 12% — and sampled durations matched inputs, with Drug History averaging 12.08 minutes out against 11.97 in.
What I found
Ward B baseline average time in system was 2,270.90 minutes (~38 hours), 95% range 2,020.93 to 2,534.87 across 50 runs, against roughly 52 minutes of actual clinical work per patient. That is 97.7% of the patient's time spent queueing.
Utilisation sat above the 85% safe threshold for all three roles: technician 100.9%, junior pharmacist 94.3%, senior pharmacist 93.7%. A figure above 100% is infeasible in steady state and confirms front-end saturation at Drug History, whose average queue is 1,298.96 minutes. In Ward A the bottleneck relocates rather than disappearing — Drug History falls by roughly 60% while Discharge Prescription Verification rises to 2,487.64 minutes, more than five times the Ward B figure. Paired-run comparison put Ward A above Ward B by 1,087.26 minutes on average.
I recommended two phases to the client. Phase 1, an additional technician Monday to Friday, projects average time in system falling from 2,271 to 630 minutes — a 72% reduction — with pharmacist utilisation dropping below 70% (61.76% and 66.28%). That beats the one-hour shift extension (772 minutes) and the combined scenario (682 minutes). Phase 2, automating Drug History, Medicines Reconciliation and Prescription Verification, was modelled by reducing average processing times to 66% of current durations and halving observed maxima, and projects a wait-time reduction of about 69%.
These are simulation projections under the modelled assumptions — nothing was implemented or measured in the real unit.
What this doesn't show
Two assumptions carry most of the risk, and I flagged both to the client. Standard deviation for tasks lacking raw data was estimated from minimum and maximum; if true variability is higher, the risk is that real queues exceed the modelled ones, and that bites hardest for the 60% of patients routed through Discrepancy Resolution. The high/low risk triage split is held constant at 80/20 throughout — winter surge or other seasonal effects could divert outcomes from these projections.
The Phase 1 comparison is also selective. The team's scenario tables include a shift extension with lengthened weekend cover at 523 minutes and a full-week extra technician at 568 minutes, both below Phase 1's 630, and the recommendation weighs neither.
Beyond those, the model was never validated against real discharge records from the Trust; validation was internal consistency plus a back-of-envelope comparison, which cannot detect a wrong pathway structure. Queues are modelled FIFO with infinite capacity, which is not how a ward triages under pressure. The scenario results are reported as point estimates without the confidence ranges given for the baseline. Phase 1 and Phase 2 were never simulated together, so their combined effect is unknown. The recommendation also assumes a hire actually lands — public sector time-to-hire averages over 100 days (Johnston, 2024), and specialised pharmacy technician training requirements extend that further.
Next steps, in the order I gave the client: validate against actual Lancashire Teaching Hospitals data, stress test against winter pressure arrival rates, model staggered shifts, and simulate Phase 1 and Phase 2 jointly before committing to either.