pediatric-ai-scribe-v3/public
Daniel 7371cbf13a feat(client): port BMI + Vitals + Resus Meds + Equipment calculators
Nine of the ten Calculator pills now run in React. Only BP Percentile
(Rosner quantile splines, ~3,000 hand-transcribed coefficients across
6 LMS arrays and 4 spline matrices) remains legacy-linked; that port
deserves its own dedicated session with extra care.

shared/clinical/bmi.ts — CDC 2000 BMI-for-age
  • bmiLMS table ported byte-for-byte from calculators.js:739
    (74 LMS triples = 37 age points × 2 sexes, 24-240 months).
  • normalCDF (Abramowitz & Stegun), calcBmiPercentile, classifyBMI
    (including the %-of-95th severe-obesity split), and a top-level
    computeBmi helper — all verbatim translations of the vanilla math.
  • classification labels preserved exactly so existing e2e screenshots
    or reporting continue to read the same text ('Class 2 Severe
    Obesity', 'Healthy Weight', etc.).

shared/clinical/bmi.test.ts — 12 captured vectors covering:
  both sexes, edges (2y + 20y), interpolated-between-keys (13m),
  each classification cliff (underweight / healthy / overweight /
  obese / severe class 2 / severe class 3), and the age-clamping
  branches (<24 mo and >240 mo). All 12 pass at 10-decimal precision
  (percentile to 6 places since the vanilla rounds to 2).

scripts/capture-calc-vectors.js — BMI section added
  Same pattern as bilirubin / Fenton: the vanilla data + math are
  inlined verbatim, the script runs 12 chosen cases, and writes to
  e2e/fixtures/calc-vectors.json. Re-run after any upstream change.

client/src/pages/CalculatorPanels.tsx (new)
  • BmiPanel — age/sex/weight/height inputs, calls computeBmi,
    renders color-coded classification badge with BMI, percentile,
    Z, and % of 95th when percentile ≥85.
  • VitalsPanel — 8-band age selector (premie → >12 yr).
    VITALS_DATA ported verbatim from calculators.js:1703-1831 with
    every HR/RR/SBP/DBP/temp/weight/SpO₂ range and clinical notes
    preserved entry-for-entry.
  • ResusPanel — weight input drives all 14 drugs (Adenosine,
    Amiodarone, Atropine, CaCl, Ca-gluconate, Dextrose, Epi,
    Hydrocortisone, Insulin, Lidocaine, Mg, Naloxone, NaHCO₃) with
    calc() closures ported verbatim from RESUS_MEDS lines 1873-2050.
    Category colors + labels preserved.
  • EquipmentPanel — 9-band age selector (premie → 16+ yr).
    EQUIP_DATA ported verbatim from calculators.js:2173-2228 with
    12 equipment sizes per band (BVM, NPA, OPA, blade, ETT, LMA,
    Glidescope, IV, CVL, NGT, chest tube, Foley).

client/src/pages/Calculators.tsx
  Dispatch wires bmi → BmiPanel, vitals → VitalsPanel, resus →
  ResusPanel, equipment → EquipmentPanel. PILLS flags all four as
  ported: true. Only bp remains on LegacyPanel.

Backend tsc + client tsc + vite build + 122/122 vitest (19 calc +
70 bili + 21 fenton/neonatal + 12 bmi) all green.
2026-04-24 02:08:05 +02:00
..
.well-known Add SHA256 fingerprint to assetlinks.json for TWA domain verification 2026-03-29 00:32:58 +00:00
app feat(client): port BMI + Vitals + Resus Meds + Equipment calculators 2026-04-24 02:08:05 +02:00
audio fix(pe-guide): remove PVC entry from cardiac sounds library 2026-04-23 18:58:38 +02:00
components fix(nav): move image lightbox to index.html so NRP + seizure pathways 2026-04-23 18:58:38 +02:00
css feat: Bedside clinical reference module + age→weight estimator + dose-math unit tests 2026-04-20 02:49:42 +02:00
data feat: B — extract drug data to public/data/drugs.json (schema v1.0) 2026-04-20 04:23:24 +02:00
icons Feat: add stethoscope+pencil favicon in SVG, ICO, and PNG sizes 2026-03-22 14:09:18 -04:00
images/pe-guide feat(pe-guide): real audio, innocent-murmur panel, APTM image, all-ages resp+CV 2026-04-22 21:00:42 +02:00
img feat: Bedside clinical reference module + age→weight estimator + dose-math unit tests 2026-04-20 02:49:42 +02:00
js test(lint): static reference linter — catches dead-code + orphan refs 2026-04-23 18:58:38 +02:00
vendor Replace Quill with Tiptap rich text editor 2026-03-23 23:32:41 -04:00
404.html Add proper 404 handling and custom error page 2026-03-23 23:47:50 -04:00
e2e-harness.html fix(nav): move image lightbox to index.html so NRP + seizure pathways 2026-04-23 18:58:38 +02:00
favicon.ico Feat: add stethoscope+pencil favicon in SVG, ICO, and PNG sizes 2026-03-22 14:09:18 -04:00
index.html test(lint): static reference linter — catches dead-code + orphan refs 2026-04-23 18:58:38 +02:00
manifest.json v9: Major feature update — audio backup, SOAP save, Dragon memory, S3 docs, CI/CD, APK 2026-03-28 21:08:32 +00:00
sw.js Fix: bump SW cache to v12, switch JS/CSS to network-first 2026-03-29 20:02:34 -04:00