FAILURE MAP
← Case archive

FA-64068 / Medication dosing calculations / Member archive

Vial reconstitution, draw volume and waste: vial count ceiling · case 03

A 601 mg dose from 500 mg vials is prepared from one vial.

Member previewVariant 3 · 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
powder displacement dilutes vial{"conc_mg_ml": 50.0, "draw_ml": 11.0, "vials": 1, "waste_mg": -50.0}{"conc_mg_ml": 50.0, "draw_ml": 11.0, "vials": 2, "waste_mg": 450.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 ↗