Batch 2: ward arrival and beds (items 6, 7, 13, 18; D-134)

Merged
BI
14h ago
+5291-2238

Requested by josh · project thread

What this does

Four ward arrival and bed features from Josh's chosen list. Design approved on the review page (D-134 item 7). Synthetic data only, information and prompts only: nothing ranks or recommends a ward or bed (D-71).

  • Item 6, bed closure review time. Closing a bed can take an optional "Review in" time (at most 48 hours). Capacity shows a "Closed beds past review" card, the bed meeting agenda lists them, and a closed tile says "Review overdue".
  • Item 7, plan staffing for an arrival. The ward's answer card shows a staffing note from the referral's safety needs (read only through patient-referral-safety.ts, R-2026-09-04-A).
  • Item 13, tonight's intake window. A ward sets the hours it can take an admission tonight (SET_INTAKE_WINDOW). Capacity shows a "Tonight's intake windows" card in neutral service-then-name order (D-126).
  • Item 18, left the ward, waiting for transport. "They have left" on a discharge still waiting on transport asks "Has their transport come?" (two buttons, never defaulted). "No, still waiting" frees the bed and lists the person under "Waiting for transport" with a Collected button (MARK_TRANSPORT_COLLECTED).

Items 4 and 15 are clinical and go in a separate held PR.

Decisions

D-134 records the held split, the advocate line, the night list, the freeze change, and the 11 November addendum: design approval, ED recording the advocate line, and item 4's wording.

Checks

  • node --max-old-space-size=8192 node_modules/typescript/bin/tsc -p tsconfig.json --noEmit: passes after merging main (19:11Z).
  • npx vitest run tests/ward-browser-install.test.ts tests/ward-public-ci-setup.test.ts tests/ward-native-dropdown-ratchet.test.ts tests/ward-no-invented-screen-figures.test.ts: 48 of 48 pass.
  • node scripts/ward-ci-public/check-contracts.mjs: OK.
  • node scripts/ward-flow/owner-rulings-index.mjs --check: index is current.
  • Hosted CI ("Ward Flow CI", including unit shards, browser journeys, and the desktop and phone release gates): all green on 179c078e0. Not re-run locally: the full unit suite and browser journeys, because CI runs them on every push and the phone gate needs WebKit, which this container lacks.

Generated by Claude Code


Summary by Gitar

  • Fixed bugs:
    • Corrected departure bed figures and blocked duplicate bed release in ward-flow-departure.ts
  • Left ward and transport wait:
    • Added waitingForTransport record and MARK_TRANSPORT_COLLECTED event in ward-left-ward.ts
    • Added "Waiting for transport" board list with Collected button in ward-board-transport-wait.tsx
  • Bed closure review:
    • Added optional reviewAt to bed closures and "Closed beds past review" card in capacity-closed-beds-review.tsx
  • Intake windows:
    • Added SET_INTAKE_WINDOW event and "Tonight's intake windows" card in capacity-intake-windows-card.tsx
  • Arrival staffing:
    • Added arrival staffing note for aggression or absconding flags in arrival-staffing-note.tsx

This will update automatically on new commits.


Generated by Claude Code