Introduction

Acute pancreatitis (AP) is a prevalent gastrointestinal condition that often requires emergency hospitalization, with a global annual incidence estimated at approximately 13 to 45 cases per 100,000 individuals1. The prognosis of AP depends on the severity of the disease. Most patients exhibit mild symptoms, including upper abdominal pain, abdominal distension, nausea, and vomiting, typically recovering within a week2. However, approximately 20% of patients may experience a rapidly progressive inflammatory response, potentially leading to moderate or severe acute pancreatitis (SAP), which can be associated with serious complications such as pancreatic necrosis or multiple organ failure, resulting in a mortality rate of up to 20% to 40%. Given that SAP progresses rapidly and is characterized by a poor prognosis, early and aggressive intervention is crucial for managing AP patients to prevent disease progression.

The pathogenesis of AP is complex, involving a systemic inflammatory cascade and microcirculatory disorders. The early intense inflammatory response can activate the coagulation system and injure vascular endothelial cells, leading to microcirculatory dysfunction and subsequent tissue ischemia, hypoxia, and multiple organ failure4,5,6,7. Venous thrombosis is a frequent local vascular complication of AP, particularly affecting the splanchnic venous system8. Once splanchnic vein thrombosis (SVT) occurs, it may result in severe complications such as gastrointestinal bleeding, portal hypertension, and intestinal ischemia9. Evidence indicates that SVT has a detrimental impact on the clinical course of AP and is strongly associated with increased disease severity and mortality10.

Based on the close association between coagulation abnormalities and clinical outcomes, anticoagulant therapy has emerged as a potential strategy worthy of attention. Heparin, a classic anticoagulant, plays a central role in preventing microvascular thrombosis and enhancing microcirculatory perfusion11. In addition to its anticoagulant effects, heparin exhibits significant anti-inflammatory properties by inhibiting various inflammatory mediators12,13. Furthermore, heparin demonstrates protective effects by inhibiting trypsin activity, reducing vascular endothelial injury, and modulating immune responses14,15,16.

The various mechanisms of heparin may improve the prognosis of AP. However, patients with severe AP often experience necrosis of the pancreas and surrounding tissues, significantly increasing the risk of bleeding. This complication renders anticoagulant therapy controversial in clinical guidelines17,18,19. Therefore, this study retrospectively collected hospitalization data for AP patients who were admitted to the intensive care unit (ICU) for the first time between 2009 and 2018, utilizing the Medical Information Mart for Intensive Care IV (MIMIC-IV) database to investigate the association between early prophylactic heparin use and patient outcomes.

Methods

Data sources

The MIMIC-IV (version 3.1) database is a large, publicly accessible intensive care database created by the MIT Laboratory for Computational Physiology. It contains comprehensive health-related data for patients admitted to the Beth Israel Deaconess Medical Center (BIDMC) ICU in Boston. The database encompasses extensive clinical data, including vital signs, laboratory results, medication information, nursing procedures, and the length of stay for each patient. To protect patient privacy, all personal information in the database has been de-identified. The author of this study, Yi Ding, has successfully completed the Collaborative Institutional Training Initiative exam (certification number: 66973490) and is qualified to access the database and extract data. Ethical approval and the requirement for individual patient consent were waived by the Institutional Review Boards of the Massachusetts Institute of Technology (MIT) and BIDMC for use of the MIMIC-IV database.

Participants

This study extracted patients diagnosed with AP from the MIMIC-IV database, identified by the ICD-9 code 577.0 and the ICD-10 codes K85-K85.92. Patients who met the following exclusion criteria were removed from the study: (1) age less than 18 years; (2) ICU stay of less than 24 h; (3) patients admitted to the ICU multiple times due to AP, with only data from the first ICU admission analyzed; (4) patients who received other anticoagulants during hospitalization, including enoxaparin, warfarin, rivaroxaban, fondaparinux, and argatroban; and (5) patients who used heparin for non-prophylactic purposes, such as treatment or dialysis.

Data collection

This study extracted data from the MIMIC-IV database using Navicat Premium (version 16) and Structured Query Language (SQL). This study extracted data from the MIMIC-IV database using Navicat Premium (version 16) and Structured Query Language (SQL): (1) demographic characteristics, such as gender, age, race, and weight; (2) vital signs, including mean arterial pressure (MAP), respiratory rate, heart rate, and temperature; (3) laboratory findings, such as white blood cell (WBC) count, red blood cell (RBC) count, hemoglobin, platelet count, international normalized ratio (INR), alanine aminotransferase (ALT), creatinine, blood urea nitrogen (BUN), anion gap (AG), and glucose; (4) therapeutic interventions, including vasopressin, continuous renal replacement therapy (CRRT), mechanical ventilation, and endoscopic retrograde cholangiopancreatography (ERCP); (5) complications, including hypertension, diabetes, obesity, chronic obstructive pulmonary disease (COPD), malignancy, heart failure, and renal failure; and (6) clinical severity scores, including the Sequential Organ Failure Assessment (SOFA) score, Charlson Comorbidity Index (CCI), and Simplified Acute Physiology Score II (SAPS II). Additionally, we recorded the administration of heparin for prophylaxis within 24 h after ICU admission (5,000 units/mL, 1 mL per dose, subcutaneously). Vital signs, laboratory indices, and clinical severity scores for all patients were extracted within 24 h of ICU admission. Missing values for screened variables did not exceed 10% (Table S1). Missing data were imputed using the MICE package in R (version 4.3.3) with the random forest method. Five datasets were generated, and the fifth was used for analysis. The R code for this process is available on GitHub (https://github.com//ding1374/imputation) for transparency.

Exposure and outcomes

Patients were divided into two groups: the heparin group (those who received subcutaneous prophylactic heparin within 24 h of ICU admission) and the control group (those who did not receive heparin on the first day of ICU admission). The primary outcome was 28-day all-cause mortality, and the secondary outcomes included 180-day all-cause mortality, in-hospital all-cause mortality, length of ICU stay, and length of hospital stay.

Statistical analysis

Continuous variables with a normal distribution were presented as mean ± standard deviation (SD), while non-normally distributed variables were expressed as median with interquartile range (IQR). Categorical variables were reported as counts and percentages. Appropriate statistical tests, including Student’s t-test, Mann-Whitney U test, or chi-square test, were employed for between-group comparisons of baseline characteristics.

This study investigated potential confounding factors associated with mortality through univariate analysis. After adjusting for different sets of covariates, three Cox proportional hazards models were constructed to evaluate the association between early prophylactic heparin use and mortality, with results presented as hazard ratios (HR) and 95% confidence intervals (CI). Model I was unadjusted for covariates; Model II was adjusted for demographic characteristics, including age, sex, ethnicity, and weight; and Model III was further adjusted for all variables in Model II plus those with P < 0.05 in the univariate Cox analysis, including ventilation, CRRT, vasopressin, malignancy, renal failure, heart failure, platelets, WBC, RBC, AG, BUN, creatinine, INR, MAP, respiratory rate, temperature, SOFA, SAPS II, CCI. The variance inflation factor (VIF) was used to assess multicollinearity among variables; all variables had VIF values of less than 5 in the multivariate Cox regression, indicating no multicollinearity (Table S2). Additionally, the cumulative incidence of patient mortality was analyzed using Kaplan-Meier curves, with the log-rank test applied to compare risks between groups.

After analyzing the original cohort, we utilized propensity score matching (PSM) to balance baseline differences between the groups. The propensity score for each patient was estimated using a logistic regression model, and 1:1 nearest-neighbor matching was then performed with a caliper width of 0.05 standard deviations of the propensity score. The balance of variables between the two groups, both before and after matching, was assessed using the standardized mean difference (SMD), with an SMD greater than 0.1 considered indicative of imbalance20. Additionally, we constructed a multiple robust estimation model using propensity scores to further validate the reliability of the study’s conclusions21.

This study performed subgroup analyses stratified by age, gender, SOFA score, mechanical ventilation use, diabetes, and hypertension. Additionally, to evaluate the impact of unmeasured confounders on the association between heparin use and mortality, we calculated E-values22. This statistic quantifies the strength of unmeasured confounding required to overturn the observed association. Data analysis was conducted using RStudio (version 4.3.1), and a P-value of < 0.05 was considered statistically significant.

Results

Baseline characteristics

Figure 1 illustrates the patient enrollment process. The final cohort included 852 patients, of whom 532 received early prophylactic subcutaneous heparin injections. Baseline characteristics before and after matching are presented in Table 1. Compared to patients who did not receive early heparin, those who did exhibited higher levels of RBC, hemoglobin, and blood glucose, as well as a greater prevalence of diabetes and hypertension; however, they showed lower INR values and reduced rates of malignancy. After PSM, 546 patients were enrolled, with 273 in each group. The SMD for all variables was less than 0.1, indicating a good balance of baseline characteristics.

Fig. 1
figure 1

Flow diagram of the research.

Table 1 Baseline characteristics of patients with acute pancreatitis before and after propensity score matching.

Analysis of primary and secondary outcomes

In the original cohort, patients who received early heparin exhibited a significantly lower 28-day all-cause mortality rate compared to those who did not receive heparin (HR = 0.74, 95% CI 0.57–0.95, P = 0.019). PSM analysis further corroborated this association (HR = 0.73, 95% CI 0.54–0.98, P = 0.037). Secondary outcome analysis indicated that early heparin use was significantly associated with a reduction in 180-day all-cause mortality (original cohort: HR = 0.72, 95% CI 0.58–0.90, P = 0.004; PSM: HR = 0.70, 95% CI 0.54–0.91, P = 0.009) and in-hospital all-cause mortality (original cohort: HR = 0.71, 95% CI 0.58–0.88, P = 0.002; PSM: HR = 0.68, 95% CI 0.53–0.87, P = 0.002). However, there were no significant differences between the two groups regarding ICU and hospital length of stay (P > 0.05) (Table 2). Kaplan-Meier survival curves shown in Fig. 2 indicated that the early heparin group had significantly lower cumulative all-cause mortality at both 28 and 180 days compared to the non-heparin group (log-rank test P < 0.05), and this association persisted in the PSM cohort.

Table 2 Association between heparin use and clinic outcomes in patients with acute pancreatitis.
Fig. 2
figure 2

Kaplan-Meier survival curve analysis between two groups before and after matching from the MIMIC-IV database. (A) Intergroup comparison of mortality rates within 28 days in original cohort. (B) Intergroup comparison of mortality rates within 180 days in original cohort. (C) Intergroup comparison of mortality rates within 28 days in matched cohort. (D) Intergroup comparison of mortality rates within 180 days in matched cohort.

In the multivariate Cox proportional hazards regression analysis, we adjusted for three models that included covariates with statistically significant differences identified in the univariate analysis (P < 0.05) (Table S3). As shown in Table 3, after adjusting for confounding factors in the multivariate analysis, early heparin use remained significantly associated with 28-day all-cause mortality (HR = 0.62, 95% CI 0.41–0.95, P = 0.027; PSM: HR = 0.55, 95% CI 0.31–0.95, P = 0.031), 180-day all-cause mortality (HR = 0.65, 95% CI 0.48–0.90, P = 0.008; after PSM: HR = 0.56, 95% CI 0.38–0.85, P = 0.006), and in-hospital all-cause mortality (HR = 0.60, 95% CI 0.39–0.92, P = 0.018; after PSM: HR = 0.54, 95% CI 0.30–0.96, P = 0.036). Furthermore, this conclusion was validated by doubly robust analysis (Table S4).

Table 3 Multivariable Cox regression analysis for mortality.

We investigated the association between heparin dosage on mortality in patients with AP, using the 0-dose group as a control. As shown in Table 4, in the unadjusted model (Model I), patients receiving 2 doses of heparin within 24 h of ICU admission were associated with significantly lower all-cause mortality rates at 28 days (HR = 0.57, 95% CI: 0.34–0.97; P = 0.037), 180 days (HR = 0.48, 95% CI: 0.29–0.79; P = 0.004), and during hospitalization (HR = 0.53, 95% CI: 0.32–0.89; P = 0.015). These associations remained statistically significant after multivariate adjustments in Models II and III. In contrast, patients receiving 3 doses of heparin demonstrated a trend toward reduced mortality risk in Models I and II; however, this did not reach statistical significance after adjustment in Model III.

Table 4 Association of heparin dosage and mortality.

Subgroup analysis

Figure 3 illustrates the results of the subgroup analysis regarding 28-day mortality in the matched cohort. In all subgroups, the interaction tests did not yield statistically significant results (P values for interaction were all > 0.05). This indicates that the therapeutic effect of early heparin remains consistent across patients with varying clinical characteristics.

Fig. 3
figure 3

Subgroup analyses of the association between early heparin use and 28-day mortality in matched cohort.

Sensitivity analysis

We conducted an E-value analysis to assess the sensitivity to unmeasured confounding (https://www.evalue-calculator.com/evalue/). The calculated E-value for the association between early heparin use and 28-day mortality in patients with AP was 2.64. This finding suggests that any unmeasured confounder would need to exhibit a strong association with both heparin use and 28-day mortality (relative risk > 2.64) for residual confounding to significantly alter the observed association. Therefore, unmeasured or unknown confounders are unlikely to exert a stronger impact on 28-day mortality than known risk factors.

Discussion

This study utilized the MIMIC-IV database to investigate the relationship between early heparin use and all-cause mortality risk in patients with AP. The results demonstrate a significant association between early prophylactic heparin use and lower mortality among ICU patients with AP. This association remained consistent even after adjusting for multiple confounding factors. Our findings suggest a potential benefit of early heparin use and may provide important insights into the clinical management of this serious condition.

Previous basic and clinical studies have suggested that heparin can not only inhibit ischemia/reperfusion-induced progression of AP and accelerate pancreatic recovery23, but also improve the severity of taurocholate-induced pancreatitis24. Clinical cohort studies further support its therapeutic potential: a retrospective analysis by Mao et al. demonstrated that early systemic anticoagulation therapy was associated with a reduced 90-day readmission risk and improved quality of life in patients with acute necrotizing pancreatitis25. Additionally, another population-based retrospective cohort study found that AP patients receiving systemic anticoagulation therapy had better prognoses regarding acute kidney injury, organ failure, ICU admission rates, and in-hospital mortality26. However, evidence remains conflicting, as a meta-analysis by Yin et al. showed no significant survival benefit with heparin in AP patients with splanchnic venous thrombosis27. These discrepancies may stem from differences in patient complications, individual variability, and treatment practices across institutions. Furthermore, the potential benefit of heparin in AP may be partly explained by its role in sepsis, a common cause of late mortality in severe acute pancreatitis. Systematic reviews and cohort studies have reported that heparin is associated with improved survival in sepsis and sepsis-associated acute kidney injury28,29, collectively supporting its potential relevance in the management of acute pancreatitis.

In delving into the potential mechanisms of heparin, our findings suggest that its association with improved survival in patients with AP may be partly attributable to its diverse pathophysiological effects. Its fundamental anticoagulant action is likely central, as it counteracts the overactivation of the coagulation cascade and impaired fibrinolysis observed in AP, thereby alleviating microvascular thrombosis, improving pancreatic and systemic microcirculation, and potentially reducing organ failure30,31,32. Heparin may also attenuate the inflammatory response by inhibiting leukocyte adhesion and recruitment, binding and neutralizing pro-inflammatory mediators such as TNF-α, IL-6, and HMGB1, and modulating TNF-α/NF-κB signaling, which could further limit inflammation-mediated tissue damage and excessive immune activation33,34,35. Heparin may additionally contribute to vascular and pancreatic protection by stabilizing the endothelial glycocalyx, thereby preserving barrier integrity, reducing vascular leakage, and maintaining microvascular function36. At the same time, through the formation of the heparin–antithrombin III complex, it can inhibit key pancreatic proteases such as trypsin and chymotrypsin, decreasing pancreatic autodigestion and mitigating local pancreatic injury23. In summary, the multiple actions of heparin in AP appear to be associated with improved clinical outcomes. These effects provide a biological rationale for the use of heparin in this setting and may help explain the survival benefit observed in our cohort.

In our study, prophylactic doses of heparin were associated with lower mortality in patients with AP. However, it is important to acknowledge that heparin-related side effects, such as bleeding and thrombocytopenia, must not be overlooked. Previous studies have reported that anticoagulant therapy can induce severe upper gastrointestinal bleeding in AP patients37. This concern contributes to the lack of consensus in current clinical practice guidelines regarding the use of heparin for treating SAP. Nonetheless, recent studies have confirmed the efficacy and safety of heparin in managing AP. Two retrospective studies reported associations between systemic anticoagulation and improved outcomes in severely ill patients, without a significant increase in bleeding events26,38. Additionally, a meta-analysis found no significant increase in anticoagulation-related complications39. Notably, a meta-analysis by Podda et al. showed that, through dose subgroup analysis, AP patients receiving therapeutic doses of anticoagulation may experience a higher rate of bleeding, whereas those given prophylactic doses showed lower mortality and a comparable bleeding risk, and appeared to have a lower incidence of organ failure40. Given that concerns regarding the bleeding risk associated with therapeutic doses of heparin may hinder adherence to clinical guidelines, these findings have important clinical implications. In practice, for patients with SAP, early administration of prophylactic doses of heparin should be considered a treatment strategy with a favorable benefit-risk ratio, provided that contraindications such as active bleeding and severe coagulation disorders are excluded and that related indicators are closely monitored.

This study has several limitations. First, as a retrospective study, it is subject to potential bias that may not be fully eliminated despite the use of PSM and multivariable analyses. Second, some potential confounders could not be extracted from the database, which may have introduced bias; however, our E-value sensitivity analysis suggests that these unmeasured confounders are unlikely to fully account for the observed treatment effect. Third, we were unable to determine the exact causes of death, so all-cause mortality was used as the outcome, which limits further exploration of the mechanisms underlying the effects of heparin. Fourth, adverse events after heparin administration were not comprehensively recorded, and its safety therefore requires further confirmation. Fifth, this study focused specifically on heparin and did not directly compare it with other anticoagulants, which limits our ability to evaluate potential class effects and should be addressed in future studies. Finally, because the data were derived from a single center, the generalizability of our findings remains limited, although patients from multiple racial groups were included. These limitations may have influenced our results, and the findings should be interpreted with caution. Future multicenter, prospective studies across diverse regions and practice settings are needed to further validate and extend these results.

Conclusion

This study found that early prophylactic heparin use was significantly associated with lower risks of 28-day, 180-day, and in-hospital all-cause mortality among critically ill AP patients. The implementation of early prophylactic anticoagulation in AP patients admitted to the ICU may represent a potential approach to improve clinical outcomes, although further multicenter prospective studies are warranted to validate these associations.