FA-64077 / Medication dosing calculations / Member archive
Pharmacokinetic loading and maintenance doses: existing level credit · case 02
Patients already partly loaded receive a full loading dose.
Case contract
Input {target, current, vd_l_kg, weight_kg, f, cl_ml_min, tau_h, unit_mg}. Toy one-compartment rule: loading = max(0, (target-current)*Vd*weight/F); maintenance = target*CL*tau/F with CL in L/h = cl_ml_min*60/1000. Both are rounded half-up to a multiple of unit_mg. Return {loading_mg, maintenance_mg}.
Why this case matters
Loading and maintenance calculations chain unit conversions and bioavailability; each factor is an independent defect site.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| partial existing level credited | {"loading_mg": 1000.0, "maintenance_mg": 950.0} | {"loading_mg": 650.0, "maintenance_mg": 950.0} | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗