Abstract:Objective To investigate the risk factors of postoperative pancreatitis after endoscopic retrograde cholangiopancreatography (ERCP), establish a quantitative risk prediction model, and conduct external validation.Methods The clinical data of patients with ERCP were analyzed. Among them, 603 ERCP patients From January 2017 to January 2021 were selected as the modeling group, and 205 ERCP patients from March 2021 to March 2022 were selected as the validation group. Pancreatitis was diagnosed according to Atlanta standards. There were 45 cases in the modeling group and 23 cases in the validation group developed pancreatitis after ERCP. Compare the clinical data and biochemical indicators of patients with and without pancreatitis in the modeling group, and screen for risk factors of pancreatitis through multivariate Logistic regression analysis. Then, establish a risk prediction model and validate it.Results Univariate analysis showed that there were statistically significant differences in age, history of gastectomy, calculus of common bile duct, papillary foramen nodule type, pancreatic wire channel, sphincterotomy, serum total bilirubin and albumin between the two groups (P < 0.05). Multivariate Logistic regression analysis showed that the history of gastrectomy (OR^ = 6.417, 95%CI: 1.900 ~ 21.675, P = 0.000), calculus of common bile duct (OR^ = 3.442, 95%CI: 1.496 ~ 7.917, P = 0.000), papillary foramen nodule type (OR^ = 2.447, 95%CI: 1.072 ~ 5.585, P = 0.018), pancreatic wire channel (OR^ = 3.673, 95%CI: 1.609 ~ 8.383, P = 0.000), sphincterotomy (OR^ = 1.758, 95%CI: 1.140 ~ 2.711, P = 0.004), elevated total bilirubin (OR^ = 1.415, 95%CI: 1.084 ~ 1.847, P = 0.008) and decreased albumin (OR^ = 1.239, 95%CI: 1.016 ~ 1.510, P = 0.010) were independent risk factors for post ERCP pancreatitis. Establish a risk prediction model Y = -1.023 + 1.859×(history of gastrectomy) + 1.236×(calculus of common bile duct) + 0.895×(papillary foramen nodule type) + 1.301×(pancreatic wire channel) + 0.564× (sphincterotomy) + 0.347×(elevated total bilirubin) + 0.214×(decreased albumin). The receiver operator characteristic curve (ROC curve) showed that the area under the curve (AUC) of the model predicting pancreatitis in the modeling and validation groups were 0.895 and 0.864, respectively. After assigning values to each variable in the model, it was divided into low risk (0 ~ 5 points), medium risk (5 ~ 10 points), and high risk ( ≥ 10 points). The actual incidence of high-risk pancreatitis in the modeling and validation groups was significantly higher than that of low-risk patients, and the actual incidence of high-risk pancreatitis was significantly higher than that of medium risk patients, with statistical significance (P < 0.05).Conclusion The history of gastrectomy, calculus of common bile duct, papillary foramen nodule type, pancreatic wire channel, sphincterotomy, elevated total bilirubin and decreased albumin were independent risk factors for post ERCP pancreatitis. We have developed a quantitative risk prediction model with good predictive efficacy for pancreatitis, which has important clinical application value.