Pulse — Hospital Orchestration Command Center
Coordinate the processes that make a hospital run — alert caregivers, connect to hospital systems, and continuously optimize operations — so the building runs smoothly with far less administrative overhead.
Pulse is an interactive ops command center for a hospital. It fuses patient flow, beds, staffing, and care coordination into one live operating picture, and runs a transparent optimization "brain" that turns the current state of the hospital into ranked, justified, one-tap actions — placing a boarder, backfilling a sick call, expediting a discharge — instead of the phone-tag, whiteboards, and stale 7am bed huddles hospitals run on today.
This repository is a working, clickable prototype driven by a deterministic simulation of a ~186-bed hospital. No real EHR/PHI is involved; the data model and store contract are designed so that "going live" means swapping the simulation tick for a real HL7/FHIR feed — the UI, selectors, and optimization brain stay unchanged.
Built with Next.js 15 · React 19 · TypeScript · Tailwind v4 · Zustand · Recharts
Quickstart
pnpm install
pnpm dev # http://localhost:3750 → redirects to /command
Standalone static pages (served by the app, also openable as files):
| URL | Page |
|---|---|
| http://localhost:3750/concept.html | Concept explainer — who it's for, problems solved, benefits |
| http://localhost:3750/diagram.html | How it works — architecture & orchestration-loop diagram |
| http://localhost:3750/mockup.html | Interactive single-file mockup of the command center |
Other scripts: pnpm build, pnpm start, pnpm typecheck.
In the top status ribbon you can play/pause the simulation clock, change speed (1× / 4× / 16×),
switch scenarios (Calm Tuesday → Friday ED Surge → Flu Season + Sick Calls → Code Influx) to
watch the brain react in real time, and reset the world. Demos are reproducible and shareable via
?seed=42&scenario=friday-surge.
The command center (flagship modules)
| Route | Module | What it does |
|---|---|---|
/command |
Mission Control | Census & surge gauge, the brain's ranked Action Queue, anomaly Watchtower, closed-loop impact ledger, and the live command feed — the single operating picture. |
/flow |
ER & Patient Flow | Per-patient & per-acuity predictive wait / door-to-provider forecasts (p50/p90), a deterioration watchlist with threshold auto-escalation, and an ED-boarding forecast. |
/beds |
Beds & EVS Turnover | Constraint-aware ranked bed placement with one-tap assign, a live 186-bed board (single source of truth), and EVS smart-dispatch Kanban. Accepting a placement fans out EVS + transport + a receiving-unit alert. |
/staffing |
Sick-Call Backfill | Auto-detected coverage gaps run a cost-and-fit-ranked, fatigue-aware open-shift cascade (same-unit → float → OT → agency) with one-tap fill, plus live acuity-weighted ratio-compliance gauges. |
/feed |
Command Feed | Every alert and recommendation lifecycle event as one closed-loop stream — owner routing, SLA timers, acknowledgment, and auto-escalation ladders. |
Roadmap modules (scaffolded, wired to the same stores): Discharge & Barriers, Perioperative, Diagnostics/TAT, Safety & Quality, Transport & Assets, Revenue & Prior-Auth. The full 27-module catalog and dozens of additional ideas live in docs/CONCEPT.md.
How it works (architecture in one breath)
deterministic sim engine ──tick──▶ Zustand store ──selectors──▶ React command center
│ ▲ │
└── optimization "brain" ──────┘ user actions (accept/override/assign) ──┘
(predictors + solvers → Recommendations + Alerts)
- Simulation (
src/lib/sim/) — a seeded clock fires stochastic events (arrivals, admits, discharges, sick calls, deterioration, EVS completion), applies them as reducers, and appends to an immutable event log (the canonical "event bus"). - Brain (
src/lib/brain/) — transparent, explainable predictors (admit probability, quantile wait forecast, deterioration, accept-likelihood) and solvers (bed placement, backfill cascade, capacity/surge index, boarding forecast). Every recommendation ships ascoreBreakdownso the UI can render factor × weight = contribution. Nothing auto-executes. - Store & selectors (
src/lib/store.ts,src/lib/selectors.ts) — one live snapshot; the store contract mirrors what an SSE/WebSocket/FHIR-Subscription bridge would push. - Design system (
src/app/globals.css,src/components/ui/) — dark, density-first, with a single shared urgency color language (ok · watch · urgent · critical) every board speaks.
Full detail: docs/ARCHITECTURE.md.
Project layout
src/
app/ # routes: /command /flow /beds /staffing /feed + roadmap stubs
components/
layout/ # nav rail, status ribbon, command shell
ui/ # design-system primitives (card, badge, gauge, data-table, sheet…)
command/ flow/ beds/ staffing/ feed/ # feature components by domain
shared/ # recommendation drawer, score breakdown, module shelf
lib/
types.ts # canonical domain model
sim/ # seed, engine, scenarios, actions, rng
brain/ # predictors, solvers, orchestration
store.ts selectors.ts ui.ts utils.ts
docs/
CONCEPT.md # the product concept + full idea catalog
ARCHITECTURE.md # technical architecture
ideation/ # raw multi-agent ideation synthesis (JSON)
⚕️ Disclaimer. Prototype with simulated data only. Not a medical device; no clinical decisions should be made from it. Real deployment would require EHR integration, clinical validation, bias/fairness governance, and regulatory review — see the governance notes in docs/CONCEPT.md.