FA-64293 / Medication dosing calculations / Member archive
INR-guided weekly dose adjustment and daily plan: daily plan remainder placement · case 03
The daily plan adds up to less than the weekly total.
Case contract
Input {inr, weekly_mg, low, high}. Toy table: inr >= 5 HOLD and weekly x0.85; high < inr < 5 x0.90; low <= inr <= high CONTINUE unchanged; low-0.5 <= inr < low x1.05; lower x1.10 (ADJUST otherwise). New weekly total rounds half-up to 0.5 mg; the plan spreads it over 7 days in 0.5 mg units as evenly as possible with the larger doses on the first days. Return {action, weekly_mg, plan}.
Why this case matters
Weekly anticoagulant adjustment combines threshold bands with a dispensing plan; band edges and the distribution rule are independent defects.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| high target range above 3 | {"action": "HOLD", "plan": [4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0], "weekly_mg": 30.0} | {"action": "HOLD", "plan": [4.5, 4.5, 4.5, 4.5, 4.0, 4.0, 4.0], "weekly_mg": 30.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 ↗