pediatric-ai-scribe-v3/e2e/fixtures/calc-vectors.json
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

1585 lines
No EOL
33 KiB
JSON

{
"generatedAt": "2026-04-24T00:03:50.703Z",
"source": "public/js/calculators.js + public/js/bedside/neonatal.js",
"bhutani": [
{
"name": "Bhutani low-end (6h)",
"inputs": {
"hours": 6,
"tsb": 5
},
"output": {
"p95": 6,
"p75": 4.5,
"p40": 3,
"zone": "High-Intermediate"
}
},
{
"name": "Bhutani high-end (120h)",
"inputs": {
"hours": 120,
"tsb": 18
},
"output": {
"p95": 19,
"p75": 16,
"p40": 13.2,
"zone": "High-Intermediate"
}
},
{
"name": "Bhutani exactly p95 at 24h",
"inputs": {
"hours": 24,
"tsb": 9.6
},
"output": {
"p95": 9.6,
"p75": 7.8,
"p40": 6.2,
"zone": "High-Risk"
}
},
{
"name": "Bhutani exactly p75 at 24h",
"inputs": {
"hours": 24,
"tsb": 7.8
},
"output": {
"p95": 9.6,
"p75": 7.8,
"p40": 6.2,
"zone": "High-Intermediate"
}
},
{
"name": "Bhutani exactly p40 at 24h",
"inputs": {
"hours": 24,
"tsb": 6.2
},
"output": {
"p95": 9.6,
"p75": 7.8,
"p40": 6.2,
"zone": "Low-Intermediate"
}
},
{
"name": "Bhutani interpolated 27h",
"inputs": {
"hours": 27,
"tsb": 9
},
"output": {
"p95": 10.399999999999999,
"p75": 8.5,
"p40": 6.7,
"zone": "High-Intermediate"
}
},
{
"name": "Bhutani interpolated 45h",
"inputs": {
"hours": 45,
"tsb": 13
},
"output": {
"p95": 14.3,
"p75": 12.1,
"p40": 9.6,
"zone": "High-Intermediate"
}
},
{
"name": "Bhutani interpolated 78h",
"inputs": {
"hours": 78,
"tsb": 16
},
"output": {
"p95": 17.7,
"p75": 15.2,
"p40": 12.399999999999999,
"zone": "High-Intermediate"
}
},
{
"name": "Bhutani low-risk 36h",
"inputs": {
"hours": 36,
"tsb": 7
},
"output": {
"p95": 12.8,
"p75": 10.6,
"p40": 8.4,
"zone": "Low-Risk"
}
},
{
"name": "Bhutani low-intermediate 36h",
"inputs": {
"hours": 36,
"tsb": 9
},
"output": {
"p95": 12.8,
"p75": 10.6,
"p40": 8.4,
"zone": "Low-Intermediate"
}
},
{
"name": "Bhutani high-intermediate 36h",
"inputs": {
"hours": 36,
"tsb": 11
},
"output": {
"p95": 12.8,
"p75": 10.6,
"p40": 8.4,
"zone": "High-Intermediate"
}
},
{
"name": "Bhutani high-risk 36h",
"inputs": {
"hours": 36,
"tsb": 15
},
"output": {
"p95": 12.8,
"p75": 10.6,
"p40": 8.4,
"zone": "High-Risk"
}
}
],
"aap": [
{
"name": "AAP 35w low-risk at 12h",
"inputs": {
"gaWeeks": 35,
"hours": 12,
"tsb": 10,
"risk": "low"
},
"output": {
"photoThreshold": 8.5,
"exchangeThreshold": 16.4,
"status": "Above Phototherapy"
}
},
{
"name": "AAP 35w low-risk at 48h",
"inputs": {
"gaWeeks": 35,
"hours": 48,
"tsb": 15,
"risk": "low"
},
"output": {
"photoThreshold": 14.2,
"exchangeThreshold": 20.7,
"status": "Above Phototherapy"
}
},
{
"name": "AAP 35w low-risk at 96h",
"inputs": {
"gaWeeks": 35,
"hours": 96,
"tsb": 18,
"risk": "low"
},
"output": {
"photoThreshold": 18.6,
"exchangeThreshold": 24.5,
"status": "Below Phototherapy"
}
},
{
"name": "AAP 35w low-risk at 31.5h",
"inputs": {
"gaWeeks": 35,
"hours": 31.5,
"tsb": 13,
"risk": "low"
},
"output": {
"photoThreshold": 11.8,
"exchangeThreshold": 18.85,
"status": "Above Phototherapy"
}
},
{
"name": "AAP 35w medium-risk at 12h",
"inputs": {
"gaWeeks": 35,
"hours": 12,
"tsb": 10,
"risk": "medium"
},
"output": {
"photoThreshold": 6.9,
"exchangeThreshold": 14.6,
"status": "Above Phototherapy"
}
},
{
"name": "AAP 35w medium-risk at 48h",
"inputs": {
"gaWeeks": 35,
"hours": 48,
"tsb": 15,
"risk": "medium"
},
"output": {
"photoThreshold": 12.2,
"exchangeThreshold": 18.5,
"status": "Above Phototherapy"
}
},
{
"name": "AAP 35w medium-risk at 96h",
"inputs": {
"gaWeeks": 35,
"hours": 96,
"tsb": 18,
"risk": "medium"
},
"output": {
"photoThreshold": 16.1,
"exchangeThreshold": 21.1,
"status": "Above Phototherapy"
}
},
{
"name": "AAP 35w medium-risk at 31.5h",
"inputs": {
"gaWeeks": 35,
"hours": 31.5,
"tsb": 13,
"risk": "medium"
},
"output": {
"photoThreshold": 10,
"exchangeThreshold": 16.95,
"status": "Above Phototherapy"
}
},
{
"name": "AAP 36w low-risk at 12h",
"inputs": {
"gaWeeks": 36,
"hours": 12,
"tsb": 10,
"risk": "low"
},
"output": {
"photoThreshold": 9,
"exchangeThreshold": 17.5,
"status": "Above Phototherapy"
}
},
{
"name": "AAP 36w low-risk at 48h",
"inputs": {
"gaWeeks": 36,
"hours": 48,
"tsb": 15,
"risk": "low"
},
"output": {
"photoThreshold": 14.8,
"exchangeThreshold": 21.9,
"status": "Above Phototherapy"
}
},
{
"name": "AAP 36w low-risk at 96h",
"inputs": {
"gaWeeks": 36,
"hours": 96,
"tsb": 18,
"risk": "low"
},
"output": {
"photoThreshold": 19.3,
"exchangeThreshold": 25.5,
"status": "Below Phototherapy"
}
},
{
"name": "AAP 36w low-risk at 31.5h",
"inputs": {
"gaWeeks": 36,
"hours": 31.5,
"tsb": 13,
"risk": "low"
},
"output": {
"photoThreshold": 12.4,
"exchangeThreshold": 20.05,
"status": "Above Phototherapy"
}
},
{
"name": "AAP 36w medium-risk at 12h",
"inputs": {
"gaWeeks": 36,
"hours": 12,
"tsb": 10,
"risk": "medium"
},
"output": {
"photoThreshold": 7.4,
"exchangeThreshold": 15.2,
"status": "Above Phototherapy"
}
},
{
"name": "AAP 36w medium-risk at 48h",
"inputs": {
"gaWeeks": 36,
"hours": 48,
"tsb": 15,
"risk": "medium"
},
"output": {
"photoThreshold": 12.8,
"exchangeThreshold": 19.1,
"status": "Above Phototherapy"
}
},
{
"name": "AAP 36w medium-risk at 96h",
"inputs": {
"gaWeeks": 36,
"hours": 96,
"tsb": 18,
"risk": "medium"
},
"output": {
"photoThreshold": 17,
"exchangeThreshold": 22.1,
"status": "Above Phototherapy"
}
},
{
"name": "AAP 36w medium-risk at 31.5h",
"inputs": {
"gaWeeks": 36,
"hours": 31.5,
"tsb": 13,
"risk": "medium"
},
"output": {
"photoThreshold": 10.6,
"exchangeThreshold": 17.45,
"status": "Above Phototherapy"
}
},
{
"name": "AAP 37w low-risk at 12h",
"inputs": {
"gaWeeks": 37,
"hours": 12,
"tsb": 10,
"risk": "low"
},
"output": {
"photoThreshold": 9.6,
"exchangeThreshold": 18.7,
"status": "Above Phototherapy"
}
},
{
"name": "AAP 37w low-risk at 48h",
"inputs": {
"gaWeeks": 37,
"hours": 48,
"tsb": 15,
"risk": "low"
},
"output": {
"photoThreshold": 15.4,
"exchangeThreshold": 23.1,
"status": "Below Phototherapy"
}
},
{
"name": "AAP 37w low-risk at 96h",
"inputs": {
"gaWeeks": 37,
"hours": 96,
"tsb": 18,
"risk": "low"
},
"output": {
"photoThreshold": 20,
"exchangeThreshold": 26.6,
"status": "Below Phototherapy"
}
},
{
"name": "AAP 37w low-risk at 31.5h",
"inputs": {
"gaWeeks": 37,
"hours": 31.5,
"tsb": 13,
"risk": "low"
},
"output": {
"photoThreshold": 12.95,
"exchangeThreshold": 21.25,
"status": "Above Phototherapy"
}
},
{
"name": "AAP 37w medium-risk at 12h",
"inputs": {
"gaWeeks": 37,
"hours": 12,
"tsb": 10,
"risk": "medium"
},
"output": {
"photoThreshold": 8,
"exchangeThreshold": 15.7,
"status": "Above Phototherapy"
}
},
{
"name": "AAP 37w medium-risk at 48h",
"inputs": {
"gaWeeks": 37,
"hours": 48,
"tsb": 15,
"risk": "medium"
},
"output": {
"photoThreshold": 13.5,
"exchangeThreshold": 19.7,
"status": "Above Phototherapy"
}
},
{
"name": "AAP 37w medium-risk at 96h",
"inputs": {
"gaWeeks": 37,
"hours": 96,
"tsb": 18,
"risk": "medium"
},
"output": {
"photoThreshold": 17.9,
"exchangeThreshold": 23.1,
"status": "Above Phototherapy"
}
},
{
"name": "AAP 37w medium-risk at 31.5h",
"inputs": {
"gaWeeks": 37,
"hours": 31.5,
"tsb": 13,
"risk": "medium"
},
"output": {
"photoThreshold": 11.2,
"exchangeThreshold": 18.05,
"status": "Above Phototherapy"
}
},
{
"name": "AAP 38w low-risk at 12h",
"inputs": {
"gaWeeks": 38,
"hours": 12,
"tsb": 10,
"risk": "low"
},
"output": {
"photoThreshold": 10.1,
"exchangeThreshold": 19.7,
"status": "Below Phototherapy"
}
},
{
"name": "AAP 38w low-risk at 48h",
"inputs": {
"gaWeeks": 38,
"hours": 48,
"tsb": 15,
"risk": "low"
},
"output": {
"photoThreshold": 16,
"exchangeThreshold": 24,
"status": "Below Phototherapy"
}
},
{
"name": "AAP 38w low-risk at 96h",
"inputs": {
"gaWeeks": 38,
"hours": 96,
"tsb": 18,
"risk": "low"
},
"output": {
"photoThreshold": 20.7,
"exchangeThreshold": 27,
"status": "Below Phototherapy"
}
},
{
"name": "AAP 38w low-risk at 31.5h",
"inputs": {
"gaWeeks": 38,
"hours": 31.5,
"tsb": 13,
"risk": "low"
},
"output": {
"photoThreshold": 13.5,
"exchangeThreshold": 22.25,
"status": "Below Phototherapy"
}
},
{
"name": "AAP 38w medium-risk at 12h",
"inputs": {
"gaWeeks": 38,
"hours": 12,
"tsb": 10,
"risk": "medium"
},
"output": {
"photoThreshold": 8.5,
"exchangeThreshold": 16.3,
"status": "Above Phototherapy"
}
},
{
"name": "AAP 38w medium-risk at 48h",
"inputs": {
"gaWeeks": 38,
"hours": 48,
"tsb": 15,
"risk": "medium"
},
"output": {
"photoThreshold": 14,
"exchangeThreshold": 20.1,
"status": "Above Phototherapy"
}
},
{
"name": "AAP 38w medium-risk at 96h",
"inputs": {
"gaWeeks": 38,
"hours": 96,
"tsb": 18,
"risk": "medium"
},
"output": {
"photoThreshold": 18.2,
"exchangeThreshold": 23.5,
"status": "Below Phototherapy"
}
},
{
"name": "AAP 38w medium-risk at 31.5h",
"inputs": {
"gaWeeks": 38,
"hours": 31.5,
"tsb": 13,
"risk": "medium"
},
"output": {
"photoThreshold": 11.7,
"exchangeThreshold": 18.45,
"status": "Above Phototherapy"
}
},
{
"name": "AAP 39w low-risk at 12h",
"inputs": {
"gaWeeks": 39,
"hours": 12,
"tsb": 10,
"risk": "low"
},
"output": {
"photoThreshold": 10.6,
"exchangeThreshold": 19.7,
"status": "Below Phototherapy"
}
},
{
"name": "AAP 39w low-risk at 48h",
"inputs": {
"gaWeeks": 39,
"hours": 48,
"tsb": 15,
"risk": "low"
},
"output": {
"photoThreshold": 16.6,
"exchangeThreshold": 24,
"status": "Below Phototherapy"
}
},
{
"name": "AAP 39w low-risk at 96h",
"inputs": {
"gaWeeks": 39,
"hours": 96,
"tsb": 18,
"risk": "low"
},
"output": {
"photoThreshold": 21.5,
"exchangeThreshold": 27,
"status": "Below Phototherapy"
}
},
{
"name": "AAP 39w low-risk at 31.5h",
"inputs": {
"gaWeeks": 39,
"hours": 31.5,
"tsb": 13,
"risk": "low"
},
"output": {
"photoThreshold": 14.1,
"exchangeThreshold": 22.25,
"status": "Below Phototherapy"
}
},
{
"name": "AAP 39w medium-risk at 12h",
"inputs": {
"gaWeeks": 39,
"hours": 12,
"tsb": 10,
"risk": "medium"
},
"output": {
"photoThreshold": 8.5,
"exchangeThreshold": 16.3,
"status": "Above Phototherapy"
}
},
{
"name": "AAP 39w medium-risk at 48h",
"inputs": {
"gaWeeks": 39,
"hours": 48,
"tsb": 15,
"risk": "medium"
},
"output": {
"photoThreshold": 14,
"exchangeThreshold": 20.1,
"status": "Above Phototherapy"
}
},
{
"name": "AAP 39w medium-risk at 96h",
"inputs": {
"gaWeeks": 39,
"hours": 96,
"tsb": 18,
"risk": "medium"
},
"output": {
"photoThreshold": 18.2,
"exchangeThreshold": 23.5,
"status": "Below Phototherapy"
}
},
{
"name": "AAP 39w medium-risk at 31.5h",
"inputs": {
"gaWeeks": 39,
"hours": 31.5,
"tsb": 13,
"risk": "medium"
},
"output": {
"photoThreshold": 11.7,
"exchangeThreshold": 18.45,
"status": "Above Phototherapy"
}
},
{
"name": "AAP 40w low-risk at 12h",
"inputs": {
"gaWeeks": 40,
"hours": 12,
"tsb": 10,
"risk": "low"
},
"output": {
"photoThreshold": 11.2,
"exchangeThreshold": 19.7,
"status": "Below Phototherapy"
}
},
{
"name": "AAP 40w low-risk at 48h",
"inputs": {
"gaWeeks": 40,
"hours": 48,
"tsb": 15,
"risk": "low"
},
"output": {
"photoThreshold": 17.2,
"exchangeThreshold": 24,
"status": "Below Phototherapy"
}
},
{
"name": "AAP 40w low-risk at 96h",
"inputs": {
"gaWeeks": 40,
"hours": 96,
"tsb": 18,
"risk": "low"
},
"output": {
"photoThreshold": 22.3,
"exchangeThreshold": 27,
"status": "Below Phototherapy"
}
},
{
"name": "AAP 40w low-risk at 31.5h",
"inputs": {
"gaWeeks": 40,
"hours": 31.5,
"tsb": 13,
"risk": "low"
},
"output": {
"photoThreshold": 14.649999999999999,
"exchangeThreshold": 22.25,
"status": "Below Phototherapy"
}
},
{
"name": "AAP 40w medium-risk at 12h",
"inputs": {
"gaWeeks": 40,
"hours": 12,
"tsb": 10,
"risk": "medium"
},
"output": {
"photoThreshold": 8.5,
"exchangeThreshold": 16.3,
"status": "Above Phototherapy"
}
},
{
"name": "AAP 40w medium-risk at 48h",
"inputs": {
"gaWeeks": 40,
"hours": 48,
"tsb": 15,
"risk": "medium"
},
"output": {
"photoThreshold": 14,
"exchangeThreshold": 20.1,
"status": "Above Phototherapy"
}
},
{
"name": "AAP 40w medium-risk at 96h",
"inputs": {
"gaWeeks": 40,
"hours": 96,
"tsb": 18,
"risk": "medium"
},
"output": {
"photoThreshold": 18.2,
"exchangeThreshold": 23.5,
"status": "Below Phototherapy"
}
},
{
"name": "AAP 40w medium-risk at 31.5h",
"inputs": {
"gaWeeks": 40,
"hours": 31.5,
"tsb": 13,
"risk": "medium"
},
"output": {
"photoThreshold": 11.7,
"exchangeThreshold": 18.45,
"status": "Above Phototherapy"
}
},
{
"name": "AAP 41w low-risk at 12h",
"inputs": {
"gaWeeks": 41,
"hours": 12,
"tsb": 10,
"risk": "low"
},
"output": {
"photoThreshold": 11.2,
"exchangeThreshold": 19.7,
"status": "Below Phototherapy"
}
},
{
"name": "AAP 41w low-risk at 48h",
"inputs": {
"gaWeeks": 41,
"hours": 48,
"tsb": 15,
"risk": "low"
},
"output": {
"photoThreshold": 17.2,
"exchangeThreshold": 24,
"status": "Below Phototherapy"
}
},
{
"name": "AAP 41w low-risk at 96h",
"inputs": {
"gaWeeks": 41,
"hours": 96,
"tsb": 18,
"risk": "low"
},
"output": {
"photoThreshold": 22.3,
"exchangeThreshold": 27,
"status": "Below Phototherapy"
}
},
{
"name": "AAP 41w low-risk at 31.5h",
"inputs": {
"gaWeeks": 41,
"hours": 31.5,
"tsb": 13,
"risk": "low"
},
"output": {
"photoThreshold": 14.649999999999999,
"exchangeThreshold": 22.25,
"status": "Below Phototherapy"
}
},
{
"name": "AAP 41w medium-risk at 12h",
"inputs": {
"gaWeeks": 41,
"hours": 12,
"tsb": 10,
"risk": "medium"
},
"output": {
"photoThreshold": 8.5,
"exchangeThreshold": 16.3,
"status": "Above Phototherapy"
}
},
{
"name": "AAP 41w medium-risk at 48h",
"inputs": {
"gaWeeks": 41,
"hours": 48,
"tsb": 15,
"risk": "medium"
},
"output": {
"photoThreshold": 14,
"exchangeThreshold": 20.1,
"status": "Above Phototherapy"
}
},
{
"name": "AAP 41w medium-risk at 96h",
"inputs": {
"gaWeeks": 41,
"hours": 96,
"tsb": 18,
"risk": "medium"
},
"output": {
"photoThreshold": 18.2,
"exchangeThreshold": 23.5,
"status": "Below Phototherapy"
}
},
{
"name": "AAP 41w medium-risk at 31.5h",
"inputs": {
"gaWeeks": 41,
"hours": 31.5,
"tsb": 13,
"risk": "medium"
},
"output": {
"photoThreshold": 11.7,
"exchangeThreshold": 18.45,
"status": "Above Phototherapy"
}
},
{
"name": "AAP 38w low-risk at 72h TSB 19 (above exchange boundary)",
"inputs": {
"gaWeeks": 38,
"hours": 72,
"tsb": 19,
"risk": "low"
},
"output": {
"photoThreshold": 18.8,
"exchangeThreshold": 25.9,
"status": "Above Phototherapy"
}
},
{
"name": "AAP 35w medium-risk at 72h TSB 16 (above phototherapy)",
"inputs": {
"gaWeeks": 35,
"hours": 72,
"tsb": 16,
"risk": "medium"
},
"output": {
"photoThreshold": 14.6,
"exchangeThreshold": 20.1,
"status": "Above Phototherapy"
}
}
],
"fenton": [
{
"name": "Fenton male 22w at 500g",
"inputs": {
"sex": "male",
"gaWeeks": 22,
"weightGrams": 500
},
"output": {
"L": 0.21,
"M": 496,
"S": 0.17,
"z": 0.047287939204605584,
"percentile": 51.885833800698336
}
},
{
"name": "Fenton female 22w at 500g",
"inputs": {
"sex": "female",
"gaWeeks": 22,
"weightGrams": 500
},
"output": {
"L": 0.23,
"M": 474,
"S": 0.17,
"z": 0.316059190595063,
"percentile": 62.402124398294
}
},
{
"name": "Fenton male 50w at 5500g",
"inputs": {
"sex": "male",
"gaWeeks": 50,
"weightGrams": 5500
},
"output": {
"L": -0.08,
"M": 5760,
"S": 0.12,
"z": -0.38562355034470663,
"percentile": 34.988770484472916
}
},
{
"name": "Fenton female 50w at 5500g",
"inputs": {
"sex": "female",
"gaWeeks": 50,
"weightGrams": 5500
},
"output": {
"L": -0.08,
"M": 5510,
"S": 0.12,
"z": -0.015138857701463284,
"percentile": 49.39605205989605
}
},
{
"name": "Fenton male 28w at 1124g (M)",
"inputs": {
"sex": "male",
"gaWeeks": 28,
"weightGrams": 1124
},
"output": {
"L": 0.2,
"M": 1124,
"S": 0.15,
"z": 0,
"percentile": 49.999985009951
}
},
{
"name": "Fenton female 30w at 1330g (M)",
"inputs": {
"sex": "female",
"gaWeeks": 30,
"weightGrams": 1330
},
"output": {
"L": 0.19,
"M": 1330,
"S": 0.14,
"z": 0,
"percentile": 49.999985009951
}
},
{
"name": "Fenton male 33w at 2000g",
"inputs": {
"sex": "male",
"gaWeeks": 33,
"weightGrams": 2000
},
"output": {
"L": 0.135,
"M": 2012.5,
"S": 0.135,
"z": -0.04613281594088144,
"percentile": 48.160198738764876
}
},
{
"name": "Fenton female 37w at 2800g",
"inputs": {
"sex": "female",
"gaWeeks": 37,
"weightGrams": 2800
},
"output": {
"L": 0.06,
"M": 2770,
"S": 0.125,
"z": 0.08620463099375068,
"percentile": 53.43483259892393
}
},
{
"name": "Fenton male 40.5w at 3600g",
"inputs": {
"sex": "male",
"gaWeeks": 40.5,
"weightGrams": 3600
},
"output": {
"L": 0.0025000000000000005,
"M": 3602.5,
"S": 0.12,
"z": -0.005785023559079504,
"percentile": 49.76919596364795
}
},
{
"name": "Fenton male 40w at 3500g",
"inputs": {
"sex": "male",
"gaWeeks": 40,
"weightGrams": 3500
},
"output": {
"L": 0.010000000000000002,
"M": 3530,
"S": 0.12,
"z": -0.07112115197836313,
"percentile": 47.16504593912861
}
},
{
"name": "Fenton female 40w at 3200g",
"inputs": {
"sex": "female",
"gaWeeks": 40,
"weightGrams": 3200
},
"output": {
"L": 0.010000000000000002,
"M": 3340,
"S": 0.12,
"z": -0.3567569227545345,
"percentile": 36.06368591694203
}
},
{
"name": "Fenton male 36w SGA 2000g",
"inputs": {
"sex": "male",
"gaWeeks": 36,
"weightGrams": 2000
},
"output": {
"L": 0.08,
"M": 2710,
"S": 0.13,
"z": -2.3087643791484385,
"percentile": 1.0478301468925577
}
},
{
"name": "Fenton female 36w LGA 3400g",
"inputs": {
"sex": "female",
"gaWeeks": 36,
"weightGrams": 3400
},
"output": {
"L": 0.08,
"M": 2540,
"S": 0.13,
"z": 2.269534182832241,
"percentile": 98.83821062755833
}
}
],
"neonatal": [
{
"name": "Neonatal 40w5d male 3070g (validated against peditools/Epic)",
"inputs": {
"weeks": 40,
"days": 5,
"weightGrams": 3070,
"sex": "male"
},
"output": {
"gaDecimal": 40.714285714285715,
"L": 0.48469999999999996,
"M": 3723,
"S": 0.1295157142857143,
"z": -1.421550744831189,
"percentile": 7.8,
"expectedWeight": 3723
}
},
{
"name": "Neonatal 28w male 1079g (M)",
"inputs": {
"weeks": 28,
"days": 0,
"weightGrams": 1079,
"sex": "male"
},
"output": {
"gaDecimal": 28,
"L": 1.3699,
"M": 1079,
"S": 0.20777,
"z": 0,
"percentile": 50,
"expectedWeight": 1079
}
},
{
"name": "Neonatal 32w female 1681g (M)",
"inputs": {
"weeks": 32,
"days": 0,
"weightGrams": 1681,
"sex": "female"
},
"output": {
"gaDecimal": 32,
"L": 1.0122,
"M": 1681,
"S": 0.21846,
"z": 0,
"percentile": 50,
"expectedWeight": 1681
}
},
{
"name": "Neonatal 24w SGA",
"inputs": {
"weeks": 24,
"days": 0,
"weightGrams": 450,
"sex": "male"
},
"output": {
"gaDecimal": 24,
"L": 0.9128,
"M": 651,
"S": 0.16235,
"z": -1.93083045598671,
"percentile": 2.7,
"expectedWeight": 651
}
},
{
"name": "Neonatal 40w LGA 4500g",
"inputs": {
"weeks": 40,
"days": 0,
"weightGrams": 4500,
"sex": "female"
},
"output": {
"gaDecimal": 40,
"L": 0.167,
"M": 3415,
"S": 0.14649,
"z": 1.9274676858691357,
"percentile": 97.3,
"expectedWeight": 3415
}
},
{
"name": "Neonatal 34w3d female 2000g",
"inputs": {
"weeks": 34,
"days": 3,
"weightGrams": 2000,
"sex": "female"
},
"output": {
"gaDecimal": 34.42857142857143,
"L": 0.671185714285714,
"M": 2227.142857142858,
"S": 0.18829285714285712,
"z": -0.5511666089022185,
"percentile": 29.1,
"expectedWeight": 2227
}
},
{
"name": "Neonatal 39w male 3400g",
"inputs": {
"weeks": 39,
"days": 0,
"weightGrams": 3400,
"sex": "male"
},
"output": {
"gaDecimal": 39,
"L": 0.5881,
"M": 3360,
"S": 0.13641,
"z": 0.08705913311792315,
"percentile": 53.5,
"expectedWeight": 3360
}
},
{
"name": "Neonatal 22w SGA",
"inputs": {
"weeks": 22,
"days": 0,
"weightGrams": 400,
"sex": "male"
},
"output": {
"gaDecimal": 22,
"L": 0.5885,
"M": 496,
"S": 0.12802,
"z": -1.5782877644718676,
"percentile": 5.7,
"expectedWeight": 496
}
}
],
"bmi": [
{
"name": "BMI 2y male healthy",
"inputs": {
"weightKg": 12,
"heightCm": 85,
"ageMonths": 24,
"sex": "male"
},
"output": {
"bmi": 16.60899653979239,
"z": 0.04590054841030556,
"percentile": 51.83,
"L": -1.982374,
"M": 16.5478,
"S": 0.080127,
"classification": {
"label": "Healthy Weight",
"pctOf95": 86.14975440063787,
"bmi95": 19.279215193757317
}
}
},
{
"name": "BMI 2y female underweight",
"inputs": {
"weightKg": 10,
"heightCm": 85,
"ageMonths": 24,
"sex": "female"
},
"output": {
"bmi": 13.84083044982699,
"z": -2.169042945502352,
"percentile": 1.5,
"L": -1.024497,
"M": 16.388,
"S": 0.085026,
"classification": {
"label": "Underweight",
"pctOf95": 72.6229727185413,
"bmi95": 19.058474104976014
}
}
},
{
"name": "BMI 5y male overweight",
"inputs": {
"weightKg": 22,
"heightCm": 110,
"ageMonths": 60,
"sex": "male"
},
"output": {
"bmi": 18.18181818181818,
"z": 1.7619400118187871,
"percentile": 96.1,
"L": -2.615166,
"M": 15.4191,
"S": 0.075992,
"classification": {
"label": "Obese (Class 1)",
"pctOf95": 101.3526600484823,
"bmi95": 17.939162300348958
}
}
},
{
"name": "BMI 5y female obese",
"inputs": {
"weightKg": 27,
"heightCm": 110,
"ageMonths": 60,
"sex": "female"
},
"output": {
"bmi": 22.314049586776857,
"z": 2.5728061038110686,
"percentile": 99.5,
"L": -3.350078,
"M": 15.1519,
"S": 0.0843,
"classification": {
"label": "Class 2 Severe Obesity",
"pctOf95": 122.21644077873168,
"bmi95": 18.257813306129258
}
}
},
{
"name": "BMI 8y male healthy interior",
"inputs": {
"weightKg": 26,
"heightCm": 128,
"ageMonths": 96,
"sex": "male"
},
"output": {
"bmi": 15.869140625,
"z": 0.05328264940184456,
"percentile": 52.12,
"L": -3.183058,
"M": 15.7823,
"S": 0.102091,
"classification": {
"label": "Healthy Weight",
"pctOf95": 79.07470043209199,
"bmi95": 20.068543463693736
}
}
},
{
"name": "BMI 10y female severe obesity",
"inputs": {
"weightKg": 55,
"heightCm": 138,
"ageMonths": 120,
"sex": "female"
},
"output": {
"bmi": 28.880487292585595,
"z": 2.3156540689599736,
"percentile": 98.97,
"L": -2.171296,
"M": 16.8623,
"S": 0.137057,
"classification": {
"label": "Class 2 Severe Obesity",
"pctOf95": 125.657690683571,
"bmi95": 22.983461764637976
}
}
},
{
"name": "BMI 12y male interpolated 13m",
"inputs": {
"weightKg": 45,
"heightCm": 150,
"ageMonths": 155,
"sex": "male"
},
"output": {
"bmi": 20,
"z": 0.5601095425342837,
"percentile": 71.23,
"L": -2.3388571666666667,
"M": 18.416283333333336,
"S": 0.13394933333333334,
"classification": {
"label": "Healthy Weight",
"pctOf95": 79.67578522133032,
"bmi95": 25.101729395502364
}
}
},
{
"name": "BMI 15y female adolescent",
"inputs": {
"weightKg": 55,
"heightCm": 162,
"ageMonths": 180,
"sex": "female"
},
"output": {
"bmi": 20.957171162932475,
"z": 0.31720639335017814,
"percentile": 62.45,
"L": -2.034893,
"M": 19.9306,
"S": 0.150512,
"classification": {
"label": "Healthy Weight",
"pctOf95": 74.51433067032951,
"bmi95": 28.125021018644542
}
}
},
{
"name": "BMI 18y male 20",
"inputs": {
"weightKg": 75,
"heightCm": 178,
"ageMonths": 216,
"sex": "male"
},
"output": {
"bmi": 23.671253629592222,
"z": 0.5483006053710078,
"percentile": 70.83,
"L": -1.87467,
"M": 21.8959,
"S": 0.132286,
"classification": {
"label": "Healthy Weight",
"pctOf95": 81.73895442996405,
"bmi95": 28.959574776399098
}
}
},
{
"name": "BMI 20y female (upper boundary)",
"inputs": {
"weightKg": 60,
"heightCm": 165,
"ageMonths": 240,
"sex": "female"
},
"output": {
"bmi": 22.03856749311295,
"z": 0.09286285862204761,
"percentile": 53.7,
"L": -2.342797,
"M": 21.7219,
"S": 0.153241,
"classification": {
"label": "Healthy Weight",
"pctOf95": 69.30198458421499,
"bmi95": 31.80077399707353
}
}
},
{
"name": "BMI clamped lower (1y)",
"inputs": {
"weightKg": 10,
"heightCm": 75,
"ageMonths": 12,
"sex": "male"
},
"output": {
"bmi": 17.77777777777778,
"z": 0.8341020364361114,
"percentile": 79.79,
"L": -1.982374,
"M": 16.5478,
"S": 0.080127,
"classification": {
"label": "Healthy Weight",
"pctOf95": 92.2121445251272,
"bmi95": 19.279215193757317
}
}
},
{
"name": "BMI clamped upper (25y)",
"inputs": {
"weightKg": 70,
"heightCm": 175,
"ageMonths": 300,
"sex": "male"
},
"output": {
"bmi": 22.857142857142858,
"z": -0.06006050146869193,
"percentile": 47.61,
"L": -1.843581,
"M": 23.0414,
"S": 0.134675,
"classification": {
"label": "Healthy Weight",
"pctOf95": 74.61824032278491,
"bmi95": 30.632111878097128
}
}
}
]
}