Association between Serum Magnesium Levels and Adverse Prognosis in Patients with Acute Pancreatitis Complicated by Acute Kidney Injury: A Retrospective Study Based on the MIMIC-IV Database
Discuss this preprint
Start a discussion What are Sciety discussions?Listed in
This article is not in any list yet, why not save it to one of your lists.Abstract
Objective Acute pancreatitis (AP) concurrent with acute kidney injury (AKI) remarkably elevates the risk of adverse outcomes in affected individuals. Abnormal serum magnesium concentrations have been linked to AKI development across diverse patient populations; however, the prognostic significance of serum magnesium levels at multiple time points (60 days, 90 days, 180 days, and 365 days) remains inadequately explored in AP patients with AKI admitted to the intensive care unit (ICU). This study aimed to assess the dynamic prognostic value of serum magnesium at the aforementioned key time points, clarify its clinical utility for risk stratification in this specific cohort, and investigate prognostic disparities among patients stratified by gender, as well as the presence or absence of diabetes mellitus, congestive heart failure, and pre-existing kidney disease. Methods Study data were extracted from the MIMIC-IV database, which was made publicly available in October 2024. Adult patients (≥18 years) diagnosed with AP, who had an ICU length of stay (LOS) exceeding 24 hours and complete mortality data, were enrolled. Exclusion criteria included missing serum magnesium measurements, ICU LOS < 24 hours, incomplete clinical records, and aberrant survival data. Finally, 492 data samples meeting the inclusion criteria were enrolled in the present study. Serum magnesium levels were stratified into three grades using X-tile software, with stratification thresholds determined based on 60-day survival outcomes. Clinical data were retrieved using SQL and PostgreSQL. Intergroup comparisons were performed using statistical methods including the Wilcoxon rank-sum test, chi-square test, and t-test. Survival analyses were conducted to evaluate the association between serum magnesium levels and prognosis. Univariate Cox regression models were used to initially assess the relationship, and multivariate Cox regression models were constructed to adjust for confounding factors based on key patient characteristics. Results Among the 492 enrolled patients, males accounted for 53.25%. No statistically significant differences were noted in gender distribution or age across the three groups stratified by serum magnesium levels (P > 0.05). The hypermagnesemia group had the longest median ICU length of stay (LOS) (145 hours, interquartile range [IQR]: 62–274 hours), with intergroup differences approaching statistical significance (H = 5.112, P = 0.078). The incidence rates of sepsis and hypertension increased significantly with elevated serum magnesium levels (sepsis: χ² = 11.496, P = 0.003; hypertension: χ² = 6.065, P = 0.048). Additionally, the utilization rate of continuous renal replacement therapy (CRRT) in the hypermagnesemia group (20.75%) was significantly higher than that in the hypomagnesemia group (9.15%) and normomagnesemia group (11.48%) (χ² = 6.302, P = 0.043). In the hypermagnesemia group, serum creatinine, potassium, sodium, and chloride levels were significantly elevated, while serum calcium levels were markedly decreased (all P < 0.05). Disease severity scores, including the Sequential Organ Failure Assessment (SOFA) score, Simplified Acute Physiology Score II (SAPS II), and Logistic Organ Dysfunction System (LODS) score, were significantly higher in the hypermagnesemia group compared to the other two groups (all P < 0.05). Regarding prognostic outcomes, the hypermagnesemia group had the shortest median survival times at 60, 180, and 365 days, with statistically significant intergroup differences (H-values: 6.75, 6.033, 9.235; all P < 0.049). Its 365-day mortality rate (37.74%) was more than twice that of the hypomagnesemia group (18.61%). Kaplan-Meier analysis revealed that the hypermagnesemia group had significantly lower survival rates at all time points compared to the hypomagnesemia group (log-rank test, P < 0.05). Multivariate Cox regression analysis indicated that the risk of death gradually increased with rising serum magnesium levels, and hypermagnesemia was associated with a 54% higher risk of 365-day mortality (HR = 1.54, 95% CI: 0.54–4.43). Restricted cubic spline (RCS) analysis demonstrated a significant increase in mortality risk when serum magnesium levels exceeded 1.9 mg/dL. Subgroup analysis confirmed that the association between serum magnesium levels and prognosis was consistent across different subgroups. Furthermore, during the 365-day follow-up, the hypermagnesemia-related mortality risk was significantly elevated in obese patients and those with sepsis (P < 0.05). Conclusion Elevated serum magnesium levels at ICU admission are significantly associated with adverse prognosis (60- to 365-day mortality) in AP patients complicated by AKI. Hypermagnesemia (>2.3 mg/dL) serves as an independent prognostic biomarker in this patient population. The stratified thresholds for serum magnesium (1.9 mg/dL and 2.3 mg/dL) identified in this study can be used as practical biological markers for risk stratification in AP patients with AKI. Routine serum magnesium monitoring is recommended for the early management of these patients, which may contribute to improved risk assessment and lay the groundwork for subsequent mechanistic research and intervention strategy development.