FAILURE MAP
← Case archive

FA-64072 / Medication dosing calculations / Member archive

Vial reconstitution, draw volume and waste: single-use waste accounting · case 02

Multi-use vials report the unused remainder as waste.

Member previewVariant 2 · 3 implementations · 7 checks per implementation

Case contract

Input {dose_mg, vial_mg, diluent_ml, displacement_ml, single_use}. Concentration = vial_mg/(diluent_ml + displacement_ml). Draw volume = dose/concentration, rounded half-up to 0.01 mL when the volume is <= 1 mL, else to 0.1 mL. Vials = ceil(dose/vial_mg). Waste = vials*vial_mg - dose for single-use vials, else 0. Return {conc_mg_ml (4 dp), draw_ml, vials, waste_mg}.

Why this case matters

Reconstitution calculators must account for powder displacement and syringe graduations; vial counts and waste accounting are separate rules.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
draw volume half step rounds up{"conc_mg_ml": 20.0, "draw_ml": 2.5, "vials": 1, "waste_mg": 951.0}{"conc_mg_ml": 20.0, "draw_ml": 2.5, "vials": 1, "waste_mg": 0.0}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 ↗