Case file

Shift replay

A ward's night shift replayed in a minute as a heatmap of every patient's NEWS2, with escalations, treatments and results on their rows. It ends in a handover generated from the night's data and fitted to 150 words, sickest first, that reads itself aloud in 60 seconds. 97 tests. Fictional patients; not a medical device.

The night as data. The handover as a rule.
Author
Henry CartoMSc · Software, Medical & eHealth Engineer
Role
Design and engineering.
Stack
React · TypeScript · Vite · SVG · Web Speech API · Vitest
State
Live, fictional patients.

Problem

Handover is where information gets lost. A night nurse has eleven patients, twelve hours and a few minutes to pass it all on, so what gets said depends on memory, mood and who asks. This replay keeps the night as data and builds the handover from it. Choosing what to say becomes a rule that can be read, tested and argued with.

The handover being read, with the night as a heatmap behind it

The handover being read at 08:00. The countdown ring runs the minute, the current sentence lights up as it is spoken, and the whole night sits behind it as a heatmap, one row per patient and one cell per ten minutes.

Three decisions

The night as a heatmap. One row per patient and one cell per ten minutes, coloured by NEWS2. Every escalation, treatment and result sits on its row as a mark. Drag across the map, or press replay and watch the night pass in a minute, with the events feed filling up as it goes.

A handover that is chosen, not cut. Each sentence is generated from the data: a patient's peak and current NEWS2, what was done, results that moved, and what the day team must do. A sentence the handover cannot do without goes in first. Detail is then added in order of need while it fits 150 words, which is 60 seconds at a normal speaking pace. Anything left out is listed, so the editing is visible.

It reads itself out. A countdown ring runs the minute and the current sentence lights up as it is spoken. Click any sentence to jump the replay to the moment it describes. On a device with no installed voice, the highlight follows the clock instead of stalling.

01:10, Bed 3 selected: her night so far, from her record

01:10, with Bed 3 selected. Her row is the one that climbs through amber into red, and the feed below shows her night so far, read straight from her record.

The handover it writes

Ward 4B night handover: 11 patients, bed 12 empty. Beds 3 and 2 first. Bed 3, Margarete Huber, 71, pneumonia: NEWS2 peaked at 17 at 01:00, now 4. Vomited her 22:00 antibiotic, sepsis screen positive, outreach reviewed, 2 fluid boluses, IV co-amoxiclav and clarithromycin. For the day: consultant review, blood cultures pending, hold amlodipine at 08:00 and statin check with pharmacy. Bed 2, Elfriede Bauer, 76, upper GI bleed: NEWS2 peaked at 7 at 03:05, now 2. For the day: endoscopy at 09:00, nil by mouth and haemoglobin after the second unit. Bed 11, Josef Wagner, 67, fast atrial fibrillation: NEWS2 peaked at 5 at 23:15, now 1. For the day: anticoagulation decision on the round. Bed 1, resolving DKA: subcutaneous insulin with breakfast then stop the infusion. Beds 4, 5, 7, 8 and 10: stable, NEWS2 0, no concerns. Bed 12: admission expected from the emergency department.

That is 148 of 150 words. At 90 seconds it adds the results that moved (lactate 3.1 to 1.4, haemoglobin 98 to 89) and the patients whose night had news but no risk (Bed 9's blood gas, Bed 6's weight).

The ward is the one from the Ward 4B monitor, and Bed 3 follows her full record from the patient timeline, including the team's response after 01:00. The GI bleed in Bed 2 is extended past 04:00 to show the transfusion working. The other beds' overnight events are written for this replay.

How it decides

  • Tiers. Each patient is put in one of four groups: watch, where NEWS2 peaked at 5 or more, is 5 or more now, or there was an escalation; task, where there is only something for the day team to do; changed, where something was recorded with no risk; and stable, where nothing happened. Stable beds are said together in one sentence, with their NEWS2 range.
  • Priority. Within those groups, patients are ordered by peak, current score, risk band, open tasks and escalations, so the two beds to start with come out of the numbers.
  • Must, should, nice. Must sentences are who, course and tasks for patients being watched, task lines, the stable beds, and the empty bed. Should sentences are what was done. Nice sentences are results that moved. Musts are always said. Shoulds, then nices, go in in reading order while they fit the budget.
  • Words. The budget is seconds times 150 words a minute. Plurals and diagnoses are written the way a nurse would say them ("2 fluid boluses", "upper GI bleed").

The first draft ran to 175 words, 25 over budget, because the must sentences were written too long. Shortening the phrases and adding the task tier brought it in at 148 with every must kept. A second pass made sure the sickest patient's overnight summary is not the sentence that gets dropped.

Tested

97 tests. 46 of them are the shared NEWS2 band edges and 26 are on the shared patient record, with CURB-65 and eGFR beside them. The shift and the handover have their own:

  • Bed 3's vital signs and events match her record
  • the 72-cell heatmap
  • ranking and tiers
  • the 150-word budget
  • musts always said, even at 10 seconds
  • nothing dropped when there is room
  • opening and closing lines
  • each bed's sentences kept together, in priority order
  • sentence timings ending within the minute
  • plurals
  • no em dashes

Design

Same design system as the ward monitor, the timeline, the cockpit and the collision map. Amber and red mark NEWS2 bands only. Purple, at an intensity set by the score, marks lower scores, so a quiet night looks quiet. The future fades behind the playhead during a replay. Dim display is there for the night itself. On a phone the heatmap scrolls under pinned patient labels.

?at=01:10 on the URL opens at that minute of the night.

Not a medical device

Fictional patients and a simulated night, for demonstrating interface design and the logic behind a generated handover. It is not validated and must not be used in clinical care.