Abstract
In clinical practice, a physician's primary cognitive work is deciding which tests to order and which evidence to acquire: every diagnostic order encodes a clinical hypothesis. Existing medical benchmarks short-circuit this reasoning by supplying pre-assembled complete charts---implicitly revealing which variables matter and creating the largest gap between benchmark scores and real-world deployment.
Even after evidence returns, text notes and final database diffs cannot separate deliberate standing-order continuation from failed execution, or verify that an order change followed reading new results. We introduce DoctorGym, an executable clinical benchmark and reinforcement learning environment spanning 10 frozen tracks (19,297 instances; 4,888 source-distinct patient keys) and three EHR interfaces (MCP tools, semantic DOM, and native OpenEMR 8.5.0) that audits agents across four state-verified stages: evidence acquisition, source-grounded documentation, decision commitment, and persisted order-ledger state.
Evaluating six frontier models and three Qwen3.5-4B checkpoints reveals three systemic gaps: (1) Complete-chart shortcut vs. autonomous inquiry: frontier models saturate at 227--228/228 with pre-supplied labs, yet drop to 107--203/228 when choosing the initial test, span 2/10--9/10 in OpenEMR, and trail a zero-query prior (0.8060 vs.
0.5151--0.6705) on 300-patient eICU inquiry; (2) Unverified order mutation: on 16 standing-order patients, two 27B checkpoints modify 8/16 orders each, yet only 1/8 vs. 4/8 follow retrieving the new report while unretrieved runs cite stale values; and (3) Post-training decoupling: SFT raises 4B autonomous workup completion (153->162/228) while degrading complete-chart grading (162->154/228), with only 1 of 23 newly completed cases gaining both.