Understanding Reasons for Oral Anticoagulation Nonprescription in Atrial Fibrillation Using Large Language Models

BACKGROUND: Rates of oral anticoagulation (OAC) nonprescription in atrial fibrillation approach 50%. Understanding reasons for OAC nonprescription may reduce gaps in guideline-recommended care. We aimed to identify reasons for OAC nonprescription from clinical notes using large language models.
METHODS: We identified all patients and associated clinical notes in our health care system with a clinician-billed visit for atrial fibrillation without another indication for OAC and stratified them on the basis of active OAC prescriptions. Three annotators labeled reasons for OAC nonprescription in clinical notes on 10% of all patients ("annotation set"). We engineered prompts for a generative large language model (Generative Pre-trained Transformer 4) and trained a discriminative large language model (ClinicalBERT) to identify reasons for OAC nonprescription and selected the best-performing model to predict reasons for the remaining 90% of patients ("inference set").
RESULTS: A total of 35 737 patients were identified, of which 7712 (21.6%) did not have active OAC prescriptions. A total of 910 notes across 771 patients were annotated. Generative Pre-trained Transformer 4 outperformed ClinicalBERT (macro-F1 score across all reasons of 0.79, compared with 0.69 for ClinicalBERT). Using Generative Pre-trained Transformer 4 on the inference set, 61.1% of notes had documented reasons for OAC nonprescription, most commonly the alternative use of an antiplatelet agent (23.3%), therapeutic inertia (21.0%), and low burden of atrial fibrillation (17.1%).
CONCLUSIONS: This is the first study using large language models to extract documented reasons for OAC nonprescription from clinical notes in patients with atrial fibrillation and reveals guideline-discordant practices and actionable insights for the development of health system interventions to reduce OAC nonprescription.
Journal of the American Heart Association, 2025-03-31