{"abstract":"Obese patients receive a dosing weight larger than their actual weight.","category":"Medication dosing calculations","checks":9,"contract":"Input {sex, height_in, weight, unit (\"kg\" or \"lb\", 1 kg = 2.2 lb), mg_per_kg, max_mg}. Toy rule: IBW = 50 kg (sex \"M\") or 45.5 kg (otherwise) + 2.3 kg per inch above 60 in (never below the base). Dosing weight is actual weight when below IBW, IBW when actual is within 100-120% of IBW inclusive, and IBW + 0.4*(actual-IBW) when actual exceeds 120% of IBW. Dose = mg_per_kg * dosing weight rounded half-up to the nearest 5 mg, then capped at max_mg. Return {basis, dosing_weight_kg (1 decimal), dose_mg}.","evaluation_group":"w2-meddose-dosing-weight","failed_approach":"Subtracting 0.4 of the excess from actual weight keeps 60% of the excess instead of 40%.","family":"w2-meddose-dosing-weight-adjusted-weight-excess-fraction","id":"FA-63856","implementations":{"attempt":{"sha256":"bf748bc3a0a9af54ff3c48fa4394721a0d43328483d597a0462ee867bd8dae54","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(x):\n    w = Fraction(str(x['weight']))\n    wt = w / Fraction(11, 5) if x['unit'] == 'lb' else w\n    hin = x['height_in']\n    base = Fraction(50) if x['sex'] == 'M' else Fraction(91, 2)\n    ibw = base + Fraction(23, 10) * max(0, hin - 60)\n    if wt < ibw:\n        dw, basis = wt, 'actual'\n    elif wt > Fraction(6, 5) * ibw:\n        dw, basis = wt - Fraction(2, 5) * (wt - ibw), 'adjusted'\n    else:\n        dw, basis = ibw, 'ideal'\n    raw = Fraction(str(x['mg_per_kg'])) * dw\n    dose = math.floor(raw / 5 + Fraction(1, 2)) * 5\n    dose = min(dose, x['max_mg'])\n    return {'basis': basis, 'dosing_weight_kg': round(float(dw), 1), 'dose_mg': dose}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('pound entry converted to kilograms',\n   {'sex': 'M', 'height_in': 70, 'weight': 154, 'unit': 'lb', 'mg_per_kg': 1, 'max_mg': 2000},\n   {'basis': 'actual', 'dosing_weight_kg': 70.0, 'dose_mg': 70}),\n  ('pound entry below ideal weight',\n   {'sex': 'F', 'height_in': 64, 'weight': 110, 'unit': 'lb', 'mg_per_kg': 2, 'max_mg': 2000},\n   {'basis': 'actual', 'dosing_weight_kg': 50.0, 'dose_mg': 100}),\n  ('short stature keeps base ideal weight',\n   {'sex': 'F', 'height_in': 57, 'weight': 51, 'unit': 'kg', 'mg_per_kg': 1, 'max_mg': 2000},\n   {'basis': 'ideal', 'dosing_weight_kg': 45.5, 'dose_mg': 45}),\n  ('exactly 120 percent of ideal stays ideal',\n   {'sex': 'M', 'height_in': 60, 'weight': '60', 'unit': 'kg', 'mg_per_kg': 2, 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 50.0, 'dose_mg': 100}),\n  ('obese patient uses adjusted weight',\n   {'sex': 'M', 'height_in': 70, 'weight': 105, 'unit': 'kg', 'mg_per_kg': 2, 'max_mg': 5000},\n   {'basis': 'adjusted', 'dosing_weight_kg': 85.8, 'dose_mg': 170}),\n  ('within ideal band control',\n   {'sex': 'F', 'height_in': 64, 'weight': 59, 'unit': 'kg', 'mg_per_kg': 3, 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 54.7, 'dose_mg': 165}),\n  ('underweight uses actual weight',\n   {'sex': 'M', 'height_in': 72, 'weight': 61, 'unit': 'kg', 'mg_per_kg': 1, 'max_mg': 5000},\n   {'basis': 'actual', 'dosing_weight_kg': 61.0, 'dose_mg': 60}),\n  ('half-way dose rounds up to next 5 mg',\n   {'sex': 'M', 'height_in': 60, 'weight': 55, 'unit': 'kg', 'mg_per_kg': '0.25', 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 50.0, 'dose_mg': 15}),\n  ('ceiling applied after rounding',\n   {'sex': 'M', 'height_in': 60, 'weight': 55, 'unit': 'kg', 'mg_per_kg': 22, 'max_mg': 1003},\n   {'basis': 'ideal', 'dosing_weight_kg': 50.0, 'dose_mg': 1003})],\n [('pound entry converted to kilograms',\n   {'sex': 'M', 'height_in': 70, 'weight': 176, 'unit': 'lb', 'mg_per_kg': 1, 'max_mg': 2000},\n   {'basis': 'ideal', 'dosing_weight_kg': 73.0, 'dose_mg': 75}),\n  ('pound entry below ideal weight',\n   {'sex': 'F', 'height_in': 64, 'weight': 110, 'unit': 'lb', 'mg_per_kg': 2, 'max_mg': 2000},\n   {'basis': 'actual', 'dosing_weight_kg': 50.0, 'dose_mg': 100}),\n  ('short stature keeps base ideal weight',\n   {'sex': 'F', 'height_in': 58, 'weight': 52, 'unit': 'kg', 'mg_per_kg': 1, 'max_mg': 2000},\n   {'basis': 'ideal', 'dosing_weight_kg': 45.5, 'dose_mg': 45}),\n  ('exactly 120 percent of ideal stays ideal',\n   {'sex': 'M', 'height_in': 65, 'weight': '73.8', 'unit': 'kg', 'mg_per_kg': 2, 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 61.5, 'dose_mg': 125}),\n  ('obese patient uses adjusted weight',\n   {'sex': 'M', 'height_in': 70, 'weight': 110, 'unit': 'kg', 'mg_per_kg': 2, 'max_mg': 5000},\n   {'basis': 'adjusted', 'dosing_weight_kg': 87.8, 'dose_mg': 175}),\n  ('within ideal band control',\n   {'sex': 'F', 'height_in': 64, 'weight': 60, 'unit': 'kg', 'mg_per_kg': 3, 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 54.7, 'dose_mg': 165}),\n  ('underweight uses actual weight',\n   {'sex': 'M', 'height_in': 72, 'weight': 62, 'unit': 'kg', 'mg_per_kg': 1, 'max_mg': 5000},\n   {'basis': 'actual', 'dosing_weight_kg': 62.0, 'dose_mg': 60}),\n  ('half-way dose rounds up to next 5 mg',\n   {'sex': 'M', 'height_in': 60, 'weight': 55, 'unit': 'kg', 'mg_per_kg': '0.45', 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 50.0, 'dose_mg': 25}),\n  ('ceiling applied after rounding',\n   {'sex': 'M', 'height_in': 60, 'weight': 55, 'unit': 'kg', 'mg_per_kg': 22, 'max_mg': 1004},\n   {'basis': 'ideal', 'dosing_weight_kg': 50.0, 'dose_mg': 1004})],\n [('pound entry converted to kilograms',\n   {'sex': 'M', 'height_in': 70, 'weight': 198, 'unit': 'lb', 'mg_per_kg': 1, 'max_mg': 2000},\n   {'basis': 'adjusted', 'dosing_weight_kg': 79.8, 'dose_mg': 80}),\n  ('pound entry below ideal weight',\n   {'sex': 'F', 'height_in': 64, 'weight': 110, 'unit': 'lb', 'mg_per_kg': 2, 'max_mg': 2000},\n   {'basis': 'actual', 'dosing_weight_kg': 50.0, 'dose_mg': 100}),\n  ('short stature keeps base ideal weight',\n   {'sex': 'F', 'height_in': 56, 'weight': 53, 'unit': 'kg', 'mg_per_kg': 1, 'max_mg': 2000},\n   {'basis': 'ideal', 'dosing_weight_kg': 45.5, 'dose_mg': 45}),\n  ('exactly 120 percent of ideal stays ideal',\n   {'sex': 'M', 'height_in': 70, 'weight': '87.6', 'unit': 'kg', 'mg_per_kg': 2, 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 73.0, 'dose_mg': 145}),\n  ('obese patient uses adjusted weight',\n   {'sex': 'M', 'height_in': 70, 'weight': 115, 'unit': 'kg', 'mg_per_kg': 2, 'max_mg': 5000},\n   {'basis': 'adjusted', 'dosing_weight_kg': 89.8, 'dose_mg': 180}),\n  ('within ideal band control',\n   {'sex': 'F', 'height_in': 64, 'weight': 61, 'unit': 'kg', 'mg_per_kg': 3, 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 54.7, 'dose_mg': 165}),\n  ('underweight uses actual weight',\n   {'sex': 'M', 'height_in': 72, 'weight': 63, 'unit': 'kg', 'mg_per_kg': 1, 'max_mg': 5000},\n   {'basis': 'actual', 'dosing_weight_kg': 63.0, 'dose_mg': 65}),\n  ('half-way dose rounds up to next 5 mg',\n   {'sex': 'M', 'height_in': 60, 'weight': 55, 'unit': 'kg', 'mg_per_kg': '0.65', 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 50.0, 'dose_mg': 35}),\n  ('ceiling applied after rounding',\n   {'sex': 'M', 'height_in': 60, 'weight': 55, 'unit': 'kg', 'mg_per_kg': 22, 'max_mg': 1008},\n   {'basis': 'ideal', 'dosing_weight_kg': 50.0, 'dose_mg': 1008})],\n [('pound entry converted to kilograms',\n   {'sex': 'M', 'height_in': 70, 'weight': 220, 'unit': 'lb', 'mg_per_kg': 1, 'max_mg': 2000},\n   {'basis': 'adjusted', 'dosing_weight_kg': 83.8, 'dose_mg': 85}),\n  ('pound entry below ideal weight',\n   {'sex': 'F', 'height_in': 64, 'weight': 110, 'unit': 'lb', 'mg_per_kg': 2, 'max_mg': 2000},\n   {'basis': 'actual', 'dosing_weight_kg': 50.0, 'dose_mg': 100}),\n  ('short stature keeps base ideal weight',\n   {'sex': 'F', 'height_in': 57, 'weight': 54, 'unit': 'kg', 'mg_per_kg': 1, 'max_mg': 2000},\n   {'basis': 'ideal', 'dosing_weight_kg': 45.5, 'dose_mg': 45}),\n  ('exactly 120 percent of ideal stays ideal',\n   {'sex': 'M', 'height_in': 75, 'weight': '101.4', 'unit': 'kg', 'mg_per_kg': 2, 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 84.5, 'dose_mg': 170}),\n  ('obese patient uses adjusted weight',\n   {'sex': 'M', 'height_in': 70, 'weight': 120, 'unit': 'kg', 'mg_per_kg': 2, 'max_mg': 5000},\n   {'basis': 'adjusted', 'dosing_weight_kg': 91.8, 'dose_mg': 185}),\n  ('within ideal band control',\n   {'sex': 'F', 'height_in': 64, 'weight': 62, 'unit': 'kg', 'mg_per_kg': 3, 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 54.7, 'dose_mg': 165}),\n  ('underweight uses actual weight',\n   {'sex': 'M', 'height_in': 72, 'weight': 64, 'unit': 'kg', 'mg_per_kg': 1, 'max_mg': 5000},\n   {'basis': 'actual', 'dosing_weight_kg': 64.0, 'dose_mg': 65}),\n  ('half-way dose rounds up to next 5 mg',\n   {'sex': 'M', 'height_in': 60, 'weight': 55, 'unit': 'kg', 'mg_per_kg': '0.85', 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 50.0, 'dose_mg': 45}),\n  ('ceiling applied after rounding',\n   {'sex': 'M', 'height_in': 60, 'weight': 55, 'unit': 'kg', 'mg_per_kg': 22, 'max_mg': 1009},\n   {'basis': 'ideal', 'dosing_weight_kg': 50.0, 'dose_mg': 1009})],\n [('pound entry converted to kilograms',\n   {'sex': 'M', 'height_in': 70, 'weight': 242, 'unit': 'lb', 'mg_per_kg': 1, 'max_mg': 2000},\n   {'basis': 'adjusted', 'dosing_weight_kg': 87.8, 'dose_mg': 90}),\n  ('pound entry below ideal weight',\n   {'sex': 'F', 'height_in': 64, 'weight': 110, 'unit': 'lb', 'mg_per_kg': 2, 'max_mg': 2000},\n   {'basis': 'actual', 'dosing_weight_kg': 50.0, 'dose_mg': 100}),\n  ('short stature keeps base ideal weight',\n   {'sex': 'F', 'height_in': 58, 'weight': 55, 'unit': 'kg', 'mg_per_kg': 1, 'max_mg': 2000},\n   {'basis': 'adjusted', 'dosing_weight_kg': 49.3, 'dose_mg': 50}),\n  ('exactly 120 percent of ideal stays ideal',\n   {'sex': 'M', 'height_in': 80, 'weight': '115.2', 'unit': 'kg', 'mg_per_kg': 2, 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 96.0, 'dose_mg': 190}),\n  ('obese patient uses adjusted weight',\n   {'sex': 'M', 'height_in': 70, 'weight': 125, 'unit': 'kg', 'mg_per_kg': 2, 'max_mg': 5000},\n   {'basis': 'adjusted', 'dosing_weight_kg': 93.8, 'dose_mg': 190}),\n  ('within ideal band control',\n   {'sex': 'F', 'height_in': 64, 'weight': 63, 'unit': 'kg', 'mg_per_kg': 3, 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 54.7, 'dose_mg': 165}),\n  ('underweight uses actual weight',\n   {'sex': 'M', 'height_in': 72, 'weight': 65, 'unit': 'kg', 'mg_per_kg': 1, 'max_mg': 5000},\n   {'basis': 'actual', 'dosing_weight_kg': 65.0, 'dose_mg': 65}),\n  ('half-way dose rounds up to next 5 mg',\n   {'sex': 'M', 'height_in': 60, 'weight': 55, 'unit': 'kg', 'mg_per_kg': '1.05', 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 50.0, 'dose_mg': 55}),\n  ('ceiling applied after rounding',\n   {'sex': 'M', 'height_in': 60, 'weight': 55, 'unit': 'kg', 'mg_per_kg': 22, 'max_mg': 1013},\n   {'basis': 'ideal', 'dosing_weight_kg': 50.0, 'dose_mg': 1013})]]\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":"5647a3f843761d4b568836832b1f05e36729529c25242247cc8acecf33c2eefa","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(x):\n    w = Fraction(str(x['weight']))\n    wt = w / Fraction(11, 5) if x['unit'] == 'lb' else w\n    hin = x['height_in']\n    base = Fraction(50) if x['sex'] == 'M' else Fraction(91, 2)\n    ibw = base + Fraction(23, 10) * max(0, hin - 60)\n    if wt < ibw:\n        dw, basis = wt, 'actual'\n    elif wt > Fraction(6, 5) * ibw:\n        dw, basis = ibw + Fraction(2, 5) * wt, 'adjusted'\n    else:\n        dw, basis = ibw, 'ideal'\n    raw = Fraction(str(x['mg_per_kg'])) * dw\n    dose = math.floor(raw / 5 + Fraction(1, 2)) * 5\n    dose = min(dose, x['max_mg'])\n    return {'basis': basis, 'dosing_weight_kg': round(float(dw), 1), 'dose_mg': dose}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('pound entry converted to kilograms',\n   {'sex': 'M', 'height_in': 70, 'weight': 154, 'unit': 'lb', 'mg_per_kg': 1, 'max_mg': 2000},\n   {'basis': 'actual', 'dosing_weight_kg': 70.0, 'dose_mg': 70}),\n  ('pound entry below ideal weight',\n   {'sex': 'F', 'height_in': 64, 'weight': 110, 'unit': 'lb', 'mg_per_kg': 2, 'max_mg': 2000},\n   {'basis': 'actual', 'dosing_weight_kg': 50.0, 'dose_mg': 100}),\n  ('short stature keeps base ideal weight',\n   {'sex': 'F', 'height_in': 57, 'weight': 51, 'unit': 'kg', 'mg_per_kg': 1, 'max_mg': 2000},\n   {'basis': 'ideal', 'dosing_weight_kg': 45.5, 'dose_mg': 45}),\n  ('exactly 120 percent of ideal stays ideal',\n   {'sex': 'M', 'height_in': 60, 'weight': '60', 'unit': 'kg', 'mg_per_kg': 2, 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 50.0, 'dose_mg': 100}),\n  ('obese patient uses adjusted weight',\n   {'sex': 'M', 'height_in': 70, 'weight': 105, 'unit': 'kg', 'mg_per_kg': 2, 'max_mg': 5000},\n   {'basis': 'adjusted', 'dosing_weight_kg': 85.8, 'dose_mg': 170}),\n  ('within ideal band control',\n   {'sex': 'F', 'height_in': 64, 'weight': 59, 'unit': 'kg', 'mg_per_kg': 3, 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 54.7, 'dose_mg': 165}),\n  ('underweight uses actual weight',\n   {'sex': 'M', 'height_in': 72, 'weight': 61, 'unit': 'kg', 'mg_per_kg': 1, 'max_mg': 5000},\n   {'basis': 'actual', 'dosing_weight_kg': 61.0, 'dose_mg': 60}),\n  ('half-way dose rounds up to next 5 mg',\n   {'sex': 'M', 'height_in': 60, 'weight': 55, 'unit': 'kg', 'mg_per_kg': '0.25', 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 50.0, 'dose_mg': 15}),\n  ('ceiling applied after rounding',\n   {'sex': 'M', 'height_in': 60, 'weight': 55, 'unit': 'kg', 'mg_per_kg': 22, 'max_mg': 1003},\n   {'basis': 'ideal', 'dosing_weight_kg': 50.0, 'dose_mg': 1003})],\n [('pound entry converted to kilograms',\n   {'sex': 'M', 'height_in': 70, 'weight': 176, 'unit': 'lb', 'mg_per_kg': 1, 'max_mg': 2000},\n   {'basis': 'ideal', 'dosing_weight_kg': 73.0, 'dose_mg': 75}),\n  ('pound entry below ideal weight',\n   {'sex': 'F', 'height_in': 64, 'weight': 110, 'unit': 'lb', 'mg_per_kg': 2, 'max_mg': 2000},\n   {'basis': 'actual', 'dosing_weight_kg': 50.0, 'dose_mg': 100}),\n  ('short stature keeps base ideal weight',\n   {'sex': 'F', 'height_in': 58, 'weight': 52, 'unit': 'kg', 'mg_per_kg': 1, 'max_mg': 2000},\n   {'basis': 'ideal', 'dosing_weight_kg': 45.5, 'dose_mg': 45}),\n  ('exactly 120 percent of ideal stays ideal',\n   {'sex': 'M', 'height_in': 65, 'weight': '73.8', 'unit': 'kg', 'mg_per_kg': 2, 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 61.5, 'dose_mg': 125}),\n  ('obese patient uses adjusted weight',\n   {'sex': 'M', 'height_in': 70, 'weight': 110, 'unit': 'kg', 'mg_per_kg': 2, 'max_mg': 5000},\n   {'basis': 'adjusted', 'dosing_weight_kg': 87.8, 'dose_mg': 175}),\n  ('within ideal band control',\n   {'sex': 'F', 'height_in': 64, 'weight': 60, 'unit': 'kg', 'mg_per_kg': 3, 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 54.7, 'dose_mg': 165}),\n  ('underweight uses actual weight',\n   {'sex': 'M', 'height_in': 72, 'weight': 62, 'unit': 'kg', 'mg_per_kg': 1, 'max_mg': 5000},\n   {'basis': 'actual', 'dosing_weight_kg': 62.0, 'dose_mg': 60}),\n  ('half-way dose rounds up to next 5 mg',\n   {'sex': 'M', 'height_in': 60, 'weight': 55, 'unit': 'kg', 'mg_per_kg': '0.45', 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 50.0, 'dose_mg': 25}),\n  ('ceiling applied after rounding',\n   {'sex': 'M', 'height_in': 60, 'weight': 55, 'unit': 'kg', 'mg_per_kg': 22, 'max_mg': 1004},\n   {'basis': 'ideal', 'dosing_weight_kg': 50.0, 'dose_mg': 1004})],\n [('pound entry converted to kilograms',\n   {'sex': 'M', 'height_in': 70, 'weight': 198, 'unit': 'lb', 'mg_per_kg': 1, 'max_mg': 2000},\n   {'basis': 'adjusted', 'dosing_weight_kg': 79.8, 'dose_mg': 80}),\n  ('pound entry below ideal weight',\n   {'sex': 'F', 'height_in': 64, 'weight': 110, 'unit': 'lb', 'mg_per_kg': 2, 'max_mg': 2000},\n   {'basis': 'actual', 'dosing_weight_kg': 50.0, 'dose_mg': 100}),\n  ('short stature keeps base ideal weight',\n   {'sex': 'F', 'height_in': 56, 'weight': 53, 'unit': 'kg', 'mg_per_kg': 1, 'max_mg': 2000},\n   {'basis': 'ideal', 'dosing_weight_kg': 45.5, 'dose_mg': 45}),\n  ('exactly 120 percent of ideal stays ideal',\n   {'sex': 'M', 'height_in': 70, 'weight': '87.6', 'unit': 'kg', 'mg_per_kg': 2, 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 73.0, 'dose_mg': 145}),\n  ('obese patient uses adjusted weight',\n   {'sex': 'M', 'height_in': 70, 'weight': 115, 'unit': 'kg', 'mg_per_kg': 2, 'max_mg': 5000},\n   {'basis': 'adjusted', 'dosing_weight_kg': 89.8, 'dose_mg': 180}),\n  ('within ideal band control',\n   {'sex': 'F', 'height_in': 64, 'weight': 61, 'unit': 'kg', 'mg_per_kg': 3, 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 54.7, 'dose_mg': 165}),\n  ('underweight uses actual weight',\n   {'sex': 'M', 'height_in': 72, 'weight': 63, 'unit': 'kg', 'mg_per_kg': 1, 'max_mg': 5000},\n   {'basis': 'actual', 'dosing_weight_kg': 63.0, 'dose_mg': 65}),\n  ('half-way dose rounds up to next 5 mg',\n   {'sex': 'M', 'height_in': 60, 'weight': 55, 'unit': 'kg', 'mg_per_kg': '0.65', 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 50.0, 'dose_mg': 35}),\n  ('ceiling applied after rounding',\n   {'sex': 'M', 'height_in': 60, 'weight': 55, 'unit': 'kg', 'mg_per_kg': 22, 'max_mg': 1008},\n   {'basis': 'ideal', 'dosing_weight_kg': 50.0, 'dose_mg': 1008})],\n [('pound entry converted to kilograms',\n   {'sex': 'M', 'height_in': 70, 'weight': 220, 'unit': 'lb', 'mg_per_kg': 1, 'max_mg': 2000},\n   {'basis': 'adjusted', 'dosing_weight_kg': 83.8, 'dose_mg': 85}),\n  ('pound entry below ideal weight',\n   {'sex': 'F', 'height_in': 64, 'weight': 110, 'unit': 'lb', 'mg_per_kg': 2, 'max_mg': 2000},\n   {'basis': 'actual', 'dosing_weight_kg': 50.0, 'dose_mg': 100}),\n  ('short stature keeps base ideal weight',\n   {'sex': 'F', 'height_in': 57, 'weight': 54, 'unit': 'kg', 'mg_per_kg': 1, 'max_mg': 2000},\n   {'basis': 'ideal', 'dosing_weight_kg': 45.5, 'dose_mg': 45}),\n  ('exactly 120 percent of ideal stays ideal',\n   {'sex': 'M', 'height_in': 75, 'weight': '101.4', 'unit': 'kg', 'mg_per_kg': 2, 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 84.5, 'dose_mg': 170}),\n  ('obese patient uses adjusted weight',\n   {'sex': 'M', 'height_in': 70, 'weight': 120, 'unit': 'kg', 'mg_per_kg': 2, 'max_mg': 5000},\n   {'basis': 'adjusted', 'dosing_weight_kg': 91.8, 'dose_mg': 185}),\n  ('within ideal band control',\n   {'sex': 'F', 'height_in': 64, 'weight': 62, 'unit': 'kg', 'mg_per_kg': 3, 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 54.7, 'dose_mg': 165}),\n  ('underweight uses actual weight',\n   {'sex': 'M', 'height_in': 72, 'weight': 64, 'unit': 'kg', 'mg_per_kg': 1, 'max_mg': 5000},\n   {'basis': 'actual', 'dosing_weight_kg': 64.0, 'dose_mg': 65}),\n  ('half-way dose rounds up to next 5 mg',\n   {'sex': 'M', 'height_in': 60, 'weight': 55, 'unit': 'kg', 'mg_per_kg': '0.85', 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 50.0, 'dose_mg': 45}),\n  ('ceiling applied after rounding',\n   {'sex': 'M', 'height_in': 60, 'weight': 55, 'unit': 'kg', 'mg_per_kg': 22, 'max_mg': 1009},\n   {'basis': 'ideal', 'dosing_weight_kg': 50.0, 'dose_mg': 1009})],\n [('pound entry converted to kilograms',\n   {'sex': 'M', 'height_in': 70, 'weight': 242, 'unit': 'lb', 'mg_per_kg': 1, 'max_mg': 2000},\n   {'basis': 'adjusted', 'dosing_weight_kg': 87.8, 'dose_mg': 90}),\n  ('pound entry below ideal weight',\n   {'sex': 'F', 'height_in': 64, 'weight': 110, 'unit': 'lb', 'mg_per_kg': 2, 'max_mg': 2000},\n   {'basis': 'actual', 'dosing_weight_kg': 50.0, 'dose_mg': 100}),\n  ('short stature keeps base ideal weight',\n   {'sex': 'F', 'height_in': 58, 'weight': 55, 'unit': 'kg', 'mg_per_kg': 1, 'max_mg': 2000},\n   {'basis': 'adjusted', 'dosing_weight_kg': 49.3, 'dose_mg': 50}),\n  ('exactly 120 percent of ideal stays ideal',\n   {'sex': 'M', 'height_in': 80, 'weight': '115.2', 'unit': 'kg', 'mg_per_kg': 2, 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 96.0, 'dose_mg': 190}),\n  ('obese patient uses adjusted weight',\n   {'sex': 'M', 'height_in': 70, 'weight': 125, 'unit': 'kg', 'mg_per_kg': 2, 'max_mg': 5000},\n   {'basis': 'adjusted', 'dosing_weight_kg': 93.8, 'dose_mg': 190}),\n  ('within ideal band control',\n   {'sex': 'F', 'height_in': 64, 'weight': 63, 'unit': 'kg', 'mg_per_kg': 3, 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 54.7, 'dose_mg': 165}),\n  ('underweight uses actual weight',\n   {'sex': 'M', 'height_in': 72, 'weight': 65, 'unit': 'kg', 'mg_per_kg': 1, 'max_mg': 5000},\n   {'basis': 'actual', 'dosing_weight_kg': 65.0, 'dose_mg': 65}),\n  ('half-way dose rounds up to next 5 mg',\n   {'sex': 'M', 'height_in': 60, 'weight': 55, 'unit': 'kg', 'mg_per_kg': '1.05', 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 50.0, 'dose_mg': 55}),\n  ('ceiling applied after rounding',\n   {'sex': 'M', 'height_in': 60, 'weight': 55, 'unit': 'kg', 'mg_per_kg': 22, 'max_mg': 1013},\n   {'basis': 'ideal', 'dosing_weight_kg': 50.0, 'dose_mg': 1013})]]\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"},"fixed":{"sha256":"800a21bcf59e7062b5fb034249ffb48ae949c37890bbe9e4f4cf181299fa329f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(x):\n    w = Fraction(str(x['weight']))\n    wt = w / Fraction(11, 5) if x['unit'] == 'lb' else w\n    hin = x['height_in']\n    base = Fraction(50) if x['sex'] == 'M' else Fraction(91, 2)\n    ibw = base + Fraction(23, 10) * max(0, hin - 60)\n    if wt < ibw:\n        dw, basis = wt, 'actual'\n    elif wt > Fraction(6, 5) * ibw:\n        dw, basis = ibw + Fraction(2, 5) * (wt - ibw), 'adjusted'\n    else:\n        dw, basis = ibw, 'ideal'\n    raw = Fraction(str(x['mg_per_kg'])) * dw\n    dose = math.floor(raw / 5 + Fraction(1, 2)) * 5\n    dose = min(dose, x['max_mg'])\n    return {'basis': basis, 'dosing_weight_kg': round(float(dw), 1), 'dose_mg': dose}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('pound entry converted to kilograms',\n   {'sex': 'M', 'height_in': 70, 'weight': 154, 'unit': 'lb', 'mg_per_kg': 1, 'max_mg': 2000},\n   {'basis': 'actual', 'dosing_weight_kg': 70.0, 'dose_mg': 70}),\n  ('pound entry below ideal weight',\n   {'sex': 'F', 'height_in': 64, 'weight': 110, 'unit': 'lb', 'mg_per_kg': 2, 'max_mg': 2000},\n   {'basis': 'actual', 'dosing_weight_kg': 50.0, 'dose_mg': 100}),\n  ('short stature keeps base ideal weight',\n   {'sex': 'F', 'height_in': 57, 'weight': 51, 'unit': 'kg', 'mg_per_kg': 1, 'max_mg': 2000},\n   {'basis': 'ideal', 'dosing_weight_kg': 45.5, 'dose_mg': 45}),\n  ('exactly 120 percent of ideal stays ideal',\n   {'sex': 'M', 'height_in': 60, 'weight': '60', 'unit': 'kg', 'mg_per_kg': 2, 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 50.0, 'dose_mg': 100}),\n  ('obese patient uses adjusted weight',\n   {'sex': 'M', 'height_in': 70, 'weight': 105, 'unit': 'kg', 'mg_per_kg': 2, 'max_mg': 5000},\n   {'basis': 'adjusted', 'dosing_weight_kg': 85.8, 'dose_mg': 170}),\n  ('within ideal band control',\n   {'sex': 'F', 'height_in': 64, 'weight': 59, 'unit': 'kg', 'mg_per_kg': 3, 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 54.7, 'dose_mg': 165}),\n  ('underweight uses actual weight',\n   {'sex': 'M', 'height_in': 72, 'weight': 61, 'unit': 'kg', 'mg_per_kg': 1, 'max_mg': 5000},\n   {'basis': 'actual', 'dosing_weight_kg': 61.0, 'dose_mg': 60}),\n  ('half-way dose rounds up to next 5 mg',\n   {'sex': 'M', 'height_in': 60, 'weight': 55, 'unit': 'kg', 'mg_per_kg': '0.25', 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 50.0, 'dose_mg': 15}),\n  ('ceiling applied after rounding',\n   {'sex': 'M', 'height_in': 60, 'weight': 55, 'unit': 'kg', 'mg_per_kg': 22, 'max_mg': 1003},\n   {'basis': 'ideal', 'dosing_weight_kg': 50.0, 'dose_mg': 1003})],\n [('pound entry converted to kilograms',\n   {'sex': 'M', 'height_in': 70, 'weight': 176, 'unit': 'lb', 'mg_per_kg': 1, 'max_mg': 2000},\n   {'basis': 'ideal', 'dosing_weight_kg': 73.0, 'dose_mg': 75}),\n  ('pound entry below ideal weight',\n   {'sex': 'F', 'height_in': 64, 'weight': 110, 'unit': 'lb', 'mg_per_kg': 2, 'max_mg': 2000},\n   {'basis': 'actual', 'dosing_weight_kg': 50.0, 'dose_mg': 100}),\n  ('short stature keeps base ideal weight',\n   {'sex': 'F', 'height_in': 58, 'weight': 52, 'unit': 'kg', 'mg_per_kg': 1, 'max_mg': 2000},\n   {'basis': 'ideal', 'dosing_weight_kg': 45.5, 'dose_mg': 45}),\n  ('exactly 120 percent of ideal stays ideal',\n   {'sex': 'M', 'height_in': 65, 'weight': '73.8', 'unit': 'kg', 'mg_per_kg': 2, 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 61.5, 'dose_mg': 125}),\n  ('obese patient uses adjusted weight',\n   {'sex': 'M', 'height_in': 70, 'weight': 110, 'unit': 'kg', 'mg_per_kg': 2, 'max_mg': 5000},\n   {'basis': 'adjusted', 'dosing_weight_kg': 87.8, 'dose_mg': 175}),\n  ('within ideal band control',\n   {'sex': 'F', 'height_in': 64, 'weight': 60, 'unit': 'kg', 'mg_per_kg': 3, 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 54.7, 'dose_mg': 165}),\n  ('underweight uses actual weight',\n   {'sex': 'M', 'height_in': 72, 'weight': 62, 'unit': 'kg', 'mg_per_kg': 1, 'max_mg': 5000},\n   {'basis': 'actual', 'dosing_weight_kg': 62.0, 'dose_mg': 60}),\n  ('half-way dose rounds up to next 5 mg',\n   {'sex': 'M', 'height_in': 60, 'weight': 55, 'unit': 'kg', 'mg_per_kg': '0.45', 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 50.0, 'dose_mg': 25}),\n  ('ceiling applied after rounding',\n   {'sex': 'M', 'height_in': 60, 'weight': 55, 'unit': 'kg', 'mg_per_kg': 22, 'max_mg': 1004},\n   {'basis': 'ideal', 'dosing_weight_kg': 50.0, 'dose_mg': 1004})],\n [('pound entry converted to kilograms',\n   {'sex': 'M', 'height_in': 70, 'weight': 198, 'unit': 'lb', 'mg_per_kg': 1, 'max_mg': 2000},\n   {'basis': 'adjusted', 'dosing_weight_kg': 79.8, 'dose_mg': 80}),\n  ('pound entry below ideal weight',\n   {'sex': 'F', 'height_in': 64, 'weight': 110, 'unit': 'lb', 'mg_per_kg': 2, 'max_mg': 2000},\n   {'basis': 'actual', 'dosing_weight_kg': 50.0, 'dose_mg': 100}),\n  ('short stature keeps base ideal weight',\n   {'sex': 'F', 'height_in': 56, 'weight': 53, 'unit': 'kg', 'mg_per_kg': 1, 'max_mg': 2000},\n   {'basis': 'ideal', 'dosing_weight_kg': 45.5, 'dose_mg': 45}),\n  ('exactly 120 percent of ideal stays ideal',\n   {'sex': 'M', 'height_in': 70, 'weight': '87.6', 'unit': 'kg', 'mg_per_kg': 2, 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 73.0, 'dose_mg': 145}),\n  ('obese patient uses adjusted weight',\n   {'sex': 'M', 'height_in': 70, 'weight': 115, 'unit': 'kg', 'mg_per_kg': 2, 'max_mg': 5000},\n   {'basis': 'adjusted', 'dosing_weight_kg': 89.8, 'dose_mg': 180}),\n  ('within ideal band control',\n   {'sex': 'F', 'height_in': 64, 'weight': 61, 'unit': 'kg', 'mg_per_kg': 3, 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 54.7, 'dose_mg': 165}),\n  ('underweight uses actual weight',\n   {'sex': 'M', 'height_in': 72, 'weight': 63, 'unit': 'kg', 'mg_per_kg': 1, 'max_mg': 5000},\n   {'basis': 'actual', 'dosing_weight_kg': 63.0, 'dose_mg': 65}),\n  ('half-way dose rounds up to next 5 mg',\n   {'sex': 'M', 'height_in': 60, 'weight': 55, 'unit': 'kg', 'mg_per_kg': '0.65', 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 50.0, 'dose_mg': 35}),\n  ('ceiling applied after rounding',\n   {'sex': 'M', 'height_in': 60, 'weight': 55, 'unit': 'kg', 'mg_per_kg': 22, 'max_mg': 1008},\n   {'basis': 'ideal', 'dosing_weight_kg': 50.0, 'dose_mg': 1008})],\n [('pound entry converted to kilograms',\n   {'sex': 'M', 'height_in': 70, 'weight': 220, 'unit': 'lb', 'mg_per_kg': 1, 'max_mg': 2000},\n   {'basis': 'adjusted', 'dosing_weight_kg': 83.8, 'dose_mg': 85}),\n  ('pound entry below ideal weight',\n   {'sex': 'F', 'height_in': 64, 'weight': 110, 'unit': 'lb', 'mg_per_kg': 2, 'max_mg': 2000},\n   {'basis': 'actual', 'dosing_weight_kg': 50.0, 'dose_mg': 100}),\n  ('short stature keeps base ideal weight',\n   {'sex': 'F', 'height_in': 57, 'weight': 54, 'unit': 'kg', 'mg_per_kg': 1, 'max_mg': 2000},\n   {'basis': 'ideal', 'dosing_weight_kg': 45.5, 'dose_mg': 45}),\n  ('exactly 120 percent of ideal stays ideal',\n   {'sex': 'M', 'height_in': 75, 'weight': '101.4', 'unit': 'kg', 'mg_per_kg': 2, 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 84.5, 'dose_mg': 170}),\n  ('obese patient uses adjusted weight',\n   {'sex': 'M', 'height_in': 70, 'weight': 120, 'unit': 'kg', 'mg_per_kg': 2, 'max_mg': 5000},\n   {'basis': 'adjusted', 'dosing_weight_kg': 91.8, 'dose_mg': 185}),\n  ('within ideal band control',\n   {'sex': 'F', 'height_in': 64, 'weight': 62, 'unit': 'kg', 'mg_per_kg': 3, 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 54.7, 'dose_mg': 165}),\n  ('underweight uses actual weight',\n   {'sex': 'M', 'height_in': 72, 'weight': 64, 'unit': 'kg', 'mg_per_kg': 1, 'max_mg': 5000},\n   {'basis': 'actual', 'dosing_weight_kg': 64.0, 'dose_mg': 65}),\n  ('half-way dose rounds up to next 5 mg',\n   {'sex': 'M', 'height_in': 60, 'weight': 55, 'unit': 'kg', 'mg_per_kg': '0.85', 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 50.0, 'dose_mg': 45}),\n  ('ceiling applied after rounding',\n   {'sex': 'M', 'height_in': 60, 'weight': 55, 'unit': 'kg', 'mg_per_kg': 22, 'max_mg': 1009},\n   {'basis': 'ideal', 'dosing_weight_kg': 50.0, 'dose_mg': 1009})],\n [('pound entry converted to kilograms',\n   {'sex': 'M', 'height_in': 70, 'weight': 242, 'unit': 'lb', 'mg_per_kg': 1, 'max_mg': 2000},\n   {'basis': 'adjusted', 'dosing_weight_kg': 87.8, 'dose_mg': 90}),\n  ('pound entry below ideal weight',\n   {'sex': 'F', 'height_in': 64, 'weight': 110, 'unit': 'lb', 'mg_per_kg': 2, 'max_mg': 2000},\n   {'basis': 'actual', 'dosing_weight_kg': 50.0, 'dose_mg': 100}),\n  ('short stature keeps base ideal weight',\n   {'sex': 'F', 'height_in': 58, 'weight': 55, 'unit': 'kg', 'mg_per_kg': 1, 'max_mg': 2000},\n   {'basis': 'adjusted', 'dosing_weight_kg': 49.3, 'dose_mg': 50}),\n  ('exactly 120 percent of ideal stays ideal',\n   {'sex': 'M', 'height_in': 80, 'weight': '115.2', 'unit': 'kg', 'mg_per_kg': 2, 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 96.0, 'dose_mg': 190}),\n  ('obese patient uses adjusted weight',\n   {'sex': 'M', 'height_in': 70, 'weight': 125, 'unit': 'kg', 'mg_per_kg': 2, 'max_mg': 5000},\n   {'basis': 'adjusted', 'dosing_weight_kg': 93.8, 'dose_mg': 190}),\n  ('within ideal band control',\n   {'sex': 'F', 'height_in': 64, 'weight': 63, 'unit': 'kg', 'mg_per_kg': 3, 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 54.7, 'dose_mg': 165}),\n  ('underweight uses actual weight',\n   {'sex': 'M', 'height_in': 72, 'weight': 65, 'unit': 'kg', 'mg_per_kg': 1, 'max_mg': 5000},\n   {'basis': 'actual', 'dosing_weight_kg': 65.0, 'dose_mg': 65}),\n  ('half-way dose rounds up to next 5 mg',\n   {'sex': 'M', 'height_in': 60, 'weight': 55, 'unit': 'kg', 'mg_per_kg': '1.05', 'max_mg': 5000},\n   {'basis': 'ideal', 'dosing_weight_kg': 50.0, 'dose_mg': 55}),\n  ('ceiling applied after rounding',\n   {'sex': 'M', 'height_in': 60, 'weight': 55, 'unit': 'kg', 'mg_per_kg': 22, 'max_mg': 1013},\n   {'basis': 'ideal', 'dosing_weight_kg': 50.0, 'dose_mg': 1013})]]\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-dosing-weight-adjusted-weight-excess-fraction","generated_at":"2026-09-29T14:47:18.477318+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Weight-based ordering tools must choose the stipulated dosing weight band, convert units exactly, and apply the ceiling after the final rounding step.","repair":"Add 0.4 x (actual - IBW) to IBW.","root_cause":"The 0.4 correction factor is applied to total weight instead of to the excess above IBW.","sha256":"9662e43dfbabadeb706bba77952e510c527e916d2ce563e21cf3866b41441f55","title":"Weight-based dose with ideal and adjusted dosing weight: adjusted weight excess fraction · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.113,"exit_code":1,"observations":[{"actual":{"basis":"actual","dose_mg":70,"dosing_weight_kg":70.0},"check":"pound entry converted to kilograms","expected":{"basis":"actual","dose_mg":70,"dosing_weight_kg":70.0},"passed":true},{"actual":{"basis":"actual","dose_mg":100,"dosing_weight_kg":50.0},"check":"pound entry below ideal weight","expected":{"basis":"actual","dose_mg":100,"dosing_weight_kg":50.0},"passed":true},{"actual":{"basis":"ideal","dose_mg":45,"dosing_weight_kg":45.5},"check":"short stature keeps base ideal weight","expected":{"basis":"ideal","dose_mg":45,"dosing_weight_kg":45.5},"passed":true},{"actual":{"basis":"ideal","dose_mg":100,"dosing_weight_kg":50.0},"check":"exactly 120 percent of ideal stays ideal","expected":{"basis":"ideal","dose_mg":100,"dosing_weight_kg":50.0},"passed":true},{"actual":{"basis":"adjusted","dose_mg":185,"dosing_weight_kg":92.2},"check":"obese patient uses adjusted weight","expected":{"basis":"adjusted","dose_mg":170,"dosing_weight_kg":85.8},"passed":false},{"actual":{"basis":"ideal","dose_mg":165,"dosing_weight_kg":54.7},"check":"within ideal band control","expected":{"basis":"ideal","dose_mg":165,"dosing_weight_kg":54.7},"passed":true},{"actual":{"basis":"actual","dose_mg":60,"dosing_weight_kg":61.0},"check":"underweight uses actual weight","expected":{"basis":"actual","dose_mg":60,"dosing_weight_kg":61.0},"passed":true},{"actual":{"basis":"ideal","dose_mg":15,"dosing_weight_kg":50.0},"check":"half-way dose rounds up to next 5 mg","expected":{"basis":"ideal","dose_mg":15,"dosing_weight_kg":50.0},"passed":true},{"actual":{"basis":"ideal","dose_mg":1003,"dosing_weight_kg":50.0},"check":"ceiling applied after rounding","expected":{"basis":"ideal","dose_mg":1003,"dosing_weight_kg":50.0},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"pound entry converted to kilograms\", \"actual\": {\"basis\": \"actual\", \"dosing_weight_kg\": 70.0, \"dose_mg\": 70}, \"expected\": {\"basis\": \"actual\", \"dosing_weight_kg\": 70.0, \"dose_mg\": 70}, \"passed\": true}, {\"check\": \"pound entry below ideal weight\", \"actual\": {\"basis\": \"actual\", \"dosing_weight_kg\": 50.0, \"dose_mg\": 100}, \"expected\": {\"basis\": \"actual\", \"dosing_weight_kg\": 50.0, \"dose_mg\": 100}, \"passed\": true}, {\"check\": \"short stature keeps base ideal weight\", \"actual\": {\"basis\": \"ideal\", \"dosing_weight_kg\": 45.5, \"dose_mg\": 45}, \"expected\": {\"basis\": \"ideal\", \"dosing_weight_kg\": 45.5, \"dose_mg\": 45}, \"passed\": true}, {\"check\": \"exactly 120 percent of ideal stays ideal\", \"actual\": {\"basis\": \"ideal\", \"dosing_weight_kg\": 50.0, \"dose_mg\": 100}, \"expected\": {\"basis\": \"ideal\", \"dosing_weight_kg\": 50.0, \"dose_mg\": 100}, \"passed\": true}, {\"check\": \"obese patient uses adjusted weight\", \"actual\": {\"basis\": \"adjusted\", \"dosing_weight_kg\": 92.2, \"dose_mg\": 185}, \"expected\": {\"basis\": \"adjusted\", \"dosing_weight_kg\": 85.8, \"dose_mg\": 170}, \"passed\": false}, {\"check\": \"within ideal band control\", \"actual\": {\"basis\": \"ideal\", \"dosing_weight_kg\": 54.7, \"dose_mg\": 165}, \"expected\": {\"basis\": \"ideal\", \"dosing_weight_kg\": 54.7, \"dose_mg\": 165}, \"passed\": true}, {\"check\": \"underweight uses actual weight\", \"actual\": {\"basis\": \"actual\", \"dosing_weight_kg\": 61.0, \"dose_mg\": 60}, \"expected\": {\"basis\": \"actual\", \"dosing_weight_kg\": 61.0, \"dose_mg\": 60}, \"passed\": true}, {\"check\": \"half-way dose rounds up to next 5 mg\", \"actual\": {\"basis\": \"ideal\", \"dosing_weight_kg\": 50.0, \"dose_mg\": 15}, \"expected\": {\"basis\": \"ideal\", \"dosing_weight_kg\": 50.0, \"dose_mg\": 15}, \"passed\": true}, {\"check\": \"ceiling applied after rounding\", \"actual\": {\"basis\": \"ideal\", \"dosing_weight_kg\": 50.0, \"dose_mg\": 1003}, \"expected\": {\"basis\": \"ideal\", \"dosing_weight_kg\": 50.0, \"dose_mg\": 1003}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.864,"exit_code":1,"observations":[{"actual":{"basis":"actual","dose_mg":70,"dosing_weight_kg":70.0},"check":"pound entry converted to kilograms","expected":{"basis":"actual","dose_mg":70,"dosing_weight_kg":70.0},"passed":true},{"actual":{"basis":"actual","dose_mg":100,"dosing_weight_kg":50.0},"check":"pound entry below ideal weight","expected":{"basis":"actual","dose_mg":100,"dosing_weight_kg":50.0},"passed":true},{"actual":{"basis":"ideal","dose_mg":45,"dosing_weight_kg":45.5},"check":"short stature keeps base ideal weight","expected":{"basis":"ideal","dose_mg":45,"dosing_weight_kg":45.5},"passed":true},{"actual":{"basis":"ideal","dose_mg":100,"dosing_weight_kg":50.0},"check":"exactly 120 percent of ideal stays ideal","expected":{"basis":"ideal","dose_mg":100,"dosing_weight_kg":50.0},"passed":true},{"actual":{"basis":"adjusted","dose_mg":230,"dosing_weight_kg":115.0},"check":"obese patient uses adjusted weight","expected":{"basis":"adjusted","dose_mg":170,"dosing_weight_kg":85.8},"passed":false},{"actual":{"basis":"ideal","dose_mg":165,"dosing_weight_kg":54.7},"check":"within ideal band control","expected":{"basis":"ideal","dose_mg":165,"dosing_weight_kg":54.7},"passed":true},{"actual":{"basis":"actual","dose_mg":60,"dosing_weight_kg":61.0},"check":"underweight uses actual weight","expected":{"basis":"actual","dose_mg":60,"dosing_weight_kg":61.0},"passed":true},{"actual":{"basis":"ideal","dose_mg":15,"dosing_weight_kg":50.0},"check":"half-way dose rounds up to next 5 mg","expected":{"basis":"ideal","dose_mg":15,"dosing_weight_kg":50.0},"passed":true},{"actual":{"basis":"ideal","dose_mg":1003,"dosing_weight_kg":50.0},"check":"ceiling applied after rounding","expected":{"basis":"ideal","dose_mg":1003,"dosing_weight_kg":50.0},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"pound entry converted to kilograms\", \"actual\": {\"basis\": \"actual\", \"dosing_weight_kg\": 70.0, \"dose_mg\": 70}, \"expected\": {\"basis\": \"actual\", \"dosing_weight_kg\": 70.0, \"dose_mg\": 70}, \"passed\": true}, {\"check\": \"pound entry below ideal weight\", \"actual\": {\"basis\": \"actual\", \"dosing_weight_kg\": 50.0, \"dose_mg\": 100}, \"expected\": {\"basis\": \"actual\", \"dosing_weight_kg\": 50.0, \"dose_mg\": 100}, \"passed\": true}, {\"check\": \"short stature keeps base ideal weight\", \"actual\": {\"basis\": \"ideal\", \"dosing_weight_kg\": 45.5, \"dose_mg\": 45}, \"expected\": {\"basis\": \"ideal\", \"dosing_weight_kg\": 45.5, \"dose_mg\": 45}, \"passed\": true}, {\"check\": \"exactly 120 percent of ideal stays ideal\", \"actual\": {\"basis\": \"ideal\", \"dosing_weight_kg\": 50.0, \"dose_mg\": 100}, \"expected\": {\"basis\": \"ideal\", \"dosing_weight_kg\": 50.0, \"dose_mg\": 100}, \"passed\": true}, {\"check\": \"obese patient uses adjusted weight\", \"actual\": {\"basis\": \"adjusted\", \"dosing_weight_kg\": 115.0, \"dose_mg\": 230}, \"expected\": {\"basis\": \"adjusted\", \"dosing_weight_kg\": 85.8, \"dose_mg\": 170}, \"passed\": false}, {\"check\": \"within ideal band control\", \"actual\": {\"basis\": \"ideal\", \"dosing_weight_kg\": 54.7, \"dose_mg\": 165}, \"expected\": {\"basis\": \"ideal\", \"dosing_weight_kg\": 54.7, \"dose_mg\": 165}, \"passed\": true}, {\"check\": \"underweight uses actual weight\", \"actual\": {\"basis\": \"actual\", \"dosing_weight_kg\": 61.0, \"dose_mg\": 60}, \"expected\": {\"basis\": \"actual\", \"dosing_weight_kg\": 61.0, \"dose_mg\": 60}, \"passed\": true}, {\"check\": \"half-way dose rounds up to next 5 mg\", \"actual\": {\"basis\": \"ideal\", \"dosing_weight_kg\": 50.0, \"dose_mg\": 15}, \"expected\": {\"basis\": \"ideal\", \"dosing_weight_kg\": 50.0, \"dose_mg\": 15}, \"passed\": true}, {\"check\": \"ceiling applied after rounding\", \"actual\": {\"basis\": \"ideal\", \"dosing_weight_kg\": 50.0, \"dose_mg\": 1003}, \"expected\": {\"basis\": \"ideal\", \"dosing_weight_kg\": 50.0, \"dose_mg\": 1003}, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":43.906,"exit_code":0,"observations":[{"actual":{"basis":"actual","dose_mg":70,"dosing_weight_kg":70.0},"check":"pound entry converted to kilograms","expected":{"basis":"actual","dose_mg":70,"dosing_weight_kg":70.0},"passed":true},{"actual":{"basis":"actual","dose_mg":100,"dosing_weight_kg":50.0},"check":"pound entry below ideal weight","expected":{"basis":"actual","dose_mg":100,"dosing_weight_kg":50.0},"passed":true},{"actual":{"basis":"ideal","dose_mg":45,"dosing_weight_kg":45.5},"check":"short stature keeps base ideal weight","expected":{"basis":"ideal","dose_mg":45,"dosing_weight_kg":45.5},"passed":true},{"actual":{"basis":"ideal","dose_mg":100,"dosing_weight_kg":50.0},"check":"exactly 120 percent of ideal stays ideal","expected":{"basis":"ideal","dose_mg":100,"dosing_weight_kg":50.0},"passed":true},{"actual":{"basis":"adjusted","dose_mg":170,"dosing_weight_kg":85.8},"check":"obese patient uses adjusted weight","expected":{"basis":"adjusted","dose_mg":170,"dosing_weight_kg":85.8},"passed":true},{"actual":{"basis":"ideal","dose_mg":165,"dosing_weight_kg":54.7},"check":"within ideal band control","expected":{"basis":"ideal","dose_mg":165,"dosing_weight_kg":54.7},"passed":true},{"actual":{"basis":"actual","dose_mg":60,"dosing_weight_kg":61.0},"check":"underweight uses actual weight","expected":{"basis":"actual","dose_mg":60,"dosing_weight_kg":61.0},"passed":true},{"actual":{"basis":"ideal","dose_mg":15,"dosing_weight_kg":50.0},"check":"half-way dose rounds up to next 5 mg","expected":{"basis":"ideal","dose_mg":15,"dosing_weight_kg":50.0},"passed":true},{"actual":{"basis":"ideal","dose_mg":1003,"dosing_weight_kg":50.0},"check":"ceiling applied after rounding","expected":{"basis":"ideal","dose_mg":1003,"dosing_weight_kg":50.0},"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"pound entry converted to kilograms\", \"actual\": {\"basis\": \"actual\", \"dosing_weight_kg\": 70.0, \"dose_mg\": 70}, \"expected\": {\"basis\": \"actual\", \"dosing_weight_kg\": 70.0, \"dose_mg\": 70}, \"passed\": true}, {\"check\": \"pound entry below ideal weight\", \"actual\": {\"basis\": \"actual\", \"dosing_weight_kg\": 50.0, \"dose_mg\": 100}, \"expected\": {\"basis\": \"actual\", \"dosing_weight_kg\": 50.0, \"dose_mg\": 100}, \"passed\": true}, {\"check\": \"short stature keeps base ideal weight\", \"actual\": {\"basis\": \"ideal\", \"dosing_weight_kg\": 45.5, \"dose_mg\": 45}, \"expected\": {\"basis\": \"ideal\", \"dosing_weight_kg\": 45.5, \"dose_mg\": 45}, \"passed\": true}, {\"check\": \"exactly 120 percent of ideal stays ideal\", \"actual\": {\"basis\": \"ideal\", \"dosing_weight_kg\": 50.0, \"dose_mg\": 100}, \"expected\": {\"basis\": \"ideal\", \"dosing_weight_kg\": 50.0, \"dose_mg\": 100}, \"passed\": true}, {\"check\": \"obese patient uses adjusted weight\", \"actual\": {\"basis\": \"adjusted\", \"dosing_weight_kg\": 85.8, \"dose_mg\": 170}, \"expected\": {\"basis\": \"adjusted\", \"dosing_weight_kg\": 85.8, \"dose_mg\": 170}, \"passed\": true}, {\"check\": \"within ideal band control\", \"actual\": {\"basis\": \"ideal\", \"dosing_weight_kg\": 54.7, \"dose_mg\": 165}, \"expected\": {\"basis\": \"ideal\", \"dosing_weight_kg\": 54.7, \"dose_mg\": 165}, \"passed\": true}, {\"check\": \"underweight uses actual weight\", \"actual\": {\"basis\": \"actual\", \"dosing_weight_kg\": 61.0, \"dose_mg\": 60}, \"expected\": {\"basis\": \"actual\", \"dosing_weight_kg\": 61.0, \"dose_mg\": 60}, \"passed\": true}, {\"check\": \"half-way dose rounds up to next 5 mg\", \"actual\": {\"basis\": \"ideal\", \"dosing_weight_kg\": 50.0, \"dose_mg\": 15}, \"expected\": {\"basis\": \"ideal\", \"dosing_weight_kg\": 50.0, \"dose_mg\": 15}, \"passed\": true}, {\"check\": \"ceiling applied after rounding\", \"actual\": {\"basis\": \"ideal\", \"dosing_weight_kg\": 50.0, \"dose_mg\": 1003}, \"expected\": {\"basis\": \"ideal\", \"dosing_weight_kg\": 50.0, \"dose_mg\": 1003}, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}