Independent education · Sources and limitations documented
Portfolio / Smart NOA simulation

Software simulation

Source snapshot · 5 November 2026

Emergency-rescue stress matrix (2026-11)

SIMULATION — fictional patients — educational use only. Not a medical device. Not medical advice. Every vital sign below is illustrative model output of the simulator (engine/physiology.js, engine/pd.js); nothing here is a clinical efficacy claim or a validation.

Generated by node tools/emergency-stress-report.mjs (driver: tests/emergency-stress.mjs; a representative subset runs in npm test, tests/emergency-stress-2026-11.test.mjs). Do not edit by hand — regenerate.

Question: do the rescue interventions the engine offers work in its scripted emergencies across extreme fictional patients, and do the safety rules hold in every run, including deliberately abusive dosing?

Matrix size

block runs definition
main matrix 1368 6 emergencies × 12 patients × arms (control, rescue, aggressive; + rescue_im for anaphylaxis) × 2 onset times × 3 seeds
light-anaesthesia "lightened" variant 108 light_anesthesia_stimulus with the maintenance hypnotic at the bottom of its label range, 12 patients × 3 arms × early × 3 seeds
fault / hold combinations 336 rescue arm, seed 1, early onset: emergency + MAP sensor fault, + HR sensor fault, + SpO2 probe off, during a latched hold, and in automatic mode with "Continue with hold latched" (laryngospasm: fault combinations only)
total 1812

Safety assertions (every run, including the aggressive arm)

assertion result
no exception PASS (0 runs with an exception)
no NaN / Infinity in vitals (NaN only on a faulted sensor channel; internal PaO2/PaCO2/SaO2 and drug states finite) PASS
vitals within plausible bounds (MAP 20–220, HR 20–250, SpO2 0–100, SBP 20–300, RR 0–60, EtCO2 0–150, index 0–100) PASS
every accepted dose ≤ every hard limit (per dose, per route, cumulative; label/guideline ceilings, interpretCeilings) and given exactly as ordered (no silent clamping) PASS
every refused dose logged "BLOCKED" with nothing given PASS (324578 refusals)
every accepted dose outside the sourced regimen range carries a warning PASS (468 such doses, all in the aggressive arm)
zero clinician-entered (manual or advisory) repeats accepted inside the label repeat interval (phenylephrine 60 s, glycopyrrolate 120 s outside emergence, IM/SC epinephrine 300 s): each is REFUSED, logged with the interval and time remaining PASS (107097 refusals)
no accepted dose takes a total above a simulator teaching ceiling without the clinician's confirmation action (one dose per confirmation) PASS (refused until confirmed: epinephrine IV 51948, glycopyrrolate 7992, crystalloid boluses 54525; confirmations 468: 468 the aggressive arm's single deliberate probe per run, 0 by the rescue-arm clinician (the rescue strategies stay below every ceiling: ≤ 4 × 500 mL, ≤ 0.4 mg IV epinephrine); 468 drug doses and 0 fluid boluses given after a confirmation; the control arm and the automatic runner never confirm)
running rates ≤ label rate/dial ceilings every second; controlled infusions ≤ Python simulation ceilings while interlocks are on; direct state write re-validated PASS
interlock hold latches one control iteration after MAP < 60 / HR < 48 / unusable reading, held infusions stay at 0, never released without resume_hold PASS (1369 runs latched a hold; resume_hold was never pressed by the driver)
no vasopressor without an explicit accept in advisory runs (advisory doses = accepted advisories = "ADVISORY accepted" log lines; control arm: zero vasopressor doses, zero accepts) PASS (776 accepted, 10254 shown)
plan-safety check passes for every patient's plan PASS
fault / hold combinations: rescue path available (FiO2, fluids, rescue bolus accepted during the fault or hold), held infusions cannot restart PASS (336 runs)
runs with any violation 0

Refusals by drug and reason (numbers masked as #):

refusal count
ephedrine:bolus:IV: Cumulative dose would exceed # mg (label maximum) 74412
phenylephrine:bolus:IV: Total bolus dose would exceed # mcg (label maximum) (already given # mcg) 60372
epinephrine:bolus:IM: Repeat bolus refused — repeat epinephrine IM bolus # s after the previous one; waits # s more (label: IM/SC repeated every # to # min as necessary; minimum # s) [S#]; # s remaining 55224
epinephrine:bolus:IV: Above the simulator teaching ceiling (not a clinical limit): epinephrine IV boluses # mg > # mg — confirm with "Confirm dose above the simulator teaching ceiling" (action confirm_teaching_ceiling:epinephrine_iv) to give it 51948
glycopyrrolate:bolus:IV: Repeat bolus refused — repeat glycopyrrolate IV bolus # s after the previous one; waits # s more (label: intraoperative # mg IV repeated as needed at #–# min intervals; minimum # s) [S#]; # s remaining 46699
epinephrine:bolus:IM: Single dose above # mg (label maximum) 9828
epinephrine:bolus:IV: Single dose above # mg per IV bolus (guideline IV titration dose used as a per-bolus stop (simulator policy)) 9828
glycopyrrolate:bolus:IV: Above the simulator teaching ceiling (not a clinical limit): glycopyrrolate boluses # mg > # mg — confirm with "Confirm dose above the simulator teaching ceiling" (action confirm_teaching_ceiling:glycopyrrolate) to give it 7992
phenylephrine:bolus:IV: Repeat bolus refused — repeat phenylephrine IV bolus # s after the previous one; waits # s more (label: additional boluses every #–# min as needed; minimum # s) [S#]; # s remaining 5174
dexmedetomidine:infusion: Rate above # mcg/kg/h (label range upper bound) 468
epinephrine:infusion: Rate above infusion # mcg/kg/min IBW (label range upper bound) 468
phenylephrine:infusion: Rate above infusion # mcg/min (label maximum) 468
propofol:infusion: Rate above # mcg/kg/min (label range upper bound) 468
sevoflurane:inhaled: Dial above # % (label range upper bound) 363
dexmedetomidine:infusion: Dexmedetomidine is held by a latched interlock; use resume_hold first 316
lidocaine:infusion: Lidocaine (IV) is held by a latched interlock; use resume_hold first 313
ketamine:infusion: Ketamine is held by a latched interlock; use resume_hold first 237

Accepted with a warning or after a confirmation (engine policy, SPEC §5.2/§6: the regimen range is a warning; drug.ceiling values and label repeat intervals refuse; simulator teaching ceilings refuse until confirmed):

drug:route:flag count
ephedrine:IV:outside_regimen_range 468
epinephrine:IV:above_teaching_ceiling_confirmed 468

Aggressive arm extremes (432 runs): max MAP 192 mmHg, max HR 200 /min; seconds at a physiology clamp (MAP/HR 25 or 200, SpO2 40): MAP 0, HR 8262 (in 12 runs: sepsis_emergency), SpO2 0; all arms: 17691 clamp-seconds (control map anaphylaxis_hypotension: 7830; aggressive hr hemorrhage: 4347; aggressive hr anaphylaxis_hypotension: 3915; control map hemorrhage: 1578; rescue_im map anaphylaxis_hypotension: 21). Per run, accepted within 600 s: phenylephrine bolus ≤ 200 mcg, ephedrine ≤ 50 mg, epinephrine IV ≤ 0.55 mg, epinephrine IM ≤ 1.5 mg, glycopyrrolate ≤ 1 mg, crystalloid ordered up to 60.5 L.

Efficacy (directional, illustrative)

Recovery = the emergency's primary vital sign(s) back inside the limits for ≥ 60 s, timed from the onset, counted only after the first deranged sample (a run that never deranges counts as recovered at 0 s). Primary criteria: hemorrhage MAP ≥ 65; vagal bradycardia HR ≥ 50; bronchospasm SpO2 ≥ 92 and internal PaCO2 < 60 mmHg; laryngospasm SpO2 ≥ 92; anaphylaxis MAP ≥ 65 and SpO2 ≥ 92; light anaesthesia MAP ≤ 120, HR ≤ 120 and processed-EEG index ≤ 60. All thresholds are reused simulator values (alarm thresholds, GA band, model hypercapnia threshold). The composite (MAP ≥ 65, HR ≥ 50, SpO2 ≥ 92 together) is in the per-patient table. Observation window 1500 s (laryngospasm 900 s after extubation).

emergency arm runs recovered median time to recovery (recovered runs; 0 s = never deranged) deranged runs median s primary deranged median deficit rescue vs control (patients: better / no difference / worse / never deranged)
hemorrhage control 72 1/72 (1 %) 232 s 72 1380 23557
hemorrhage rescue 72 66/72 (92 %) 204 s 72 18 24 12 / 0 / 0 / 0
hemorrhage aggressive 72 72/72 (100 %) 0 s 31 0 0 12 / 0 / 0 / 0
vagal_bradycardia control 72 72/72 (100 %) 119 s 71 102 1062
vagal_bradycardia rescue 72 72/72 (100 %) 107 s 71 88 563 12 / 0 / 0 / 0
vagal_bradycardia aggressive 72 72/72 (100 %) 0 s 28 0 0 12 / 0 / 0 / 0
bronchospasm control 72 72/72 (100 %) 407 s 72 161 589
bronchospasm rescue 72 72/72 (100 %) 0 s 0 0 0 12 / 0 / 0 / 0
bronchospasm aggressive 72 72/72 (100 %) 0 s 0 0 0 12 / 0 / 0 / 0
laryngospasm_on_extubation control 72 72/72 (100 %) 0 s 12 0 0
laryngospasm_on_extubation rescue 72 72/72 (100 %) 0 s 0 0 0 2 / 0 / 0 / 10
laryngospasm_on_extubation aggressive 72 72/72 (100 %) 0 s 12 0 0 2 / 0 / 0 / 10
light_anesthesia_stimulus control 72 72/72 (100 %) 0 s 0 0 0
light_anesthesia_stimulus rescue 72 72/72 (100 %) 0 s 0 0 0 0 / 0 / 0 / 12
light_anesthesia_stimulus aggressive 72 0/72 (0 %) — 72 1474 79822 0 / 0 / 12 / 0
anaphylaxis_hypotension control 72 54/72 (75 %) 1242 s 72 1233 31316
anaphylaxis_hypotension rescue 72 72/72 (100 %) 65 s 72 31 60 12 / 0 / 0 / 0
anaphylaxis_hypotension rescue_im 72 72/72 (100 %) 214 s 72 166 1927 12 / 0 / 0 / 0
anaphylaxis_hypotension aggressive 72 72/72 (100 %) 0 s 31 0 0 12 / 0 / 0 / 0
light_anesthesia_stimulus:lightened control 36 16/36 (44 %) 0 s 21 976 6461
light_anesthesia_stimulus:lightened rescue 36 36/36 (100 %) 378 s 21 3 3 7 / 0 / 0 / 5
light_anesthesia_stimulus:lightened aggressive 36 0/36 (0 %) — 36 1475 80429 0 / 0 / 12 / 0

"better" = recovers more often, or as often and faster (median), or spends less time with the primary sign deranged, or has a smaller median deficit (shortfall beyond the primary limit summed over the window, e.g. mmHg·s below MAP 65). The aggressive arm is a cap probe, not a treatment; its "efficacy" mostly reflects overshoot.

Per patient: control vs rescue

emergency patient control: rec / median / worst rescue: rec / median / worst verdict
hemorrhage age18_asa1 0/6 / — / MAP ≥38 6/6 / 66 s / MAP ≥60 better
hemorrhage age90 0/6 / — / MAP ≥34 6/6 / 124 s / MAP ≥59 better
hemorrhage wt40_bmi15 0/6 / — / MAP ≥35 6/6 / 25 s / MAP ≥58 better
hemorrhage wt200_bmi65_osa 1/6 / 232 s / MAP ≥47 6/6 / 353 s / MAP ≥62 better
hemorrhage egfr10_asa4 0/6 / — / MAP ≥47 6/6 / 366 s / MAP ≥63 better
hemorrhage asa4_hfref_cad 0/6 / — / MAP ≥25 3/6 / 104 s / MAP ≥36 better
hemorrhage beta_blocker_brady 0/6 / — / MAP ≥35 6/6 / 123 s / MAP ≥61 better
hemorrhage elderly_cad_ckd 0/6 / — / MAP ≥35 6/6 / 123 s / MAP ≥62 better
hemorrhage obese_osa 0/6 / — / MAP ≥43 6/6 / 325 s / MAP ≥62 better
hemorrhage mh_susceptible 0/6 / — / MAP ≥40 6/6 / 177 s / MAP ≥63 better
hemorrhage hypovolaemia 0/6 / — / MAP ≥25 6/6 / 583 s / MAP ≥44 better
hemorrhage sepsis_emergency 0/6 / — / MAP ≥25 3/6 / 123 s / MAP ≥39 better
vagal_bradycardia age18_asa1 6/6 / 123 s / HR ≥31 6/6 / 98 s / HR ≥33 better
vagal_bradycardia age90 6/6 / 125 s / HR ≥29 6/6 / 109 s / HR ≥32 better
vagal_bradycardia wt40_bmi15 6/6 / 118 s / HR ≥34 6/6 / 74 s / HR ≥37 better
vagal_bradycardia wt200_bmi65_osa 6/6 / 111 s / HR ≥40 6/6 / 108 s / HR ≥41 better
vagal_bradycardia egfr10_asa4 6/6 / 117 s / HR ≥32 6/6 / 104 s / HR ≥38 better
vagal_bradycardia asa4_hfref_cad 6/6 / 119 s / HR ≥34 6/6 / 108 s / HR ≥36 better
vagal_bradycardia beta_blocker_brady 6/6 / 239 s / HR ≥25 6/6 / 131 s / HR ≥25 better
vagal_bradycardia elderly_cad_ckd 6/6 / 127 s / HR ≥28 6/6 / 118 s / HR ≥30 better
vagal_bradycardia obese_osa 6/6 / 114 s / HR ≥38 6/6 / 108 s / HR ≥40 better
vagal_bradycardia mh_susceptible 6/6 / 126 s / HR ≥27 6/6 / 113 s / HR ≥33 better
vagal_bradycardia hypovolaemia 6/6 / 107 s / HR ≥43 6/6 / 70 s / HR ≥43 better
vagal_bradycardia sepsis_emergency 6/6 / 98 s / HR ≥47 6/6 / 68 s / HR ≥46 better
bronchospasm age18_asa1 6/6 / 409 s / PaCO2 ≤67, SpO2 ≥99 6/6 / 0 s / PaCO2 ≤57, SpO2 ≥99 better
bronchospasm age90 6/6 / 404 s / PaCO2 ≤66, SpO2 ≥99 6/6 / 0 s / PaCO2 ≤57, SpO2 ≥99 better
bronchospasm wt40_bmi15 6/6 / 409 s / PaCO2 ≤67, SpO2 ≥99 6/6 / 0 s / PaCO2 ≤57, SpO2 ≥99 better
bronchospasm wt200_bmi65_osa 6/6 / 409 s / PaCO2 ≤67, SpO2 ≥98 6/6 / 0 s / PaCO2 ≤57, SpO2 ≥99 better
bronchospasm egfr10_asa4 6/6 / 408 s / PaCO2 ≤67, SpO2 ≥99 6/6 / 0 s / PaCO2 ≤58, SpO2 ≥99 better
bronchospasm asa4_hfref_cad 6/6 / 404 s / PaCO2 ≤66, SpO2 ≥99 6/6 / 0 s / PaCO2 ≤57, SpO2 ≥99 better
bronchospasm beta_blocker_brady 6/6 / 405 s / PaCO2 ≤66, SpO2 ≥99 6/6 / 0 s / PaCO2 ≤58, SpO2 ≥99 better
bronchospasm elderly_cad_ckd 6/6 / 404 s / PaCO2 ≤66, SpO2 ≥99 6/6 / 0 s / PaCO2 ≤57, SpO2 ≥99 better
bronchospasm obese_osa 6/6 / 409 s / PaCO2 ≤67, SpO2 ≥98 6/6 / 0 s / PaCO2 ≤57, SpO2 ≥99 better
bronchospasm mh_susceptible 6/6 / 409 s / PaCO2 ≤66, SpO2 ≥99 6/6 / 0 s / PaCO2 ≤57, SpO2 ≥99 better
bronchospasm hypovolaemia 6/6 / 408 s / PaCO2 ≤67, SpO2 ≥99 6/6 / 0 s / PaCO2 ≤57, SpO2 ≥99 better
bronchospasm sepsis_emergency 6/6 / 409 s / PaCO2 ≤67, SpO2 ≥99 6/6 / 0 s / PaCO2 ≤58, SpO2 ≥99 better
laryngospasm_on_extubation age18_asa1 6/6 / 0 s / SpO2 ≥99 6/6 / 0 s / SpO2 ≥99 no_derangement
laryngospasm_on_extubation age90 6/6 / 0 s / SpO2 ≥98 6/6 / 0 s / SpO2 ≥99 no_derangement
laryngospasm_on_extubation wt40_bmi15 6/6 / 0 s / SpO2 ≥99 6/6 / 0 s / SpO2 ≥99 no_derangement
laryngospasm_on_extubation wt200_bmi65_osa 6/6 / 160 s / SpO2 ≥43 6/6 / 0 s / SpO2 ≥99 better
laryngospasm_on_extubation egfr10_asa4 6/6 / 0 s / SpO2 ≥99 6/6 / 0 s / SpO2 ≥99 no_derangement
laryngospasm_on_extubation asa4_hfref_cad 6/6 / 0 s / SpO2 ≥98 6/6 / 0 s / SpO2 ≥99 no_derangement
laryngospasm_on_extubation beta_blocker_brady 6/6 / 0 s / SpO2 ≥98 6/6 / 0 s / SpO2 ≥99 no_derangement
laryngospasm_on_extubation elderly_cad_ckd 6/6 / 0 s / SpO2 ≥98 6/6 / 0 s / SpO2 ≥99 no_derangement
laryngospasm_on_extubation obese_osa 6/6 / 158 s / SpO2 ≥47 6/6 / 0 s / SpO2 ≥99 better
laryngospasm_on_extubation mh_susceptible 6/6 / 0 s / SpO2 ≥99 6/6 / 0 s / SpO2 ≥99 no_derangement
laryngospasm_on_extubation hypovolaemia 6/6 / 0 s / SpO2 ≥99 6/6 / 0 s / SpO2 ≥99 no_derangement
laryngospasm_on_extubation sepsis_emergency 6/6 / 0 s / SpO2 ≥98 6/6 / 0 s / SpO2 ≥98 no_derangement
light_anesthesia_stimulus age18_asa1 6/6 / 0 s / MAP ≤83, index ≤48 6/6 / 0 s / MAP ≤94, index ≤48 no_derangement
light_anesthesia_stimulus age90 6/6 / 0 s / MAP ≤89, index ≤44 6/6 / 0 s / MAP ≤96, index ≤44 no_derangement
light_anesthesia_stimulus wt40_bmi15 6/6 / 0 s / MAP ≤80, index ≤48 6/6 / 0 s / MAP ≤89, index ≤48 no_derangement
light_anesthesia_stimulus wt200_bmi65_osa 6/6 / 0 s / MAP ≤103, index ≤48 6/6 / 0 s / MAP ≤103, index ≤48 no_derangement
light_anesthesia_stimulus egfr10_asa4 6/6 / 0 s / MAP ≤103, index ≤47 6/6 / 0 s / MAP ≤103, index ≤47 no_derangement
light_anesthesia_stimulus asa4_hfref_cad 6/6 / 0 s / MAP ≤65, index ≤45 6/6 / 0 s / MAP ≤83, index ≤45 no_derangement
light_anesthesia_stimulus beta_blocker_brady 6/6 / 0 s / MAP ≤89, index ≤44 6/6 / 0 s / MAP ≤89, index ≤44 no_derangement
light_anesthesia_stimulus elderly_cad_ckd 6/6 / 0 s / MAP ≤93, index ≤46 6/6 / 0 s / MAP ≤97, index ≤46 no_derangement
light_anesthesia_stimulus obese_osa 6/6 / 0 s / MAP ≤100, index ≤49 6/6 / 0 s / MAP ≤100, index ≤49 no_derangement
light_anesthesia_stimulus mh_susceptible 6/6 / 0 s / MAP ≤90, index ≤49 6/6 / 0 s / MAP ≤90, index ≤49 no_derangement
light_anesthesia_stimulus hypovolaemia 6/6 / 0 s / MAP ≤67, index ≤47 6/6 / 0 s / MAP ≤82, index ≤47 no_derangement
light_anesthesia_stimulus sepsis_emergency 6/6 / 0 s / MAP ≤62, index ≤48 6/6 / 0 s / MAP ≤78, index ≤48 no_derangement
anaphylaxis_hypotension age18_asa1 6/6 / 1266 s / MAP ≥25 6/6 / 32 s / MAP ≥60 better
anaphylaxis_hypotension age90 6/6 / 1250 s / MAP ≥25 6/6 / 43 s / MAP ≥59 better
anaphylaxis_hypotension wt40_bmi15 6/6 / 1299 s / MAP ≥25 6/6 / 16 s / MAP ≥58 better
anaphylaxis_hypotension wt200_bmi65_osa 6/6 / 1178 s / MAP ≥25 6/6 / 78 s / MAP ≥61 better
anaphylaxis_hypotension egfr10_asa4 6/6 / 1172 s / MAP ≥25 6/6 / 74 s / MAP ≥59 better
anaphylaxis_hypotension asa4_hfref_cad 0/6 / — / MAP ≥25 6/6 / 468 s / MAP ≥36 better
anaphylaxis_hypotension beta_blocker_brady 6/6 / 1255 s / MAP ≥25 6/6 / 34 s / MAP ≥61 better
anaphylaxis_hypotension elderly_cad_ckd 6/6 / 1230 s / MAP ≥25 6/6 / 42 s / MAP ≥61 better
anaphylaxis_hypotension obese_osa 6/6 / 1195 s / MAP ≥25 6/6 / 76 s / MAP ≥60 better
anaphylaxis_hypotension mh_susceptible 6/6 / 1259 s / MAP ≥25 6/6 / 56 s / MAP ≥61 better
anaphylaxis_hypotension hypovolaemia 0/6 / — / MAP ≥25 6/6 / 236 s / MAP ≥44 better
anaphylaxis_hypotension sepsis_emergency 0/6 / — / MAP ≥25 6/6 / 495 s / MAP ≥39 better
light_anesthesia_stimulus:lightened age18_asa1 0/3 / — / MAP ≤89, index ≤83 3/3 / 371 s / MAP ≤84, index ≤64 better
light_anesthesia_stimulus:lightened age90 3/3 / 0 s / MAP ≤96, index ≤55 3/3 / 0 s / MAP ≤96, index ≤55 no_derangement
light_anesthesia_stimulus:lightened wt40_bmi15 0/3 / — / MAP ≤84, index ≤79 3/3 / 416 s / MAP ≤97, index ≤62 better
light_anesthesia_stimulus:lightened wt200_bmi65_osa 1/3 / 346 s / MAP ≤109, index ≤77 3/3 / 515 s / MAP ≤104, index ≤65 better
light_anesthesia_stimulus:lightened egfr10_asa4 0/3 / — / MAP ≤109, index ≤73 3/3 / 523 s / MAP ≤101, index ≤61 better
light_anesthesia_stimulus:lightened asa4_hfref_cad 3/3 / 0 s / MAP ≤78, index ≤59 3/3 / 0 s / MAP ≤88, index ≤59 no_derangement
light_anesthesia_stimulus:lightened beta_blocker_brady 3/3 / 0 s / MAP ≤96, index ≤60 3/3 / 0 s / MAP ≤96, index ≤60 no_derangement
light_anesthesia_stimulus:lightened elderly_cad_ckd 3/3 / 0 s / MAP ≤101, index ≤58 3/3 / 0 s / MAP ≤101, index ≤58 no_derangement
light_anesthesia_stimulus:lightened obese_osa 0/3 / — / MAP ≤107, index ≤75 3/3 / 455 s / MAP ≤99, index ≤61 better
light_anesthesia_stimulus:lightened mh_susceptible 3/3 / 0 s / MAP ≤85, index ≤45 3/3 / 0 s / MAP ≤85, index ≤45 no_derangement
light_anesthesia_stimulus:lightened hypovolaemia 0/3 / — / MAP ≤74, index ≤74 3/3 / 495 s / MAP ≤83, index ≤62 better
light_anesthesia_stimulus:lightened sepsis_emergency 0/3 / — / MAP ≤70, index ≤74 3/3 / 485 s / MAP ≤79, index ≤62 better

Emergencies combined with faults and holds (rescue arm)

combination runs safety violations rescue path available during fault/hold (of which a probe bolus was refused only by the label repeat interval since the strategy's own previous dose) held infusion restart refused primary recovered hold latched at end
map_sensor_fault 72 0 72/72 (18) 210/210 70/72 72/72
hr_sensor_fault 72 0 72/72 (17) 210/210 70/72 72/72
spo2_probe_off 72 0 72/72 (18) 101/101 70/72 52/72
hold_latched 60 0 60/60 (4) 175/175 60/60 60/60
continue_with_hold 60 0 60/60 (3) 170/170 59/60 60/60

Findings (illustrative model behaviour; reported, not tuned)

  1. Model limit — pre-emergency hypotension at the default plan (documented only; no dose or physiology change, owner decision). With the ga_opioid template (label-default fentanyl, propofol induction, 1.0 × age-adjusted MAC sevoflurane, or propofol TIVA when sevoflurane is locked), MAP was already < 65 just before the onset in 7/12 patients (seed 1, early onset): age18_asa1 63, age90 61, wt40_bmi15 63, asa4_hfref_cad 38, beta_blocker_brady 63, hypovolaemia 48, sepsis_emergency 41 mmHg (processed-EEG index 31–40). Consistent with the documented deep reading of the illustrative depth model at label-default maintenance (TIMING_CONFIG DEPTH_LOW_ADVISORY note). Many hemorrhage/anaphylaxis "recoveries" therefore start from a pre-existing derangement; arms are still compared on the same pre-onset state.
  2. Hemorrhage: fluids + accepted label vasopressor advisories do not restore MAP ≥ 65 in every patient class. Not recovered within 1500 s in: asa4_hfref_cad 3/6 (worst MAP 36); sepsis_emergency 3/6 (worst MAP 39). The bleeding never stops in the scenario (holdSec null; surgical control is not modelled), crystalloid offsets at most 80 % of the loss (FLUID_MODEL), the driver gives at most 4 × 500 mL, and the advisory stops at the phenylephrine 200 mcg / ephedrine 50 mg cumulative label maxima ("label maximum reached — escalate; not simulated"). Control: 1/72 runs recovered.
  3. Vagal bradycardia: the scenario resolves by itself; glycopyrrolate 0.1 mg (label rescue dose [S8]) helps only a little. Control median time to HR ≥ 50: 119 s; rescue 107 s. Median seconds with HR < 50: control 102, rescue 88; worst nadir HR control 25, rescue 25 /min. Cause: the event lasts 10 s ramp + 90 s + 30 s resolve, and glycopyrrolate uses the generic illustrative PK (no label onset statement; ke0 0.3 /min, effect-site half-time ≈ 2.3 min), so its effect arrives as the event ends. The largest benefit is in the beta-blocker patient (control 239 s vs rescue 131 s). "Stop the stimulus" cannot be modelled (gap).
  4. Bronchospasm does not desaturate a ventilated patient at FiO2 0.5. Worst SpO2 across all arms 98 %; the scenario shows as hypercapnia (control worst internal PaCO2 67 mmHg, rescue 58 mmHg). The rescue (FiO2 1.0, deepen once, IV epinephrine 50 mcg when EtCO2 > 45 or SpO2 < 90) keeps PaCO2 below 60 mmHg; deepening alone does little because the hypnotic effect is already near maximal (bronchospasm is countered by 0.4 × hypnosis). The IV epinephrine dose is the perioperative-anaphylaxis guideline dose [S44, S45] — no bronchospasm-specific IV regimen is in the library.
  5. Laryngospasm desaturates only the obese patients (FiO2 left at 0.5 through extubation): control worst SpO2 wt200_bmi65_osa 43, obese_osa 47; every other patient stays ≥ 92 % during the 120-s spasm. Rescue (FiO2 1.0, jaw thrust, positive-pressure mask ventilation, which breaks the spasm after 45 s in the scenario) prevents the desaturation. With FiO2 1.0 before extubation (checked while building the matrix) no patient desaturated.
  6. Light anaesthesia / strong stimulus is fully blunted at the default maintenance. Control: no patient exceeded MAP 120, HR 120 or index 60 (worst MAP 103, worst HR 118, worst index 49), so efficacy cannot be tested there ("never deranged"). In the "lightened" variant (hypnotic at the bottom of its label range 300 s before the stimulus, every arm) the index exceeded 60 in 21/36 control runs (worst index 83), while MAP stayed ≤ 109 and HR ≤ 115; of those deranged runs the control recovered in 1 (the anaesthetic stays light), the rescue (fentanyl maintenance boluses [S13], deepen once within the regimen range) in 21/21 (median 485 s). The model's stimulus response (GAINS.STIM_MAP_GAIN 0.4 × stimulus blunted by analgesia and hypnosis) cannot take MAP above 120 from these baselines once label-default analgesia is present.
  7. Anaphylaxis: IV epinephrine 50 mcg [S44, S45] + fluids recovers fastest; IM 0.3 mg [S40] is slower; the control recovers only when the scripted event ends (control median 1242 s, rescue IV 65 s, rescue IM 214 s). Slowest rescue: sepsis_emergency 495 s, asa4_hfref_cad 468 s, hypovolaemia 236 s. The phenylephrine/ephedrine advisory is suppressed during anaphylaxis by design.
  8. Aggressive arm after the owner decisions (repeat refusal, teaching ceilings). Before (commit 21637da) every too-close repeat was accepted with a warning: up to 60.5 mg IM epinephrine, 6.05 mg IV epinephrine and 12.1 mg glycopyrrolate per run (104,616 warned-and-accepted doses in 432 runs). Now, in 432 runs: repeats refused — phenylephrine 4752, epinephrine IM 50976, glycopyrrolate 41400; teaching-ceiling refusals (confirmation required) — epinephrine IV 47952, crystalloid 50334; per run at most epinephrine IM 1.5 mg (one 0.5 mg injection per 5 min), IV 0.55 mg (0.5 mg ceiling + the one deliberately confirmed dose), glycopyrrolate 1 mg. Per-injection caps, the phenylephrine 200 mcg / ephedrine 50 mg cumulative caps and all rate ceilings held as before. Ephedrine ("as needed") and IV epinephrine ("titrated") still have no label interval; ephedrine is limited by its 50 mg label total, IV epinephrine by the teaching ceiling. Midazolam's repeat rule stays warn-only (owner decision; its label wording — "wait an additional 2 or more minutes to fully evaluate the sedative effect" — is titration guidance rather than a stated dosing interval).

Fixes and owner decisions

  • Label repeat intervals of rescue boluses were not checked at all (silent). A phenylephrine, glycopyrrolate (rescue) or IM/SC epinephrine bolus repeated sooner than the label interval was accepted with no warning and no record (only the advisory knew the phenylephrine interval). Fix: engine/timing.js TIMING_CONFIG PHENYLEPHRINE_REPEAT_MIN_SEC 60 s [S18], GLYCOPYRROLATE_RESCUE_REPEAT_MIN_SEC 120 s [S8] (not in emergence, where glycopyrrolate goes with neostigmine), EPINEPHRINE_IM_REPEAT_MIN_SEC 300 s [S40] (lower bounds of the label intervals), read by repeatBolusHold / labelRepeatHold (first a warning for manual repeats in commit 21637da, now a refusal — next item); the bolus route is now recorded in the dose log so IM and IV epinephrine are gated separately. Ephedrine ("as needed") and IV epinephrine ("titrated to effect") have no stated interval and are not gated.
  • Owner decision: too-close clinician-entered repeats are refused. sim.administer refuses (BLOCKED, logged with the label interval and the seconds remaining) a manual or accepted-advisory repeat of phenylephrine IV < 60 s, glycopyrrolate IV < 120 s outside emergence or IM/SC epinephrine < 300 s after the previous one (engine/timing.js labelRepeatHold); planned repeats keep waiting. Midazolam and the rocuronium top-up stay warn-only.
  • Owner decision: simulator teaching ceilings (engine/teaching-ceilings.js, provenance simulator convention, no sourceIds; searched 2026-11-06 — no label or guideline states a cumulative maximum for intraoperative glycopyrrolate or perioperative IV epinephrine boluses; crystalloid has no label dose): IV epinephrine boluses 0.5 mg total (10 × the 50-mcg guideline titration step; = the label IM per-injection maximum), glycopyrrolate 1 mg total (10 × the 0.1 mg rescue dose; = the top of the emergence regimen range), crystalloid 30 mL/kg TBW total (the Surviving Sepsis 2021 initial volume already shown by the fluid model). A dose that would exceed one is refused until the clinician presses "Confirm dose above the simulator teaching ceiling" (confirm_teaching_ceiling:<key>, logged; covers one dose within 60 s). Guided/automatic modes never confirm (a planned step above the ceiling is refused and skipped). The Run screen shows the ceiling and running total next to the dose form and the fluid buttons, with the confirm button after a refusal; the debrief has a "Simulator teaching ceilings" table.

Gaps the engine cannot model (not invented here)

  • Stopping the trigger (anaphylaxis: no causative drug is modelled; vagal bradycardia: the surgical stimulus cannot be stopped — both events run on their scripted time course).
  • Surgical control of bleeding and blood products (hemorrhage never stops; fluids temporise only).
  • Anticholinergic other than glycopyrrolate (no atropine regimen in the library); glycopyrrolate onset uses generic illustrative PK.
  • Inhaled bronchodilators, airway pressure / peak pressure, and a bronchospasm-specific epinephrine regimen; only the anaphylaxis guideline IV dose is available.
  • A laryngospasm-specific propofol or succinylcholine dose: the scenario resolves on any propofol/succinylcholine dose, but the library has only induction/sedation regimens, so the rescue arm uses airway manoeuvres and oxygen only.
  • A sourced antihypertensive (MAP > 120 advisory is text only) and a vasopressor infusion in the advisory (phenylephrine infusion exists in the library but is a manual choice).
  • A sourced cumulative maximum for IV epinephrine boluses, glycopyrrolate and crystalloid (simulator teaching ceilings stand in for them); fluid overload.

Patients, plans and strategies

Fictional patients, each built through derivePatient (validation applies). Plans: ga_opioid technique template via buildTemplatePlan (sevoflurane → propofol TIVA fallback for the MH-susceptible patient); hold combinations use ga_opioid_free (dexmedetomidine, ketamine, lidocaine infusions). Every plan passes the plan-safety check.

id patient BMI flags plan substitutions
age18_asa1 18 y, ASA 1, eGFR 120 22 highPonvRisk —
age90 90 y, ASA 3, eGFR 45 22.5 elderly, ckd, asa3plus —
wt40_bmi15 40 kg, BMI 14.7 14.7 underweight, highPonvRisk —
wt200_bmi65_osa 200 kg, BMI 65, OSA, ASA 3 65.3 obese, morbidObese, asa3plus, difficultAirwayPredicted, osaRisk —
egfr10_asa4 eGFR 10, ASA 4 26.1 ckd, severeCkd, asa3plus —
asa4_hfref_cad ASA 4, HFrEF + CAD, 72 y 26.1 elderly, ckd, asa3plus —
beta_blocker_brady Beta-blocker, baseline HR 52, 68 y 27.3 elderly, asa3plus, highPonvRisk, betaBlocker —
elderly_cad_ckd Example: elderly CAD/CKD, beta-blocker 26.4 elderly, ckd, asa3plus, osaRisk, betaBlocker —
obese_osa Example: obese OSA 41.7 obese, morbidObese, asa3plus, aspirationRisk, difficultAirwayPredicted, osaRisk —
mh_susceptible Example: MH-susceptible (TIVA) 25.4 highPonvRisk, mhSusceptible sevoflurane→propofol
hypovolaemia Hypovolaemia, ASA 3 23.9 asa3plus, highPonvRisk —
sepsis_emergency Sepsis, emergency, ASA 4 26.8 asa3plus, aspirationRisk —

Arms (every dose from recommend(); label/guideline sources in brackets):

  • control — nothing; the rescue advisor is attached but never accepted (it must never dose by itself).
  • rescue — hemorrhage: lactated Ringer's 500 mL when MAP < 65 (one at a time, ≤ 4) + every phenylephrine/ephedrine advisory accepted [S18, S19]; vagal bradycardia: glycopyrrolate 0.1 mg IV when HR < 50, ≥ 120 s apart [S8] + advisories; bronchospasm: after 30 s FiO2 1.0 and deepen once (sevoflurane +0.5 % or propofol +50 mcg/kg/min, within the regimen range), epinephrine 50 mcg IV when EtCO2 > 45 or SpO2 < 90, ≥ 120 s apart [S44, S45]; laryngospasm: 5 s after extubation FiO2 1.0, jaw thrust, positive-pressure mask ventilation until resolved and SpO2 ≥ 94 for 30 s; light anaesthesia: when MAP > 120, HR > 120 or index > 60, fentanyl maintenance bolus (≤ 4, ≥ 180 s apart) [S13] and deepen once; anaphylaxis: FiO2 1.0, fluids as hemorrhage, epinephrine 50 mcg IV when MAP < 65 ≥ 120 s apart, after 3 boluses an epinephrine infusion from 0.05 mcg/kg/min IBW, +0.05 every 10 min while MAP < 65 [S40, S41, S44, S45].
  • rescue_im (anaphylaxis) — as rescue but epinephrine 0.3 mg IM when MAP < 65, ≥ 300 s apart (label [S40]); no IV epinephrine.
  • aggressive — every 5 s for 600 s: the regimen-maximum bolus of phenylephrine, ephedrine, epinephrine IV and IM, glycopyrrolate, a 500 mL fluid bolus and a refused 1000 mL bolus; every 30 s twice a hard cap (phenylephrine cumulative, epinephrine per IV and IM injection, ephedrine cumulative) and twice the ephedrine regimen maximum; at the onset every infusion at twice and at exactly its rate ceiling (epinephrine, phenylephrine, propofol, dexmedetomidine) and the sevoflurane dial at twice its ceiling; at 60 s a direct state write of an epinephrine rate (must be re-validated).

Driver conventions (simulated clinician; not clinical recommendations):

name value
PREMED_SEC 300
INDUCTION_SEC 360
PRE_INCISION_SEC 300
FIO2_MAINTENANCE 0.5
FIO2_INDUCTION 1
FIO2_EMERGENCE 0.5
LIGHTEN_BEFORE_SEC 300
ONSET_AFTER_INCISION_SEC {"early":300,"late":1200}
OBSERVE_SEC 1500
OBSERVE_LARYNGOSPASM_SEC 900
SURGERY_SEC_BEFORE_EMERGENCE 1500
READINESS_TIMEOUT_SEC 1500
EXTUBATE_AFTER_READY_SEC {"early":0,"late":180}
RECOVERY_SUSTAIN_SEC 60
RECOGNITION_SEC 30
ETCO2_HIGH_MMHG 45
FLUID_BOLUS_ML 500
FLUID_MAX_BOLUSES 4
NO_LABEL_INTERVAL_REPEAT_SEC 120
FENTANYL_REPEAT_SEC 180
FENTANYL_MAX_DOSES 4
DEEPEN_VOLATILE_STEP_PCT 0.5
DEEPEN_PROPOFOL_STEP 50
EPI_INFUSION_AFTER_BOLUSES 3
EPI_INFUSION_STEP_SEC 600
AGGRESSIVE_EVERY_SEC 5
AGGRESSIVE_FOR_SEC 600

Plausible bounds: the physiology clamps MAP and HR to 25–200 and SpO2 to 40–100 (engine/physiology.js); the asserted bounds are a little wider than these clamps (so a clamp failure would be caught) and everything outside them is non-physiological. Seconds spent at a clamp are reported above as a sign of model saturation, not a pass/fail criterion. Timeline: premed 300 s, induction 360 s (FiO2 1.0), airway secured, maintenance FiO2 0.5, incision after 300 s, onset 300 s (early) or 1200 s (late) after incision; laryngospasm is armed at that time and starts at extubation (at readiness, or readiness + 180 s for "late"), after 1500 s of surgery.

Source and scope

Published from Smart-NOA-Controller/simulator/EMERGENCY_STRESS.md at revision 477da1e08dca. Full source text is retained; HTML presentation does not establish independent clinical review. In-memory simulation with no patient, monitor or pump interface; not clinically validated.