A convenient machine learning model to predict full stomach and evaluate the safety and comfort improvements of preoperative oral carbohydrate in patients undergoing elective painless gastrointestinal endoscopy

Ann Med. 2023;55(2):2292778. doi: 10.1080/07853890.2023.2292778. Epub 2023 Dec 18.

Abstract

Background and aims: Assessment of the patient's gastric contents is the key to avoiding aspiration incidents, however, there is no effective method to determine whether elective painless gastrointestinal endoscopy (GIE) patients have a full stomach or an empty stomach. And previous studies have shown that preoperative oral carbohydrates (POCs) can improve the discomfort induced by fasting, but there are different perspectives on their safety. This study aimed to develop a convenient, accurate machine learning (ML) model to predict full stomach. And based on the model outcomes, evaluate the safety and comfort improvements of POCs in empty- and full stomach groups.

Methods: We enrolled 1386 painless GIE patients between October 2022 and January 2023 in Nanjing First Hospital, and 1090 patients without POCs were used to construct five different ML models to identify full stomach. The metrics of discrimination and calibration validated the robustness of the models. For the best-performance model, we further interpreted it through SHapley Additive exPlanations (SHAP) and constructed a web calculator to facilitate clinical use. We evaluated the safety and comfort improvements of POCs by propensity score matching (PSM) in the two groups, respectively.

Results: Random Forest (RF) model showed the greatest discrimination with the area under the receiver operating characteristic curve (AUROC) 0.837 [95% confidence interval (CI): 79.1-88.2], F1 71.5%, and best calibration with a Brier score of 15.2%. The web calculator can be visited at https://medication.shinyapps.io/RF_model/. PSM results demonstrated that POCs significantly reduced the full stomach incident in empty stomach group (p < 0.05), but no differences in full stomach group (p > 0.05). Comfort improved in both groups and was more significant in empty stomach group.

Conclusions: The developed convenient RF model predicted full stomach with high accuracy and interpretability. POCs were safe and comfortably improved in both groups, with more benefit in empty stomach group. These findings may guide the patients' gastrointestinal preparation.

Keywords: Full stomach; aspiration; gastrointestinal endoscopy; machine learning; preoperative oral carbohydrates; propensity score matching.

Plain language summary

This study is the first model utilizing advanced ML techniques based on multiple clinical variables to identify full stomach. The model is suitable for patient-rich outpatient clinics, primary hospitals, remote regions, and specific clinical settings where POCUS is not available.The developed convenient RF model predicted full stomach with high accuracy and interpretability. The test cohort AUROC was 0.837. We further established an online accessible individualized risk calculator and provided waterfall plots to increase the interpretability of each prediction.The propensity score matching (PSM) showed that preoperative oral carbohydrate (POCs) were safe and comfortably improved in both groups, with more benefit in empty stomach group. These findings may provide information for anesthesiologists to guide patients on POCs.

Publication types

  • Research Support, Non-U.S. Gov't

MeSH terms

  • Endoscopy, Gastrointestinal* / adverse effects
  • Humans
  • Machine Learning*
  • Retrospective Studies
  • Stomach
  • Time Factors

Grants and funding

This work was supported by the National Natural Science Foundation of China [Grant Number 81873954, 82173899], the Six Talent Peaks Project of Jiangsu [Grant Number WSW-106], Nanjing Medical Science and Technical Development Foundation [Grant Number ZKX22030], Jiangsu Pharmaceutical Association [Grant Number H202108, A2021024, Q202202, JY202207].