Valid look-alike · weight unit · patient PT007
A genuine 150 kg patient
A rule that big numbers must be pounds halves the weight of exactly the patients actual-weight dosing matters most for.
The patient's rows
Exactly what the agent sees for PT007, copied from the chart. The value this mistake misreads is underlined.
| patient_id | age_years | sex | weight | weight_unit |
|---|---|---|---|---|
| PT007 | 45 | M | 150 (the value this mistake misreads) | kg (the value this mistake misreads) |
| patient_id | creatinine | creatinine_unit | collected_at |
|---|---|---|---|
| PT007 | 1.3 | mg/dL | 2026-10-31T07:37 |
| order_id | patient_id | drug | dose_mg | frequency | start_time | status |
|---|---|---|---|---|---|---|
| RX4493 | PT007 | Aldrovexin | 2500 | OD | 2026-10-22T19:16 | active |
| RX7563 | PT007 | Dorvatinex | 50 | OD | 2026-10-23T07:44 | active |
| RX2229 | PT007 | Cylvarone | 1000 | OD | 2026-10-31T23:31 | active |
Two readings of the same rows
Every step is shown. Where the careless reading goes wrong, the value is underlined.
What a careless agent computes
Applies a blanket rule, weights over 140 must be lb, instead of reading the unit column.
- Weight
- 150 read as lb → 68.0 kg (the value this mistake misreads)
- Creatinine
- 1.3 mg/dL (2026-10-31T07:37) read as mg/dL → 1.30 mg/dL
- CrCl
- (140 − 45) × 68.0 ÷ (72 × 1.30) = 69.1 mL/min (the value this mistake misreads)
| Order | Daily dose | Limit | Flagged |
|---|---|---|---|
| RX4493Aldrovexin | 2500 × 1 = 2500 mg | 3000 mgCrCl ≥ 60 | no |
| RX7563Dorvatinex | 50 × 1 = 50 mg | 60 mgCrCl ≥ 40 | no |
| RX2229Cylvarone | 1000 × 1 = 1000 mg | 900 mgCrCl 45-90 (the value this mistake misreads) | yes (the value this mistake misreads) |
Output line: {"crcl_ml_min":69.1,"flagged_order_ids":["RX2229"]}
The correct answer
Reads the unit, status, frequency and time columns as the instruction says, and flags only a daily dose strictly over the band's limit.
- Weight
- 150 read as kg → 150 kg
- Creatinine
- 1.3 mg/dL (2026-10-31T07:37) read as mg/dL → 1.30 mg/dL
- CrCl
- (140 − 45) × 150 ÷ (72 × 1.30) = 152.2 mL/min
| Order | Daily dose | Limit | Flagged |
|---|---|---|---|
| RX4493Aldrovexin | 2500 × 1 = 2500 mg | 3000 mgCrCl ≥ 60 | no |
| RX7563Dorvatinex | 50 × 1 = 50 mg | 60 mgCrCl ≥ 40 | no |
| RX2229Cylvarone | 1000 × 1 = 1000 mg | 1200 mgCrCl ≥ 90 | no |
Output line: {"crcl_ml_min":152.2,"flagged_order_ids":[]}
The tests that catch it
The careless output, graded by the task's real test file. This is what pytest printed.
CrCl within 1% · PT007test_clearance_within_one_percent[PT007]
AssertionError: PT007: CrCl 69.1 vs expected 152.2 (±1%)
Flagged set exact · PT007test_flagged_orders_exact[PT007]
AssertionError: PT007: flagged ['RX2229'] vs expected []
@pytest.mark.parametrize("pid", PATIENT_IDS)
def test_clearance_within_one_percent(by_patient, pid):
assert pid in by_patient, f"no output for {pid}"
got, want = by_patient[pid].get("crcl_ml_min"), EXPECTED[pid]["crcl_ml_min"]
assert isinstance(got, (int, float)) and not isinstance(got, bool)
assert abs(got - want) <= REL_TOL * abs(want), f"{pid}: CrCl {got} vs expected {want} (±{REL_TOL:.0%})"
@pytest.mark.parametrize("pid", PATIENT_IDS)
def test_flagged_orders_exact(by_patient, pid):
assert pid in by_patient, f"no output for {pid}"
got = by_patient[pid].get("flagged_order_ids")
assert isinstance(got, list)
assert set(got) == set(EXPECTED[pid]["flagged_order_ids"]), \
f"{pid}: flagged {sorted(got)} vs expected {EXPECTED[pid]['flagged_order_ids']}"
No other patient's answer moves under this mistake, so this one failure is the whole signal.