v0.4.0: add alarms

This commit is contained in:
GABRIEL Sebastian 2026-11-12 11:30:50 +01:00
commit 49c25bf5bb
7 changed files with 1188 additions and 52 deletions

View file

@ -1,4 +1,4 @@
# Patient Monitor Simulation (PaMSim) — v0.3.2
# Patient Monitor Simulation (PaMSim) — v0.4.0
A two-window, Rust/GTK4 patient-monitor simulator for teaching on Fedora Linux.
@ -40,6 +40,48 @@ The monitor can be resized and toggled fullscreen with **F11**; **Esc** exits
fullscreen. On Wayland, move the monitor to the presentation screen before
activating fullscreen. Fullscreen does not lock down the computer.
## Numerical alarm limits (new in v0.4.0)
Each displayed numeric measurement has an **independent optional lower (↓) and
upper (↑) alarm threshold** in the corresponding Admin section. Alarm fields
are text inputs; leave a field **blank** (displayed as `off`) to disable just
that threshold. With both fields blank, the whole numeric alarm is disabled.
The value may equal either limit without triggering an alarm; only readings
strictly below/above the respective threshold are out of range. If both limits
are present, the lower limit must not exceed the upper limit. Invalid input is
highlighted and the last valid configuration stays active.
| Monitor section | Independently configurable alarms |
| --- | --- |
| ECG | HR |
| SpO₂ | Oxygen saturation (SpO₂), derived pulse rate (PR) |
| Invasive arterial pressure (ART) | Systolic (SYS), mean (MAP), diastolic (DIA), PPV |
| NIBP | Systolic (SYS), mean (MAP), diastolic (DIA) |
| Capnography | End-tidal CO₂ (EtCO₂), respiratory rate (RR) |
The current limits are displayed in small type at the **upper-right corner** of
each channel, with an arrow for the corresponding direction. A disabled
boundary is displayed as `---`. For instance:
```text
⚠ SYS ↑180 ↓80
MAP ↑--- ↓60
DIA ↑--- ↓---
```
When a number violates a configured limit, **that number flashes by inverting
its foreground and background colors** (500 ms inverted / 500 ms normal).
Each pressure component (SYS, DIA, MAP) and the PPV reading flash independently. The waveform
itself remains unchanged. All alarms are **disabled by default** so old
scenarios do not unexpectedly flash.
Numerical threshold alarms only evaluate actual displayed measurements:
`--`, `NO SENSOR`, and other unavailable readings do not trigger low-value
alarms. ECG-derived PR and signal visibility continue to work as in v0.3.2.
Alarms are presentation-only: there is **no audible alarm, alarm latching,
priority classification or clinical alarm validation**. Instructor settings
are held in memory and reset on restart.
## Patient name and pulse oximeter signal state (new in v0.3.2)
The new **Patient name** text field at the top of Admin immediately replaces the