Introduction

Osteoporosis (OP) is a clinically common systemic bone disease that increases the risk of brittle fractures due to reduced bone mass and the breakdown of the bone tissue microstructure [1, 2]. Approximately 200 million people worldwide while approximately 88 million people in China suffer from osteoporosis [3]. Under the trend of global population aging, OP becomes increasingly widespread [4]. Recent studies indicate that elderly patients with type 2 diabetes mellitus (T2DM) have a high incidence of OP, which affects their quality of life and leads to high disability and mortality rates [5,6,7]. A recent meta-analysis of 21 studies involving 11,603 T2DM patients found a high OP prevalence of 27.67% (95% confidence interval (CI) 21.37–33.98%) [8].

At present, bone mineral density (BMD) testing is the main method for OP screening or diagnosing, as it is a strong and consistent predictor of OP. A single measure of BMD can predict OP risk over 25 years, with little degradation in this association over time [9]. In addition, there are other OP screening tools such as the fracture risk assessment tool (FRAX) [10], the male osteoporosis risk estimation score (MORES) [11], and the osteoporosis self-assessment tool for Asians (OSTA) [12].

However, the pathogenesis of OP in elderly patients with T2DM remains ambiguous. In addition to factors related to age, sex, race, and genetics, poor blood sugar control in T2DM patients leads to osmotic diuresis, and a large amount of calcium ions is lost from the urine, which leads to abnormal metabolism of vitamin D and parathyroid hormone. Ultimately this results in abnormal bone metabolism [13, 14]. Secondly, poor long-term blood glucose control leads to an increase in advanced glycation end products, which ends in the abnormal metabolism of bone organic matter, weakened osteogenesis, and enhanced osteoclasis, ultimately causing a high incidence of OP in diabetes patients [15].

OP diagnosis is relatively delayed and is prone to brittle fractures. Additionally, patients do not receive early prevention and treatment. Therefore, an early diagnosis plays a decisive role in disease development and prognosis. In this novel study, we identified the factors influencing OP by analyzing the clinical characteristics of elderly patients with T2DM admitted to six tertiary hospitals in Southwest China, and developed a predictive risk model for OP. Furthermore, we sought to develop a user-friendly interface via a web link to calculate the precise probability of OP in elderly patients with T2DM. These tools were designed to support quality improvement and aid in the clinical management of elderly patients with T2DM.

Materials and methods

Data source

This was a retrospective multicenter study. The study followed the guidelines for transparent reporting of a multivariable prediction model for individual prognosis or diagnosis (TRIPOD) [16]. The clinical data of 21,070 elderly patients with T2DM were obtained from six tertiary hospitals in Southwest China from 2012 to 2022. Using a random number method, the “caret” R package, patients from hospitals A-E were randomly divided into a training set (n = 12,366) and an internal validation set (n = 5,301) at a ratio of 7:3. Patient data from hospital F were collected for external validation (n = 3,403). The study protocol was reviewed and approved by the ethics committee of the Affiliated Banan Hospital of Chongqing Medical University. Informed consent was not required because of the retrospective nature of the study.

Inclusion and exclusion criteria

The inclusion criteria were : (i) diagnosed with T2DM between 2012 and 2022, and (ii) aged 65 years or older. The exclusion criteria involve: (i) combined thyroiditis and hyperthyroidism; (ii) combined with other bone metabolic disorders, such as rickets, osteomalacia, and osteosclerosis; (iii) concomitant with severe mental illness; (iv) recipient of calcium, glucocorticoid, calcitonin, or other drugs that affect bone metabolism; and (v) patients with > 30% missing data (after meeting the inclusion criteria and the exclusion criteria i, ii, iii, and iv, patients still had variables with more than 30% of missing data). The selection process is illustrated in supplementary figure S1.

Definition

Severe mental illness was defined as conditions presenting as psychosis, including schizophrenia, schizoaffective disorder, bipolar disorder, and other psychotic disorders [17].

Bone mineral density was measured using whole-body dual-energy X-ray absorptiometry (DXA). The detection sites included the lumbar spine (LS) 1–4, femoral neck, greater trochanter of the femur, inner femur, and Ward’s triangular area. OP was defined if the T-score ≤ -2.5SD, according to the WHO criteria (1994) [18]. In addition, OP was identified using computable phenotypes based on billing codes from the International Classification of Diseases, Tenth Revision, Clinical Modification (ICD-10-CM). The ICD-10-CM codes M80, M81, and M82 were associated with OP.

Data Collection

Based on previous reports, a total of 26 candidate variables were selected to reflect OP [19,20,21]. We explored age, sex, hypertension, coronary heart disease (CHD), cerebral infarction (CI), hyperlipidemia, past surgical history (PSH), past medical history (PMH), smoking history, drinking history, systolic blood pressure (SBP), diastolic blood pressure (DBP), pulse, aspartate aminotransferase (AST), triglycerides (TGs), neutrophil-lymphocyte ratio (NLR), platelet-lymphocyte ratio (PLR), lymphocyte-monocyte ratio (LMR), neutrophil percentage-to-albumin ratio (NPAR), creatinine (CREA), uric acid (UA), low-density lipoprotein cholesterol (LDL-C), high-density lipoprotein cholesterol (HDL-C), glycated hemoglobin (HbA1c), and glomerular filtration rate (GFR).

Statistical analyses

Statistical analyses were performed using the SPSS (version 22.0; IBM Corp., Armonk, NY, USA) and R software (version 4.0.2; R Core Team, Vienna, Austria). The Kolmogorov–Smirnov normality test was performed on all measurement data. Indicators conforming to normal distribution were described as mean ± standard deviation, and a t-test was adopted. Indicators that did not conform to normal distribution were described as median (M) and quartile interval (P25, P75), and the Mann-Whitney U test was used. The enumeration data were expressed in terms of frequency and rate and were tested using the χ2 test or Fisher’s exact test. We used the R multivariate imputation by chained equation package for missing data imputation in this study. For all statistical analyses, the significance was set at P < 0.05.

Univariate logistic regression analysis was employed to screen for potential influencing factors of OP, and the least absolute shrinkage and selection operator regression (LASSO) and multivariate logistic regression analyses were performed to further select variables for developing a novel predictive model. The area under the receiver operating characteristic curve (AUROC), calibration curve, decision curve analysis (DCA), and clinical impact curve (CIC) were used to evaluate the performance and clinical utility of the model.

Results

Patient characteristics

The Mann-Whitney U test revealed that there was no significant difference in several missing variables in the training and internal validation sets before and after multiple imputations (Table 1). Furthermore, there were no significant differences in any missing variables in the external validation set before and after multiple imputations (Supplementary Table 1). In total, 21,070 elderly patients with T2DM were included in this study. The incidence of OP in elderly patients with T2DM was 7.01% (1,476/21,070). Table 2 lists the baseline characteristics of patients in the training and internal validation sets.

Table 1 Comparison of continuous variables in the training and internal validation sets before and after multiple imputation
Table 2 Demographic and clinical characteristics of the training and internal validation sets

Selection of predictors

Patients in the training set were divided into OP and non-OP groups. The following factors were significantly associated with OP in univariate analysis: age, sex, hypertension, CHD, CI, hyperlipidemia, PSH, PMH, smoking history, drinking history, SBP, pulse, AST, ALT, NLR, PLR, LMR, NPAR, CREA, HbA1c, and GFR (P < 0.05) (Table 3).

Table 3 Demographic and clinical characteristics associated with OP as assessed in the training set

As depicted in Fig. 1, the model chose Lambda corresponding to a value of 0.009374144 and selected 11 predictors: age, sex, hypertension, CHD, CI, hyperlipidemia, PSH, SBP, pulse, NLR, and HbA1c. Ultimately, the multivariate logistic regression model depicted that age (odds ratio [OR] = 1.043, 95% confidence interval [CI]:1.032–1.054), sex (OR = 3.138, 95% CI: 2.668–3.692), hypertension (OR = 1.238, 95% CI: 1.059–1.447), CHD (OR = 1.509, 95% CI: 1.303–1.748), CI (OR = 1.772, 95% CI: 1.512–2.076), hyperlipidemia (OR = 1.639, 95% CI: 1.381–1.944), and PSH (OR = 1.384, 95% CI: 1.201–1.594) were the influencing factors for predicting OP (Fig. 2).

Fig. 1
figure 1

Features selection by LASSO. A LASSO coefcients profles (y-axis) of the 21 features. The upper x-axis is the average numbers of predictors and the lower x-axis is the log(λ). B Tenfold cross-validation for tuning parameter selection in the LASSO model

Fig. 2
figure 2

Forest plot showing the results of multivariable analysis for OP

To further validate the performance of LASSO-logistic regression in screening predictive variables, we evaluated variable subsets with the top k features, k ranging between 1 and 21, to identify the threshold at which adding variables to the predictive model would not significantly improve its performance. Finally, we identified seven variables with the highest information gain and found no significant increase in the AUROC after including such variables (AUROC = 0.713, P = 0.134, Fig. 3), which were consistent with the variables in the LASSO-logistic regression model. This finding indicates that adding more variables, even those closely related to OP, may not necessarily improve model performance (mean rolling P value for the remaining variable sets: 0.404).

Fig. 3
figure 3

Identification of the optimal variables numbers for a prediction of OP

Nomogram prediction model construction and performance

Figure 4 reveals the prediction model as a nomogram for calculating the probability of OP in elderly patients with T2DM. To use the nomogram, we first drew a line from each parameter value to the score axis, added the scores of all parameters, and finally drew a line from the total score axis to determine the probability of OP in elderly patients with T2DM. The model displayed a high predictive ability, with an AUROC of 0.713 (95% confidence interval [CI]: 0.697–0.730) in the training set (Figs. 5), 0.716 (95% CI: 0.691–0.740) in the internal set, and 0.694 (95% CI: 0.653–0.735) in the external set. The optimal decision probability cut-off value was 0.075. The calibration curve (bootstraps = 1,000) indicated good calibration (Fig. 6). Supplementary figures S2-S3 respectively revealed calibration curves for the internal and external validation sets. Table 4 presents the detailed performance metrics for the three datasets.

Fig. 4
figure 4

Nomogram predicting OP in elderly patients with T2DM

Fig. 5
figure 5

Receiver operating characteristics curves of the model

Fig. 6
figure 6

Calibration curves of the model

Table 4 Detailed performance metrics of the three models

AUC: area under the curve; CI: Confidence Interval.

Clinical utility of the nomogram prediction model

The clinical utility of the model was evaluated by DCA (Fig. 7). The results indicate that when the threshold probability ranges from 10 to 40%, the model provides greater net benefits. The CIC for OP in elderly patients with T2DM is depicted in Fig. 8. This curve reveals the estimated number of participants deemed to be at high risk of OP. For example, at a 17% risk threshold, out of 1000 patients screened, approximately 400 were deemed high-risk through model analysis. The DCA of the internal and external validation sets are depicted in Supplementary figures S4-S5. The CIC of the internal and external validation sets are displayed in Supplementary figures S6-S7.

Fig. 7
figure 7

Decision curve analysis of the model. X-axis indicates the threshold probability for OP and Y-axis indicates the net benefit

Fig. 8
figure 8

Clinical impact curve of the model. The red curve (number of high-risk individuals) indicates the number of people who are classified as positive (high risk) by the model at each threshold probability; the green curve (number of high-risk individuals with outcome) is the number of true positives at each threshold probability

Construction of an online interface to easily access the model

Finally, we developed a user-friendly interface via a web link (https://juntaotan.shinyapps.io/osteoporosis/) to calculate the precise probability of OP in elderly patients with T2DM. One patient from our study is demonstrated as an example; the likelihood of OP was 0.410 (95% CI: 0.357–0.465) when a female patient aged 85 years had hypertension, CHD, CI, hyperlipidemia, and PSH (Fig. 9).

Fig. 9
figure 9

An example of nomogram to predicting OP in elderly patients with T2DM via a link

Discussion

In this study, we assessed several characteristics and clinical data that may be associated with an increased risk of OP in elderly patients with T2DM. Our study demonstrated that an easy-to-use predictive model based on seven predictors (age, sex, hypertension, CHD, CI, hyperlipidemia, and PSH) could identify underlying OP, with an AUROC of 0.713, specificity of 0.655, and sensitivity of 0.675.

Although there are currently many screening tools for OP, their applicability and effectiveness remain challenging. In a cross-sectional study, 786 Malaysians were recruited to verify the performance of OSTA in identifying subjects with OP, as determined by DXA [22]. The results showed that the sensitivity of OSTA in identifying subjects with suboptimal bone health was only 0.323, with an AUROC of only 0.618. Even after adjusting the cutoff value of OSTA, its specificity in identifying male and female patients only reached 0.555 and 0.614, respectively. In another study, researchers used data from the National Health and Nutrition Examination Survey to validate the effectiveness of MORES in identifying the risk of vertebral OP in men [23]. The results showed that the sensitivity and specificity of MORES were only 0.582 (95% CI: 0.460–0.694) and 0.652 (95% CI: 0.627–0.676), respectively. The study by Crandall et al. also showed that both FRAX and Garvan fracture risk calculator had low specificity in detecting incident hip fracture during the 10-year follow-up (Garvan 0.306 (95% CI: 0.303–0.310) and FRAX 0.431 (95% CI: 0.427–0.435)) [24].

Due to long-term blood sugar fluctuations, T2DM patients may experience metabolic disorders involving three major nutrients (protein, fat, and sugar), which are not conducive to the bone matrix [25]. Additionally, high blood sugar levels can cause osmotic diuresis, resulting in a significant loss of trace elements such as calcium and phosphorus, thereby leading to a decrease in bone density [26]. Therefore, T2DM patients have a higher risk of developing OP than others. In this study, we established that older age is a risk factor for T2DM patients with OP. With an increase in age, T2DM patients have a decrease in their immune system and hormone levels. Moreover, they are prone to disorders in calcium and phosphorus metabolism, decreased osteocalcin levels, and decreased bone remodeling function, which increases the probability of OP occurrence [27].

Several studies have confirmed that sex is an important risk factor for OP [28,29,30]. Here, we found that female patients with T2DM had a higher risk of OP than male patients (OR = 3.138, 95% CI: 2.668–3.692; P < 0.001). In postmenopausal women, estrogen levels and osteoblast activity decreases while osteoclast activity increases. This in turn leads to bone loss and decreased bone density, resulting in OP. In the male population, testosterone decrease may have a similar but less significant impact, with sex being the strongest influencing factor of OP occurrence [31]. Martin et al. showed that halving estrogen concentration would reduce bone mineral density of the lumbar vertebrae by 10% and the femoral neck by 12% [32]. Therefore, the elderly female population should appropriately consume calcium-containing foods, including shrimp skin, fish, milk, and dairy products, to supplement nutrition, and maintain bone density and metabolic balance, thereby preventing OP.

The traditional concept indicates OP is purely a metabolic bone disease. However, accumulating evidence suggests that OP may be regarded as a risk factor for cardiovascular disease, similar to other traditional risk factors (e.g., hypertension, CI, CHD, hyperlipidemia, and diabetes) [33,34,35]. This represents a paradigm shift in the prospects of OP. OP and cardiovascular diseases have similar risk factors, including diabetes, smoking, excessive drinking, a sedentary lifestyle, aging, and dyslipidemia. This may partially explain the association between OP and cardiovascular disease. The results of this study suggest that hypertension, CI, hyperlipidemia, and CHD are risk factors for OP in elderly patients with T2DM. Consistent with our research results, a survey of the health and nutrition of Korean residents showed that OP in the femoral neck was significantly associated with hypertension (OR = 1.422, 95% CI: 1.107–1.827; P = 0.006) [36]. The mechanism by which hypertension causes OP may be that the RAAS system not only plays an important role in hypertension, but also that angiotensin is a factor regulating osteoclast bone absorption [37]. In addition, OP may be associated with abnormal calcium metabolism and hypertension-related bone loss. Hu et al. stated that hypertension, CHD, and CI were the main risk factors for OP in the elderly [38]. The incidence rates of OP in the two-vessel and three-vessel disease groups were significantly higher than those in the single-vessel disease group. Furthermore, this study suggests that PSH is an important risk factor for OP in elderly patients with T2DM (OR = 1.384, 95% CI: 1.201–1.594). Previous studies confirmed that gastrotomy and cervical disc arthroplasty [39,40,41,42] may easily lead to OP. Therefore, for elderly T2DM patients with PSH, systematic recovery of bone mineral density is necessary.

The advantages of this study mainly are two-fold: first, the use of a large sample and multicenter data to construct the prediction model; second, the variables used to construct the predictive model are simple and easy to obtain, which greatly improves the model’s generalizability and facilitates its application to clinical practice. However, our study has some limitations. First, it was a retrospective study. Retrospective studies provide weaker evidence compared with prospective studies. Hence, the interpretation of these findings should be considered with caution. Second, although our study evaluated the demographic characteristics and baseline clinical data of patients, it may be advantageous to identify the predictors of OP in elderly patients with T2DM and improve the predictive performance of the model by evaluating other variables, such as disability and use of drugs and omics data. Therefore, further studies with complete data on all the pertinent covariates would be useful.

Conclusions

In a large retrospective study of elderly patients with T2DM admitted to six tertiary hospitals in Southwest China, we observed that the key factors influencing OP were age, sex, hypertension, CHD, CI, hyperlipidemia, and PSH. Hence, the primary management step should focus on optimizing the influencing factors to reduce the risk of OP in elderly patients with T2DM. Additionally, our study suggests that a simple predictive model may be used as an automatic screening tool to provide additional reference values for the priority identification of high-risk patients.