FAILURE MAP
← Case archive

FA-64037 / Medication dosing calculations / Member archive

Body-surface-area dose with capping and dose banding: band tolerance comparison · case 02

A band exactly 5% from the calculated dose is rejected.

Member previewVariant 2 · 3 implementations · 7 checks per implementation

Case contract

Input {height_cm, weight_kg (integers), mg_m2, bands}. BSA (Mosteller) = sqrt(height*weight/3600) rounded half-up to 0.01 m2, computed exactly as (isqrt(100*h*w)+3)//6 hundredths, and capped at 2.00 m2. dose = mg_m2 * BSA. Dose banding: the band with the smallest absolute difference that is within 5% of the dose (difference*20 <= dose) is used, ties going to the lower band; otherwise the dose is rounded half-up to a whole mg. Return {bsa, dose_mg, banded}.

Why this case matters

Dose banding systems take a calculated BSA dose and snap it to prefilled products; BSA rounding, the cap and the tolerance each fail separately.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
band exactly 5 percent away{"banded": false, "bsa": 2.0, "dose_mg": 200}{"banded": true, "bsa": 2.0, "dose_mg": 190}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 ↗