Introduction

Diabetes mellitus (DM) encompasses a diverse spectrum of conditions characterized by hyperglycemia, categorized as type 1, type 2, “other specified types,” and gestational diabetes mellitus1. The prevalence of DM has surged markedly in recent decades, evolving into a significant global health challenge2. According to the International Diabetes Federation (IDF) Atlas 10th edition, the projection indicates that the diabetic population will escalate to 643 million by 2030 and 783 million by 20453,4. Congestive heart failure (CHF), a predominant and severe cardiovascular consequence of DM, has garnered substantial global attention4. Around 40% of CHF patients are afflicted with DM5, which also entails a two- to five-fold elevation in heart failure risk compared to normoglycemic individuals6. Previous inquiries underscore the unfavorable clinical prognosis for diabetic patients with heart failure, exhibiting higher mortality rates than their normoglycemic counterparts7,8. The advent of heart failure in diabetic individuals precipitates a tenfold surge in mortality rates, resulting in a meager five-year survival rate of 12.5%9. Consequently, an urgent imperative arises to concurrently address DM and CHF. In recent years, the relationship between blood electrolyte disorder and the progress of diabetes and heart failure has gradually aroused the interest of scholars, especially blood calcium10,11.

Calcium is crucial for many physiological functions, including muscle contraction, secretion of neurotransmitters and hormones, blood coagulation, and mineralization of bone12. Approximately 50% of serum calcium is in the ionized form, while 40% in the bound form mainly to albumin, and 10% is bound to anions13. Serum total calcium is the total sum of three forms and is least affected by physiological changes or varieties in measurement. Therefore, total serum calcium is routinely used in clinical practice to represent calcium status in the human body14. An epidemiological study across multiple centers in the United States has indicated that calcium concentrations ≥ 2.38 mmol/l (9.5 mg/dl) correlate with heightened diabetes risk15. Substantial evidence suggests that elevated serum calcium levels contribute to heightened all-cause mortality among individuals with diabetes, primarily due to augmented risk of coronary artery calcification16,17. Elevated serum calcium levels are linked to increased vulnerability to heart failure with preserved ejection fraction in type 2 diabetes (T2D) patients18. Investigations by Jensen et al. have highlighted that both excessively high and low serum calcium levels in CHF patients are associated with elevated mortality rates19. Prior research underscores the detrimental impact of elevated blood calcium levels on diabetes management and associates extreme serum calcium levels with unfavorable heart failure outcomes. Significantly, heart failure and diabetes mellitus often co-occur, yet the simultaneous exploration of serum calcium levels in both conditions remains limited5.

To our knowledge, we are the first to evaluate such an association between serum calcium levels and patients with combined diabetes mellitus and heart failure, utilizing the first large-sample patient data from the U.S. context.

Methods

Data sources and study population

We conducted a retrospective cohort analysis utilizing the Medical Information Mart for Intensive Care IV (MIMIC-IV) database, a comprehensive compilation of contemporary electronic health records covering a decade of hospital admissions (2008–2019)20. MIMIC-IV, an updated iteration of MIMIC-III, contains extensive information encompassing patients’ demographics, laboratory results, medications, vital signs, surgical interventions, disease diagnoses, medication protocols, and post-discharge survival outcomes21. This dataset notably furnishes precise insights into mortality events, including in-hospital deaths and deaths within 90 days post-discharge22. Leveraging the MIMIC-IV database in-depth can offer valuable evidence for clinical decision-making and prognostic assessments. Research clearance for database access was granted by the institutional review bodies at the Massachusetts Institute of Technology and Beth Israel Deaconess Medical Center. Given the absence of clinical impact and the anonymization of protected health information, the necessity for consent was waived23. The responsible author (ID: 11639604) met the prerequisites for database access and assumed data extraction responsibilities.

Identification of heart failure patients within the MIMIC-IV database employed ICD-9CM code 428, while diabetic patients were screened using ICD-9-CM code 250. Our analysis encompassed 16,012 retrospectively selected patients diagnosed with congestive heart failure (CHF), excluding those under 18 years of age (n = 12). Subsequent exclusions comprised patients with incomplete outcome data (n = 17) and non-diabetic patients (n = 8920). Ultimately, the final study cohort comprised 7063 patients after thorough screening, as depicted in Fig. 1.

Figure 1
figure 1

Flowchart of patient selection.

Data collection and primary outcome

The primary exposure of interest pertains to the serum calcium levels of patients. This serum calcium datum corresponds to the highest recorded value within the initial 24 h period subsequent to the patients’ admission to the intensive care unit (ICU), denominated in milligrams per deciliter (mg/dL). The principal outcome under investigation is the in-hospital mortality rate, denoting the proportion of patients who undergo fatal consequences due to a deterioration in their condition or other causes during a specific time frame while receiving treatment within hospitals.

We conducted a comprehensive data collection employing Structured Query Language (SQL), encompassing continuous variables such as age, anion gap (AG), blood urea nitrogen (BUN), chloride, creatinine, hemoglobin (Hb), mean corpuscular hemoglobin (MCH), mean corpuscular hemoglobin concentration (MCHC), mean corpuscular volume (MCV), platelet count, potassium, sodium, alongside severity scores represented by SOFA and APSIII. Additionally, we recorded other continuous variables pertaining to vital signs such as temperature and heart rate. A diverse array of categorical variables, including gender, race, complicating medical conditions, medication regimens, and medical procedures, were also collected. Subsequently, we selected the following four complicating medical conditions as covariates, drawing from analogous research: chronic obstructive pulmonary disease (COPD), acute myocardial infarction (AMI), melanosis coli (MC), and hepatic failure (HepF).

Statistical analysis

Firstly, Table 1 presents baseline demographic and clinical data for the cohorts. Continuous variables with normal distributions are displayed as mean ± standard deviation (SD) and were compared using Student’s t-test or ANOVA. Skewed continuous variables are presented as medians ± interquartile ranges (IQR) and were analyzed with Mann–Whitney U or Kruskal–Wallis tests. Categorical variables were assessed for association using the chi-square test and reported as percentages. Differences among groups, stratified by serum calcium levels, were evaluated via one-way ANOVA or Kruskal–Wallis tests.

Table 1 Characteristics of the study population (N = 7063).

Secondly, to mitigate potential confounding, multivariate logistic regression examined the link between blood calcium levels and in-hospital mortality across seven groups. Odds ratios (ORs) and 95% confidence intervals (CIs) were calculated. Stepwise regression models were utilized, progressively adjusting for covariates. Model 1 was unadjusted, while Model 2 incorporated demographic variables (gender, age, race). Model 3 added complicating diseases (COPD, AMI, MC, HepF), and Model 4 further adjusted for medical procedures, medication usage, vital signs, and blood biochemical indicators. Model 5 included APSIII and SOFA scores. Linear trend assessments were conducted using categorical variables as continuous in regression models.

Furthermore, to examine the dose–response relationship between serum calcium and in-hospital mortality, cubic spline and penalized spline models were fitted. Threshold effects of serum calcium on mortality were analyzed using piecewise regression models.

Lastly, subgroup analyses depicted prognostic associations between serum calcium and patient characteristics, presented through forest plots. Forest plots described subgroup analyses including age, gender, race, and presence of COPD, AMI, and MC.

All analyses utilized R version 4.1.1 (R Foundation for Statistical Computing, Vienna, Austria) and Free Statistics software version 1.7. Statistical significance was set at P < 0.05 (two-sided). Reporting adhered to the Strengthening the Reporting of Observational Studies in Epidemiology (STROBE) statement for studies.

Ethics approval and consent to participate

The establishment of this database was approved by the Massachusetts Institute of Technology (Cambridge, MA, USA) and Beth Israel Deaconess Medical Center (Boston, MA, USA), and informed consents were exempted due to all patients’ data were anonymized before the data were obtained. We also complied with all relevant ethical regulations regarding the use of the data in our study. All reports adhered to the guidelines for Strengthening the Reporting of Observational Studies in Epidemiology and the Declaration of Helsinki.

Results

Baseline characteristics of selected participants

The study enrolled a total of 7063 patients after a rigorous screening process (Fig. 1). Table 1 presents an overview of the baseline characteristics of the study population based on seven distinct subgroups categorized by serum calcium concentrations. Q1(≤ 7.7 mg/dL), Q2(7.7–8 mg/dL), Q3(8–8.3 mg/dL), Q4(8.3–8.5 mg/dL), Q5(8.5–8.8 mg/dL), Q6(8.8–9.1 mg/dL), Q7(≥ 9.1 mg/dL). The median age of the patients included in the study was 71.5 ± 12.2 years, with 55.6% male. Most participants were of white ethnicity, constituting 63% of the sample. Black participants constituted approximately 18.1%, while individuals from other racial backgrounds, including Asians, comprised 19% of the cohort. The overall in-hospital mortality rate stood at 12.2%.

Patients with elevated serum calcium levels displayed a higher proportion of female and black ethnicity, a greater incidence of COPD complications, elevated SBP, anion AG, Hb, platelet count, potassium, sodium, and red blood cell counts compared to patients with lower serum calcium levels. Conversely, the subgroup with decreased serum calcium levels exhibited an increased likelihood of requiring phenylephrine and vasopressin interventions, intubation, and ventilation. Additionally, this subgroup presented higher levels of chloride, MCH, WBC, SOFA scores, and APSIII scores. Blood biochemistry analyses indicated more pronounced BUN and Creatinine concentrations in both high and low calcium groups, with the most significant values observed in the highest calcium group, Q7. Similarly, deviations in serum calcium levels, whether elevated or diminished, correlated with heightened in-hospital mortality rates. Remarkably, the subgroup with the lowest serum calcium value displayed the highest in-hospital mortality rate of 18.3%. Detailed baseline characteristics are provided in Table 1.

Relationship between serum calcium and in-hospital mortality

Table 2 depicts the correlation between serum calcium levels and in-hospital mortality among diabetes patients afflicted with congestive heart failure. Employing a multivariate logistic regression model, we computed the odds ratios (OR) accompanied by their corresponding 95% confidence intervals (CI). The adjustment for this study encompassed demographic characteristics, comorbidities, medical interventions, medication profiles, essential vital signs, blood biochemical markers, APSIII score, and SOFA score.

Table 2 Multivariable logistic regression to assess the association of serum calcium with In-hospital mortality rate.

In the unadjusted analysis, the cohorts displaying the lowest serum calcium levels (Q1 and Q2) exhibited a notably heightened susceptibility to in-hospital mortality, reflecting a 169% increase (OR = 2.69, 95% CI 2.02–3.59, p < 0.001) and a 110% increase (OR = 2.1, 95% CI 1.55–2.85, p < 0.001), respectively, in contrast to the reference group. Similarly, the high serum calcium group demonstrated a comparable trend, indicating a 72% elevated risk of in-hospital mortality within Q7 (OR = 1.72, 95% CI 1.28–2.31, p < 0.001).

It is noteworthy that this observed association retained its statistical significance even subsequent to comprehensive covariate adjustment. Specifically, following full adjustment, Q1 exhibited a 69% elevation in in-hospital mortality (OR = 1.69, 95% CI 1.17–2.44, p = 0.005), while Q2 demonstrated a 62% increase in in-hospital mortality (OR = 1.62, 95% CI 1.11–2.36, p = 0.013). Furthermore, the adjusted OR for Q7 stood at 1.57 (95% CI 1.1–2.24, p = 0.012).

Dose–response relationships

The dose–response analysis, as shown in Fig. 2 (P for nonlinearity = 0.03), unveiled a non-linear link between serum calcium levels and in-hospital mortality, following adjustments for potential covariates. The spline curves vividly portray the U-shaped trend characterizing this relationship. Moreover, the study identified a threshold effect in the nexus between serum calcium levels and in-hospital mortality, as highlighted in Table 3. Among patients exhibiting serum calcium levels ≤ 9.05 mg/dL, the odds ratio (OR) for in-hospital mortality stood at 0.814 (95% CI 0.678–0.976; p = 0.0262), denoting an 18.6% reduction in the relative risk of in-hospital mortality with each unit increase in serum calcium levels. Conversely, beyond the inflection point of 9.05 mg/dL, a subtle positive correlation emerged linking serum calcium levels to in-hospital mortality (OR = 1.153, 95% CI 0.818–1.626, p = 0.4158).

Figure 2
figure 2

Dose–Response Relationships between Blood calcium with In-hospital mortality odds ratio. Solid and dashed lines represent the predicted value and 95% confidence intervals. Adjusted for demographic variables (sex, age, race), Concomitant disease(COPD,AMI,MC, HepF), Medical Procedures(Vent, Intubated), Medication situation(Norepinephrine Dopamine Epinephrine Phenylephrine Vasopressin),Basic vital signs(Temperature Respiratory Rate Heart Rate SBP),Blood biochemical indicators(AG BUN Chloride Creatinine Hb MCH MCHC MCV Platelet Potassium Sodium RBC RDW WBC), APSIII,SOFA. Only 99% of the data is shown. % weighted proportion, CHF congestive heart failure, COPD chronic obstructive pulmonary disease, HepF hepatic failure, AMI acute myocardial infarction, APSIII Acute Physiology III, SOFA Sequential Organ Failure Assessment, SBP systolic blood pressure, AG anion gap, BUN blood urea nitrogen, MCH mean corpuscular hemoglobin, MCHC mean corpuscular hemoglobin concentration, MCV mean corpuscular volume, RBC red blood cell, RDW red blood cell distribution width, WBC white blood cell count, CI confidence interval, OR odds ratios, Ref reference.

Table 3 Threshold effect analysis of relationship of serum calcium with In-hospital mortality rate.

Subgroup analysis

We performed subgroup analyses to investigate potential modifications of this association by other confounding variables (Supplement Fig. 1). The subgroup analyses incorporated stratification variables such as age, gender, COPD, AMI, and MC. No significant interaction was observed between in-hospital mortality and all of the stratification above variables (p > 0.05), further confirming the reliability of our conclusions.

Discussion

Numerous studies have identified prevalent disturbances in serum calcium homeostasis among critically ill patients, wherein both elevated and diminished levels correlate with heightened susceptibility to adverse clinical outcomes24,25. This phenomenon has been independently corroborated in cohorts of patients with diabetes and heart failure16,17,19. To the best of our knowledge, we are the first to demonstrate such an association between blood calcium concentrations and in-hospital mortality in the context of concomitant diabetes mellitus and heart failure. Our findings distinctly unveil a substantial nexus between in-hospital mortality and aberrant serum calcium levels, encompassing both hypercalcemia and hypocalcemia, within individuals afflicted with diabetes mellitus and heart failure. Importantly, this correlation perseveres even subsequent to meticulous adjustment for plausible confounding variables.

In alignment with our investigation, prior research has consistently indicated a robust correlation between serum calcium levels and the onset, prognosis, and outcomes of individuals afflicted with diabetes or heart failure. A recent cross-sectional study, employing a constrained cubic spline curve, unveiled a J-shaped association between serum calcium levels and type 2 diabetes (T2D). Logistic regression analysis further disclosed a statistically significant elevation in the risk of T2D among individuals in the high serum calcium group in comparison to the moderate group26. Concurrently, three distinct cohort analyses conducted in China (n = 6096)27, the United States (n = 12,800)28, and Norway (n = 27,158)29, consistently affirmed a positive correlation between serum calcium levels and diabetes risk. Moreover, serum calcium exhibits an indirect influence on in-hospital mortality among diabetic patients. Kwak et al., by introducing serum calcium as a continuous variable in a multivariate model, demonstrated that each 1 SD mg increase in serum calcium resulted in a 30% rise in coronary artery calcification scores16. A significant interaction between the average coronary calcium score (CCS) and diabetes mellitus (DM) also emerged (p < 0.00001). Notably, mortality rates exhibited a substantial elevation in diabetic subjects relative to non-diabetic subjects as CCS levels escalated17. These findings collectively suggest a connection between hypercalcemia and unfavorable outcomes among diabetic individuals, partially aligning with our own observations. However, existing conclusions primarily emphasize high serum calcium as a diabetes risk factor, with insufficient consideration for the impact of low serum calcium on mortality. This discordance underscores the intricate nature of the relationship between calcium levels and diabetes, likely influenced by factors such as sample size, ethnicity, confounding adjustments, and study design. While studies pertaining to heart failure patients are comparatively smaller than those concentrating on diabetes, a cross-sectional echocardiographic investigation identified an independent association between elevated albumin-adjusted serum calcium levels and heart failure with preserved ejection fraction in individuals with type 2 diabetes mellitus30. Notably congruent with our findings, a Danish cohort study involving chronic heart failure patients revealed a parallel observation. Both hypocalcemia and hypercalcemia conferred increased mortality risks in the short term (within 30 days) and the long term (beyond 30 days)19.

In our study, we observed a U-shaped dose–response relationship between serum calcium levels and the odds ratio for intrahospital mortality. This curve exhibited an initial decrease followed by an increase. The inflection point of the curve, corresponding to the nadir, occurred around 9.05 mg/dL. At this point, the odds ratio for in-hospital mortality reached 1. Deviations from the 9.05 mg/dL threshold, whether higher or lower, were associated with an escalating risk of in-hospital mortality. Previous research has predominantly focused on heart failure or diabetes as individual ailments. However, given the frequent coexistence of these conditions, our study design better reflects real-world clinical scenarios. Moreover, our investigation underscores the importance of hypocalcemia as a critical indicator warranting meticulous attention. Within a clinical context, low serum calcium levels hold as much significance as elevated levels. The findings of this study hold the potential to facilitate earlier and more efficacious medical interventions and strategies for individuals dealing with both diabetes mellitus and heart failure, ultimately culminating in a reduction of their mortality rate.

The precise mechanism underlying the association between serum calcium and the concurrent diagnosis of diabetes mellitus (DM) and congestive heart failure (CHF) remains unclear, though several potential hypotheses have been proposed. Firstly, calcium influx is implicated in the stimulation of insulin secretion, and its aberration is linked to β-cell dysfunction and the onset of type 2 diabetes31. Additionally, calcium ions (Ca2 +) modulate insulin signaling pathways, thereby influencing cellular insulin sensitivity32. Research suggests that heightened serum calcium levels inhibit the production of parathyroid hormone (PTH), leading to a reduction in the biologically active form of vitamin D33. Deficiency in vitamin D augments systemic inflammatory mediators, exacerbates cellular oxidative stress, suppresses the immune system’s release of anti-inflammatory factors, and heightens susceptibility to diabetes and cardiovascular disease34,35,36. Furthermore, a complex interplay exists between cardiovascular well-being and mineral homeostasis. Calcium functions as a pivotal secondary messenger, exerting a critical role in governing mitochondrial activity and upholding excitation–contraction coupling mechanisms37. Perturbation of calcium homeostasis detrimentally impacts the contractile proficiency of the heart, culminating in compromised cardiac performance38. Anomalies in calcium signaling may lead to cardiac arrhythmias, thereby exacerbating heart failure conditions39. The deleterious effects of calcium imbalance extend to myocardial and vascular structures. For instance, the deposition of calcium along the coronary artery walls gives rise to coronary calcification, a well-recognized risk factor contributing to the progression of heart failure40,41.

Our research possesses notable design and statistical advantages. Initially, we focused on assessing serum calcium levels, a clinically feasible metric. Calcium’s role as a straightforward and dependable clinical marker enhances the translational prospects of our theoretical discoveries in the realm of medical application. Secondly, our investigation represents a pioneering effort in examining a sizable cohort of patients with diabetes and heart failure, distinguished by a substantial sample size and data quality. Furthermore, our study substantiates a significant non-linear correlation between serum calcium levels and in-hospital mortality, demonstrated via refined curve fitting techniques. Additionally, we mitigated bias arising from confounding variables by employing subgroup analyses and multivariate logistic regression.

However, there exist several limitations within this study. First, it is a retrospective cohort study, which by design cannot establish causal relationships, but is intended to assess associations. Secondly, our methodology used ICD9 codes to identify patients. But the method relies on the accuracy of ICD9 coding. Coding inconsistencies vary significantly by diagnosis, and rates of coding issues have been reported as high as 80%42. Thirdly, different types of heart failure, such as Heart failure with preserved ejection fraction (HFpEF), Heart failure with reduced ejection fraction (HFrEF), and Heart failure with mildly reduced ejection fraction (HFmrEF), may have different impacts on the results. However, due to the lack of relevant subtype heart failure data, we will verify it in our own database in the future. In addition, our study population primarily consisted of participants in the United States, which may limit the generalization of the findings to other populations. Finally, due to the limitations of the institutional database, we were unable to collect detailed information on different drugs in patients, which plays an important role in heart failure (HF). For example, different types and doses of diuretics, patient enuresis status, and patient resistance to diuretics have a certain impact on the treatment and management of heart failure in patients. And the role of parathyroid hormone is related to calcium serum levels and prognosis of patients with HF43. Similarly, we used total serum calcium level rather than corrected values of calcium because it is readily available. In the future, based on the present research, we will further supplement the data and conduct detailed and conduct prospective controlled trials with large sample sizes to provide more powerful evidence to support our findings.

In summary, our study expands upon prior research concerning the links between serum calcium and diabetes as well as heart failure. Deviations in serum calcium levels, whether elevated or diminished, significantly impact the likelihood of in-hospital mortality among diabetes patients with congestive heart failure. Optimal in-hospital survival rates were observed when serum calcium levels reached 9.05 mg/dL. The serum calcium level holds promise as a straightforward and dependable prognostic marker.