Trap · creatinine unit · patient PT002
Creatinine in µmol/L read as mg/dL
Kidney function looks 88 times worse than it is, so a drug the patient needs gets withheld.
The patient's rows
Exactly what the agent sees for PT002, copied from the chart. The value this mistake misreads is underlined.
| patient_id | age_years | sex | weight | weight_unit |
|---|---|---|---|---|
| PT002 | 67 | F | 64 | kg |
| patient_id | creatinine | creatinine_unit | collected_at |
|---|---|---|---|
| PT002 | 150 (the value this mistake misreads) | µmol/L (the value this mistake misreads) | 2026-10-31T23:12 |
| order_id | patient_id | drug | dose_mg | frequency | start_time | status |
|---|---|---|---|---|---|---|
| RX3455 | PT002 | Cylvarone | 400 | OD | 2026-10-18T10:59 | active |
| RX1560 | PT002 | Bremazotan | 300 | OD | 2026-10-29T16:20 | 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
Reads 150 µmol/L as 150 mg/dL, skipping the ÷ 88.4 the unit column asks for.
- Weight
- 64 read as kg → 64 kg
- Creatinine
- 150 µmol/L (2026-10-31T23:12) read as mg/dL → 150 mg/dL (the value this mistake misreads)
- CrCl
- (140 − 67) × 64 ÷ (72 × 150) × 0.85 = 0.4 mL/min (the value this mistake misreads)
| Order | Daily dose | Limit | Flagged |
|---|---|---|---|
| RX3455Cylvarone | 400 × 1 = 400 mg | 0 mgCrCl < 20 (the value this mistake misreads) | yes (the value this mistake misreads) |
| RX1560Bremazotan | 300 × 1 = 300 mg | 100 mgCrCl < 25 (the value this mistake misreads) | yes |
Output line: {"crcl_ml_min":0.4,"flagged_order_ids":["RX1560","RX3455"]}
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
- 64 read as kg → 64 kg
- Creatinine
- 150 µmol/L (2026-10-31T23:12) read as µmol/L → 1.70 mg/dL
- CrCl
- (140 − 67) × 64 ÷ (72 × 1.70) × 0.85 = 32.5 mL/min
| Order | Daily dose | Limit | Flagged |
|---|---|---|---|
| RX3455Cylvarone | 400 × 1 = 400 mg | 450 mgCrCl 20-45 | no |
| RX1560Bremazotan | 300 × 1 = 300 mg | 200 mgCrCl 25-50 | yes |
Output line: {"crcl_ml_min":32.5,"flagged_order_ids":["RX1560"]}
The tests that catch it
The careless output, graded by the task's real test file. This is what pytest printed.
CrCl within 1% · PT002test_clearance_within_one_percent[PT002]
AssertionError: PT002: CrCl 0.4 vs expected 32.5 (±1%)
Flagged set exact · PT002test_flagged_orders_exact[PT002]
AssertionError: PT002: flagged ['RX1560', 'RX3455'] vs expected ['RX1560']
@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']}"
The same mistake also changes PT001, PT003, PT004, which share this trap family, and fails 6 more of their tests. No patient from another family moves.