EHR-Based Machine Learning Shows Promise for Detecting Undiagnosed Atrial Fibrillation in Primary Care, but Validation Gaps Persist

Atrial fibrillation raises stroke, heart failure and mortality risk, and often goes undiagnosed until a first stroke occurs, causing thousands of preventable hospitalizations yearly.
One in five AF cases is found only after a first stroke
The review cites an estimate that 20% of atrial fibrillation is diagnosed only after a patient's first stroke.
Mark

Why does this review matter if machine learning for AF already exists?

Mimi

Most of that work uses ECG data. This review looks at electronic health records, which every primary care clinic already has, so no extra device or provider input is needed.

Mark

What did they find?

Mimi

Of 16 studies, half outperformed their controls. AUROC ran from 0.71 to 0.948, and combining machine learning with clinical tools did better than machine learning alone.

Luke

That range is wide. A 0.71 is a very different tool from a 0.948, so promise is carrying a lot of weight.

Mimi

Fair. The authors say performance was variable, and that's one of their stated limits.

Luke

And only four studies were externally validated. Why does that matter?

Mimi

Because a model that works in the data it was built on may not work in other clinics or populations. Also 53% were at high risk of bias.

Mark

Anything surprising in the predictors?

Mimi

Gout showed up as a nontraditional predictor. Changing BMI, blood pressure and heart failure diagnosis beat single static readings.

Luke

Worth saying that's from the reviewed models. The review doesn't establish gout as a cause, and only one study was a randomized trial, so patient outcomes remain largely untested.

Mark

So what comes next?

Mimi

External validation and clinical trials, before anyone adopts this routinely.

  • A common, silent heart rhythm disorder keeps slipping past primary care until a stroke reveals it.
  • Current screening in Canada relies on opportunistic pulse checks, with no unified guideline to tighten the net.
  • Researchers searched seven databases and screened over 4,500 references to gather 16 studies testing machine learning on ordinary health records.
  • Eight studies beat their comparison groups, and combining the algorithms with clinical tools sharpened results further.
  • Only four studies were validated on outside populations, and more than half carry a high risk of bias.
  • The field is landing in a holding pattern: trials and external validation must come before routine adoption.

Atrial fibrillation often announces itself only after it has already done damage, sometimes as a first stroke. In October 2025, a systematic review in PLOS Digital Health asked whether the ordinary electronic health records that family doctors already keep could help reveal the condition sooner. Sixteen studies later, the answer is hopeful but unfinished: the models often outperform usual care, yet they have rarely been tested beyond the settings that built them. The question now is whether a promising pattern in the record can be trusted at the bedside.

A systematic review published October 14, 2025 in PLOS Digital Health asks a practical and urgent question: can machine learning, applied to the electronic health records family doctors already keep, find atrial fibrillation before it reveals itself through a stroke? The team led by Chalati searched seven databases through May 2023, screened 4,536 references, and included 16 studies.

The stakes are well documented. Atrial fibrillation is the most common arrhythmia in family medicine, and it can raise stroke risk several times over while increasing heart failure and mortality. Some estimates suggest a fifth of cases are found only after a first stroke. Current screening offers little systematic protection. Canada has no unified guideline, and age-based pulse checks often miss silent cases. Existing risk tools were built mostly on American cohorts and depend on manual physician input.

Most of the included studies were retrospective, and random forest models were the most common approach. Performance ranged widely, and half the studies beat their controls. Three paired machine learning with clinical tools and did better still. The models also flagged gout as an unexpected predictor and showed that changing measures of BMI, blood pressure and heart failure carried more signal than static snapshots.

The caution is equally clear. Only four studies were externally validated, and 53 percent were rated at high risk of bias. The authors recommend external validation, clinical trials, and a focus on predictors that primary care reliably collects. The promise is real, but whether it reaches everyday practice depends on evidence that has not yet been gathered in sufficient quantity.

A systematic review published October 14, 2025 in PLOS Digital Health asks a practical question: can machine learning applied to ordinary electronic health records find atrial fibrillation in primary care patients before it announces itself through a stroke? The authors, led by Chalati with Shirvankar, Gore, Sharma and Abbasgholizadeh-Rahimi, searched seven databases from their inception to May 2023. They screened 4,536 references and included 16 studies.

The problem they start from is well documented. Atrial fibrillation is the most common arrhythmia in family medicine. The Canadian Cardiovascular Society estimates that up to a million Canadians live with silent or paroxysmal forms of it. Left untreated, it raises stroke risk three to five times, increases mortality even after adjusting for other cardiovascular factors, and raises the risk of heart failure. The review cites an estimate that 20% of cases are diagnosed only after a patient's first stroke, and that this leads to thousands of hospitalizations a year.

Current screening does little to change that. Canada has no unified guideline. The Canadian Cardiovascular Society recommends only opportunistic screening for people 65 and older, by pulse palpation at annual check-ups. The authors note that this lacks a systematic approach and often misses silent AF. Screening by age alone has been studied, with one study reporting a number needed to treat of 111. The best-performing risk model for five-year incident AF, CHARGE-AF, was developed mainly in three American cohorts, which limits its use in non-white populations. It also relies on static values that need manual input from physicians, adding to their workload.

Machine learning tools built on ECG data or wearables have shown promise, but the authors say they depend heavily on ECG-derived data and active provider input, which limits scalability in primary care. Electronic health records, which already hold demographics, comorbidities and health history, offered an alternative. The review looked at whether models built on them beat standard care, how well they were validated, and what they meant for patients, providers and health systems. It followed Joanna Briggs Institute and PRISMA guidelines and was registered in PROSPERO (CRD42023390603). Studies built only on ECG, imaging or wearable variables, without integration into EHR data, were excluded.

Of the 16 included studies, 14 (87%) were retrospective cohort studies, one was prospective and one was a randomized controlled trial. Random forest classifiers were the most common model, used in seven studies (43%). Discrimination, measured by AUROC, ranged from 0.71 to 0.948. Half the studies, eight, outperformed their controls. Three studies combined machine learning with clinical tools, and those combinations discriminated significantly better than machine learning alone.

The models also surfaced some clinical signals. They identified gout as a nontraditional predictor of AF. They showed that dynamic measures of BMI, blood pressure and heart failure diagnosis predicted AF better than static measures did.

The weaknesses are substantial. Only four studies (25%) were externally validated, and 53% were rated at high risk of bias. Performance varied widely. The authors conclude that EHR-based models show promise against standard care, but that their clinical applicability is limited by thin validation, bias and inconsistency.

Their recommendations are specific: prioritize external validation, test the tools in clinical trials, and favor predictors routinely available in primary care. The authors reported no specific funding; several disclosed research support and, for Dr. Sharma, industry support from pharmaceutical and diagnostics companies. Whether these tools reach everyday practice depends on trials that do not yet exist in number.

EHR-based ML models show promise for improving AF detection in primary care, but clinical applicability is limited by insufficient external validation, high risk of bias, and variable performance.
— Chalati et al., PLOS Digital Health
Fale Conosco FAQ