FA-63915 / Medication dosing calculations / Member archive
mcg/kg/min infusion converted to pump mL/h: pump ceiling comparison · case 05
A rate of exactly 999.9 mL/h is reported as exceeding the pump.
Case contract
Input {dose (mcg/kg/min), weight_kg, drug_mg, bag_ml}. Concentration = drug_mg*1000/bag_ml mcg/mL. Rate mL/h = dose*weight*60/concentration, rounded half-up to 0.1 mL/h. Pump accepts 0.1-999.9 mL/h: a rounded rate above 999.9 returns status EXCEEDS_PUMP, a rounded rate of 0.0 returns BELOW_RESOLUTION; otherwise status OK with rate_ml_h. conc_mcg_ml is always reported.
Why this case matters
Weight-based infusion programming is a classic unit-conversion fault surface: mg vs mcg, per-minute vs per-hour, and pump resolution limits.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| rate exactly at pump maximum | {"conc_mcg_ml": 600.0, "status": "EXCEEDS_PUMP"} | {"conc_mcg_ml": 600.0, "rate_ml_h": 999.9, "status": "OK"} | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗