CODEBOARD — Physiology & Medication Logic Reference

This documents exactly how the simulator's physiology and medication effects work under the hood — useful for understanding what to expect during a case, or for troubleshooting "why did that happen?" moments.

Contents

Vital Sign Display & Timing

Gradual transitions (~20 seconds)

When HR or SpO2 changes for any reason (a medication effect resolving, an instructor override, etc.), the room screen doesn't snap to the new number — it eases toward it over about 20 seconds, the same way a real patient's numbers trend rather than teleport. The EKG rate and beep follow the same transition. Exception: arrest transitions (going pulseless, or achieving ROSC) and pacer capture changes are instant — those need immediate recognition, not a lagging trend.

Small natural variability

HR, SpO2, RR, and EtCO2 all have a slow, gentle wobble layered on top of whatever their target value is, so nothing sits perfectly flat the way it would with an artificial fixed number. This is a display-only effect — it doesn't change the underlying case physiology.

EKG complex spacing is proportional to HR

The visual gap between QRS complexes on the tracing scales with the current heart rate — faster HR compresses the spacing, slower HR stretches it out. The SpO2 pleth and arterial line waveform (if placed) share the exact same per-beat timing, so everything on the monitor moves together.

Ectopic beats

About 1 in 100 beats, in any organized rhythm, renders as a wide, bizarre ectopic (PVC-like) complex instead of the normal shape for that one beat — a small, realistic irregularity rather than a perfectly regular trace.

The beep

The audible beep fires at the exact moment a new QRS starts on the tracing (not on a separate independent timer). Pacer-captured beats have their own beep tied to capture timing and don't double up with this one. There's no beep at all while the patient is pulseless — VFib instead triggers a continuous alarm tone (see Other Features).

Case Onset Modes

Selectable on control.html under Case Onset, applies the next time a case is started:

ModeBehavior
InstantPatient presents at the case's full authored severity immediately.
GradualPatient starts near-normal (HR ~82, SpO2 ~97, RR 16, BP ~118/74, Temp 37.0, EtCO2 ~36, sinus rhythm) and deteriorates smoothly to the case's true presentation over about 90 seconds. If the case is an arrest, the rhythm snaps into the arrest rhythm right at the end of that 90s window — simulating a patient who was stable, then suddenly coded.

Oxygen, Airway & Ventilator

Device ranking & probabilistic improvement

Oxygen devices are ranked Room Air < Nasal Cannula < Non-Rebreather < BVM < ETT. Every device change (or flow rate change) has some chance of improving SpO2 — even in cases whose root problem isn't primarily hypoxia-fixable-by-oxygen — but the odds and magnitude scale up with device rank and flow rate. Cases flagged as not "intubation responsive" (mechanical/obstructive problems like tension pneumothorax) get a much smaller benefit from BVM/ETT specifically.

Intubation gating

ConditionEffect
Patient awake, not sedatedIntubation attempt aborted — patient becomes combative. Give sedation first (etomidate, ketamine, propofol, midazolam).
No paralytic given25% chance of failed visualization on the attempt.
No suction used10% chance of secretions obscuring the view — suction and retry.

Ventilator

Once on ETT, applying vent settings shows ETT (Vent ON) under O2 Device. SpO2 improvement is driven primarily by FiO2, with separate smaller bonuses for tidal volume (capped around 700mL) and respiratory rate (capped around 22). If tidal volume exceeds ~550mL, rising intrathoracic pressure reduces venous return and lowers blood pressure — a real and common bedside teaching point about avoiding excessive Vt.

Respiratory depression cascade

Giving ketamine, etomidate, rocuronium, or propofol without a secured airway (BVM, ETT, or an active vent) starts a countdown:

Placing BVM, ETT, or turning on the vent at any point halts the cascade immediately.

Continuous BVM/vent sound

The bagging/ventilator sound loops continuously (roughly matching the set RR or ~12/min for manual bagging) rather than playing once at device change.

CPR

The CPR button blinks at 100/min while active and the text changes to "CPR In Process." Clicking again turns it off. While CPR is active on a pulseless patient, EtCO2 reads in the realistic 15–23 range (reflecting compression quality); without compressions during arrest, it decays toward zero. CPR auto-stops on ROSC.

Medication Effects

Unless noted, most medications apply their effect after roughly a 1-minute onset delay (mirroring real circulation time), and log a message when given and again when the effect becomes apparent.

MedicationEffect
Adenosine50% chance of conversion per dose (independent each time — a second dose is a fresh coin flip). If it works: ~8s onset → transient asystole with a gasp sound → a few escape beats → sinus rhythm at 70 over the following ~7 seconds. 1 in 10 successful conversions instead degenerates into VFib (a real, if rare, complication) and does not self-resolve.
Esmolol / Labetalol~10% HR reduction and ~15% BP reduction, applied to whatever the vitals are at the 1-minute mark — so repeat dosing (or increasing the esmolol infusion rate) compounds further each time rather than being a fixed one-time change.
Diltiazem gtt50% chance of slowing HR (~25% reduction), assessed about 4 minutes after starting the infusion.
IV fluid bolus15% BP increase after 1 minute — but only for the first two boluses given, and only if BP isn't already above 140/80.
pRBC transfusion+3 hematocrit points; ~78% chance of some BP improvement (not guaranteed — ongoing losses or transfusion lag can blunt it). A repeat CBC after transfusion reflects the improved Hct/Hgb.
DigibindCurative for digoxin toxicity (the Brady Arrest case) — resolves the bradycardia/arrest rhythm and lowers potassium, about 90 seconds after administration.
Active cooling / rewarming±1°F temperature change, 3 minutes after starting.
Needle decompressionTemporizing SpO2/BP improvement for tension pneumothorax-type physiology — framed as needing a definitive chest tube to follow.
Chest tubeMore definitive/larger SpO2 and BP improvement than needle decompression alone.
Arterial lineUnlocks the arterial line waveform (see below) and cuts ABG/VBG turnaround time by ~40% (no fresh stick needed).
Amiodarone / ProcainamideMarks the patient as having an antiarrhythmic on board (improves post-shock rhythm stability — see below). If given during active VFib/VTach, also gives a standalone 30% chance of helping the rhythm convert about 90 seconds later, reflecting real use as a shock adjunct.

Shock, Cardioversion & Rhythm Stability

Success rates

ActionSuccess chance
Defibrillation (VFib/VTach, unsynchronized)50%
Synchronized cardioversion — AFib80%
Synchronized cardioversion — SVT/VTach with a pulse50%

VFib/VTach will not resolve on their own — only a shock, or amiodarone/procainamide (see above), can convert them.

Post-conversion rhythm stability

After any successful conversion to a normal rhythm, a check runs every 30 seconds:

Antiarrhythmic on board?Stay normal→ VTach→ VFib→ Asystole
No40%25%25%10%
Yes (amiodarone/procainamide given)80%8%8%4%

This check only runs while the rhythm remains normal — if it degenerates, the check stops (the patient needs re-treatment, which restarts the process on the next successful conversion).

Labs & the Approval Workflow

When a lab is ordered, it immediately appears on control.html in an editable draft form — you don't have to wait for the turnaround timer to review or adjust it. The room screen shows a live countdown in the meantime. Whatever is left in the fields (edited or not) automatically releases to the room the moment the turnaround timer completes — no approval click required, though you can still approve manually to release early.

CBC, ABG/VBG, and Lactate are dynamic — they reflect the patient's actual current state (hematocrit, respiratory status, live lactate value) rather than a fixed snapshot, so a repeat draw after treatment shows real improvement.

Lactate & Blood Gas Dynamics

Condition (checked every minute)Effect on lactate
BP is low or unmeasurable (systolic < 80 or null)+1 point/minute, capped at 12
BP above 80/40, or CPR is in progress−1 point/minute (CPR takes priority even without a measurable cuff BP)

ABG/VBG pH and pCO2 partially mirror the lactate trend on top of their normal respiratory-status calculation — as lactate climbs, pH can fall as low as 6.5 and pCO2 can rise as high as 110, reflecting a mixed picture of worsening metabolic acidosis with inadequate ventilatory compensation (realistic in a decompensating/arrested patient).

Arterial Line

Once placed, a new waveform row appears under EtCO2 showing a real arterial pressure trace (sharp systolic upstroke, dicrotic notch, diastolic runoff), with its amplitude scaled to the current pulse pressure and a live systolic/diastolic numeric readout. It shares the same per-beat timing as the EKG.

Other Features