FAILURE MAP
← Case archive

FA-63882 / Medication dosing calculations / Member archive

Pediatric mg/kg/day dose divided by interval: single-dose ceiling · case 02

Individual doses above max_single_mg are produced for heavy patients on high mg/kg/day orders.

Member previewVariant 2 · 3 implementations · 6 checks per implementation

Case contract

Input {weight_kg, mg_per_kg_day, interval_h (divides 24), max_single_mg, max_daily_mg, round_mg}. Toy rule: doses/day = 24 / interval_h; daily = min(mg_per_kg_day * weight, max_daily_mg); per-dose = min(daily / doses, max_single_mg), then rounded DOWN to a multiple of round_mg. Return {doses_per_day, dose_mg, daily_mg = dose_mg * doses_per_day}.

Why this case matters

Divided-dose calculators must count administrations per day correctly and apply both ceilings before rounding down to a measurable increment.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
single-dose ceiling{"daily_mg": 4200.0, "dose_mg": 2100.0, "doses_per_day": 2}{"daily_mg": 2000.0, "dose_mg": 1000.0, "doses_per_day": 2}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 ↗