pediatric-ai-scribe-v3/e2e/fixtures/calc-vectors.json
Daniel 21facd4e1b feat(client): port BP Percentile — all 10 Calculator pills now run in React
Closes the Calculators migration. AAP 2017 BP percentile (Rosner
quantile splines) was the biggest table-driven calculator in the
codebase: 6 height-LMS arrays × 218 entries + 4 spline coefficient
matrices × 99 rows × 13 terms = ~3,500 numeric constants. Every one
ported verbatim. 14 parity tests prove the TS port returns identical
percentile and classification outputs to the vanilla calculators.js.

shared/clinical/bp.ts — 571 lines
  Generated from public/js/calculators.js via awk-extracted lines
  89-94 (LMS) and 97-503 (coefficients), wrapped in TS export
  declarations. No rewriting, no reformatting, no reordering — the
  data bytes are identical to the vanilla source.
  Math (calcHeightPercentile, computeBpPercentile,
  classifyBpFromPercentiles) ported verbatim from calculators.js:
  505-608. Exports a top-level computeBp() helper returning
  { sysPercentile, diaPercentile, heightPercentile, sysClass,
  diaClass, classification }.

scripts/capture-calc-vectors.js — BP cases added
  Uses new Function() to evaluate the raw LMS + coefficient blocks
  from calculators.js directly, then runs the vanilla math against
  14 carefully chosen test cases:
    • Typical pediatric ages (3, 5, 8, 10, 12 years, both sexes)
    • Adult-threshold cross-over (age 13 — uses absolute mmHg cutoffs)
    • Stage 1 / Stage 2 hypertension boundaries
    • Edge-of-domain (age 1, age 17)
    • Tall / short height-percentile outliers
  Fixture regenerated to 14 Bhutani + 58 AAP + 13 Fenton + 8 neonatal
  + 12 BMI + 14 BP = 117 total vectors.

shared/clinical/bp.test.ts — exact-match parity
  sysPercentile / diaPercentile are integer selections from 99
  candidate predicted values, so tests use .toBe() for exact match.
  heightPercentile uses toBeCloseTo(6) (double-precision float).
  Classification strings must match exactly. 14/14 pass.

client/src/pages/CalculatorPanels.tsx — BpPanel added
  Age/sex/height/SBP/DBP inputs, validation (age 1-17, height 50-200
  cm), color-coded overall classification + per-measurement
  percentile and tier (Normal / Elevated / Stage 1 / Stage 2) in a
  4-column result grid with the height percentile for context.

client/src/pages/Calculators.tsx
  Dispatch wires bp → BpPanel. PILLS['bp'].ported = true.
  LegacyPanel is now dead code — every pill has a real implementation.

Final test suite: 5 files, 136 tests green
  (19 calculators + 70 bilirubin + 21 fenton/neonatal + 12 BMI + 14 BP)
2026-04-24 02:15:17 +02:00

1839 lines
No EOL
39 KiB
JSON

{
"generatedAt": "2026-04-24T00:13:31.431Z",
"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
}
}
}
],
"bp": [
{
"name": "BP 3y female normal",
"inputs": {
"ageYears": 3,
"sex": "female",
"heightCm": 95,
"sbp": 95,
"dbp": 55
},
"output": {
"sysPercentile": 70,
"diaPercentile": 73,
"heightPercentile": 63.554384607738854,
"sysClass": "normal",
"diaClass": "normal",
"classification": "normal"
}
},
{
"name": "BP 5y male normal",
"inputs": {
"ageYears": 5,
"sex": "male",
"heightCm": 110,
"sbp": 100,
"dbp": 60
},
"output": {
"sysPercentile": 76,
"diaPercentile": 75,
"heightPercentile": 61.69102517593652,
"sysClass": "normal",
"diaClass": "normal",
"classification": "normal"
}
},
{
"name": "BP 8y female elevated",
"inputs": {
"ageYears": 8,
"sex": "female",
"heightCm": 128,
"sbp": 115,
"dbp": 75
},
"output": {
"sysPercentile": 96,
"diaPercentile": 96,
"heightPercentile": 54.39820910144323,
"sysClass": "stage1",
"diaClass": "stage1",
"classification": "stage1"
}
},
{
"name": "BP 8y male stage 1",
"inputs": {
"ageYears": 8,
"sex": "male",
"heightCm": 128,
"sbp": 125,
"dbp": 82
},
"output": {
"sysPercentile": 99,
"diaPercentile": 99,
"heightPercentile": 52.54906355063203,
"sysClass": "stage1",
"diaClass": "stage1",
"classification": "stage1"
}
},
{
"name": "BP 10y female stage 2",
"inputs": {
"ageYears": 10,
"sex": "female",
"heightCm": 140,
"sbp": 135,
"dbp": 90
},
"output": {
"sysPercentile": 99,
"diaPercentile": 99,
"heightPercentile": 62.99666136100739,
"sysClass": "stage1",
"diaClass": "stage2",
"classification": "stage2"
}
},
{
"name": "BP 12y male normal",
"inputs": {
"ageYears": 12,
"sex": "male",
"heightCm": 150,
"sbp": 112,
"dbp": 70
},
"output": {
"sysPercentile": 81,
"diaPercentile": 78,
"heightPercentile": 56.45148566203309,
"sysClass": "normal",
"diaClass": "normal",
"classification": "normal"
}
},
{
"name": "BP 13y female adult normal",
"inputs": {
"ageYears": 13,
"sex": "female",
"heightCm": 158,
"sbp": 115,
"dbp": 70
},
"output": {
"sysPercentile": 78,
"diaPercentile": 75,
"heightPercentile": 55.935930022685156,
"sysClass": "normal",
"diaClass": "normal",
"classification": "normal"
}
},
{
"name": "BP 14y male elevated (adult)",
"inputs": {
"ageYears": 14,
"sex": "male",
"heightCm": 165,
"sbp": 122,
"dbp": 78
},
"output": {
"sysPercentile": 84,
"diaPercentile": 92,
"heightPercentile": 57.25077758940361,
"sysClass": "elevated",
"diaClass": "normal",
"classification": "elevated"
}
},
{
"name": "BP 15y female stage 1 (adult)",
"inputs": {
"ageYears": 15,
"sex": "female",
"heightCm": 162,
"sbp": 132,
"dbp": 85
},
"output": {
"sysPercentile": 98,
"diaPercentile": 97,
"heightPercentile": 51.122031674332725,
"sysClass": "stage1",
"diaClass": "stage1",
"classification": "stage1"
}
},
{
"name": "BP 16y male stage 2 (adult)",
"inputs": {
"ageYears": 16,
"sex": "male",
"heightCm": 175,
"sbp": 145,
"dbp": 92
},
"output": {
"sysPercentile": 99,
"diaPercentile": 99,
"heightPercentile": 58.47809148805949,
"sysClass": "stage2",
"diaClass": "stage2",
"classification": "stage2"
}
},
{
"name": "BP 1y male (lowest age)",
"inputs": {
"ageYears": 1,
"sex": "male",
"heightCm": 75,
"sbp": 95,
"dbp": 55
},
"output": {
"sysPercentile": 83,
"diaPercentile": 96,
"heightPercentile": 0.04857786890346549,
"sysClass": "normal",
"diaClass": "stage1",
"classification": "stage1"
}
},
{
"name": "BP 17y female (highest age)",
"inputs": {
"ageYears": 17,
"sex": "female",
"heightCm": 165,
"sbp": 110,
"dbp": 70
},
"output": {
"sysPercentile": 47,
"diaPercentile": 66,
"heightPercentile": 62.710639919799746,
"sysClass": "normal",
"diaClass": "normal",
"classification": "normal"
}
},
{
"name": "BP 10y male very tall",
"inputs": {
"ageYears": 10,
"sex": "male",
"heightCm": 160,
"sbp": 110,
"dbp": 68
},
"output": {
"sysPercentile": 69,
"diaPercentile": 63,
"heightPercentile": 99.92239024648315,
"sysClass": "normal",
"diaClass": "normal",
"classification": "normal"
}
},
{
"name": "BP 10y male very short",
"inputs": {
"ageYears": 10,
"sex": "male",
"heightCm": 125,
"sbp": 110,
"dbp": 68
},
"output": {
"sysPercentile": 94,
"diaPercentile": 84,
"heightPercentile": 1.8187811736029624,
"sysClass": "elevated",
"diaClass": "normal",
"classification": "elevated"
}
}
]
}