Repository navigation
Clinical: forecast double count, ended legal form wording, ED 24-hour boundary (D-145) - #1621
Conversation
…pancy and forecasts Per-ward expected occupancy counted a named hold in takenNow and the same person's planned admission again, so 24/48/72h rose by 2. The network forecast and the by-kind forecast had the same double count for a named referral hold (and a later-stage journey hold). A shared patientsHoldingANamedBed rule now feeds plannedAdmissionsStillNeedingABed. Approved by Josh, 11 Nov 2026. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J352nkwW4xTv5Ftznofb8N
legalDeadlineText showed "Form expiry ends 15:42 as typed" under "Ended". A form recorded as ended now reads "Form ended; expiry as typed was 15:42" (or "Form ended" with no time typed). Times stay as typed (D-93). Approved by Josh, 11 Nov 2026. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J352nkwW4xTv5Ftznofb8N
Adds isLongWait (>= LONG_WAIT_MINUTES) and uses it in the ED priority flags and timeline, matching Alerts, TV, bed meeting and Statistics. Approved by Josh, 11 Nov 2026. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J352nkwW4xTv5Ftznofb8N
|
Warning Review limit reachedYour organization has reached its usage spending cap. Adjust your spending cap in the billing tab. Next included review available in 36 minutes. View limit details
Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
|
|
This PR is held because it changes clinical display: bed forecast counts, legal form wording and the ED long-wait flag. It merges only after Josh has checked it. Only Josh removes the Generated by Claude Code |
The named-bed check in the bed forecast and the shared ED long-wait helper add 0.1 to 0.3 KB gzipped to routes that already load the forecast. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J352nkwW4xTv5Ftznofb8N
Booking, change, cancel and convert dispatch is unchanged; only the bed-needed filter gained the named-bed holders, so the reviewed lines moved by four and the file digest changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J352nkwW4xTv5Ftznofb8N
…ducer The D-14 patient-link guard refused ward-movement-bed-hold.ts reading patientId. The helper now lives in planned-admissions-reducer.ts, already allowlisted for the same yes/no id comparison, and its allowlist reason names the new use. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J352nkwW4xTv5Ftznofb8N
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J352nkwW4xTv5Ftznofb8N
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J352nkwW4xTv5Ftznofb8N
Kept D-144 and D-145 both; regenerated FACTS, owner rulings and journey outputs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J352nkwW4xTv5Ftznofb8N
Phone limits are main's new values plus this PR's raise. Ward gets 0.2 KB more rounding room, because the last build measured it at exactly its limit. Journey reader outputs are regenerated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GxPPxkWmB3aquWnS7ScPRS
Hosted CI measured /ward-flow/ed/arm-ed at 671.7 KB after main's shared long-wait fix landed. Limits keep main's own raises and stay within 5 KB per screen. Journey reader outputs regenerated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GxPPxobiABL12fRKomRfoE
Hosted CI on 272e9c8 measured movement 610.0, bed meeting 593.6 and statistics 632.9 KB, each just over its limit once PR #1621's shared forecast code joined this PR's shared shell code. Each new limit is the measurement plus about 0.3. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GxPPxnKy5cgHmGa8NdCd2U
Requested by Josh · project thread
The clinical part of the 11 November repository review. Josh approved it as D-145 item 1, which is recorded in the thread's normal PR, #1623. Josh signed it off on 11 November 2026 at 05:51 UTC ("I approve all of them to remove labels"), so the hold label is off; the sign-off is recorded under D-145 in #1623. Synthetic data only. No signed clinical value changes.
What changes
patientsHoldingANamedBedhelper uses the same rule asnumberedReservationBeds. It feedsplannedAdmissionsStillNeedingABedfromexpected-occupancy.ts,beds-forecast.tsandforecast/forecast-by-kind.ts, so all the forecast views agree.capacity/planned-admissions-reducer.ts, which is already on the D-14 patient-link allowlist for the same yes/no id comparison. Its allowlist reason intests/ward-patient-link-default-deny.test.tsnow names this use. No new file joins the allowlist.isLongWait()now does the check on the ED screen and its timeline, matching Alerts, TV, the bed meeting and statistics ("24 h or more").Phone size limits
/ward-flow/ward-flow/referrals/ward-flow/ward/rph-adult-secure/ward-flow/capacity/ward-flow/eddocs/script-budget-history/2026-11-11-pr1621-held-clinical-review-fixes.md.Checks (local, not hosted CI)
npx vitest runon 92 related test files: 742 passed; after the helper move, 20 related files (235 tests) includingtests/ward-patient-link-default-deny.test.tspassed.node --max-old-space-size=8192 node_modules/typescript/bin/tsc -p tsconfig.json --noEmit --incremental false: exit 0.npx eslinton changed files: clean.node docs/ward-flow/journey/verify.mjs --check,node scripts/doc-facts.mjs,node scripts/ward-flow/owner-rulings-index.mjs --check: passed after merging main3aa63c3.🤖 Generated with Claude Code
https://claude.ai/code/session_01J352nkwW4xTv5Ftznofb8N