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.

patients.csv
patient_idage_yearssexweightweight_unit
PT00490F38kg
labs.csv
patient_idcreatininecreatinine_unitcollected_at
PT00416 (the value this mistake misreads)µmol/L (the value this mistake misreads)2026-11-01T05:43
meds.csv
order_idpatient_iddrugdose_mgfrequencystart_timestatus
RX4564PT004Cylvarone250QDS2026-10-29T11:01active
RX2169PT004Exalmizide1000OD2026-10-17T00:28active

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)
OrderDaily doseLimitFlagged
RX4564Cylvarone250 × 4 = 1000 mg0 mgCrCl < 20 (the value this mistake misreads)yes (the value this mistake misreads)
RX2169Exalmizide1000 × 1 = 1000 mg500 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
OrderDaily doseLimitFlagged
RX4564Cylvarone250 × 4 = 1000 mg1200 mgCrCl ≥ 90no
RX2169Exalmizide1000 × 1 = 1000 mg2000 mgCrCl ≥ 70no

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 []
tests/test_outputs.py
@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%})"
tests/test_outputs.py
@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.