Tunas Akara
Back to Blog

Nurse Call and Code Blue: Reliable Alert Design

Technical nurse call and code blue design: recorded calls, staff confirmation, backup paths and fault testing.

by RayhanUpdated 10 min read

For Technical Teams

iothealthcaremqttreliabilityemergency-systems
Nurse Call and Code Blue: Reliable Alert Design
On this page

Nurse call buttons summon staff; code blue alerts signal a medical emergency under the hospital’s procedures. The system must record calls, confirm staff receive them and still signal when the network fails. This technical article covers delivery, backup paths and fault tests. Agree response targets and call-closing rules with the hospital team.

Most IoT platforms are built on the telemetry contract and then pointed at a button. That works in the demo and fails on the one press that mattered.

What actually separates an alert from telemetry?

Six properties. Every one of them changes the code you write.

PropertyTelemetryLife-critical alert
Loss toleranceA dropped sample is noiseA dropped press is a missed patient
Latency budgetMinutes are finePress to registered under one second
DuplicatesDeduplicate later, or don't botherMust be idempotent at ingest
AcknowledgementBroker PUBACK is enoughSeparate application receipt and staff acknowledgement
SilenceMeans "nothing happened"Ambiguous, and must be made impossible
Path countOneTwo, independent, different failure modes

The last two rows carry the design. Telemetry also needs connection-health checks; a stable value must not conceal a dead device. In an alert system, silence is the exact signal you cannot distinguish from disaster — a quiet ward and a dead network produce the same dashboard. Removing that ambiguity is most of the engineering work.

How fast does the system need to be?

Fast enough that it disappears inside the clinical window rather than eating it. An educational article on Indonesia's Ministry of Health website describes an expected code blue arrival time of 5 to 10 minutes to reach the scene (Kemenkes, 8 August 2022). This article is not a national response-time regulation; agree applicable clinical and accreditation requirements with the hospital.

The clinical evidence sets a much tighter inner bound. In a study of 7,479 in-hospital cardiac arrests across 200 US hospitals, 18.3% of patients waited more than 2 minutes for defibrillation (Chan et al., Archives of Internal Medicine, 2009). Adjusted hospital-level rates of that delay ranged from 2.4% to 50.9%, and hospitals in the best-performing quartile had 41% higher odds of survival to discharge (OR 1.41, 95% CI 1.11–1.77). The study found much of the variation unexplained by traditional hospital factors; it did not establish a single cause.

That is the budget you are spending. A proposed engineering split to agree and test with the hospital team:

StageBudgetWhy
Press to local feedback (beep, light)Under 100 msThe patient must know the press landed
Press to registered at the backendUnder 1 sThe confirmation light is only honest after this
Registered to visible at the stationUnder 2 sIncludes queue insertion and ordering
First escalation timerSet by hospital policyThe system follows the SOP, never the reverse

The delivery targets above are engineering proposals. Escalation timing, call priority, and closing rules follow hospital procedures and the applicable safety requirements.

Why is a button press not a phone call?

Because a call can be busy and a press cannot. Model the press as a ticket whose lifecycle is independent of any voice session. A voice session is one possible response to a ticket, not the ticket itself.

Loading diagram…

Three consequences fall out of that split, and each of them is a bug you would otherwise ship.

Nobody ever gets a busy tone. Two rooms pressing at once produce two tickets in one ordered queue. A telephony-shaped design would return "line busy" to the second patient, which in this context is a system that refuses a call for help.

The confirmation light must not lie. Two stages: a fast blink means sent, a normal blink means registered. The device is only allowed to show "registered" after the backend acknowledges the ticket. A light that turns solid on local button-press logic tells a frightened patient that help is coming when nothing left the room.

Abnormal termination reopens the ticket. If the voice session ends any way other than the backend commanding it, the ticket returns to NEW with a "dropped" flag rather than silently closing. Do not infer normality from a hangup cause code — Asterisk 20 through 22 have known cases of empty cause values, and an empty cause read as "normal" closes a live emergency.

What does at-least-once delivery really cost?

Three things people skip: an idempotent event id, an application-level acknowledgement, and a local queue that predates the network attempt.

MQTT QoS 1 means at least once: duplicates are possible and must be handled. Give every press a stable event id and make ingest idempotent. The part usually missed is the reply: a duplicate must be acknowledged again, with the same ticket id. Not an empty ack, not silence. The device cannot tell "you already have this" apart from "you never got this", so it will keep retrying and the patient keeps watching an unconfirmed light.

A broker PUBACK is not an acknowledgement either. It says the broker took the bytes. It says nothing about whether a ticket exists, and the backend can be dead while the broker is perfectly healthy. Only an application-level ticket-created reply is allowed to delete the local queue entry.

That local queue has to be written before the first publish attempt, in every mode — normal and degraded. The tempting design writes to a queue only after the network fails, which leaves a window between the press and the degraded-mode trigger where a brownout erases a call that was never recorded anywhere. One owner for the event lifecycle, no bypass path.

Two rules keep the queue honest:

  • Full or write-failed means fail loud, never drop-oldest. The oldest entry is the longest-unanswered call — the worst possible thing to discard. Reject the new event, raise a persistent fault, show an error pattern on the device, and still fire the beep and the hardwired lamp.
  • Replayed events carry their age, or admit they cannot. Store a monotonic timestamp plus a boot counter per entry. On replay, send the age so the backend can compute when the press happened. If the boot counter changed, the device rebooted, the monotonic clock reset, and the age is a lie — discard the age estimate, retain the event, and annotate the ticket "time unknown" instead of guessing. This is the same class of problem covered in clock drift in field systems, and in a code blue log the timestamp is the evidence.

Why does a second path matter more than a better first path?

Because the failure that hurts is the one that takes out your whole stack at once. ECRI ranked "unpreparedness for a digital darkness event" as the #2 health technology hazard for 2026 (published 21 January 2026), defining it as a sudden loss of access to electronic systems and patient information. A nurse call system with one path is a system that goes dark with everything else.

The second path should not be a cleverer version of the first. It should be dumber and physically separate.

Loading diagram…

The hardwired call line is a GPIO pulling a lamp driver. Test its power backup and shared failure points too: physical separation alone does not make the two paths independent. It needs no broker, no backend, no DNS, no certificate. Server down, network down, backend crash-looping: the patient presses, the unit beeps, the corridor lamp lights, and a nurse walking the ward sees which room. That is a worse experience than the full system and an enormously better one than nothing.

This is also why an in-device "emergency dial-out mode" is usually the wrong answer. If the voice server, broker, and backend share a host — and in a single-server LAN deployment they do — then the host dying takes the fallback with it. A fallback that fails with the thing it protects is not a fallback. It is complexity aimed at a narrow window that a container restart policy already closes in seconds. Same reasoning as single points of failure in business systems: the cheap dumb redundancy usually beats the clever smart one.

Who is allowed to close an alert?

Not the system, and often not the patient.

DIN VDE 0834, the German standard for nurse call systems in hospitals and care homes, is unusually explicit here: calls without speech capability can only be cancelled at the call location, and where speech is available, remote cancellation is permitted only if a speech connection was actually established (ZVEI, Call Systems according to DIN VDE 0834). Rooms that cannot be seen from the presence-detection point — bathrooms — require their own separate call cancellation.

Read that as a design rule rather than a European formality. It encodes a failure mode: a nurse opens the channel, hears nothing, and hangs up. In a bathroom, "hears nothing" is exactly what a patient collapsed on tile sounds like. So a bathroom or pull-cord call becomes its own class from day one:

  • No auto-resolve when the voice session ends. The ticket moves to AWAITING_CONFIRM and the room lamp stays lit.
  • Resolution only through an explicit nurse action — "room checked" — recorded with the nurse's identity and a timestamp.
  • The patient cannot cancel a bathroom call at all. Only staff can.

If hospital policy permits patient cancellation for an ordinary bedside call, design the gesture against panic and verify the rule against the applicable standard. A long press of two seconds or more cancels; repeated short presses are ignored. Someone frightened will hit a button several times, and that must never cancel their own call for help.

How do you know every endpoint still works?

You supervise every leg and treat silence as a fault. UL 1069, the North American standard for hospital signaling and nurse call equipment (Edition 8, 2024), covers supervision requirements. The linked Intertek notice for earlier editions describes a maximum time from a communication-path fault to a trouble signal of 90 seconds, and the trouble signal must be distinguishable from every nurse call signal.

Ninety seconds is a useful yardstick even outside a certified installation, because it rules out the common lazy design: a 60-second MQTT keepalive means the last will and testament publishes at around 90 seconds, and only then does your alarm logic start. A 15-second keepalive can reduce broker detection delay, but test the complete path to the trouble signal, including backend detection and notification.

A supervision matrix worth copying:

LegWatched byMechanismOn failure
Unit, data pathBackendMQTT last will + 30 s heartbeatAlarm, move room to "unreachable" bucket
Unit, voice pathVoice server → backendEndpoint qualify pollingAlarm; never the sole reason to refuse a call
Nurse app, data pathBackendWebSocket heartbeatDegraded banner in the app
Nurse app, voice pathVoice server → backendContact status events, seeded at startupDisable the answer button, loud alarm
BackendEvery unitRetained liveness topic, refreshed ≤10 sUnit enters degraded mode locally
BackendNurse appWebSocket heartbeatLoud alarm, not a toast
Cord / button hardwareUnitEnd-of-line resistance checkFault flag in heartbeat

The bolded row is the one teams forget. In this architecture the nurse app never dials out — the backend originates every session — so the app's voice registration is only exercised when a call arrives. Its data socket can be perfectly healthy while its voice registration is dead, and mobile SIP stacks do lose registration in background states. Without that row, the station dashboard shows green and the app is discovered deaf at the exact moment a patient presses.

Two more supervision details that pay for themselves:

A backend liveness topic the units subscribe to. Units watching only their own broker connection cannot tell "broker alive, backend dead" from healthy. A retained heartbeat from the backend, refreshed every ten seconds and checked for freshness, helps detect that gap and lets the unit switch to degraded feedback on its own.

Test mode. Drills follow the hospital's SOP, and a system with no test mode either gets drilled with real events — polluting the response time data the accreditation review depends on — or does not get drilled at all. Rarely-used emergency hardware that is never exercised is discovered broken during the emergency.

What does the nurse's shift owe this design?

More than the architecture diagrams usually admit. In a survey of 3,986 nurses across 213 hospitals, 76% reported delaying their response to alarms and 55% had encountered a situation where a patient needed urgent attention and nobody responded (Ruppel et al., BMJ Open Quality, 2023). ECRI's 2026 list names the same theme from the other direction, ranking "health technology implementations that prompt unsafe clinical workflows" as hazard #9.

An alert system that adds noise makes the ward less safe, not more. Four rules that follow:

  1. Distinct sounds for distinct classes. A bathroom call and a low-battery warning must not share a tone. If everything beeps the same, everything gets treated the same, which means treated late.
  2. Escalate rather than repeat. Repeating the same alarm to the same person trains them to ignore it. After the policy timeout, send it to a different person — the same escalation chain pattern used in panic button fleets, with the timers set by the hospital's code blue SOP.
  3. Order the queue by priority, not only arrival. Bathroom calls above bedside calls, always visible, never hidden behind a modal.
  4. Every alert has an owner. A claimed ticket shows who claimed it, so two nurses do not both walk to room 3 while room 7 waits. Make the claim atomic in the backend; two taps at the same instant must produce one winner.

The pre-signoff checklist

Before a life-critical alert system goes live, these are the things worth proving with a test rather than a diagram:

  • Press the button with the network cable unplugged. Beep, local light, corridor lamp — all three still fire.
  • Kill the backend but leave the broker running. Units must enter degraded mode within the supervision window, not sit there looking healthy.
  • Restore the network. Every queued press replays with a correct age, and a press made across a device reboot arrives marked "time unknown" rather than with an invented timestamp.
  • Send the same event id twice. One ticket, two acknowledgements, same ticket id in both.
  • Cancel a bathroom call as a patient. It must be refused.
  • End a bathroom voice session normally. The ticket must stay open and the lamp must stay lit.
  • Force-quit the nurse station app. The answer button must go disabled and an alarm must sound within the supervision window.
  • Run a drill in test mode. Nothing from that drill appears in the incident report.

None of this is exotic engineering. It is the ordinary monitoring and alerting discipline applied with the assumption that silence is never good news. The difference between a nurse call system and a sensor network is not the hardware — the board, the broker, and the protocol are the same. The difference is what you are willing to assume when nothing arrives.

Related Posts

Need help applying this approach?

IoT Device Monitoring System Development

Bring meter, sensor, and other device data into one dashboard. Monitor recent readings, historical data, and disruptions around your operational needs.

Explore related services

Describe the operational problem you are facing so we can discuss a suitable next step.

Share this article
Free Initial Discussion