A machine learning tool for predicting newly diagnosed osteoporosis in primary healthcare in the Stockholm Region

Improving accuracy and timeliness for osteoporosis diagnosis could help prevent fragility fractures, morbidity, and mortality for older individuals. Osteoporosis is an often silent health condition, especially as regards vertebral fractures, and WHO issued a call to action for primary care to lead efforts in screening, assessing, and managing diseases such as osteoporosis. We used a machine learning method, Stochastic Gradient Boosting (SGB), to identify what diagnoses in a primary care setting predict a new osteoporosis diagnosis, using a sex- and age-matched case-control design. Cases of new osteoporosis (ICD-10 code: M80, M81, M82) were identified across all outpatient care settings during 2012-2019. We included individuals aged ≥ 40 years old, stratified by sex and age-groups 40-65 years and > 65 years old. Controls were sampled from outpatients that did not have osteoporosis at any time during 2010-2019. Using the SGB model, we ranked the most important diagnoses related to newly diagnosed osteoporosis, presented as the normalized relative influence (NRI) score with a corresponding odds ratio of marginal effects (OR<sub>ME</sub>) of being newly diagnosed with osteoporosis. A train-test approach was used to develop the model, with the performance evaluated using area under the curve (AUC). In total, we included 30,741 patients with osteoporosis aged ≥ 40 years. AUC was high, > 0.899 for all age and sex stratas. The number of visits to primary care in the year prior to the osteoporosis diagnosis contributed with the most predictive information for all age and sex stratas. For all age groups several other factors also showed high NRI and OR<sub>ME</sub> and among them many unspecific diagnoses such as Dorsalgia showed high NRI, (2.6-9.0%) and other painful musculoskeletal disorders. However, our study also showed that the diagnosis of Hypertension had a very high NRI for patients aged > 65 years but not in patients 40-65 years of age. In this AI study, including only diagnoses from patients seen in primary health care centres, we found that the number of consultations in primary care had high predictive information as well unspecific diagnoses including muscle and skeletal pain predicted high risk for osteoporosis in all age groups.

Authors

Institutions

Publication Details

Journal
Scientific Reports
Published
2025-10-20
DOI
https://doi.org/10.1038/s41598-025-24450-5
Primary Topic
Bone health and osteoporosis research
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

A machine learning tool for predicting newly diagnosed osteoporosis in primary healthcare in the Stockholm Region

Caroline Wachtler, Andreas Rosenblad, Per Wändell, Per Swärd et al.
Scientific Reports
Bone health and osteoporosis research
article

A machine learning tool for predicting newly diagnosed osteoporosis in primary healthcare in the Stockholm Region

Caroline Wachtler, Andreas Rosenblad, Per Wändell, Per Swärd, Julia Eriksson, Toralph Ruge, Johan Ärnlöv, Axel C. Carlsson
article en

Abstract

Improving accuracy and timeliness for osteoporosis diagnosis could help prevent fragility fractures, morbidity, and mortality for older individuals. Osteoporosis is an often silent health condition, especially as regards vertebral fractures, and WHO issued a call to action for primary care to lead efforts in screening, assessing, and managing diseases such as osteoporosis. We used a machine learning method, Stochastic Gradient Boosting (SGB), to identify what diagnoses in a primary care setting predict a new osteoporosis diagnosis, using a sex- and age-matched case-control design. Cases of new osteoporosis (ICD-10 code: M80, M81, M82) were identified across all outpatient care settings during 2012-2019. We included individuals aged ≥ 40 years old, stratified by sex and age-groups 40-65 years and > 65 years old. Controls were sampled from outpatients that did not have osteoporosis at any time during 2010-2019. Using the SGB model, we ranked the most important diagnoses related to newly diagnosed osteoporosis, presented as the normalized relative influence (NRI) score with a corresponding odds ratio of marginal effects (OR<sub>ME</sub>) of being newly diagnosed with osteoporosis. A train-test approach was used to develop the model, with the performance evaluated using area under the curve (AUC). In total, we included 30,741 patients with osteoporosis aged ≥ 40 years. AUC was high, > 0.899 for all age and sex stratas. The number of visits to primary care in the year prior to the osteoporosis diagnosis contributed with the most predictive information for all age and sex stratas. For all age groups several other factors also showed high NRI and OR<sub>ME</sub> and among them many unspecific diagnoses such as Dorsalgia showed high NRI, (2.6-9.0%) and other painful musculoskeletal disorders. However, our study also showed that the diagnosis of Hypertension had a very high NRI for patients aged > 65 years but not in patients 40-65 years of age. In this AI study, including only diagnoses from patients seen in primary health care centres, we found that the number of consultations in primary care had high predictive information as well unspecific diagnoses including muscle and skeletal pain predicted high risk for osteoporosis in all age groups.

Scientific ReportsVol. 15(1)
Dalarna University (SE), Uppsala University (SE), Lund University (SE), Karolinska Institutet (SE), Region Västra Götaland (SE), Stockholm Health Care Services (SE), Skåne University Hospital (SE)
Openalex Percentile: Top 61%
Bone health and osteoporosis research
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.