Trap · frequency · patient PT011

TDS read as twice a day

Three doses counted as two drops the daily total under the limit and hides an overdose.

The patient's rows

Exactly what the agent sees for PT011, copied from the chart. The value this mistake misreads is underlined.

patients.csv
patient_idage_yearssexweightweight_unit
PT01133F55kg
labs.csv
patient_idcreatininecreatinine_unitcollected_at
PT0110.7mg/dL2026-10-31T02:17
meds.csv
order_idpatient_iddrugdose_mgfrequencystart_timestatus
RX1434PT011Dorvatinex15TDS (the value this mistake misreads)2026-10-29T17:35active
RX7981PT011Cylvarone450TDS (the value this mistake misreads)2026-10-23T11:39active

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 TDS, Latin for three times a day, as twice daily.

Weight
55 read as kg → 55 kg
Creatinine
0.7 mg/dL (2026-10-31T02:17) read as mg/dL → 0.70 mg/dL
CrCl
(140 − 33) × 55 ÷ (72 × 0.70) × 0.85 = 99.3 mL/min
OrderDaily doseLimitFlagged
RX1434Dorvatinex15 × 2 = 30 mg (the value this mistake misreads)60 mgCrCl ≥ 40no
RX7981Cylvarone450 × 2 = 900 mg (the value this mistake misreads)1200 mgCrCl ≥ 90no (the value this mistake misreads)

Output line: {"crcl_ml_min":99.3,"flagged_order_ids":[]}

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
55 read as kg → 55 kg
Creatinine
0.7 mg/dL (2026-10-31T02:17) read as mg/dL → 0.70 mg/dL
CrCl
(140 − 33) × 55 ÷ (72 × 0.70) × 0.85 = 99.3 mL/min
OrderDaily doseLimitFlagged
RX1434Dorvatinex15 × 3 = 45 mg60 mgCrCl ≥ 40no
RX7981Cylvarone450 × 3 = 1350 mg1200 mgCrCl ≥ 90yes

Output line: {"crcl_ml_min":99.3,"flagged_order_ids":["RX7981"]}

The test that catches it

The careless output, graded by the task's real test file. This is what pytest printed.

  • Flagged set exact · PT011test_flagged_orders_exact[PT011]

    AssertionError: PT011: flagged [] vs expected ['RX7981']
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.