Development and validation of a hypoxemia prediction model in middle-aged and elderly outpatients undergoing painless gastroscopy

Abstract Hypoxemia is a common complication associated with anesthesia in painless gastroscopy. With the aging of the social population, the number of cases of hypoxemia among middle-aged and elderly patients is increasing. However, tools for predicting hypoxemia in middle-aged and elderly patients...

Full description

Saved in:
Bibliographic Details
Main Authors: Leilei Zheng, Xinyan Wu, Wei Gu, Rui Wang, Jing Wang, Hongying He, Zhao Wang, Bin Yi, Yi Zhang
Format: Article
Language:English
Published: Nature Portfolio 2025-05-01
Series:Scientific Reports
Subjects:
Online Access:https://doi.org/10.1038/s41598-025-02540-8
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1850125516762251264
author Leilei Zheng
Xinyan Wu
Wei Gu
Rui Wang
Jing Wang
Hongying He
Zhao Wang
Bin Yi
Yi Zhang
author_facet Leilei Zheng
Xinyan Wu
Wei Gu
Rui Wang
Jing Wang
Hongying He
Zhao Wang
Bin Yi
Yi Zhang
author_sort Leilei Zheng
collection DOAJ
description Abstract Hypoxemia is a common complication associated with anesthesia in painless gastroscopy. With the aging of the social population, the number of cases of hypoxemia among middle-aged and elderly patients is increasing. However, tools for predicting hypoxemia in middle-aged and elderly patients are lacking. In this study, we investigated the risk factors for hypoxemia in middle-aged and elderly outpatients undergoing painless gastroscopy based on machine learning and constructed a risk prediction model. In this retrospective study, we included the data on 1,348 outpatients undergoing painless gastroscopy. In total, 26 characteristic variables, including demographic information, past medical history, and clinical data of the patients were included, and BorutaShap was used for feature selection. Five machine learning algorithm models, including logistic regression (LR), support vector machine (SVM), random forest (RF), extreme gradient boosting (XGB), and light gradient boosting machine (LightGBM), were selected. The best models were selected based on the area under the receiver operating characteristic curve (AUROC). Model feature importance was explained and analyzed using Shapley Additive Explanations (SHAP). The endpoint event of this study was considered to be hypoxemia during the procedure, defined as at least one occurrence of pulse oxygen saturation below 90% without probe misalignment or interference from the beginning of anesthesia induction to the end of painless gastroscopy. In the final cohort of 984 patients, 11% of patients (108/984) experienced hypoxemia during the painless gastroscopy procedure. The AUROCs of the five models were as follows: Logistic Regression (AUROC = 0.893, 95CI: 0.881–0.899), SVM (AUROC = 0.855, 95CI: 0.812–0.884), Random Forest (AUROC = 0.914, 95CI: 0.889–0.924), XGB (AUROC = 0.902, 95CI: 0.865–0.919), and LightGBM (AUROC = 0.891, 95CI: 0.847–0.917). Regarding the explanation of the importance of SHAP features, preoperative variables (baseline SpO2, body mass index, and micrognathia) and intraoperative variables (operating time of gastroscopy, induction dose of etomidate and propofol mixture, append anesthetic, cough, and repeated pharyngeal irritation) significantly contributed to the model. We identified eight potential risk factors related to the occurrence of hypoxemia in middle-aged and elderly patients undergoing painless gastroscopy, based on machine learning feature engineering. Among the five machine learning algorithms, RF exhibited the best predictive performance in the internal test set and had a certain degree of generalization ability in the external validation set, which indicated that the RF model was more suitable for the data framework of this study. This model was more likely to enhance the accuracy of hypoxemia prediction in middle-aged and elderly patients undergoing painless gastroscopy, and thus, it is suitable for assisting anesthesiologists in clinical decision-making.
format Article
id doaj-art-3a2fe4a8e14f4e56a2c4d22cbd7938bd
institution OA Journals
issn 2045-2322
language English
publishDate 2025-05-01
publisher Nature Portfolio
record_format Article
series Scientific Reports
spelling doaj-art-3a2fe4a8e14f4e56a2c4d22cbd7938bd2025-08-20T02:34:06ZengNature PortfolioScientific Reports2045-23222025-05-0115111910.1038/s41598-025-02540-8Development and validation of a hypoxemia prediction model in middle-aged and elderly outpatients undergoing painless gastroscopyLeilei Zheng0Xinyan Wu1Wei Gu2Rui Wang3Jing Wang4Hongying He5Zhao Wang6Bin Yi7Yi Zhang8Department of Anesthesiology, Second Affiliated Hospital of Zunyi Medical UniversityDepartment of Anesthesiology, Second Affiliated Hospital of Zunyi Medical UniversityDepartment of Anesthesiology, Minhang Hospital of Fudan UniversityDepartment of Anesthesiology, Third Affiliated Hospital of Zunyi Medical UniversityDepartment of Anesthesiology, Second Affiliated Hospital of Zunyi Medical UniversityDepartment of Anesthesiology, Second Affiliated Hospital of Zunyi Medical UniversityDepartment of Anesthesiology, Second Affiliated Hospital of Zunyi Medical UniversityDepartment of Anesthesiology, First Affiliated Hospital of Army Medical UniversityDepartment of Anesthesiology, Second Affiliated Hospital of Zunyi Medical UniversityAbstract Hypoxemia is a common complication associated with anesthesia in painless gastroscopy. With the aging of the social population, the number of cases of hypoxemia among middle-aged and elderly patients is increasing. However, tools for predicting hypoxemia in middle-aged and elderly patients are lacking. In this study, we investigated the risk factors for hypoxemia in middle-aged and elderly outpatients undergoing painless gastroscopy based on machine learning and constructed a risk prediction model. In this retrospective study, we included the data on 1,348 outpatients undergoing painless gastroscopy. In total, 26 characteristic variables, including demographic information, past medical history, and clinical data of the patients were included, and BorutaShap was used for feature selection. Five machine learning algorithm models, including logistic regression (LR), support vector machine (SVM), random forest (RF), extreme gradient boosting (XGB), and light gradient boosting machine (LightGBM), were selected. The best models were selected based on the area under the receiver operating characteristic curve (AUROC). Model feature importance was explained and analyzed using Shapley Additive Explanations (SHAP). The endpoint event of this study was considered to be hypoxemia during the procedure, defined as at least one occurrence of pulse oxygen saturation below 90% without probe misalignment or interference from the beginning of anesthesia induction to the end of painless gastroscopy. In the final cohort of 984 patients, 11% of patients (108/984) experienced hypoxemia during the painless gastroscopy procedure. The AUROCs of the five models were as follows: Logistic Regression (AUROC = 0.893, 95CI: 0.881–0.899), SVM (AUROC = 0.855, 95CI: 0.812–0.884), Random Forest (AUROC = 0.914, 95CI: 0.889–0.924), XGB (AUROC = 0.902, 95CI: 0.865–0.919), and LightGBM (AUROC = 0.891, 95CI: 0.847–0.917). Regarding the explanation of the importance of SHAP features, preoperative variables (baseline SpO2, body mass index, and micrognathia) and intraoperative variables (operating time of gastroscopy, induction dose of etomidate and propofol mixture, append anesthetic, cough, and repeated pharyngeal irritation) significantly contributed to the model. We identified eight potential risk factors related to the occurrence of hypoxemia in middle-aged and elderly patients undergoing painless gastroscopy, based on machine learning feature engineering. Among the five machine learning algorithms, RF exhibited the best predictive performance in the internal test set and had a certain degree of generalization ability in the external validation set, which indicated that the RF model was more suitable for the data framework of this study. This model was more likely to enhance the accuracy of hypoxemia prediction in middle-aged and elderly patients undergoing painless gastroscopy, and thus, it is suitable for assisting anesthesiologists in clinical decision-making.https://doi.org/10.1038/s41598-025-02540-8Machine learningMiddle-aged and elderly patientsPainless gastroscopyHypoxemiaPrediction model
spellingShingle Leilei Zheng
Xinyan Wu
Wei Gu
Rui Wang
Jing Wang
Hongying He
Zhao Wang
Bin Yi
Yi Zhang
Development and validation of a hypoxemia prediction model in middle-aged and elderly outpatients undergoing painless gastroscopy
Scientific Reports
Machine learning
Middle-aged and elderly patients
Painless gastroscopy
Hypoxemia
Prediction model
title Development and validation of a hypoxemia prediction model in middle-aged and elderly outpatients undergoing painless gastroscopy
title_full Development and validation of a hypoxemia prediction model in middle-aged and elderly outpatients undergoing painless gastroscopy
title_fullStr Development and validation of a hypoxemia prediction model in middle-aged and elderly outpatients undergoing painless gastroscopy
title_full_unstemmed Development and validation of a hypoxemia prediction model in middle-aged and elderly outpatients undergoing painless gastroscopy
title_short Development and validation of a hypoxemia prediction model in middle-aged and elderly outpatients undergoing painless gastroscopy
title_sort development and validation of a hypoxemia prediction model in middle aged and elderly outpatients undergoing painless gastroscopy
topic Machine learning
Middle-aged and elderly patients
Painless gastroscopy
Hypoxemia
Prediction model
url https://doi.org/10.1038/s41598-025-02540-8
work_keys_str_mv AT leileizheng developmentandvalidationofahypoxemiapredictionmodelinmiddleagedandelderlyoutpatientsundergoingpainlessgastroscopy
AT xinyanwu developmentandvalidationofahypoxemiapredictionmodelinmiddleagedandelderlyoutpatientsundergoingpainlessgastroscopy
AT weigu developmentandvalidationofahypoxemiapredictionmodelinmiddleagedandelderlyoutpatientsundergoingpainlessgastroscopy
AT ruiwang developmentandvalidationofahypoxemiapredictionmodelinmiddleagedandelderlyoutpatientsundergoingpainlessgastroscopy
AT jingwang developmentandvalidationofahypoxemiapredictionmodelinmiddleagedandelderlyoutpatientsundergoingpainlessgastroscopy
AT hongyinghe developmentandvalidationofahypoxemiapredictionmodelinmiddleagedandelderlyoutpatientsundergoingpainlessgastroscopy
AT zhaowang developmentandvalidationofahypoxemiapredictionmodelinmiddleagedandelderlyoutpatientsundergoingpainlessgastroscopy
AT binyi developmentandvalidationofahypoxemiapredictionmodelinmiddleagedandelderlyoutpatientsundergoingpainlessgastroscopy
AT yizhang developmentandvalidationofahypoxemiapredictionmodelinmiddleagedandelderlyoutpatientsundergoingpainlessgastroscopy