Abstract / Summary
Fractures impose substantial morbidity and mortality burdens on older adults, and many osteoporotic fractures remain undiagnosed or are detected late. Existing risk stratification tools are designed for long-term risk prediction and are not intended to identify fractures that have already occurred. This study aimed to develop machine learning (ML)-based classification models to identify prevalent fracture in older patients with osteoporosis (OP) using routinely available admission electronic health record (EHR) data. We retrospectively enrolled 12,116 hospitalized older patients with OP (3,152 with prevalent fractures, 26.02%) from a tertiary hospital in China between January 2020 and December 2025. This was a cross-sectional study; all variables were measured at admission, concurrently with fracture ascertainment, and the model identifies prevalent fracture rather than predicting future fracture risk. The cohort was randomly divided into training (7:3) and validation sets. Twenty-three candidate predictors were selected via LASSO regression from demographic, comorbidity, vital sign, and laboratory variables. Restricted cubic spline regression was applied to explore dose-response relationships. Nine ML algorithms were developed and compared, with calibration assessed by Brier scores and clinical utility evaluated through decision curve analysis. Model interpretability was examined using SHAP analysis. XGBoost outperformed all competing models, achieving an AUC of 0.967 (95% CI: 0.965–0.970) in the training set and 0.852 (95% CI: 0.838–0.865) in the validation set, alongside the lowest Brier scores (0.078 and 0.136, respectively) and the greatest net benefit across threshold probabilities. Notably, several continuous predictors showed significant nonlinear associations with fracture risk: pulse rate, blood urea nitrogen, and aspartate aminotransferase showed inverted U-shaped patterns, whereas platelet count, creatinine, and uric acid showed U-shaped relationships. SHAP analysis identified D-dimer, alkaline phosphatase, neutrophil count, heart failure, creatinine, and age as the six most influential features; creatinine exhibited a negative SHAP contribution. Because these variables were measured concurrently with fracture ascertainment, they most likely reflect the physiological consequences of fracture rather than causal risk factors. The XGBoost model demonstrated good discriminative ability and acceptable calibration for identifying prevalent fracture in older patients with OP using admission data. These findings suggest that routinely available variables may help flag patients who warrant imaging confirmation, particularly when fracture is not clinically suspected. However, the model was not compared against FRAX or DXA-based rules, and no claim of superiority over conventional tools is made. Because all variables were measured concurrently with fracture ascertainment, the model identifies prevalent rather than future fracture, and top-ranked features such as D-dimer most likely reflect the physiological consequences of fracture rather than causal risk factors.