FAILURE MAP
← Case archive

FA-64255 / Medication dosing calculations / Member archive

Order screening against mg/kg reference ranges: neonatal range gating · case 05

A 3-month-old is screened against the neonatal range whenever the drug has one.

Member previewVariant 5 · 3 implementations · 10 checks per implementation

Case contract

Input {dose_mg, weight_kg (or null), age_days, range [lo, hi] mg/kg, optional neonatal_range, abs_max_mg}. Missing weight returns NO_WEIGHT. A dose above abs_max_mg returns OVER_ABSOLUTE. Neonates (age_days < 28) use neonatal_range when present. Toy 10% tolerance: UNDER when mg/kg < 0.9*lo, OVER when mg/kg > 1.1*hi, else OK. Return {flag, mg_per_kg (2 dp)}.

Why this case matters

Clinical decision support screens orders against weight-based ranges; the population gate and the tolerance edges are separate rules.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
infant on day 28 uses standard range{"flag": "OVER", "mg_per_kg": 5.67}{"flag": "UNDER", "mg_per_kg": 5.67}Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗