{"abstract":"A 2.25 mL requirement is drawn as 2.2 mL.","category":"Medication dosing calculations","checks":7,"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}.","contract_signature":"x","evaluation_group":"w2-meddose-reconstitution","failed_approach":"Always rounding up overdraws volumes that should round down.","family":"w2-meddose-reconstitution-draw-volume-rounding","id":"FA-64061","implementations":{"attempt":{"sha256":"4b4c3ba3f898b90c3a5aa78be44a08ef7253557c1e881ac51599be46d068daec","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(x):\n    conc = Fraction(x['vial_mg']) / (Fraction(str(x['diluent_ml'])) + Fraction(str(x['displacement_ml'])))\n    vol = Fraction(str(x['dose_mg'])) / conc\n    q = 100 if vol <= 1 else 10\n    draw = Fraction(math.ceil(vol * q), q)\n    vials = -(-Fraction(str(x['dose_mg'])) // x['vial_mg'])\n    waste = vials * x['vial_mg'] - Fraction(str(x['dose_mg'])) if x['single_use'] else 0\n    return {'conc_mg_ml': round(float(conc), 4), 'draw_ml': float(draw), 'vials': int(vials), 'waste_mg': float(waste)}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('powder displacement dilutes vial',\n   {'dose_mg': 450, 'vial_mg': 500, 'diluent_ml': '9.6', 'displacement_ml': '0.4', 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 9.0, 'vials': 1, 'waste_mg': 50.0}),\n  ('sub-millilitre draw in hundredths',\n   {'dose_mg': 37, 'vial_mg': 100, 'diluent_ml': '1.8', 'displacement_ml': '0.2', 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 0.74, 'vials': 1, 'waste_mg': 63.0}),\n  ('draw volume half step rounds up',\n   {'dose_mg': 45, 'vial_mg': 1000, 'diluent_ml': 49, 'displacement_ml': 1, 'single_use': False},\n   {'conc_mg_ml': 20.0, 'draw_ml': 2.3, 'vials': 1, 'waste_mg': 0.0}),\n  ('draw volume below half step rounds down',\n   {'dose_mg': 62, 'vial_mg': 100, 'diluent_ml': '1.8', 'displacement_ml': '0.2', 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 1.2, 'vials': 1, 'waste_mg': 38.0}),\n  ('dose exactly one vial',\n   {'dose_mg': 250, 'vial_mg': 250, 'diluent_ml': 5, 'displacement_ml': 0, 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 5.0, 'vials': 1, 'waste_mg': 0.0}),\n  ('dose spanning two vials',\n   {'dose_mg': 601, 'vial_mg': 500, 'diluent_ml': 10, 'displacement_ml': 0, 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 12.0, 'vials': 2, 'waste_mg': 399.0}),\n  ('multi-use vial has no waste',\n   {'dose_mg': 31, 'vial_mg': 100, 'diluent_ml': 10, 'displacement_ml': 0, 'single_use': False},\n   {'conc_mg_ml': 10.0, 'draw_ml': 3.1, 'vials': 1, 'waste_mg': 0.0})],\n [('powder displacement dilutes vial',\n   {'dose_mg': 500, 'vial_mg': 500, 'diluent_ml': '9.6', 'displacement_ml': '0.4', 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 10.0, 'vials': 1, 'waste_mg': 0.0}),\n  ('sub-millilitre draw in hundredths',\n   {'dose_mg': 41, 'vial_mg': 100, 'diluent_ml': '1.8', 'displacement_ml': '0.2', 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 0.82, 'vials': 1, 'waste_mg': 59.0}),\n  ('draw volume half step rounds up',\n   {'dose_mg': 49, 'vial_mg': 1000, 'diluent_ml': 48, 'displacement_ml': 2, 'single_use': False},\n   {'conc_mg_ml': 20.0, 'draw_ml': 2.5, 'vials': 1, 'waste_mg': 0.0}),\n  ('draw volume below half step rounds down',\n   {'dose_mg': 71, 'vial_mg': 100, 'diluent_ml': '1.8', 'displacement_ml': '0.2', 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 1.4, 'vials': 1, 'waste_mg': 29.0}),\n  ('dose exactly one vial',\n   {'dose_mg': 500, 'vial_mg': 500, 'diluent_ml': 5, 'displacement_ml': 0, 'single_use': True},\n   {'conc_mg_ml': 100.0, 'draw_ml': 5.0, 'vials': 1, 'waste_mg': 0.0}),\n  ('dose spanning two vials',\n   {'dose_mg': 602, 'vial_mg': 500, 'diluent_ml': 10, 'displacement_ml': 0, 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 12.0, 'vials': 2, 'waste_mg': 398.0}),\n  ('multi-use vial has no waste',\n   {'dose_mg': 32, 'vial_mg': 100, 'diluent_ml': 10, 'displacement_ml': 0, 'single_use': False},\n   {'conc_mg_ml': 10.0, 'draw_ml': 3.2, 'vials': 1, 'waste_mg': 0.0})],\n [('powder displacement dilutes vial',\n   {'dose_mg': 550, 'vial_mg': 500, 'diluent_ml': '9.6', 'displacement_ml': '0.4', 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 11.0, 'vials': 2, 'waste_mg': 450.0}),\n  ('sub-millilitre draw in hundredths',\n   {'dose_mg': 29, 'vial_mg': 100, 'diluent_ml': '1.8', 'displacement_ml': '0.2', 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 0.58, 'vials': 1, 'waste_mg': 71.0}),\n  ('draw volume half step rounds up',\n   {'dose_mg': 53, 'vial_mg': 1000, 'diluent_ml': 47, 'displacement_ml': 3, 'single_use': False},\n   {'conc_mg_ml': 20.0, 'draw_ml': 2.7, 'vials': 1, 'waste_mg': 0.0}),\n  ('draw volume below half step rounds down',\n   {'dose_mg': 81, 'vial_mg': 100, 'diluent_ml': '1.8', 'displacement_ml': '0.2', 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 1.6, 'vials': 1, 'waste_mg': 19.0}),\n  ('dose exactly one vial',\n   {'dose_mg': 750, 'vial_mg': 750, 'diluent_ml': 5, 'displacement_ml': 0, 'single_use': True},\n   {'conc_mg_ml': 150.0, 'draw_ml': 5.0, 'vials': 1, 'waste_mg': 0.0}),\n  ('dose spanning two vials',\n   {'dose_mg': 603, 'vial_mg': 500, 'diluent_ml': 10, 'displacement_ml': 0, 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 12.1, 'vials': 2, 'waste_mg': 397.0}),\n  ('multi-use vial has no waste',\n   {'dose_mg': 33, 'vial_mg': 100, 'diluent_ml': 10, 'displacement_ml': 0, 'single_use': False},\n   {'conc_mg_ml': 10.0, 'draw_ml': 3.3, 'vials': 1, 'waste_mg': 0.0})],\n [('powder displacement dilutes vial',\n   {'dose_mg': 600, 'vial_mg': 500, 'diluent_ml': '9.6', 'displacement_ml': '0.4', 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 12.0, 'vials': 2, 'waste_mg': 400.0}),\n  ('sub-millilitre draw in hundredths',\n   {'dose_mg': 33, 'vial_mg': 100, 'diluent_ml': '1.8', 'displacement_ml': '0.2', 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 0.66, 'vials': 1, 'waste_mg': 67.0}),\n  ('draw volume half step rounds up',\n   {'dose_mg': 57, 'vial_mg': 1000, 'diluent_ml': 46, 'displacement_ml': 4, 'single_use': False},\n   {'conc_mg_ml': 20.0, 'draw_ml': 2.9, 'vials': 1, 'waste_mg': 0.0}),\n  ('draw volume below half step rounds down',\n   {'dose_mg': 92, 'vial_mg': 100, 'diluent_ml': '1.8', 'displacement_ml': '0.2', 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 1.8, 'vials': 1, 'waste_mg': 8.0}),\n  ('dose exactly one vial',\n   {'dose_mg': 1000, 'vial_mg': 1000, 'diluent_ml': 5, 'displacement_ml': 0, 'single_use': True},\n   {'conc_mg_ml': 200.0, 'draw_ml': 5.0, 'vials': 1, 'waste_mg': 0.0}),\n  ('dose spanning two vials',\n   {'dose_mg': 604, 'vial_mg': 500, 'diluent_ml': 10, 'displacement_ml': 0, 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 12.1, 'vials': 2, 'waste_mg': 396.0}),\n  ('multi-use vial has no waste',\n   {'dose_mg': 34, 'vial_mg': 100, 'diluent_ml': 10, 'displacement_ml': 0, 'single_use': False},\n   {'conc_mg_ml': 10.0, 'draw_ml': 3.4, 'vials': 1, 'waste_mg': 0.0})],\n [('powder displacement dilutes vial',\n   {'dose_mg': 650, 'vial_mg': 500, 'diluent_ml': '9.6', 'displacement_ml': '0.4', 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 13.0, 'vials': 2, 'waste_mg': 350.0}),\n  ('sub-millilitre draw in hundredths',\n   {'dose_mg': 47, 'vial_mg': 100, 'diluent_ml': '1.8', 'displacement_ml': '0.2', 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 0.94, 'vials': 1, 'waste_mg': 53.0}),\n  ('draw volume half step rounds up',\n   {'dose_mg': 61, 'vial_mg': 1000, 'diluent_ml': 45, 'displacement_ml': 5, 'single_use': False},\n   {'conc_mg_ml': 20.0, 'draw_ml': 3.1, 'vials': 1, 'waste_mg': 0.0}),\n  ('draw volume below half step rounds down',\n   {'dose_mg': 102, 'vial_mg': 100, 'diluent_ml': '1.8', 'displacement_ml': '0.2', 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 2.0, 'vials': 2, 'waste_mg': 98.0}),\n  ('dose exactly one vial',\n   {'dose_mg': 1250, 'vial_mg': 1250, 'diluent_ml': 5, 'displacement_ml': 0, 'single_use': True},\n   {'conc_mg_ml': 250.0, 'draw_ml': 5.0, 'vials': 1, 'waste_mg': 0.0}),\n  ('dose spanning two vials',\n   {'dose_mg': 605, 'vial_mg': 500, 'diluent_ml': 10, 'displacement_ml': 0, 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 12.1, 'vials': 2, 'waste_mg': 395.0}),\n  ('multi-use vial has no waste',\n   {'dose_mg': 35, 'vial_mg': 100, 'diluent_ml': 10, 'displacement_ml': 0, 'single_use': False},\n   {'conc_mg_ml': 10.0, 'draw_ml': 3.5, 'vials': 1, 'waste_mg': 0.0})]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"566e6604c529370d41fa79aaa16317d2a59c66bb5bfb0d080abc5a28342dd6de","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(x):\n    conc = Fraction(x['vial_mg']) / (Fraction(str(x['diluent_ml'])) + Fraction(str(x['displacement_ml'])))\n    vol = Fraction(str(x['dose_mg'])) / conc\n    q = 100 if vol <= 1 else 10\n    draw = Fraction(math.floor(vol * q), q)\n    vials = -(-Fraction(str(x['dose_mg'])) // x['vial_mg'])\n    waste = vials * x['vial_mg'] - Fraction(str(x['dose_mg'])) if x['single_use'] else 0\n    return {'conc_mg_ml': round(float(conc), 4), 'draw_ml': float(draw), 'vials': int(vials), 'waste_mg': float(waste)}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('powder displacement dilutes vial',\n   {'dose_mg': 450, 'vial_mg': 500, 'diluent_ml': '9.6', 'displacement_ml': '0.4', 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 9.0, 'vials': 1, 'waste_mg': 50.0}),\n  ('sub-millilitre draw in hundredths',\n   {'dose_mg': 37, 'vial_mg': 100, 'diluent_ml': '1.8', 'displacement_ml': '0.2', 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 0.74, 'vials': 1, 'waste_mg': 63.0}),\n  ('draw volume half step rounds up',\n   {'dose_mg': 45, 'vial_mg': 1000, 'diluent_ml': 49, 'displacement_ml': 1, 'single_use': False},\n   {'conc_mg_ml': 20.0, 'draw_ml': 2.3, 'vials': 1, 'waste_mg': 0.0}),\n  ('draw volume below half step rounds down',\n   {'dose_mg': 62, 'vial_mg': 100, 'diluent_ml': '1.8', 'displacement_ml': '0.2', 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 1.2, 'vials': 1, 'waste_mg': 38.0}),\n  ('dose exactly one vial',\n   {'dose_mg': 250, 'vial_mg': 250, 'diluent_ml': 5, 'displacement_ml': 0, 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 5.0, 'vials': 1, 'waste_mg': 0.0}),\n  ('dose spanning two vials',\n   {'dose_mg': 601, 'vial_mg': 500, 'diluent_ml': 10, 'displacement_ml': 0, 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 12.0, 'vials': 2, 'waste_mg': 399.0}),\n  ('multi-use vial has no waste',\n   {'dose_mg': 31, 'vial_mg': 100, 'diluent_ml': 10, 'displacement_ml': 0, 'single_use': False},\n   {'conc_mg_ml': 10.0, 'draw_ml': 3.1, 'vials': 1, 'waste_mg': 0.0})],\n [('powder displacement dilutes vial',\n   {'dose_mg': 500, 'vial_mg': 500, 'diluent_ml': '9.6', 'displacement_ml': '0.4', 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 10.0, 'vials': 1, 'waste_mg': 0.0}),\n  ('sub-millilitre draw in hundredths',\n   {'dose_mg': 41, 'vial_mg': 100, 'diluent_ml': '1.8', 'displacement_ml': '0.2', 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 0.82, 'vials': 1, 'waste_mg': 59.0}),\n  ('draw volume half step rounds up',\n   {'dose_mg': 49, 'vial_mg': 1000, 'diluent_ml': 48, 'displacement_ml': 2, 'single_use': False},\n   {'conc_mg_ml': 20.0, 'draw_ml': 2.5, 'vials': 1, 'waste_mg': 0.0}),\n  ('draw volume below half step rounds down',\n   {'dose_mg': 71, 'vial_mg': 100, 'diluent_ml': '1.8', 'displacement_ml': '0.2', 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 1.4, 'vials': 1, 'waste_mg': 29.0}),\n  ('dose exactly one vial',\n   {'dose_mg': 500, 'vial_mg': 500, 'diluent_ml': 5, 'displacement_ml': 0, 'single_use': True},\n   {'conc_mg_ml': 100.0, 'draw_ml': 5.0, 'vials': 1, 'waste_mg': 0.0}),\n  ('dose spanning two vials',\n   {'dose_mg': 602, 'vial_mg': 500, 'diluent_ml': 10, 'displacement_ml': 0, 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 12.0, 'vials': 2, 'waste_mg': 398.0}),\n  ('multi-use vial has no waste',\n   {'dose_mg': 32, 'vial_mg': 100, 'diluent_ml': 10, 'displacement_ml': 0, 'single_use': False},\n   {'conc_mg_ml': 10.0, 'draw_ml': 3.2, 'vials': 1, 'waste_mg': 0.0})],\n [('powder displacement dilutes vial',\n   {'dose_mg': 550, 'vial_mg': 500, 'diluent_ml': '9.6', 'displacement_ml': '0.4', 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 11.0, 'vials': 2, 'waste_mg': 450.0}),\n  ('sub-millilitre draw in hundredths',\n   {'dose_mg': 29, 'vial_mg': 100, 'diluent_ml': '1.8', 'displacement_ml': '0.2', 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 0.58, 'vials': 1, 'waste_mg': 71.0}),\n  ('draw volume half step rounds up',\n   {'dose_mg': 53, 'vial_mg': 1000, 'diluent_ml': 47, 'displacement_ml': 3, 'single_use': False},\n   {'conc_mg_ml': 20.0, 'draw_ml': 2.7, 'vials': 1, 'waste_mg': 0.0}),\n  ('draw volume below half step rounds down',\n   {'dose_mg': 81, 'vial_mg': 100, 'diluent_ml': '1.8', 'displacement_ml': '0.2', 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 1.6, 'vials': 1, 'waste_mg': 19.0}),\n  ('dose exactly one vial',\n   {'dose_mg': 750, 'vial_mg': 750, 'diluent_ml': 5, 'displacement_ml': 0, 'single_use': True},\n   {'conc_mg_ml': 150.0, 'draw_ml': 5.0, 'vials': 1, 'waste_mg': 0.0}),\n  ('dose spanning two vials',\n   {'dose_mg': 603, 'vial_mg': 500, 'diluent_ml': 10, 'displacement_ml': 0, 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 12.1, 'vials': 2, 'waste_mg': 397.0}),\n  ('multi-use vial has no waste',\n   {'dose_mg': 33, 'vial_mg': 100, 'diluent_ml': 10, 'displacement_ml': 0, 'single_use': False},\n   {'conc_mg_ml': 10.0, 'draw_ml': 3.3, 'vials': 1, 'waste_mg': 0.0})],\n [('powder displacement dilutes vial',\n   {'dose_mg': 600, 'vial_mg': 500, 'diluent_ml': '9.6', 'displacement_ml': '0.4', 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 12.0, 'vials': 2, 'waste_mg': 400.0}),\n  ('sub-millilitre draw in hundredths',\n   {'dose_mg': 33, 'vial_mg': 100, 'diluent_ml': '1.8', 'displacement_ml': '0.2', 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 0.66, 'vials': 1, 'waste_mg': 67.0}),\n  ('draw volume half step rounds up',\n   {'dose_mg': 57, 'vial_mg': 1000, 'diluent_ml': 46, 'displacement_ml': 4, 'single_use': False},\n   {'conc_mg_ml': 20.0, 'draw_ml': 2.9, 'vials': 1, 'waste_mg': 0.0}),\n  ('draw volume below half step rounds down',\n   {'dose_mg': 92, 'vial_mg': 100, 'diluent_ml': '1.8', 'displacement_ml': '0.2', 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 1.8, 'vials': 1, 'waste_mg': 8.0}),\n  ('dose exactly one vial',\n   {'dose_mg': 1000, 'vial_mg': 1000, 'diluent_ml': 5, 'displacement_ml': 0, 'single_use': True},\n   {'conc_mg_ml': 200.0, 'draw_ml': 5.0, 'vials': 1, 'waste_mg': 0.0}),\n  ('dose spanning two vials',\n   {'dose_mg': 604, 'vial_mg': 500, 'diluent_ml': 10, 'displacement_ml': 0, 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 12.1, 'vials': 2, 'waste_mg': 396.0}),\n  ('multi-use vial has no waste',\n   {'dose_mg': 34, 'vial_mg': 100, 'diluent_ml': 10, 'displacement_ml': 0, 'single_use': False},\n   {'conc_mg_ml': 10.0, 'draw_ml': 3.4, 'vials': 1, 'waste_mg': 0.0})],\n [('powder displacement dilutes vial',\n   {'dose_mg': 650, 'vial_mg': 500, 'diluent_ml': '9.6', 'displacement_ml': '0.4', 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 13.0, 'vials': 2, 'waste_mg': 350.0}),\n  ('sub-millilitre draw in hundredths',\n   {'dose_mg': 47, 'vial_mg': 100, 'diluent_ml': '1.8', 'displacement_ml': '0.2', 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 0.94, 'vials': 1, 'waste_mg': 53.0}),\n  ('draw volume half step rounds up',\n   {'dose_mg': 61, 'vial_mg': 1000, 'diluent_ml': 45, 'displacement_ml': 5, 'single_use': False},\n   {'conc_mg_ml': 20.0, 'draw_ml': 3.1, 'vials': 1, 'waste_mg': 0.0}),\n  ('draw volume below half step rounds down',\n   {'dose_mg': 102, 'vial_mg': 100, 'diluent_ml': '1.8', 'displacement_ml': '0.2', 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 2.0, 'vials': 2, 'waste_mg': 98.0}),\n  ('dose exactly one vial',\n   {'dose_mg': 1250, 'vial_mg': 1250, 'diluent_ml': 5, 'displacement_ml': 0, 'single_use': True},\n   {'conc_mg_ml': 250.0, 'draw_ml': 5.0, 'vials': 1, 'waste_mg': 0.0}),\n  ('dose spanning two vials',\n   {'dose_mg': 605, 'vial_mg': 500, 'diluent_ml': 10, 'displacement_ml': 0, 'single_use': True},\n   {'conc_mg_ml': 50.0, 'draw_ml': 12.1, 'vials': 2, 'waste_mg': 395.0}),\n  ('multi-use vial has no waste',\n   {'dose_mg': 35, 'vial_mg': 100, 'diluent_ml': 10, 'displacement_ml': 0, 'single_use': False},\n   {'conc_mg_ml': 10.0, 'draw_ml': 3.5, 'vials': 1, 'waste_mg': 0.0})]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"A deterministic toy software model with explicitly stipulated thresholds and formulas; it is not clinical guidance, not a validated medical calculator, and makes no claim of conformance to any published protocol. Numbered variants vary patient and order inputs. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-meddose-reconstitution-draw-volume-rounding","generated_at":"2026-09-29T14:47:20.746347+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Reconstitution calculators must account for powder displacement and syringe graduations; vial counts and waste accounting are separate rules.","root_cause":"The draw volume is truncated to the graduation instead of rounded half-up.","sha256":"afed2d2a4602c4abfe92133c54a0158f2e141445569a9f38016b87b604014dd6","title":"Vial reconstitution, draw volume and waste: draw volume rounding · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":43.246,"exit_code":1,"observations":[{"actual":{"conc_mg_ml":50.0,"draw_ml":9.0,"vials":1,"waste_mg":50.0},"check":"powder displacement dilutes vial","expected":{"conc_mg_ml":50.0,"draw_ml":9.0,"vials":1,"waste_mg":50.0},"passed":true},{"actual":{"conc_mg_ml":50.0,"draw_ml":0.74,"vials":1,"waste_mg":63.0},"check":"sub-millilitre draw in hundredths","expected":{"conc_mg_ml":50.0,"draw_ml":0.74,"vials":1,"waste_mg":63.0},"passed":true},{"actual":{"conc_mg_ml":20.0,"draw_ml":2.3,"vials":1,"waste_mg":0.0},"check":"draw volume half step rounds up","expected":{"conc_mg_ml":20.0,"draw_ml":2.3,"vials":1,"waste_mg":0.0},"passed":true},{"actual":{"conc_mg_ml":50.0,"draw_ml":1.3,"vials":1,"waste_mg":38.0},"check":"draw volume below half step rounds down","expected":{"conc_mg_ml":50.0,"draw_ml":1.2,"vials":1,"waste_mg":38.0},"passed":false},{"actual":{"conc_mg_ml":50.0,"draw_ml":5.0,"vials":1,"waste_mg":0.0},"check":"dose exactly one vial","expected":{"conc_mg_ml":50.0,"draw_ml":5.0,"vials":1,"waste_mg":0.0},"passed":true},{"actual":{"conc_mg_ml":50.0,"draw_ml":12.1,"vials":2,"waste_mg":399.0},"check":"dose spanning two vials","expected":{"conc_mg_ml":50.0,"draw_ml":12.0,"vials":2,"waste_mg":399.0},"passed":false},{"actual":{"conc_mg_ml":10.0,"draw_ml":3.1,"vials":1,"waste_mg":0.0},"check":"multi-use vial has no waste","expected":{"conc_mg_ml":10.0,"draw_ml":3.1,"vials":1,"waste_mg":0.0},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"powder displacement dilutes vial\", \"actual\": {\"conc_mg_ml\": 50.0, \"draw_ml\": 9.0, \"vials\": 1, \"waste_mg\": 50.0}, \"expected\": {\"conc_mg_ml\": 50.0, \"draw_ml\": 9.0, \"vials\": 1, \"waste_mg\": 50.0}, \"passed\": true}, {\"check\": \"sub-millilitre draw in hundredths\", \"actual\": {\"conc_mg_ml\": 50.0, \"draw_ml\": 0.74, \"vials\": 1, \"waste_mg\": 63.0}, \"expected\": {\"conc_mg_ml\": 50.0, \"draw_ml\": 0.74, \"vials\": 1, \"waste_mg\": 63.0}, \"passed\": true}, {\"check\": \"draw volume half step rounds up\", \"actual\": {\"conc_mg_ml\": 20.0, \"draw_ml\": 2.3, \"vials\": 1, \"waste_mg\": 0.0}, \"expected\": {\"conc_mg_ml\": 20.0, \"draw_ml\": 2.3, \"vials\": 1, \"waste_mg\": 0.0}, \"passed\": true}, {\"check\": \"draw volume below half step rounds down\", \"actual\": {\"conc_mg_ml\": 50.0, \"draw_ml\": 1.3, \"vials\": 1, \"waste_mg\": 38.0}, \"expected\": {\"conc_mg_ml\": 50.0, \"draw_ml\": 1.2, \"vials\": 1, \"waste_mg\": 38.0}, \"passed\": false}, {\"check\": \"dose exactly one vial\", \"actual\": {\"conc_mg_ml\": 50.0, \"draw_ml\": 5.0, \"vials\": 1, \"waste_mg\": 0.0}, \"expected\": {\"conc_mg_ml\": 50.0, \"draw_ml\": 5.0, \"vials\": 1, \"waste_mg\": 0.0}, \"passed\": true}, {\"check\": \"dose spanning two vials\", \"actual\": {\"conc_mg_ml\": 50.0, \"draw_ml\": 12.1, \"vials\": 2, \"waste_mg\": 399.0}, \"expected\": {\"conc_mg_ml\": 50.0, \"draw_ml\": 12.0, \"vials\": 2, \"waste_mg\": 399.0}, \"passed\": false}, {\"check\": \"multi-use vial has no waste\", \"actual\": {\"conc_mg_ml\": 10.0, \"draw_ml\": 3.1, \"vials\": 1, \"waste_mg\": 0.0}, \"expected\": {\"conc_mg_ml\": 10.0, \"draw_ml\": 3.1, \"vials\": 1, \"waste_mg\": 0.0}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.263,"exit_code":1,"observations":[{"actual":{"conc_mg_ml":50.0,"draw_ml":9.0,"vials":1,"waste_mg":50.0},"check":"powder displacement dilutes vial","expected":{"conc_mg_ml":50.0,"draw_ml":9.0,"vials":1,"waste_mg":50.0},"passed":true},{"actual":{"conc_mg_ml":50.0,"draw_ml":0.74,"vials":1,"waste_mg":63.0},"check":"sub-millilitre draw in hundredths","expected":{"conc_mg_ml":50.0,"draw_ml":0.74,"vials":1,"waste_mg":63.0},"passed":true},{"actual":{"conc_mg_ml":20.0,"draw_ml":2.2,"vials":1,"waste_mg":0.0},"check":"draw volume half step rounds up","expected":{"conc_mg_ml":20.0,"draw_ml":2.3,"vials":1,"waste_mg":0.0},"passed":false},{"actual":{"conc_mg_ml":50.0,"draw_ml":1.2,"vials":1,"waste_mg":38.0},"check":"draw volume below half step rounds down","expected":{"conc_mg_ml":50.0,"draw_ml":1.2,"vials":1,"waste_mg":38.0},"passed":true},{"actual":{"conc_mg_ml":50.0,"draw_ml":5.0,"vials":1,"waste_mg":0.0},"check":"dose exactly one vial","expected":{"conc_mg_ml":50.0,"draw_ml":5.0,"vials":1,"waste_mg":0.0},"passed":true},{"actual":{"conc_mg_ml":50.0,"draw_ml":12.0,"vials":2,"waste_mg":399.0},"check":"dose spanning two vials","expected":{"conc_mg_ml":50.0,"draw_ml":12.0,"vials":2,"waste_mg":399.0},"passed":true},{"actual":{"conc_mg_ml":10.0,"draw_ml":3.1,"vials":1,"waste_mg":0.0},"check":"multi-use vial has no waste","expected":{"conc_mg_ml":10.0,"draw_ml":3.1,"vials":1,"waste_mg":0.0},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"powder displacement dilutes vial\", \"actual\": {\"conc_mg_ml\": 50.0, \"draw_ml\": 9.0, \"vials\": 1, \"waste_mg\": 50.0}, \"expected\": {\"conc_mg_ml\": 50.0, \"draw_ml\": 9.0, \"vials\": 1, \"waste_mg\": 50.0}, \"passed\": true}, {\"check\": \"sub-millilitre draw in hundredths\", \"actual\": {\"conc_mg_ml\": 50.0, \"draw_ml\": 0.74, \"vials\": 1, \"waste_mg\": 63.0}, \"expected\": {\"conc_mg_ml\": 50.0, \"draw_ml\": 0.74, \"vials\": 1, \"waste_mg\": 63.0}, \"passed\": true}, {\"check\": \"draw volume half step rounds up\", \"actual\": {\"conc_mg_ml\": 20.0, \"draw_ml\": 2.2, \"vials\": 1, \"waste_mg\": 0.0}, \"expected\": {\"conc_mg_ml\": 20.0, \"draw_ml\": 2.3, \"vials\": 1, \"waste_mg\": 0.0}, \"passed\": false}, {\"check\": \"draw volume below half step rounds down\", \"actual\": {\"conc_mg_ml\": 50.0, \"draw_ml\": 1.2, \"vials\": 1, \"waste_mg\": 38.0}, \"expected\": {\"conc_mg_ml\": 50.0, \"draw_ml\": 1.2, \"vials\": 1, \"waste_mg\": 38.0}, \"passed\": true}, {\"check\": \"dose exactly one vial\", \"actual\": {\"conc_mg_ml\": 50.0, \"draw_ml\": 5.0, \"vials\": 1, \"waste_mg\": 0.0}, \"expected\": {\"conc_mg_ml\": 50.0, \"draw_ml\": 5.0, \"vials\": 1, \"waste_mg\": 0.0}, \"passed\": true}, {\"check\": \"dose spanning two vials\", \"actual\": {\"conc_mg_ml\": 50.0, \"draw_ml\": 12.0, \"vials\": 2, \"waste_mg\": 399.0}, \"expected\": {\"conc_mg_ml\": 50.0, \"draw_ml\": 12.0, \"vials\": 2, \"waste_mg\": 399.0}, \"passed\": true}, {\"check\": \"multi-use vial has no waste\", \"actual\": {\"conc_mg_ml\": 10.0, \"draw_ml\": 3.1, \"vials\": 1, \"waste_mg\": 0.0}, \"expected\": {\"conc_mg_ml\": 10.0, \"draw_ml\": 3.1, \"vials\": 1, \"waste_mg\": 0.0}, \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}