Preprint
Article

This version is not peer-reviewed.

Preventing Wrong-Patient, Wrong-Timepoint, and Stale-Chart Errors in Large Language Model Clinical Decision Support via Discourse-Stateful Verification

Submitted:

24 November 2026

Posted:

26 November 2026

You are already at the latest version

Abstract
Delegating arithmetic from large language models (LLMs) to clinical calculators prevents mental-math drift, yet tool calls remain unsafe when models bind relatives' vitals, confuse discharge with admission labs, misconvert molar units, or commit against electronic health record (EHR) notes updated mid-inference. We present MedCalc-Enforce, a runtime verification and transactional commit kernel for clinical calculator calls. Before execution, a paragraph-stateful discourse automaton tracks subject identity and encounter phase across sentences while blocking relative deltas; a 42-digit decimal canonicalizer converts molar and mass units across 16 clinical scores; and a SQLite write-ahead logging (WAL) protocol re-projects bound fields atomically under concurrent addenda. Across 620 held-out runs over five open-weight LLMs (1.5B–8B; 124 patient clusters) at zero API cost, MedCalc-Enforce lifts agreement from 76.9% (477/620) to 89.4% (554/620; Δ = +12.4%, p = 4.10 × 10⁻¹²) and cuts unsafe releases by 89.7% from 17.3% (107/620) to 1.8% (11/620; Δ = −15.5%, p = 2.26 × 10⁻¹⁶), with 93.6% of releases (99.1%–100.0% on 3.8B–8B models) from verified proposals. MedCalc-Enforce blocks 240/240 live multi-sentence traps and 24/24 unseen surface-form traps, sustaining 2,881.8 checks/s with zero stale commits or false addendum blocks.
Keywords: 
;  ;  ;  ;  ;  ;  ;  
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.