Objective: To investigate risk factors for moderate to severe postoperative pain in patients undergoing endoscopic submucosal dissection(ESD) and develop a prediction model to validate it. Methods: A retrospective data analysis was conducted in 297 patients who underwent ESD for early gastrointestinal cancer or precancerous lesions from January 2022 to October 2024 at our hospital. Based on postoperative visual analog scale(VAS) scores, patients were stratified into mild pain group(n=175) and moderate to severe pain group(n=122), and then clinical data were compared between two groups. Univariate and multivariate Logistic regression was performed to identify independent risk factors for moderate to severe postoperative pain, followed by a construction of nomogram predictive model using the “rms” package in R software. Thereafter, ten-fold cross-validation was used to verify the generalization capability and stability of the algorithm, and simultaneously its predictive performance was assessed by the discrimination, calibration, and clinical application. Results: Logistic regression analysis showed that clinical malignant diagnosis(OR=1.888,95%CI 1.029-3.466), postoperative complications(OR=4.561,95%CI 2.522-8.248), procedure duration(≥60 min)(OR=2.170,95%CI 1.136-4.145), lesion size(≥7 cm2)(OR=2.031,95%CI 1.035-3.986), and surgical site(duodenal: OR=10.616, 95%CI 2.684-41.987); esophageal: OR=5.717, 95%CI 1.991-16.417; gastric body: OR=4.456, 95%CI 1.576-12.602; gastric antrum: OR=3.250, 95%CI 1.040-10.158) were independent risk factors for moderate to severe postoperative pain in patients with ESD(P<0.05). The accuracy of ten-fold cross-validation was 0.715. The Hosmer-Lemeshow goodness-of-fit test(χ2=2.938, P=0.891) and area under the curve(AUC) of 0.807(95%CI 0.757-0.856) separately suggested a good fit and a good discriminatory power of the model. Finally, the “non-compliance prediction column chart” can derive the greatest net benefit for clinical decision-making within the high-risk threshold range of 4% to 77%. Conclusion: Malignant diagnosis, complications, surgical time(≥60 min), lesion size(≥ 7 cm2), and surgical site(duodenum, esophagus, gastric body, and antrum) are independent risk factors for moderate to severe pain after ESD. Based on these risk factors, the constructed nomogram prediction model has a good discrimination and calibration ability, which can be used to evaluate early warning of high-risk patients with ESD for early gastrointestinal cancer and precancerous lesions, so as to take targeted pain management measures and improve the quality of perioperative care for patients. |