Abstract
Abstract
Introduction
To enhance the quality of surgical care, complications need to be minimised. Consequently, comprehending the occurrence and risk elements for postoperative complications is essential. Subsequently, we will apply machine learning (ML) algorithms to build risk factor prediction models that will assist surgeons in identifying the risk factors associated with the development of postoperative complications after general surgery.
Methods and analysis
This research will take place at a tertiary referral medical centre located in Bandar Abbas, Hormozgan, Iran. The inclusion criteria are (1) individuals aged 18 years or older who have any type of general surgery and (2) hospitalised from September 2025 to September 2026. Individuals with insufficient data will be excluded. The main outcomes of the study are complications within 30 days of surgery. Patients will be divided into two groups based on whether they develop complications or not. The predictors are classified as (1) patient-related factors, (2) surgery-related factors and (3) postoperative factors. We intend to detect postoperative complications following general surgery using four distinct supervised ML techniques: (1) logistic regression, (2) decision trees, (3) random forests and (4) extreme gradient boosting. Accuracy, precision, recall and F1 score will be used to evaluate the performance of ML models.
Ethics and dissemination
With approval from the Hormozgan University of Medical School Research Ethics Board (IR.HUMS.REC.1404.137), we will carry out a forward-looking analysis of the medical records of patients undergoing general surgery. We will obtain informed consent, and all information will be collected and examined anonymously. The findings of this research will be released in appropriate scientific publications.
Keywords: SURGERY, Machine Learning, Risk Factors
STRENGTH AND LIMITATIONS OF THIS STUDY.
Evaluating various complications post-surgery as outcome indicators is the study’s strength.
Multiple potential risk factors are chosen to serve as feature selection for running the machine learning models.
This research is applicable across medical fields, not only general surgery.
Recruiting a diverse population can be time-consuming and may still present challenges in achieving the target number of participants.
Introduction
Objective key results serve as a powerful tool for executing plans and managing performance. Establishing clear objectives and quantifiable key results enables healthcare organisations to align their efforts, monitor advancement and accomplish their strategic aims.1 In addition to ensuring patient safety and satisfaction, complications arising from surgical procedures represent one of the most difficult elements of the healthcare system.2 Consequently, minimising negative events after surgical treatment is one of the main objectives of any healthcare institution. In recent years, quality improvement offices in numerous healthcare facilities have sought to reduce the negative outcomes of surgical procedures by creating measurable key outcomes, including evaluating the probability of complications and recognising the risks linked to complications after any intervention.3 4 To enhance the quality of surgical care, complications need to be minimised. Consequently, comprehending the occurrence and risk elements for postoperative complications is essential. Nonetheless, issues are varied and challenging to characterise consistently.
Earlier efforts to use preoperative risk factors for forecasting postoperative complications concentrated on traditional statistical modelling techniques.5 In recent years, the focus has shifted to enhancing prior models by developing and validating classification models to assess the risk of postoperative haematoma and wound infection through machine learning (ML) techniques. In the past few years, artificial intelligence (AI) has progressed rapidly within the healthcare field. ML, a crucial component of AI, provides the benefits of more consistent model development and improved accuracy in predictions, gaining popularity among doctors and extensively used in clinical forecasting and various other applications.6,13
The American College of Surgeons’ National Surgical Quality Improvement Programme (ACS-NSQIP) serves as a variable-based data registry aimed at enhancing hospital-wide quality throughout all surgical divisions. The ACS states that the NSQIP helps surgical and quality teams make informed choices to enhance care quality while reducing complications and expenses.14 15
Despite being a widely recognised tool used in numerous hospitals globally, research outcomes regarding ACS-NSQIP’s effectiveness in forecasting surgical complication risks have differed. For instance, the findings of a recent study indicate that the ACS-NSQIP surgical risk calculator effectively predicted major complications, surgical site infections, rehabilitation facility discharge and mortality in patients undergoing common bile duct procedures. Nonetheless, the model showed weak predictive performance in every other issue examined.16
A different study revealed that the ACS-NSQIP surgical risk calculator exhibited inadequate individual risk prediction for all outcomes and had moderate ability to distinguish between pneumonia and non-home discharge. The calculator might help in pinpointing patients at elevated risk of pneumonia, preventing discharge to home to implement additional preparatory actions.17 A meta-analysis indicated that the ACS-NSQIP surgical risk calculator is a reliable predictor of mortality in this external population and could be used in the multidisciplinary care of patients requiring emergency abdominal surgery.18
In this research, we will prospectively gather clinical data from patients receiving general surgery using the ACS-NSQIP variables along with additional variables not included in the ACS-NSQIP that we consider to be potential risk factors, including patients’ educational level, marital status, substance use, hypothyroidism, surgical approach (inpatient/outpatient), COVID-19 history and COVID-19 vaccination, among other factors that will be elaborated in the Methods section. Subsequently, we will apply ML algorithms to build risk factor prediction models that will ultimately help surgeons to identify the risk factors related to the occurrence of postoperative complications following general surgery.
Objectives
To assess the capability of ML models in predicting the risk of postoperative complications following general surgery.
To identify the risk factors related to the occurrence of postoperative complications associated with general surgery.
Methods
Study design
With approval from the Hormozgan University of Medical School (HUMS) Research Ethics Board, we will carry out a forward-looking analysis of the medical records of patients undergoing general surgery. We will obtain informed consent, and all information will be collected and examined anonymously.
Study setting
This research will take place at a tertiary referral medical centre located in Bandar Abbas, Hormozgan, Iran. We will use the registry data of all patients with any type of general surgery.
Study population
The inclusion criteria are (1) individuals aged 18 years or older who have any type of general surgery and (2) hospitalised from September 2025 to September 2026. Individuals with insufficient data will be excluded.
Outcome measures
The main outcomes of the study are complications such as intra-cardiac arrest or postoperative cardiac arrest within 72 hours of surgery requiring cardiopulmonary resuscitation, being on ventilation for more than 48 hours, pulmonary embolism, progressive renal insufficiency, intra-/postoperative myocardial infarction, intra-/postoperative blood transfusion, acute renal failure, vein thrombosis, sepsis/septic shock, cerebrovascular accident, urinary tract infection, postoperative pneumonia, superficial incisional surgical site infection, deep incisional surgical site infection, organ space surgical site infection, wound disruption and haematoma within 30 days of surgery. Patients will be divided into two groups based on whether they develop complications or not.
The predictors are classified as (1) patient-related factors, (2) surgery-related factors and (3) postoperative factors. Predicting patient-related factors includes gender, race, age, residency place, education, marital status, body mass index, physical status classification, smoking, substance use, alcohol consumption, medical comorbidities such as chronic hypertension, diabetes mellitus, cardiovascular disease, anaemia, thyroid disease, von Willebrand’s disease, haemophilia, cirrhosis, lupus, previous history of COVID-19, current COVID-19, dyspnoea, chronic obstructive pulmonary disease, congestive heart failure within 30 days, ascites within 30 days, acute renal failure within 24 hours, dialysis within 2 weeks, being on ventilation for more than 48 hours, preoperative blood transfusion within 72 hours, loss of body weight for more than 10%, sepsis within 48 hours, open wound, disseminated cancer, COVID-19 vaccination, anticoagulant therapy (a history of using low-molecular weight heparin and low-molecular weight heparin that has not been stopped 24 hours before the operation), antiplatelet therapy (a history of taking aspirin that has not been stopped a week before the operation), chronic steroid use, existing infections at distant sites, chemotherapy within 30 days, malnutrition, laboratory tests and American Society of Anesthesiologists.
Surgery-related factors include intra-/postoperative intubation; surgical approach (inpatient/outpatient); type of procedure (scheduled/urgent); surgical technique (laparoscopic/open surgery); indication of surgery (emergency/scheduled); experience of the surgeon; the duration of surgery; the time of surgery (morning/afternoon/night shift); abnormal fluid collection such as haematoma or seroma; contamination of the surgical site, equipment or personnel; the presence of foreign material in the surgical site; improper hair removal; inadequate antibiotic prophylaxis; wound class; surgical wound closure; anaesthesia utilisation; and duration of drains and urinary catheter.
The postoperative factors include cough, emesis, postoperative hypertension, inadequate postoperative antibiotic therapy and the duration of hospitalisation. A copy of the full questionnaire is presented in online supplemental file 1.
Data collection
Several research assistants will be employed to complete the questionnaire for each patient across all three shifts by interviewing the patients and examining the patients’ charts. As a result, the information for each patient undergoing general surgery is refreshed daily. Subsequently, all patients will be overseen by the same research assistant who will reach out to them through phone calls weekly for a month to detect complications.
Handling missing data
In handling missing data, data scientists can employ two main techniques to address the issue: imputation or elimination of data. The imputation technique replaces missing data with sensible estimates. It is most beneficial when the missing data percentage is minimal. When the amount of missing data is excessively large, the findings lack the natural variability needed for a successful model. The alternative is to delete data. When handling randomly missing data, the complete data point lacking information can be removed to minimise bias. Eliminating data might not be the best choice if there are not sufficient observations to yield a dependable analysis. In certain circumstances, it may be necessary to observe particular events or factors, even if not fully complete.19 We will develop a strategy to handle missing values based on their amount. If a particular feature column is missing more than 40% of its values, we will remove that column to maintain data integrity. Since many of the variables are categorical, we will employ mode imputation, replacing missing values with the category that appears most often. This approach ensures that our dataset is thorough and upholds the overall quality and uniformity of the data.
Data analysis
We intend to detect postoperative complications following general surgery using four distinct supervised ML techniques: (1) logistic regression, (2) decision trees, (3) random forests and (4) extreme gradient boosting. These classification algorithms, or classifiers, were chosen for their widespread use, relative ease of use and diverse learning capacities. They also represent a broad range of classifiers, from traditional (eg, logistic regression) to modern (eg, extreme gradient boosting).
We will report our findings in accordance with the Guidelines for Developing and Reporting Machine Learning Predictive Models in Biomedical Research: A Multidisciplinary View. The ML model will be developed using Python, and the ML algorithm will be implemented with Scikit-learn.20
Internal validation will be carried out with the help of k-fold cross-validation. The cases will be randomly assigned to either the ‘training set’ (70%) or the ‘test set’ (30%) using a random number generator. The original dataset will be divided into complicated and non-complicated groups in the training and test set constants. Using the training set, we will arrange the parameters of the prediction models and evaluate their performance using the ‘test set’. The average performance will be calculated by repeating these ten times.
Table 1 contains all of the metrics that will be used to evaluate the performance of each ML.21 Evaluation metrics are quantitative measures used to examine the performance of ML, providing insights into how well the model is working and assisting in the comparison of alternative models or algorithms.
Table 1. Performance evaluation metrics of machine learning models.
| Metric | Definition |
|---|---|
| Accuracy | The proportion of the total number of correct predictions that were correct. |
| Positive predictive value (precision) | The proportion of positive cases that were correctly identified. |
| Negative predictive value | The proportion of negative cases that were correctly identified. |
| Sensitivity (recall) | The proportion of actual positive cases which are correctly identified. |
| Specificity | The proportion of actual negative cases which are correctly identified. |
| F1 score | The harmonic mean of precision and recall values for a classification problem. |
Patient characteristics will be provided as frequencies (percentages). Categorical variables will be analysed using the X2 test. All statistical analyses will be performed with SPSS (version 25.0, IBM Corp. Armonk, NY, USA) and Python (version 3.7.0). All statistical tests are two-tailed, and p<0.05 was considered statistically significant.
Practical implications
The results of this study are important from several perspectives.
Displays the hospital’s current complication rates for general surgery.
Identifying the risk factors that lead to the occurrence of complications provides the basis for planning to take preventive measures against these complications.
Since patient safety and patient satisfaction are closely related to the complications of the surgical procedure, this research can improve patient safety and satisfaction by addressing complications following surgical procedures.
The research findings can inform the development of a patient information system to track problems after surgical procedures.
This research is applicable across medical fields, not only general surgery.
Ethics and dissemination
With approval from the Hormozgan University of Medical School Research Ethics Board (IR.HUMS.REC.1404.137), we will carry out a forward-looking analysis of the medical records of patients undergoing general surgery. We will obtain informed consent, and all information will be collected and examined anonymously. The findings of this research will be released in appropriate scientific publications.
Supplementary material
Acknowledgements
We would like to express our sincere gratitude to Hormozgan University of Medical Sciences, Bandar Abbas, Iran, for their unwavering support. We hope that, with your valuable collaboration and guidance, this research will be conducted successfully in the future.
Footnotes
Funding: Hormozgan University of Medical Sciences. The funder did not influence the results/outcomes of the study despite author affiliations with the funder.
Pre-publication history and additional supplemental material for this paper are available online. To view these files, please visit the journal online (https://doi.org/10.1136/bmjopen-2025-108019).
Provenance and peer review: Not commissioned; externally peer reviewed.
Patient consent for publication: Consent obtained directly from patients.
Patient and public involvement: Patients and/or the public were not involved in the design, conduct, reporting or dissemination plans of this research.
References
- 1.Fishbein D, Nambiar S, McKenzie K, et al. Objective measures of workload in healthcare: a narrative review. Int J Health Care Qual Assur. 2019;33:1–17. doi: 10.1108/IJHCQA-12-2018-0288. [DOI] [PubMed] [Google Scholar]
- 2.Sargent SK, Waldman R. The Patient Experience and Safety. Obstet Gynecol Clin North Am. 2019;46:199–214. doi: 10.1016/j.ogc.2019.01.001. [DOI] [PubMed] [Google Scholar]
- 3.Mehrnoush V, Darsareh F, Shabana W, et al. Prediction of renal Cancer recurrence using artificial intelligence: A systematic review. Canc Therapy Oncol Int J. 2025;28:556233. doi: 10.19080/CTOIJ.2025.28.556233. [DOI] [Google Scholar]
- 4.Rezaei N, Amani M, Asgharpoor H, et al. Machine Learning Approach to Predict Emergency Cesarean Sections Among Nulliparous Women. Cureus. 2025;17:e90501. doi: 10.7759/cureus.90501. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 5.Zhong C, Lu W, Xie W, et al. A prediction model of risk factors of poor wound healing after craniocerebral surgery. Pak J Med Sci. 2023;39:1835–9. doi: 10.12669/pjms.39.6.7963. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 6.Taeidi E, Ranjbar A, Montazeri F, et al. Machine Learning-Based Approach to Predict Intrauterine Growth Restriction. Cureus. 2023;15:e41448. doi: 10.7759/cureus.41448. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 7.Banaei M, Roozbeh N, Darsareh F, et al. Utilizing machine learning to predict the risk factors of episiotomy in parturient women. AJOG Glob Rep . 2025;5:100420. doi: 10.1016/j.xagr.2024.100420. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 8.Malakooti N, Mehrnoush V, Abdi F, et al. Development of a machine learning model to identify the predictors of the neonatal intensive care unit admission. Sci Rep. 2025;15:20914. doi: 10.1038/s41598-025-06651-0. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 9.Boujarzadeh B, Ranjbar A, Banihashemi F, et al. Machine learning approach to predict postpartum haemorrhage: a systematic review protocol. BMJ Open. 2023;13:e067661. doi: 10.1136/bmjopen-2022-067661. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 10.Ranjbar A, Taeidi E, Mehrnoush V, et al. Machine learning models for predicting pre-eclampsia: a systematic review protocol. BMJ Open. 2023;13:e074705. doi: 10.1136/bmjopen-2023-074705. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 11.Roozbeh N, Montazeri F, Farashah MV, et al. Proposing a machine learning-based model for predicting nonreassuring fetal heart. Sci Rep. 2025;15:7812. doi: 10.1038/s41598-025-92810-2. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 12.Ranjbar A, Rezaei Ghamsari S, Boujarzadeh B, et al. Predicting risk of postpartum hemorrhage using machine learning approach: A systematic review. Gocm. 2023;3:170–4. doi: 10.1016/j.gocm.2023.07.002. [DOI] [Google Scholar]
- 13.Safarzadeh S, Ardabili NS, Farashah MV, et al. Predicting mother and newborn skin-to-skin contact using a machine learning approach. BMC Pregnancy Childbirth. 2025;25:182. doi: 10.1186/s12884-025-07313-9. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 14.ACS National Surgical Quality Improvement Program. https://www.facs.org/quality-programs/data-and-registries/acs-nsqip/ Available.
- 15.Ingraham AM, Richards KE, Hall BL, et al. Quality improvement in surgery: the American College of Surgeons National Surgical Quality Improvement Program approach. Adv Surg. 2010;44:251–67. doi: 10.1016/j.yasu.2010.05.003. [DOI] [PubMed] [Google Scholar]
- 16.Erginoz E, Sak K, Bozkir HO, et al. Evaluation of the ACS NSQIP surgical risk calculator in patients undergoing common bile duct exploration. Langenbecks Arch Surg. 2023;409:12. doi: 10.1007/s00423-023-03207-6. [DOI] [PubMed] [Google Scholar]
- 17.van der Hulst HC, Dekker JWT, Bastiaannet E, et al. Validation of the ACS NSQIP surgical risk calculator in older patients with colorectal cancer undergoing elective surgery. J Geriatr Oncol. 2022;13:788–95. doi: 10.1016/j.jgo.2022.04.004. [DOI] [PubMed] [Google Scholar]
- 18.Parkin CJ, Moritz P, Kirkland O, et al. What is the Accuracy of the ACS-NSQIP Surgical Risk Calculator in Emergency Abdominal Surgery? A Meta-Analysis. J Surg Res. 2021;268:300–7. doi: 10.1016/j.jss.2021.07.009. [DOI] [PubMed] [Google Scholar]
- 19.Tahir M, Abdullah A, Udzir NI, et al. A novel approach for handling missing data to enhance network intrusion detection system. Cyber Security and Applicat. 2025;3:100063. doi: 10.1016/j.csa.2024.100063. [DOI] [Google Scholar]
- 20.Pedregosa F, Varoquaux G, Gramfort A, et al. Scikit-learn: machine learning in Python. J Mach Learn Res. 2011;12:2825–30. doi: 10.1145/2786984.2786995. [DOI] [Google Scholar]
- 21.Yen SJ, Lee YS. Under-sampling approaches for improving prediction of the minority class in an imbalanced dataset. Proceedings of the 2016 International Conference on Intelligent Computing; ICIC ’06; 2006. pp. 731–40. [DOI] [Google Scholar]
