The status field had no answer
A doctor finishes a consultation and orders three things in the same
sitting: a blood count, a scan, and a prescription. The workflow document
in front of me said the patient’s status was now Awaiting Lab Payment.
Which is true. It is also true that they are awaiting a scan payment, and awaiting a pharmacy verification, and that the prescription has not been priced yet because nobody has checked the shelf.
One field, one slot, and no honest value to put in it. The status wasn’t wrong on the patient — it was on the wrong noun entirely. Payment, performance and result belong to each ordered thing, not to the human being carrying them around the building.
Moving status onto the order dissolved the problem. A station’s work queue stops being a stored value that something has to remember to update, and becomes a query: visits with an item pending for me. Waiting times fall out of the same events for free, which is the number the owner will actually care about six months in.
The interesting part is that this happened three times in the same week, in three unrelated corners of the design.
The second: a draft flow had the doctor toggling each prescribed drug as “clinic” or “buy outside.” Clean, one decision, one screen. Except the doctor cannot know what is on the shelf this morning. The pharmacist can — she does it today with a pen, marking the available lines and recalculating the bill. Authority had been placed with the person who had the clearest view of the patient and no view of the stock.
The third: the queue. The tidy version enforces next-in-line. The real clinic has emergencies, and a family member seen alongside a relative, and a patient who is in the toilet when called. Every one of those is a correct exception that a rule engine would have to be taught. So the system stopped enforcing and started recording — call anyone, and if it wasn’t the top of the list, pick a reason. Out-of-turn calls by staff becomes a report. The judgement stays with the nurse, who has information the software will never have.
Same root cause under all three. A single authoritative field is a bet that one place in the system knows the whole truth at once, and in an operational business no place ever does. The fix each time was to move the truth outward — to the order, to the pharmacist, to the person at the window — and let the aggregate be computed rather than declared.
The tell is easy to spot once you’ve been bitten. If you’re reaching for a
status enum and find yourself needing a value like partly_dispensed,
the field is on the wrong entity. Compound states are what a header looks
like when it’s trying to summarise lines it should have delegated to.
The part I’d have got wrong twice
Deriving the queue instead of storing it feels expensive. It isn’t, at clinic volume — but the reason to do it isn’t performance, it’s that a stored status has to be maintained, and every station that forgets to update one leaves a patient invisible in someone’s list. Derived state cannot drift, because there is nothing to drift from.
Stored status is a promise every future developer has to keep. Derived status is a promise the database keeps for you.
DESIGNER BLUEPRINT
Draw the station screen, not the flow diagram — the flow is already understood, the screen is where this decision becomes visible.
One screen per station, identical in structure. A single list, oldest first. Each row: queue number (large), minutes waiting, and any flag (emergency in red, returning-review, second no-show). No patient names on anything visible from the waiting area.
Two call affordances. A primary Call next button taking the top row,
and a tappable row for calling anyone else. Tapping a row that isn’t the
top opens a small reason sheet — four or five short options and nothing
more. The sheet must not feel like a punishment; it’s a note, not a
confession.
Three row states to draw: waiting, called (clock running, No show
button now visible), and in service. A no-show returns the row to the list
with a mark, never removes it.
The waiting-area board is a separate read-only screen: last few calls
as 14 → Triage, number and destination only, largest type that fits.
Show the same list rendered for three roles — triage, lab, pharmacy — so it’s obvious that the queue is a view over one set of pending items, not three separate systems.