A machine learning model to simplify recognition of patients with atrial fibrillation based on diagnostic codes in Swedish primary health care
BMC Medical Informatics and Decision Making · 17.04.2026 · 26 (1)
DOI: 10.1186/s12911-026-03491-4 ↗Kurz gefasst
Fachartikel in der Zeitschrift BMC Medical Informatics and Decision Making, online erschienen am 17.04.2026. Verfasst von Anders Norrman und 8 weiteren Autor:innen. Beteiligte Einrichtung: Division of Family Medicine and Primary Care, Department of Neurobiology, Care Sciences and Society, Karolinska Institutet, Huddinge, Sweden. Hauptthemen laut MEDLINE: Atrial Fibrillation, Primary Health Care, Machine Learning. Die Arbeit nennt 33 Literaturangaben. Der Volltext ist frei zugänglich (Open Access, CC BY 4.0). Gefördert von: Karolinska Institute.
Abstract (Originalsprache)
Background
Atrial fibrillation (AF) is a major risk factor for atherothrombotic complications but is often asymptomatic and undiagnosed. This study aimed to develop a machine learning model to distinguish between individuals with low and high risk of AF, using routinely collected diagnostic data from Swedish primary health care.
Methods
Cases ( n = 42,607, aged ≥ 45 years) with diagnosed new onset AF and controls ( n = 427,169) matched by age and sex. Machine learning models stratified for age (45–69 and ≥ 70 years) and sex were developed using stochastic gradient boosting, based on number of primary health care visits during the year before the index AF diagnosis, age, and ICD-10 codes from electronic medical records 2014–2019. Performance was evaluated by AUC, sensitivity and specificity, and key predictors ranked by normalized relative influence (NRI) and odds ratios for marginal effects.
Results
The most influential predictors were the number of visits (NRI: 29.9–46.3%) and age (NRI: 6.2–15.9%), followed by risk factors for AF such as heart failure, hypertension, and cardiac arrhythmias. Model AUC ranged from 0.77 to 0.79 across subgroups. Sensitivity was 0.76–0.80, and specificity 0.58–0.66, with higher sensitivity in older groups and higher specificity in younger ones. The models correctly identified 95–98% of individuals without known AF.
Conclusions
The models show good predictive ability, effectively ruling out low-risk patients while identifying known risk factors. With AUC values comparable to more complex models, our approach using only visit frequency, age, and diagnoses may support initial risk assessment in primary health care for identifying individuals at risk of AF.
Schlagwörter
MeSH-Schlagwörter (MEDLINE)
Stichwörter der Autor:innen
Autor:innen und Institutionen
- Division of Family Medicine and Primary Care, Department of Neurobiology, Care Sciences and Society, Karolinska Institutet, Huddinge, Sweden.
- Academic Primary Health Care Centre, Region Stockholm, Stockholm, Sweden.
- Center for Primary Health Care Research, Lund University, Malmö, Sweden.
- Division of Biostatistics, Institute of Environmental Medicine, Karolinska Institutet, Stockholm, Sweden.
- Department of Clinical Sciences Malmö, Lund University, Lund, Sweden.
- Department of Internal Medicine, Skåne University Hospital, Malmö, Sweden.
Förderung
- Karolinska Institute
Zitieren
APA
Norrman, A., Wachtler, C., Wändell, P., Eriksson, J., Ruge, T., Brynedal, B., Hasselström, J., Kahan, T., & Carlsson, A. C. (2026). A machine learning model to simplify recognition of patients with atrial fibrillation based on diagnostic codes in Swedish primary health care. BMC Medical Informatics and Decision Making, 26(1). https://doi.org/10.1186/s12911-026-03491-4
Vancouver
Norrman A, Wachtler C, Wändell P, Eriksson J, Ruge T, Brynedal B, et al. A machine learning model to simplify recognition of patients with atrial fibrillation based on diagnostic codes in Swedish primary health care. BMC Medical Informatics and Decision Making. 2026;26(1). doi:10.1186/s12911-026-03491-4
BibTeX
@article{Norrman2026,
author = {Norrman, Anders and Wachtler, Caroline and Wändell, Per and Eriksson, Julia and Ruge, Toralph and Brynedal, Boel and Hasselström, Jan and Kahan, Thomas and Carlsson, Axel C},
title = {A machine learning model to simplify recognition of patients with atrial fibrillation based on diagnostic codes in Swedish primary health care},
journal = {BMC Medical Informatics and Decision Making},
year = {2026},
volume = {26},
number = {1},
doi = {10.1186/s12911-026-03491-4}
}
EUVIMED