ED and referral flow: ten features from Josh's list
Merged
BI
4d ago+5974+5974+0123456789012345678901234567890123456789-1072-1072-0123456789012345678901234567890123456789
Ten ED and referral flow features from Josh's list of 50, built on synthetic data. Merge slot 7, after the page-tops redesign. Josh approved one PR on 9 Nov 2026. His rulings are recorded as D-110.
Review page with before-and-after screenshots: https://claude.ai/artifact/Mw767wFxkToNNDP86tDk6H
What it adds
- Referral response timer. Each ward still to answer shows the time it has left, then how long it is overdue. An overdue ward gets an Escalate button, which records a bed meeting action and can be undone. A wait-listed ward now reads "wait list", not as a struck-out decline.
- Medical clearance tracker (clinical; Josh signed off). A clinician still records clearance. The app shows time since arrival or time to clearance, and shows amber after 6 h with nothing recorded (
edClearanceNotRecorded). ED Statistics gets a median time to clearance card. - Psychiatry review tracker. Adds
Movement.psychReview, withREQUEST_PSYCH_REVIEWandRECORD_PSYCH_REVIEW_SEEN. Each ED review row shows one next-step button. The list is never re-sorted. - Smart bed match, as a fit line only. Every shortlist card shows "Fits sex and security · Not met: age · Check special care". Cards are not ranked and nothing is marked as the best match.
- Where the hours went. A breakdown of the stay's hours on the patient page.
- Ward wait list, and the ward ready for its next patient. Adds
MARK_WARD_READY_FOR_NEXT, which a pull clears. Home shows a line for each ward that is ready. - Step-down requests between wards. Sent from the ward board. The request opens the existing referral sheet as a ward-to-ward referral.
- ED-to-ward handover pack. A two-column A4 page that can be printed or copied. It is never emailed, and the record number is left out of the copy.
- Alternatives to admission (clinical; Josh signed off). An unranked, optional list on a ward-bed referral. It never blocks Send. Service names are placeholders.
- Referral pre-fill. Values carried from the current stay or the last referral, each marked "Check it". Free text, risk flags and urgency still start empty, as D-99 requires.
Checks
- Full unit suite on Node 24 before the main merge: 2,203 files and 21,726 tests passed, 32 skipped.
- After merging the latest main, these passed:
- the whole-project type check
- the journey documentation check, after refreshing its review digests
- the focused tests: 1,835 passed
- Not run locally: the phone size limits (
script-budget.json). CI checks them, and I'll check them again before arming in slot 7.
Not built
- A handover pack button inside the referral drawer.
- Review steps on the phone ED list.
- A Statistics view for "where the hours went".
Generated by Claude Code