Rx Meridian Dispensary
Branch Erbil Central · —Waiting
0Dispense
| Medicine | Directions | Qty | Batch · expiry |
|---|
Stock on shelf
How it is designed
A dispensing screen is not a shopping basket. The person using it is fast, interrupted, and legally responsible for what leaves the counter — so the design has to make the dangerous case impossible rather than merely discouraged.
The allergy check blocks, it does not warn
Pick Dara Salih in the queue. The penicillin allergy is on the record and the prescription contains amoxicillin: the line cannot be dispensed at all. There is no “proceed anyway” button, because a confirmation dialog under time pressure is just a slower way of saying yes. Overriding it is a conversation with the prescriber, not a click.
Batches are chosen first-expiry-first-out
The console never asks which box to take. It picks the batch that expires soonest and shows it, because leaving that decision to a human at speed is how short-dated stock ends up at the back of the shelf until it is waste. Anything inside ninety days is flagged amber as it is picked.
Controlled drugs get a second pair of eyes
A CD line needs a witness before it can be completed, and the
entry it writes is append-only: quantity, running balance, both signatures,
timestamp. Registers are corrected by adding a correcting entry, never by
editing the original — the same discipline as a paper register, for the
same reason.
What the schema has to guarantee
Stock is a ledger of movements rather than a number on a product row, so “where did those eleven go?” is always answerable. Every dispense writes one movement per batch inside the same transaction as the dispense record, so a crash between them cannot leave the shelf count disagreeing with the audit trail.
Controlled drug