pediatric-ai-scribe-v3/e2e/tests
Daniel 95a5a5e40e feat(client): port Bedside Anaphylaxis + Cardiac + Seizure panels
Replaces the legacy-viewer fallback for three of the fifteen Bedside
sub-modules with real React implementations. Weight-based dosing now
runs locally for the most time-critical emergencies — the other 12
modules (neonatal, airway, respiratory, ventilation, sepsis, sedation,
agitation, antiemetics, antimicrobials, burns, toxicology, trauma)
still fall through to LegacyPanel.

shared/clinical/calculators.ts
  New formatDose(weightKg, perKg, max?, unit = 'mg') helper that
  mirrors the vanilla S.dStr exactly — same rounding, same cap rule,
  same label format. Returns { value, unit, capped, perKg, max,
  label } so consumers can render rich UI without re-parsing a HTML
  string. Pure function; unit tests in the existing vitest suite
  still pass.

client/src/pages/BedsidePanels.tsx (new)
  Three panels keyed to the Bedside pill id:
    • AnaphylaxisPanel — STEP 1 epi IM callout + full 9-row dosing
      table (fluids, diphenhydramine, ranitidine, dex, methylpred,
      refractory epi gtt, glucagon). Drug per-kg + max values ported
      verbatim from ANAPH_FALLBACK in the vanilla module.
    • CardiacPanel — PALS dosing with 6 sub-views (general,
      asystole/PEA, bradycardia, SVT, VF/pulseless VT, stable VT).
      Every drug row carries the same mg/kg + max values as the
      vanilla cardiac.js (epi, amio, lido, atropine, adenosine ×2,
      bicarb, CaCl/CaGluc, Mg, D10, defib energies). Concentration
      disclaimer + AHA citation preserved.
    • SeizurePanel — full status-epilepticus timeline (0 min →
      40 min refractory) with the vanilla SEIZURE_FALLBACK drug
      table (loraz / midaz / diaz for benzo; levetiracetam /
      fosphenytoin / valproate / phenobarb for 2nd-line; midaz
      pentobarb propofol ketamine infusions for refractory). Key
      points + citation preserved.

  REAL_BEDSIDE_PANELS set + renderBedsideRealPanel(pillId) export so
  Bedside.tsx can dispatch by id without import sprawl.

client/src/pages/Bedside.tsx
  When the active pill is in REAL_BEDSIDE_PANELS, render the real
  panel; otherwise fall back to LegacyPanel. No other changes — the
  sub-nav, age→weight estimator, and 12 legacy-linked modules stay
  exactly as they were.

e2e/tests/bedside-react.spec.js
  Three new parity tests (in addition to the existing shell checks):
    • Anaphylaxis: 20 kg → 0.2 mg epi IM; 70 kg → 0.5 mg (capped).
    • Cardiac: 25 kg → 0.25 mg epi IV in general view and asystole.
    • Seizure: 10 kg → D10W 20-50 mL, Lorazepam 1 mg.

Client tsc -b + vite build clean. Bundle 609 kB / 173 kB gz (+28 kB
for three full panels; vite's 500 kB chunk warning noted for later
code-splitting, not blocking).
2026-04-24 01:27:29 +02:00
..
admin-react.spec.js feat(client): port Admin shell with role-gated sidebar entry 2026-04-24 00:03:02 +02:00
ai-endpoints-contract.spec.js test(e2e): +120 tests across 8 new specs; baseline fixes 2026-04-23 18:58:38 +02:00
auth-gated-smoke.spec.js feat(pe-guide): unified single-play + remove badges; fix(e2e): shared fixture + raised login limit 2026-04-22 22:57:11 +02:00
auth-screen.spec.js test(e2e): +44 tests — sick visit, hospital course, auth screen, 2026-04-23 18:58:38 +02:00
bedside-react.spec.js feat(client): port Bedside Anaphylaxis + Cardiac + Seizure panels 2026-04-24 01:27:29 +02:00
bedside-smoke.spec.js fix(nav): move image lightbox to index.html so NRP + seizure pathways 2026-04-23 18:58:38 +02:00
calculators-react.spec.js feat(client): port age→weight + BSA + dose + GCS; shared/clinical module 2026-04-24 01:11:58 +02:00
chart-review-workflow.spec.js test(e2e): +120 tests across 8 new specs; baseline fixes 2026-04-23 18:58:38 +02:00
encounter-save-load.spec.js test(e2e): +120 tests across 8 new specs; baseline fixes 2026-04-23 18:58:38 +02:00
encounter-workflow.spec.js test(e2e): +120 tests across 8 new specs; baseline fixes 2026-04-23 18:58:38 +02:00
extensions-crud.spec.js test(e2e): +120 tests across 8 new specs; baseline fixes 2026-04-23 18:58:38 +02:00
hospitalcourse-workflow.spec.js test(e2e): +44 tests — sick visit, hospital course, auth screen, 2026-04-23 18:58:38 +02:00
learning-react.spec.js feat(client): port Learning Hub to React 2026-04-23 23:49:56 +02:00
learning-tab.spec.js test(e2e): +120 tests across 8 new specs; baseline fixes 2026-04-23 18:58:38 +02:00
model-selector.spec.js test(e2e): +44 tests — sick visit, hospital course, auth screen, 2026-04-23 18:58:38 +02:00
pe-guide-smoke.spec.js test(e2e): +120 tests across 8 new specs; baseline fixes 2026-04-23 18:58:38 +02:00
peguide-react.spec.js feat(client): port full PE_DATA checklist + Generate Exam Report flow 2026-04-24 01:21:44 +02:00
session-persistence.spec.js test(e2e): +44 tests — sick visit, hospital course, auth screen, 2026-04-23 18:58:38 +02:00
settings-faq-dictation.spec.js test(e2e): +120 tests across 8 new specs; baseline fixes 2026-04-23 18:58:38 +02:00
settings-react-integrations.spec.js feat(client): port Settings — Integrations (Nextcloud + Documents) 2026-04-23 23:35:12 +02:00
settings-react-security.spec.js feat(client): port Settings — Security (password, 2FA, sessions) 2026-04-23 23:31:14 +02:00
settings-react-voice-content.spec.js feat(client): port Settings — Voice + Content (8 sub-sections) 2026-04-23 23:40:33 +02:00
sickvisit-workflow.spec.js test(e2e): +44 tests — sick visit, hospital course, auth screen, 2026-04-23 18:58:38 +02:00
soap-hospital-workflow.spec.js feat(ui-state): persist sub-pill selections across reload + sign-out 2026-04-23 18:58:38 +02:00
top-calculators.spec.js test(e2e): add 27 Playwright smoke tests for top-row calculator tabs 2026-04-20 23:19:50 +02:00
ui-state-persistence.spec.js feat(ui-state): persist sub-pill selections across reload + sign-out 2026-04-23 18:58:38 +02:00
vaxschedule-content.spec.js test(e2e): +120 tests across 8 new specs; baseline fixes 2026-04-23 18:58:38 +02:00
wellvisit-workflow.spec.js test(e2e): +44 tests — sick visit, hospital course, auth screen, 2026-04-23 18:58:38 +02:00