Twelve beds on one screen, and the alarm that matters stands out.
An ICU central station for a 12-bed unit: live ECG and pleth sweeps, vital signs, NEWS2 and qSOFA, an alarm system inspired by IEC 60601-1-8 — priorities, acknowledgement, a 120 s audio pause that re-arms, escalation — a patient detail with trends, and admit, transfer and discharge on two identifiers. Open with no sign-in: the physiology is shared, your actions stay yours.
Demo — not a medical device — synthetic data only.

A long shift, many beds, little room for error.
An ICU nurse watches several beds through a 12-hour shift; an intensivist decides from trends, scores and alarm history. Three things decide whether the right patient gets attention in time.
Every bed at a glance
Twelve beds on one screen: ECG II and pleth sweeping live, heart rate, SpO₂, blood pressure, respiration and temperature, with NEWS2 and qSOFA beside them.
Alarms that earn attention
Too many alarms and the one that matters gets missed. Priorities read by marker, flash and sound; a condition must hold before it sounds, and a repeat arrives as one alarm with a counter.
Every action on record
Who acknowledged, who paused, who changed a limit, and on which patient: each action names the bed, the patient and the identifier, and lands in an audit trail nobody can rewrite.
What the station holds to.
A few rules every screen keeps, because a monitor that is wrong quietly is worse than one that says it does not know.
Never a stale value as current
A signal with no fresh sample turns into grey hatched NO DATA with its age. Gaps are drawn as gaps; nothing is interpolated as if it had been measured. And it fails loud: a silent simulator raises NO MONITOR DATA on every bed, a lost stream blanks the values and sounds a technical alarm in the browser itself.
Never colour alone
High, medium, low and technical alarms each carry a marker (!!!, !!, !, TECH), a flash rate and an audio pattern, after the conventions of IEC 60601-1-8.
Scores only on fresh inputs
NEWS2 and qSOFA are computed from current values only. A score with a stale or missing input says so — NEWS2 — SpO₂ n/a — rather than pretending.
A demo, and it says so
Not a medical device, no compliance claimed, synthetic data only: fictitious names, SIM- record numbers, and a banner on every screen.
Built and running.
Stills of the live station: the patient detail, the alarm system, alarm fatigue, patient flow and the design-system page, on twelve synthetic patients sweeping in real time.









Weighed, chosen, and why.
Each key decision, with the alternatives, the choice and its reason. Each one is written down as a decision record in the repository.
- 01
Where the alarms live
- Weighed
- In the browser · on the server, with XState · on the server, hand-written
- Chosen
- On the server: a pure, hand-written state machine, one per bed and condition, stepped on the simulated clock.
- Because
- Every station agrees, alarms keep escalating with no browser open, every step is audited, and the suite can iterate the whole transition table.
- 02
Drawing the waveforms
- Weighed
- WebGL · Canvas 2D on the main thread · Canvas 2D in a worker
- Chosen
- Canvas 2D in one render worker that owns every OffscreenCanvas, sweeping only the new pixels.
- Because
- A sweep touches a few pixels per trace per frame, so WebGL buys nothing; off the main thread, React never competes with the traces.
- 03
Getting samples to the screen
- Weighed
- JSON · Server-Sent Events · binary WebSocket frames
- Chosen
- Binary WebSocket frames for the waveforms, batched every 80 ms with a sequence number; state as compact JSON at up to 4 Hz.
- Because
- The bulk stays small and fast to decode, a gap is told from a late chunk, and the state schema stays readable.
- 04
Standing in for the bedside monitors
- Weighed
- A module inside the API · a service of its own
- Chosen
- A deterministic physiological simulator as its own service, reached through the port a real monitor gateway would implement.
- Because
- A real process boundary: stopping the simulator shows a lost feed end to end, and the same seed always gives the same bytes.
- 05
Who acts on the unit
- Weighed
- A real sign-in · one shared unit · a private sandbox per visitor
- Chosen
- No sign-in: everyone sees the same physiology, and each visitor's acknowledgements, pauses and limits stay in a private sandbox.
- Because
- Zero friction for a reviewer, no personal data, and no visitor can silence another's alarms.
- 06
Storing the record
- Weighed
- MySQL with Prisma · PostgreSQL with pg and plain SQL
- Chosen
- PostgreSQL through pg and numbered SQL migrations.
- Because
- The audit trail is append-only in the database itself — a trigger refuses any update, and any delete outside the sandbox purge — and empty minutes in trends stay explicit.
From the simulated bedside to the station.
Three processes on one server, and a shared model between them: the same boundaries a real unit's monitor gateway would draw.
Simulator
A Nest service of its own: seeded PRNG, virtual clock, ECG, pleth and respiration, numerics, scripted scenarios. Same seed, same bytes.
API
Nest 12 on PostgreSQL: freshness, NEWS2 and qSOFA, alarm conditions once for all, alarm machines per visitor sandbox, the hash-chained audit trail.
Station
Next 16 and React 19 on Tailwind v4: a stream worker decodes the binary frames, a render worker sweeps the traces, React gets the state.
Shared model
Plain TypeScript used by all three: the wire codec, the PRNG, the scores, the alarm state machine.
Numbers from the live unit.
Every figure is measured on the running station by its perf harness and its post-deploy checks, against the budget in docs/budget.md, and written up in the case study.
- Frame rate
- 60 fps medianThe whole unit at 1920 × 1080: 22 traces, ECG II and pleth for each of the 11 occupied beds. Budget 55: a sweep that stutters reads as an arrhythmia that is not there.
- Render worker
- 0.2 ms p95 per frameDraw time in the worst second. Budget 4 ms, a quarter of a 60 Hz frame: only the new pixels are stroked.
- Sample-to-screen lag
- 40 ms p95In production, from Paris, worst second. Budget 400 ms: later than that, a sample is drawn as a gap.
- Stress tier
- 0.6 ms p95 at 48 beds96 traces at 60 fps median, lag 17 ms p95, no frame dropped: a 48-bed unit in the harness alone, never on the public site.
- Waveform stream
- 19 KB/sBinary frames for the whole unit, decoded in a worker; the JSON state frames come on top.
- Other origins
- 0 requestsEvery page opened and left running, after every deploy: no request or WebSocket leaves the station's own origin.
Apple M1 · Chromium headless · 1920 × 1080 · the 12-bed unit, 20 s runs · production, and the 48-bed stress tier on the local stack · measured 2026-11-05
What is built, and what is next.
Built ticket by ticket, each decision written down as it is taken.
Built · the station
- Central stationTwelve bed tiles with ECG II and pleth sweeps, HR, SpO₂, NIBP or ART, RR and temperature, NEWS2 and qSOFA, the unit's alarm counts and the active-alarm list.
- Patient detailECG, pleth and respiration sweeps; current values with their limits and measurement times; trends over 1, 8 and 24 h, gaps kept and cuff NIBP as dots; the NEWS2 breakdown against the RCP bands, qSOFA, an audited alarm-limits editor, the events timeline.
- Patient flowAdmit from an ADT queue, transfer, discharge behind a checklist, each on two identifiers, MRN and date of birth; an SBAR handover drafted from the monitoring data.
- Design systemThe PFA design system in its dark palette with Excubia's clinical tokens, every tile and band state shown live at /design-system.
Built · alarms and safety
- Alarm systemPriorities by marker, flash rate and sound, each pattern playable; a playground stepping the server's own state machine; the full state × event table; sound off until armed.
- Alarm fatigue and auditAlarm load per bed and hour, by priority and by source, the levers with their safety guards, and each visitor's hash-chained audit trail.
- Fails loudA silent simulator raises NO MONITOR DATA on every bed; a lost stream blanks the values and sounds a technical alarm in the browser.
- Regulatory awareness and case studyIEC 60601-1-8, IEC 62304, ISO 14971 and EU MDR rule 11 with a hazard table, no compliance claimed; the case study in English and French.
Next · measurements
- Main threadA Performance-panel trace of its CPU time and long tasks; the overlay reports the workers today.
- Lower-end hardwareEvery figure above is from an Apple M1.
See it run,
on twelve synthetic patients.
Acknowledge an alarm, pause its sound for 120 s, watch it re-arm; step the alarm machine by hand, change a limit, transfer a patient. Your actions stay in your own sandbox; nobody else's station changes.