Valid look-alike · creatinine unit · patient PT004
A low creatinine that really is µmol/L
A frail 90-year-old with little muscle has a low creatinine. Guess the unit from the number and she looks like she's in kidney failure.
The patient's rows
Exactly what the agent sees for PT004, copied from the chart. The value this mistake misreads is underlined.
| patient_id | age_years | sex | weight | weight_unit |
|---|---|---|---|---|
| PT004 | 90 | F | 38 | kg |
| patient_id | creatinine | creatinine_unit | collected_at |
|---|---|---|---|
| PT004 | 16 (the value this mistake misreads) | µmol/L (the value this mistake misreads) | 2026-11-01T05:43 |
| order_id | patient_id | drug | dose_mg | frequency | start_time | status |
|---|---|---|---|---|---|---|
| RX4564 | PT004 | Cylvarone | 250 | QDS | 2026-10-29T11:01 | active |
| RX2169 | PT004 | Exalmizide | 1000 | OD | 2026-10-17T00:28 | 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, values under 20 must be mg/dL, instead of reading the unit column.
- Weight
- 38 read as kg → 38 kg
- Creatinine
- 16 µmol/L (2026-11-01T05:43) read as mg/dL → 16 mg/dL (the value this mistake misreads)
- CrCl
- (140 − 90) × 38 ÷ (72 × 16) × 0.85 = 1.4 mL/min (the value this mistake misreads)
| Order | Daily dose | Limit | Flagged |
|---|---|---|---|
| RX4564Cylvarone | 250 × 4 = 1000 mg | 0 mgCrCl < 20 (the value this mistake misreads) | yes (the value this mistake misreads) |
| RX2169Exalmizide | 1000 × 1 = 1000 mg | 500 mgCrCl < 35 (the value this mistake misreads) | yes (the value this mistake misreads) |
Output line: {"crcl_ml_min":1.4,"flagged_order_ids":["RX2169","RX4564"]}
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
- 38 read as kg → 38 kg
- Creatinine
- 16 µmol/L (2026-11-01T05:43) read as µmol/L → 0.18 mg/dL
- Calculated CrCl
- (140 − 90) × 38 ÷ (72 × 0.18) × 0.85 = 123.9 mL/min
| Order | Daily dose | Limit | Flagged |
|---|---|---|---|
| RX4564Cylvarone | 250 × 4 = 1000 mg | 1200 mgCrCl ≥ 90 | no |
| RX2169Exalmizide | 1000 × 1 = 1000 mg | 2000 mgCrCl ≥ 70 | no |
Output line: {"crcl_ml_min":123.9,"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% · PT004test_clearance_within_one_percent[PT004]
AssertionError: PT004: CrCl 1.4 vs expected 123.9 (±1%)
Flagged set exact · PT004test_flagged_orders_exact[PT004]
AssertionError: PT004: flagged ['RX2169', 'RX4564'] 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.