{"abstract":"A 15 gtt/mL macrodrip set is counted as if it were a 60 gtt/mL microdrip set.","category":"Medication dosing calculations","checks":6,"contract":"Input {volume_ml, duration_min, drop_factor (gtt/mL), start \"HH:MM\" 24-hour}. drops/min = volume*drop_factor/duration rounded half-up to a whole drop; mL/h = volume*60/duration rounded half-up to 0.1; end = start + duration on a 24-hour clock with day_offset = number of midnights crossed (ending exactly at 00:00 counts as the next day). Return {gtt_min, ml_h, end, day_offset}.","evaluation_group":"w2-meddose-gravity-drip","failed_approach":"Dividing by 60 instead of the duration only works for one-hour infusions.","family":"w2-meddose-gravity-drip-drop-factor-application","id":"FA-64101","implementations":{"attempt":{"sha256":"2170ddb3adf3ac9159e8669f34a715757fedc6272a8c7e4c88a1fdd924880212","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(x):\n    gtt = Fraction(x['volume_ml'] * x['drop_factor'], 60)\n    gtt_i = math.floor(gtt + Fraction(1, 2))\n    mlh = Fraction(x['volume_ml'] * 60, x['duration_min'])\n    mlh_t = math.floor(mlh * 10 + Fraction(1, 2))\n    h, m = map(int, x['start'].split(':'))\n    total = h * 60 + m + x['duration_min']\n    day = total // 1440\n    total = total % 1440\n    return {'gtt_min': gtt_i, 'ml_h': mlh_t / 10, 'end': '%02d:%02d' % (total // 60, total % 60), 'day_offset': day}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('macrodrip set afternoon start',\n   {'volume_ml': 1000, 'duration_min': 480, 'drop_factor': 15, 'start': '14:05'},\n   {'gtt_min': 31, 'ml_h': 125.0, 'end': '22:05', 'day_offset': 0}),\n  ('drop rate rounds half up',\n   {'volume_ml': 250, 'duration_min': 100, 'drop_factor': 15, 'start': '08:00'},\n   {'gtt_min': 38, 'ml_h': 150.0, 'end': '09:40', 'day_offset': 0}),\n  ('fractional drop rate rounds down',\n   {'volume_ml': 103, 'duration_min': 60, 'drop_factor': 20, 'start': '09:30'},\n   {'gtt_min': 34, 'ml_h': 103.0, 'end': '10:30', 'day_offset': 0}),\n  ('ends exactly at midnight',\n   {'volume_ml': 500, 'duration_min': 150, 'drop_factor': 20, 'start': '22:00'},\n   {'gtt_min': 67, 'ml_h': 200.0, 'end': '00:30', 'day_offset': 1}),\n  ('multi-day infusion',\n   {'volume_ml': 2000, 'duration_min': 2940, 'drop_factor': 60, 'start': '13:15'},\n   {'gtt_min': 41, 'ml_h': 40.8, 'end': '14:15', 'day_offset': 2}),\n  ('short microdrip before noon',\n   {'volume_ml': 50, 'duration_min': 31, 'drop_factor': 60, 'start': '10:45'},\n   {'gtt_min': 97, 'ml_h': 96.8, 'end': '11:16', 'day_offset': 0})],\n [('macrodrip set afternoon start',\n   {'volume_ml': 1000, 'duration_min': 480, 'drop_factor': 20, 'start': '14:10'},\n   {'gtt_min': 42, 'ml_h': 125.0, 'end': '22:10', 'day_offset': 0}),\n  ('drop rate rounds half up',\n   {'volume_ml': 250, 'duration_min': 100, 'drop_factor': 15, 'start': '08:00'},\n   {'gtt_min': 38, 'ml_h': 150.0, 'end': '09:40', 'day_offset': 0}),\n  ('fractional drop rate rounds down',\n   {'volume_ml': 106, 'duration_min': 60, 'drop_factor': 20, 'start': '09:30'},\n   {'gtt_min': 35, 'ml_h': 106.0, 'end': '10:30', 'day_offset': 0}),\n  ('ends exactly at midnight',\n   {'volume_ml': 500, 'duration_min': 180, 'drop_factor': 20, 'start': '21:30'},\n   {'gtt_min': 56, 'ml_h': 166.7, 'end': '00:30', 'day_offset': 1}),\n  ('multi-day infusion',\n   {'volume_ml': 2000, 'duration_min': 3000, 'drop_factor': 60, 'start': '13:15'},\n   {'gtt_min': 40, 'ml_h': 40.0, 'end': '15:15', 'day_offset': 2}),\n  ('short microdrip before noon',\n   {'volume_ml': 50, 'duration_min': 32, 'drop_factor': 60, 'start': '10:45'},\n   {'gtt_min': 94, 'ml_h': 93.8, 'end': '11:17', 'day_offset': 0})],\n [('macrodrip set afternoon start',\n   {'volume_ml': 1000, 'duration_min': 480, 'drop_factor': 10, 'start': '14:15'},\n   {'gtt_min': 21, 'ml_h': 125.0, 'end': '22:15', 'day_offset': 0}),\n  ('drop rate rounds half up',\n   {'volume_ml': 250, 'duration_min': 100, 'drop_factor': 10, 'start': '08:00'},\n   {'gtt_min': 25, 'ml_h': 150.0, 'end': '09:40', 'day_offset': 0}),\n  ('fractional drop rate rounds down',\n   {'volume_ml': 109, 'duration_min': 60, 'drop_factor': 20, 'start': '09:30'},\n   {'gtt_min': 36, 'ml_h': 109.0, 'end': '10:30', 'day_offset': 0}),\n  ('ends exactly at midnight',\n   {'volume_ml': 500, 'duration_min': 210, 'drop_factor': 20, 'start': '21:00'},\n   {'gtt_min': 48, 'ml_h': 142.9, 'end': '00:30', 'day_offset': 1}),\n  ('multi-day infusion',\n   {'volume_ml': 2000, 'duration_min': 3060, 'drop_factor': 60, 'start': '13:15'},\n   {'gtt_min': 39, 'ml_h': 39.2, 'end': '16:15', 'day_offset': 2}),\n  ('short microdrip before noon',\n   {'volume_ml': 50, 'duration_min': 33, 'drop_factor': 60, 'start': '10:45'},\n   {'gtt_min': 91, 'ml_h': 90.9, 'end': '11:18', 'day_offset': 0})],\n [('macrodrip set afternoon start',\n   {'volume_ml': 1000, 'duration_min': 480, 'drop_factor': 15, 'start': '14:20'},\n   {'gtt_min': 31, 'ml_h': 125.0, 'end': '22:20', 'day_offset': 0}),\n  ('drop rate rounds half up',\n   {'volume_ml': 250, 'duration_min': 100, 'drop_factor': 20, 'start': '08:00'},\n   {'gtt_min': 50, 'ml_h': 150.0, 'end': '09:40', 'day_offset': 0}),\n  ('fractional drop rate rounds down',\n   {'volume_ml': 112, 'duration_min': 60, 'drop_factor': 20, 'start': '09:30'},\n   {'gtt_min': 37, 'ml_h': 112.0, 'end': '10:30', 'day_offset': 0}),\n  ('ends exactly at midnight',\n   {'volume_ml': 500, 'duration_min': 240, 'drop_factor': 20, 'start': '20:30'},\n   {'gtt_min': 42, 'ml_h': 125.0, 'end': '00:30', 'day_offset': 1}),\n  ('multi-day infusion',\n   {'volume_ml': 2000, 'duration_min': 3120, 'drop_factor': 60, 'start': '13:15'},\n   {'gtt_min': 38, 'ml_h': 38.5, 'end': '17:15', 'day_offset': 2}),\n  ('short microdrip before noon',\n   {'volume_ml': 50, 'duration_min': 34, 'drop_factor': 60, 'start': '10:45'},\n   {'gtt_min': 88, 'ml_h': 88.2, 'end': '11:19', 'day_offset': 0})],\n [('macrodrip set afternoon start',\n   {'volume_ml': 1000, 'duration_min': 480, 'drop_factor': 20, 'start': '14:25'},\n   {'gtt_min': 42, 'ml_h': 125.0, 'end': '22:25', 'day_offset': 0}),\n  ('drop rate rounds half up',\n   {'volume_ml': 250, 'duration_min': 100, 'drop_factor': 15, 'start': '08:00'},\n   {'gtt_min': 38, 'ml_h': 150.0, 'end': '09:40', 'day_offset': 0}),\n  ('fractional drop rate rounds down',\n   {'volume_ml': 115, 'duration_min': 60, 'drop_factor': 20, 'start': '09:30'},\n   {'gtt_min': 38, 'ml_h': 115.0, 'end': '10:30', 'day_offset': 0}),\n  ('ends exactly at midnight',\n   {'volume_ml': 500, 'duration_min': 270, 'drop_factor': 20, 'start': '20:00'},\n   {'gtt_min': 37, 'ml_h': 111.1, 'end': '00:30', 'day_offset': 1}),\n  ('multi-day infusion',\n   {'volume_ml': 2000, 'duration_min': 3180, 'drop_factor': 60, 'start': '13:15'},\n   {'gtt_min': 38, 'ml_h': 37.7, 'end': '18:15', 'day_offset': 2}),\n  ('short microdrip before noon',\n   {'volume_ml': 50, 'duration_min': 35, 'drop_factor': 60, 'start': '10:45'},\n   {'gtt_min': 86, 'ml_h': 85.7, 'end': '11:20', 'day_offset': 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":"831754e1a7be81f3854b7933f38ae3291b0028b6668cf3d48cc602a53609a46b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(x):\n    gtt = Fraction(x['volume_ml'] * 60, x['duration_min'])\n    gtt_i = math.floor(gtt + Fraction(1, 2))\n    mlh = Fraction(x['volume_ml'] * 60, x['duration_min'])\n    mlh_t = math.floor(mlh * 10 + Fraction(1, 2))\n    h, m = map(int, x['start'].split(':'))\n    total = h * 60 + m + x['duration_min']\n    day = total // 1440\n    total = total % 1440\n    return {'gtt_min': gtt_i, 'ml_h': mlh_t / 10, 'end': '%02d:%02d' % (total // 60, total % 60), 'day_offset': day}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('macrodrip set afternoon start',\n   {'volume_ml': 1000, 'duration_min': 480, 'drop_factor': 15, 'start': '14:05'},\n   {'gtt_min': 31, 'ml_h': 125.0, 'end': '22:05', 'day_offset': 0}),\n  ('drop rate rounds half up',\n   {'volume_ml': 250, 'duration_min': 100, 'drop_factor': 15, 'start': '08:00'},\n   {'gtt_min': 38, 'ml_h': 150.0, 'end': '09:40', 'day_offset': 0}),\n  ('fractional drop rate rounds down',\n   {'volume_ml': 103, 'duration_min': 60, 'drop_factor': 20, 'start': '09:30'},\n   {'gtt_min': 34, 'ml_h': 103.0, 'end': '10:30', 'day_offset': 0}),\n  ('ends exactly at midnight',\n   {'volume_ml': 500, 'duration_min': 150, 'drop_factor': 20, 'start': '22:00'},\n   {'gtt_min': 67, 'ml_h': 200.0, 'end': '00:30', 'day_offset': 1}),\n  ('multi-day infusion',\n   {'volume_ml': 2000, 'duration_min': 2940, 'drop_factor': 60, 'start': '13:15'},\n   {'gtt_min': 41, 'ml_h': 40.8, 'end': '14:15', 'day_offset': 2}),\n  ('short microdrip before noon',\n   {'volume_ml': 50, 'duration_min': 31, 'drop_factor': 60, 'start': '10:45'},\n   {'gtt_min': 97, 'ml_h': 96.8, 'end': '11:16', 'day_offset': 0})],\n [('macrodrip set afternoon start',\n   {'volume_ml': 1000, 'duration_min': 480, 'drop_factor': 20, 'start': '14:10'},\n   {'gtt_min': 42, 'ml_h': 125.0, 'end': '22:10', 'day_offset': 0}),\n  ('drop rate rounds half up',\n   {'volume_ml': 250, 'duration_min': 100, 'drop_factor': 15, 'start': '08:00'},\n   {'gtt_min': 38, 'ml_h': 150.0, 'end': '09:40', 'day_offset': 0}),\n  ('fractional drop rate rounds down',\n   {'volume_ml': 106, 'duration_min': 60, 'drop_factor': 20, 'start': '09:30'},\n   {'gtt_min': 35, 'ml_h': 106.0, 'end': '10:30', 'day_offset': 0}),\n  ('ends exactly at midnight',\n   {'volume_ml': 500, 'duration_min': 180, 'drop_factor': 20, 'start': '21:30'},\n   {'gtt_min': 56, 'ml_h': 166.7, 'end': '00:30', 'day_offset': 1}),\n  ('multi-day infusion',\n   {'volume_ml': 2000, 'duration_min': 3000, 'drop_factor': 60, 'start': '13:15'},\n   {'gtt_min': 40, 'ml_h': 40.0, 'end': '15:15', 'day_offset': 2}),\n  ('short microdrip before noon',\n   {'volume_ml': 50, 'duration_min': 32, 'drop_factor': 60, 'start': '10:45'},\n   {'gtt_min': 94, 'ml_h': 93.8, 'end': '11:17', 'day_offset': 0})],\n [('macrodrip set afternoon start',\n   {'volume_ml': 1000, 'duration_min': 480, 'drop_factor': 10, 'start': '14:15'},\n   {'gtt_min': 21, 'ml_h': 125.0, 'end': '22:15', 'day_offset': 0}),\n  ('drop rate rounds half up',\n   {'volume_ml': 250, 'duration_min': 100, 'drop_factor': 10, 'start': '08:00'},\n   {'gtt_min': 25, 'ml_h': 150.0, 'end': '09:40', 'day_offset': 0}),\n  ('fractional drop rate rounds down',\n   {'volume_ml': 109, 'duration_min': 60, 'drop_factor': 20, 'start': '09:30'},\n   {'gtt_min': 36, 'ml_h': 109.0, 'end': '10:30', 'day_offset': 0}),\n  ('ends exactly at midnight',\n   {'volume_ml': 500, 'duration_min': 210, 'drop_factor': 20, 'start': '21:00'},\n   {'gtt_min': 48, 'ml_h': 142.9, 'end': '00:30', 'day_offset': 1}),\n  ('multi-day infusion',\n   {'volume_ml': 2000, 'duration_min': 3060, 'drop_factor': 60, 'start': '13:15'},\n   {'gtt_min': 39, 'ml_h': 39.2, 'end': '16:15', 'day_offset': 2}),\n  ('short microdrip before noon',\n   {'volume_ml': 50, 'duration_min': 33, 'drop_factor': 60, 'start': '10:45'},\n   {'gtt_min': 91, 'ml_h': 90.9, 'end': '11:18', 'day_offset': 0})],\n [('macrodrip set afternoon start',\n   {'volume_ml': 1000, 'duration_min': 480, 'drop_factor': 15, 'start': '14:20'},\n   {'gtt_min': 31, 'ml_h': 125.0, 'end': '22:20', 'day_offset': 0}),\n  ('drop rate rounds half up',\n   {'volume_ml': 250, 'duration_min': 100, 'drop_factor': 20, 'start': '08:00'},\n   {'gtt_min': 50, 'ml_h': 150.0, 'end': '09:40', 'day_offset': 0}),\n  ('fractional drop rate rounds down',\n   {'volume_ml': 112, 'duration_min': 60, 'drop_factor': 20, 'start': '09:30'},\n   {'gtt_min': 37, 'ml_h': 112.0, 'end': '10:30', 'day_offset': 0}),\n  ('ends exactly at midnight',\n   {'volume_ml': 500, 'duration_min': 240, 'drop_factor': 20, 'start': '20:30'},\n   {'gtt_min': 42, 'ml_h': 125.0, 'end': '00:30', 'day_offset': 1}),\n  ('multi-day infusion',\n   {'volume_ml': 2000, 'duration_min': 3120, 'drop_factor': 60, 'start': '13:15'},\n   {'gtt_min': 38, 'ml_h': 38.5, 'end': '17:15', 'day_offset': 2}),\n  ('short microdrip before noon',\n   {'volume_ml': 50, 'duration_min': 34, 'drop_factor': 60, 'start': '10:45'},\n   {'gtt_min': 88, 'ml_h': 88.2, 'end': '11:19', 'day_offset': 0})],\n [('macrodrip set afternoon start',\n   {'volume_ml': 1000, 'duration_min': 480, 'drop_factor': 20, 'start': '14:25'},\n   {'gtt_min': 42, 'ml_h': 125.0, 'end': '22:25', 'day_offset': 0}),\n  ('drop rate rounds half up',\n   {'volume_ml': 250, 'duration_min': 100, 'drop_factor': 15, 'start': '08:00'},\n   {'gtt_min': 38, 'ml_h': 150.0, 'end': '09:40', 'day_offset': 0}),\n  ('fractional drop rate rounds down',\n   {'volume_ml': 115, 'duration_min': 60, 'drop_factor': 20, 'start': '09:30'},\n   {'gtt_min': 38, 'ml_h': 115.0, 'end': '10:30', 'day_offset': 0}),\n  ('ends exactly at midnight',\n   {'volume_ml': 500, 'duration_min': 270, 'drop_factor': 20, 'start': '20:00'},\n   {'gtt_min': 37, 'ml_h': 111.1, 'end': '00:30', 'day_offset': 1}),\n  ('multi-day infusion',\n   {'volume_ml': 2000, 'duration_min': 3180, 'drop_factor': 60, 'start': '13:15'},\n   {'gtt_min': 38, 'ml_h': 37.7, 'end': '18:15', 'day_offset': 2}),\n  ('short microdrip before noon',\n   {'volume_ml': 50, 'duration_min': 35, 'drop_factor': 60, 'start': '10:45'},\n   {'gtt_min': 86, 'ml_h': 85.7, 'end': '11:20', 'day_offset': 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"},"fixed":{"sha256":"12873decc47feb680c6b69ec2a87c9deaf9d737a7a98868fa6c518f9f8abd494","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(x):\n    gtt = Fraction(x['volume_ml'] * x['drop_factor'], x['duration_min'])\n    gtt_i = math.floor(gtt + Fraction(1, 2))\n    mlh = Fraction(x['volume_ml'] * 60, x['duration_min'])\n    mlh_t = math.floor(mlh * 10 + Fraction(1, 2))\n    h, m = map(int, x['start'].split(':'))\n    total = h * 60 + m + x['duration_min']\n    day = total // 1440\n    total = total % 1440\n    return {'gtt_min': gtt_i, 'ml_h': mlh_t / 10, 'end': '%02d:%02d' % (total // 60, total % 60), 'day_offset': day}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('macrodrip set afternoon start',\n   {'volume_ml': 1000, 'duration_min': 480, 'drop_factor': 15, 'start': '14:05'},\n   {'gtt_min': 31, 'ml_h': 125.0, 'end': '22:05', 'day_offset': 0}),\n  ('drop rate rounds half up',\n   {'volume_ml': 250, 'duration_min': 100, 'drop_factor': 15, 'start': '08:00'},\n   {'gtt_min': 38, 'ml_h': 150.0, 'end': '09:40', 'day_offset': 0}),\n  ('fractional drop rate rounds down',\n   {'volume_ml': 103, 'duration_min': 60, 'drop_factor': 20, 'start': '09:30'},\n   {'gtt_min': 34, 'ml_h': 103.0, 'end': '10:30', 'day_offset': 0}),\n  ('ends exactly at midnight',\n   {'volume_ml': 500, 'duration_min': 150, 'drop_factor': 20, 'start': '22:00'},\n   {'gtt_min': 67, 'ml_h': 200.0, 'end': '00:30', 'day_offset': 1}),\n  ('multi-day infusion',\n   {'volume_ml': 2000, 'duration_min': 2940, 'drop_factor': 60, 'start': '13:15'},\n   {'gtt_min': 41, 'ml_h': 40.8, 'end': '14:15', 'day_offset': 2}),\n  ('short microdrip before noon',\n   {'volume_ml': 50, 'duration_min': 31, 'drop_factor': 60, 'start': '10:45'},\n   {'gtt_min': 97, 'ml_h': 96.8, 'end': '11:16', 'day_offset': 0})],\n [('macrodrip set afternoon start',\n   {'volume_ml': 1000, 'duration_min': 480, 'drop_factor': 20, 'start': '14:10'},\n   {'gtt_min': 42, 'ml_h': 125.0, 'end': '22:10', 'day_offset': 0}),\n  ('drop rate rounds half up',\n   {'volume_ml': 250, 'duration_min': 100, 'drop_factor': 15, 'start': '08:00'},\n   {'gtt_min': 38, 'ml_h': 150.0, 'end': '09:40', 'day_offset': 0}),\n  ('fractional drop rate rounds down',\n   {'volume_ml': 106, 'duration_min': 60, 'drop_factor': 20, 'start': '09:30'},\n   {'gtt_min': 35, 'ml_h': 106.0, 'end': '10:30', 'day_offset': 0}),\n  ('ends exactly at midnight',\n   {'volume_ml': 500, 'duration_min': 180, 'drop_factor': 20, 'start': '21:30'},\n   {'gtt_min': 56, 'ml_h': 166.7, 'end': '00:30', 'day_offset': 1}),\n  ('multi-day infusion',\n   {'volume_ml': 2000, 'duration_min': 3000, 'drop_factor': 60, 'start': '13:15'},\n   {'gtt_min': 40, 'ml_h': 40.0, 'end': '15:15', 'day_offset': 2}),\n  ('short microdrip before noon',\n   {'volume_ml': 50, 'duration_min': 32, 'drop_factor': 60, 'start': '10:45'},\n   {'gtt_min': 94, 'ml_h': 93.8, 'end': '11:17', 'day_offset': 0})],\n [('macrodrip set afternoon start',\n   {'volume_ml': 1000, 'duration_min': 480, 'drop_factor': 10, 'start': '14:15'},\n   {'gtt_min': 21, 'ml_h': 125.0, 'end': '22:15', 'day_offset': 0}),\n  ('drop rate rounds half up',\n   {'volume_ml': 250, 'duration_min': 100, 'drop_factor': 10, 'start': '08:00'},\n   {'gtt_min': 25, 'ml_h': 150.0, 'end': '09:40', 'day_offset': 0}),\n  ('fractional drop rate rounds down',\n   {'volume_ml': 109, 'duration_min': 60, 'drop_factor': 20, 'start': '09:30'},\n   {'gtt_min': 36, 'ml_h': 109.0, 'end': '10:30', 'day_offset': 0}),\n  ('ends exactly at midnight',\n   {'volume_ml': 500, 'duration_min': 210, 'drop_factor': 20, 'start': '21:00'},\n   {'gtt_min': 48, 'ml_h': 142.9, 'end': '00:30', 'day_offset': 1}),\n  ('multi-day infusion',\n   {'volume_ml': 2000, 'duration_min': 3060, 'drop_factor': 60, 'start': '13:15'},\n   {'gtt_min': 39, 'ml_h': 39.2, 'end': '16:15', 'day_offset': 2}),\n  ('short microdrip before noon',\n   {'volume_ml': 50, 'duration_min': 33, 'drop_factor': 60, 'start': '10:45'},\n   {'gtt_min': 91, 'ml_h': 90.9, 'end': '11:18', 'day_offset': 0})],\n [('macrodrip set afternoon start',\n   {'volume_ml': 1000, 'duration_min': 480, 'drop_factor': 15, 'start': '14:20'},\n   {'gtt_min': 31, 'ml_h': 125.0, 'end': '22:20', 'day_offset': 0}),\n  ('drop rate rounds half up',\n   {'volume_ml': 250, 'duration_min': 100, 'drop_factor': 20, 'start': '08:00'},\n   {'gtt_min': 50, 'ml_h': 150.0, 'end': '09:40', 'day_offset': 0}),\n  ('fractional drop rate rounds down',\n   {'volume_ml': 112, 'duration_min': 60, 'drop_factor': 20, 'start': '09:30'},\n   {'gtt_min': 37, 'ml_h': 112.0, 'end': '10:30', 'day_offset': 0}),\n  ('ends exactly at midnight',\n   {'volume_ml': 500, 'duration_min': 240, 'drop_factor': 20, 'start': '20:30'},\n   {'gtt_min': 42, 'ml_h': 125.0, 'end': '00:30', 'day_offset': 1}),\n  ('multi-day infusion',\n   {'volume_ml': 2000, 'duration_min': 3120, 'drop_factor': 60, 'start': '13:15'},\n   {'gtt_min': 38, 'ml_h': 38.5, 'end': '17:15', 'day_offset': 2}),\n  ('short microdrip before noon',\n   {'volume_ml': 50, 'duration_min': 34, 'drop_factor': 60, 'start': '10:45'},\n   {'gtt_min': 88, 'ml_h': 88.2, 'end': '11:19', 'day_offset': 0})],\n [('macrodrip set afternoon start',\n   {'volume_ml': 1000, 'duration_min': 480, 'drop_factor': 20, 'start': '14:25'},\n   {'gtt_min': 42, 'ml_h': 125.0, 'end': '22:25', 'day_offset': 0}),\n  ('drop rate rounds half up',\n   {'volume_ml': 250, 'duration_min': 100, 'drop_factor': 15, 'start': '08:00'},\n   {'gtt_min': 38, 'ml_h': 150.0, 'end': '09:40', 'day_offset': 0}),\n  ('fractional drop rate rounds down',\n   {'volume_ml': 115, 'duration_min': 60, 'drop_factor': 20, 'start': '09:30'},\n   {'gtt_min': 38, 'ml_h': 115.0, 'end': '10:30', 'day_offset': 0}),\n  ('ends exactly at midnight',\n   {'volume_ml': 500, 'duration_min': 270, 'drop_factor': 20, 'start': '20:00'},\n   {'gtt_min': 37, 'ml_h': 111.1, 'end': '00:30', 'day_offset': 1}),\n  ('multi-day infusion',\n   {'volume_ml': 2000, 'duration_min': 3180, 'drop_factor': 60, 'start': '13:15'},\n   {'gtt_min': 38, 'ml_h': 37.7, 'end': '18:15', 'day_offset': 2}),\n  ('short microdrip before noon',\n   {'volume_ml': 50, 'duration_min': 35, 'drop_factor': 60, 'start': '10:45'},\n   {'gtt_min': 86, 'ml_h': 85.7, 'end': '11:20', 'day_offset': 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-gravity-drip-drop-factor-application","generated_at":"2026-09-29T14:47:21.166409+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Manual gravity infusions depend on drop-factor arithmetic and clock arithmetic across midnight, each with its own failure modes.","repair":"Multiply volume by the set drop factor and divide by the duration in minutes.","root_cause":"The drop calculation hard-codes 60 drops per mL instead of using the administration set drop factor.","sha256":"0c79fab47b7919d5c689be642cf15d9e32f602b3117b185379b4fe85bae02358","title":"Gravity drip rate and infusion end time: drop factor application · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.63,"exit_code":1,"observations":[{"actual":{"day_offset":0,"end":"22:05","gtt_min":250,"ml_h":125.0},"check":"macrodrip set afternoon start","expected":{"day_offset":0,"end":"22:05","gtt_min":31,"ml_h":125.0},"passed":false},{"actual":{"day_offset":0,"end":"09:40","gtt_min":63,"ml_h":150.0},"check":"drop rate rounds half up","expected":{"day_offset":0,"end":"09:40","gtt_min":38,"ml_h":150.0},"passed":false},{"actual":{"day_offset":0,"end":"10:30","gtt_min":34,"ml_h":103.0},"check":"fractional drop rate rounds down","expected":{"day_offset":0,"end":"10:30","gtt_min":34,"ml_h":103.0},"passed":true},{"actual":{"day_offset":1,"end":"00:30","gtt_min":167,"ml_h":200.0},"check":"ends exactly at midnight","expected":{"day_offset":1,"end":"00:30","gtt_min":67,"ml_h":200.0},"passed":false},{"actual":{"day_offset":2,"end":"14:15","gtt_min":2000,"ml_h":40.8},"check":"multi-day infusion","expected":{"day_offset":2,"end":"14:15","gtt_min":41,"ml_h":40.8},"passed":false},{"actual":{"day_offset":0,"end":"11:16","gtt_min":50,"ml_h":96.8},"check":"short microdrip before noon","expected":{"day_offset":0,"end":"11:16","gtt_min":97,"ml_h":96.8},"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"macrodrip set afternoon start\", \"actual\": {\"gtt_min\": 250, \"ml_h\": 125.0, \"end\": \"22:05\", \"day_offset\": 0}, \"expected\": {\"gtt_min\": 31, \"ml_h\": 125.0, \"end\": \"22:05\", \"day_offset\": 0}, \"passed\": false}, {\"check\": \"drop rate rounds half up\", \"actual\": {\"gtt_min\": 63, \"ml_h\": 150.0, \"end\": \"09:40\", \"day_offset\": 0}, \"expected\": {\"gtt_min\": 38, \"ml_h\": 150.0, \"end\": \"09:40\", \"day_offset\": 0}, \"passed\": false}, {\"check\": \"fractional drop rate rounds down\", \"actual\": {\"gtt_min\": 34, \"ml_h\": 103.0, \"end\": \"10:30\", \"day_offset\": 0}, \"expected\": {\"gtt_min\": 34, \"ml_h\": 103.0, \"end\": \"10:30\", \"day_offset\": 0}, \"passed\": true}, {\"check\": \"ends exactly at midnight\", \"actual\": {\"gtt_min\": 167, \"ml_h\": 200.0, \"end\": \"00:30\", \"day_offset\": 1}, \"expected\": {\"gtt_min\": 67, \"ml_h\": 200.0, \"end\": \"00:30\", \"day_offset\": 1}, \"passed\": false}, {\"check\": \"multi-day infusion\", \"actual\": {\"gtt_min\": 2000, \"ml_h\": 40.8, \"end\": \"14:15\", \"day_offset\": 2}, \"expected\": {\"gtt_min\": 41, \"ml_h\": 40.8, \"end\": \"14:15\", \"day_offset\": 2}, \"passed\": false}, {\"check\": \"short microdrip before noon\", \"actual\": {\"gtt_min\": 50, \"ml_h\": 96.8, \"end\": \"11:16\", \"day_offset\": 0}, \"expected\": {\"gtt_min\": 97, \"ml_h\": 96.8, \"end\": \"11:16\", \"day_offset\": 0}, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.311,"exit_code":1,"observations":[{"actual":{"day_offset":0,"end":"22:05","gtt_min":125,"ml_h":125.0},"check":"macrodrip set afternoon start","expected":{"day_offset":0,"end":"22:05","gtt_min":31,"ml_h":125.0},"passed":false},{"actual":{"day_offset":0,"end":"09:40","gtt_min":150,"ml_h":150.0},"check":"drop rate rounds half up","expected":{"day_offset":0,"end":"09:40","gtt_min":38,"ml_h":150.0},"passed":false},{"actual":{"day_offset":0,"end":"10:30","gtt_min":103,"ml_h":103.0},"check":"fractional drop rate rounds down","expected":{"day_offset":0,"end":"10:30","gtt_min":34,"ml_h":103.0},"passed":false},{"actual":{"day_offset":1,"end":"00:30","gtt_min":200,"ml_h":200.0},"check":"ends exactly at midnight","expected":{"day_offset":1,"end":"00:30","gtt_min":67,"ml_h":200.0},"passed":false},{"actual":{"day_offset":2,"end":"14:15","gtt_min":41,"ml_h":40.8},"check":"multi-day infusion","expected":{"day_offset":2,"end":"14:15","gtt_min":41,"ml_h":40.8},"passed":true},{"actual":{"day_offset":0,"end":"11:16","gtt_min":97,"ml_h":96.8},"check":"short microdrip before noon","expected":{"day_offset":0,"end":"11:16","gtt_min":97,"ml_h":96.8},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"macrodrip set afternoon start\", \"actual\": {\"gtt_min\": 125, \"ml_h\": 125.0, \"end\": \"22:05\", \"day_offset\": 0}, \"expected\": {\"gtt_min\": 31, \"ml_h\": 125.0, \"end\": \"22:05\", \"day_offset\": 0}, \"passed\": false}, {\"check\": \"drop rate rounds half up\", \"actual\": {\"gtt_min\": 150, \"ml_h\": 150.0, \"end\": \"09:40\", \"day_offset\": 0}, \"expected\": {\"gtt_min\": 38, \"ml_h\": 150.0, \"end\": \"09:40\", \"day_offset\": 0}, \"passed\": false}, {\"check\": \"fractional drop rate rounds down\", \"actual\": {\"gtt_min\": 103, \"ml_h\": 103.0, \"end\": \"10:30\", \"day_offset\": 0}, \"expected\": {\"gtt_min\": 34, \"ml_h\": 103.0, \"end\": \"10:30\", \"day_offset\": 0}, \"passed\": false}, {\"check\": \"ends exactly at midnight\", \"actual\": {\"gtt_min\": 200, \"ml_h\": 200.0, \"end\": \"00:30\", \"day_offset\": 1}, \"expected\": {\"gtt_min\": 67, \"ml_h\": 200.0, \"end\": \"00:30\", \"day_offset\": 1}, \"passed\": false}, {\"check\": \"multi-day infusion\", \"actual\": {\"gtt_min\": 41, \"ml_h\": 40.8, \"end\": \"14:15\", \"day_offset\": 2}, \"expected\": {\"gtt_min\": 41, \"ml_h\": 40.8, \"end\": \"14:15\", \"day_offset\": 2}, \"passed\": true}, {\"check\": \"short microdrip before noon\", \"actual\": {\"gtt_min\": 97, \"ml_h\": 96.8, \"end\": \"11:16\", \"day_offset\": 0}, \"expected\": {\"gtt_min\": 97, \"ml_h\": 96.8, \"end\": \"11:16\", \"day_offset\": 0}, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.384,"exit_code":0,"observations":[{"actual":{"day_offset":0,"end":"22:05","gtt_min":31,"ml_h":125.0},"check":"macrodrip set afternoon start","expected":{"day_offset":0,"end":"22:05","gtt_min":31,"ml_h":125.0},"passed":true},{"actual":{"day_offset":0,"end":"09:40","gtt_min":38,"ml_h":150.0},"check":"drop rate rounds half up","expected":{"day_offset":0,"end":"09:40","gtt_min":38,"ml_h":150.0},"passed":true},{"actual":{"day_offset":0,"end":"10:30","gtt_min":34,"ml_h":103.0},"check":"fractional drop rate rounds down","expected":{"day_offset":0,"end":"10:30","gtt_min":34,"ml_h":103.0},"passed":true},{"actual":{"day_offset":1,"end":"00:30","gtt_min":67,"ml_h":200.0},"check":"ends exactly at midnight","expected":{"day_offset":1,"end":"00:30","gtt_min":67,"ml_h":200.0},"passed":true},{"actual":{"day_offset":2,"end":"14:15","gtt_min":41,"ml_h":40.8},"check":"multi-day infusion","expected":{"day_offset":2,"end":"14:15","gtt_min":41,"ml_h":40.8},"passed":true},{"actual":{"day_offset":0,"end":"11:16","gtt_min":97,"ml_h":96.8},"check":"short microdrip before noon","expected":{"day_offset":0,"end":"11:16","gtt_min":97,"ml_h":96.8},"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"macrodrip set afternoon start\", \"actual\": {\"gtt_min\": 31, \"ml_h\": 125.0, \"end\": \"22:05\", \"day_offset\": 0}, \"expected\": {\"gtt_min\": 31, \"ml_h\": 125.0, \"end\": \"22:05\", \"day_offset\": 0}, \"passed\": true}, {\"check\": \"drop rate rounds half up\", \"actual\": {\"gtt_min\": 38, \"ml_h\": 150.0, \"end\": \"09:40\", \"day_offset\": 0}, \"expected\": {\"gtt_min\": 38, \"ml_h\": 150.0, \"end\": \"09:40\", \"day_offset\": 0}, \"passed\": true}, {\"check\": \"fractional drop rate rounds down\", \"actual\": {\"gtt_min\": 34, \"ml_h\": 103.0, \"end\": \"10:30\", \"day_offset\": 0}, \"expected\": {\"gtt_min\": 34, \"ml_h\": 103.0, \"end\": \"10:30\", \"day_offset\": 0}, \"passed\": true}, {\"check\": \"ends exactly at midnight\", \"actual\": {\"gtt_min\": 67, \"ml_h\": 200.0, \"end\": \"00:30\", \"day_offset\": 1}, \"expected\": {\"gtt_min\": 67, \"ml_h\": 200.0, \"end\": \"00:30\", \"day_offset\": 1}, \"passed\": true}, {\"check\": \"multi-day infusion\", \"actual\": {\"gtt_min\": 41, \"ml_h\": 40.8, \"end\": \"14:15\", \"day_offset\": 2}, \"expected\": {\"gtt_min\": 41, \"ml_h\": 40.8, \"end\": \"14:15\", \"day_offset\": 2}, \"passed\": true}, {\"check\": \"short microdrip before noon\", \"actual\": {\"gtt_min\": 97, \"ml_h\": 96.8, \"end\": \"11:16\", \"day_offset\": 0}, \"expected\": {\"gtt_min\": 97, \"ml_h\": 96.8, \"end\": \"11:16\", \"day_offset\": 0}, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}