Each medication can carry a single expiry date. When it passes, the medication is automatically blocked from being recorded — and (optionally) auto-archived. A separate notification fires in the lead-up so you can reorder in time.
Setting expiry
Open the medication.
Tick Has expiry.
Set the expiry date.
Optionally add an expiry message that's shown to staff if they try to record against the medication after expiry (e.g. "Discontinued by GP, return stock to pharmacy").
Set notification emails for the expiry warning (optional).
Save.
What happens at expiry
The
auto_expiredflag flips when the date passes.Recordings against the medication are blocked with a
MEDICATION_EXPIREDerror.An override is possible (with reason + senior approval) but rare — typically you should be using fresh stock by then.
An auto-archive cron tidies expired medications after a configurable delay.
Heads up — Expiry is per-medication, not per-batch. If you have two batches with different expiry dates, the medication's expiry date should be the earlier of the two — handle batch-specific differences by physically counting stock when the earlier batch hits its date.