Machine learning-enhanced modified early warning system for predicting in-hospital mortality on pulmonary ward
Original Article

Machine learning-enhanced modified early warning system for predicting in-hospital mortality on pulmonary ward

Yu-Pin Ku1 ORCID logo, Chin-Fu Chang2*, Chung-Chih Lin3, Shao-Jen Weng1

1Department of Industrial Engineering and Enterprise Information, Tunghai University, Taichung; 2Emergency and Critical Care Medicine Department, Changhua Christian Hospital, Changhua; 3Holistic Health Care Education Center, Changhua Christian Hospital, Changhua

Contributions: (I) Conception and design: YP Ku, CF Chang; (II) Administrative support: SJ Weng; (III) Provision of study materials or patients: CF Chang; (IV) Collection and assembly of data: YP Ku; (V) Data analysis and interpretation: YP Ku, CC Lin; (VI) Manuscript writing: All authors; (VII) Final approval of manuscript: All authors.

*, retired.

Correspondence to: Yu Pin Ku, MHA; Shao-Jen Weng, PhD. Department of Industrial Engineering and Enterprise Information, Tunghai University, No. 1727, Sec. 4, Taiwan Boulevard, Xitun District, 40704, Taichung. Email: eason1010815@gmail.com; sjweng@thu.edu.tw.

Background: Early recognition of impending systemic failure and timely delivery of appropriate medical care are critical for effective clinical intervention. The Modified Early Warning Score (MEWS) is widely used to identify patients at risk of clinical deterioration. However, as patient complexity increases—driven by advanced age, multimorbidity, and other risk factors—automated warning systems often generate excessive alerts, leading to high false-alarm rates. Therefore, we aim to develop and validate a machine learning-enhanced predictive model (MEWS+) to detect critical in-hospital mortality risk factors earlier, thereby supporting clinical decision-making and optimizing acute care triage on pulmonary wards.

Methods: This retrospective cohort study analyzed electronic health records from 4,108 consecutive adult patients admitted to the pulmonary wards of a medical center between January and June 2021. Four machine learning (ML) frameworks—extreme gradient boosting (XGBoost), random forest, logistic regression, and support vector machine—were trained and evaluated using an 80:20 data split. Pairwise nonparametric Spearman rank correlation was used to assess associations between baseline predictors and in-hospital mortality.

Results: Among the 4,108 patients included, the cohort was predominantly elderly (60.6% aged ≥65 years) and female (61.6%), with males accounting for 38.4%. The baseline in-hospital mortality rate was 5.4%, representing 222 empirical mortality events. Spearman correlation analysis showed that the recalculated traditional MEWS score had the strongest positive monotonic association with in-hospital mortality (ρs =0.430, P<0.05), followed by signed do-not-resuscitate (DNR) status (ρs =0.383, P<0.05), MEWS time (ρs =0.292, P<0.05), and age (ρs =0.204, P<0.05). In contrast, chronic comorbidities demonstrated very weak correlations (heart failure: ρs =0.079; hypertension: ρs =0.035). On the independent testing set, the XGBoost classifier achieved the highest predictive performance, with an area under the curve (AUC) of 0.970 [95% confidence interval (CI): 0.944–0.990], sensitivity of 0.872 (95% CI: 0.743–0.952), and specificity of 0.972 (95% CI: 0.957–0.982). Feature-importance analysis indicated that the MEWS score (0.402), signed DNR status (0.194), and MEWS time (0.136) were the primary contributors to model performance.

Conclusions: An ML-enhanced MEWS+ model by effectively balancing clinical sensitivity and operational precision, by integrating acute physiological indicators with advanced directives and demographic factors, the XGBoost-based MEWS+ system provides highly accurate, individualized early-warning triage to strengthen clinical safety on general hospital wards.

Keywords: Machine learning (ML); pulmonary diseases; in-hospital mortality


Received: 29 March 2026; Accepted: 19 August 2026; Published online: 22 September 2026.

doi: 10.21037/jphe-2026-0026


Highlight box

Key findings

• The study developed a machine-learning-enhanced Modified Early Warning System (MEWS+) that significantly outperforms traditional scoring methods in predicting patient mortality, achieving an area under the curve of 0.970 [95% confidence interval (CI): 0.944–0.990] using extreme gradient boosting (XGBoost).

• Beyond the MEWS score, signed do-not-resuscitate (DNR) status, MEWS time, and age were identified as the most influential predictors of clinical deterioration.

What is known and what is new?

• The traditional MEWS is a widely used tool for identifying patients at risk of clinical deterioration. However, in specialized wards, it often produces excessive false alarms, contributing to “alarm fatigue”.

• This study introduces a localized “Precision Healthcare Support System” tailored for pulmonary wards. It incorporates Elixhauser comorbidities (heart failure and renal failure) and operational variables into a dynamic predictive framework. Shapley Additive exPlanations (SHAP)-based interpretability provides clinicians with transparent insights into how non-physiological factors—such as MEWS time and signed DNR status—affect survival outcomes.

What is the implication, and what should change now?

• The MEWS+ framework supports a shift from reactive monitoring to proactive clinical decision-making, with the potential to reduce the incidence of unexpected in-hospital cardiac arrests.

• Hospital administrators should consider integrating MEWS time and localized comorbidity data into automated alert systems to improve resource allocation and reduce alarm fatigue, particularly during off-peak hours.


Introduction

Background

According to the Heart Disease and Stroke Statistics—2026 Update: A Report from the American Heart Association (AHA), more than 380,000 in-hospital cardiac arrests (IHCAs) occur annually in the United States. Despite advances in therapeutic interventions, survival remains low at 10–15%, and heart disease continues to be the leading cause of mortality (1). This challenge is similarly reflected in Taiwan’s healthcare system.

In the 2024 Annual Report of the Taiwan Patient Safety Reporting System (TPR), 866 IHCA cases were documented, accounting for 52.0% of all reported incidents in this category. Patient outcomes demonstrated substantial clinical impact: 55.6% (n=479) resulted in death, while 6.3% (n=54) and 32.3% (n=278) of patients experienced extreme and severe disability, respectively. Most events occurred in general wards (74.1%), followed by specialized care units (12.0%) and emergency departments (7.4%). The most common clinical triggers were respiratory failure (23.7%) and lethal arrhythmias (20.4%). Comorbidities were highly prevalent, including hypertension (54.9%), diabetes mellitus (40.1%), cardiovascular disease (39.6%), and chronic kidney disease (24.7%) (2). These findings highlight a distinct high-risk clinical profile, suggesting that multimorbidity significantly complicates acute patient safety outcomes.

The incidence and prognosis of IHCA reflect both the quality of medical care and the effectiveness of emergency response. Preventing unexpected IHCA is essential for improving survival. Cardiopulmonary resuscitation (CPR) requires substantial human and material resources, and without adequate training, outcomes are poor. Even after return of spontaneous circulation, mortality continues to rise. Clinicians are often only partially aware of patients with abnormal vital signs, in part because there is no holistic evaluation mechanism. Although automated surveillance systems have replaced routine manual assessments, clinical re-evaluation still relies heavily on the judgment of experienced personnel and may be insufficient for patients with evolving or uncertain conditions. Early warning systems can enhance the detection of abnormal physiological changes, thereby improving outcomes and reducing mortality (3).

Early Warning Score (EWS) systems enable proactive identification of subtle physiological deterioration. More than 100 localized EWS variants have been developed worldwide, establishing these tools as foundational components of routine hospital monitoring. Table 1 summarizes the evolution and alert thresholds of major EWS indices (4-10). By detecting minor deviations in vital signs, EWS systems alert clinicians to potential deterioration and support timely intervention. These systems demonstrate high sensitivity for critically ill patients and have been validated across internal medicine, surgical, and intensive care settings as reliable predictors of clinical outcomes (11-15).

Table 1

Early warning scoring index related development and alert thresholds

Author [year] Scoring model Parameters Alert threshold
Morgan [1997] (4) Early Warning Score (EWS) Heart rate, blood pressure, respiratory rate, temperature, level of consciousness ≥3 points
Subbe [2001] (5) Modified Early Warning Score (MEWS) Heart rate, blood pressure, respiratory rate, temperature, level of consciousness ≥5 points
Jerng [2008] (6) Clinical Alert System (CAS) SpO2, heart rate abnormalities, respiratory rate changes, blood pressure deviations, loss of consciousness, seizures, arrhythmias, chest pain, oliguria, or any clinical abnormality identified by medical staff Any single positive finding
Kellett [2012] (7) Vital PAC Early Warning Score (ViEWS) Heart rate, blood pressure, respiratory rate, temperature, use of supplemental oxygen, oxygen saturation monitoring ≥5 points
Churpek [2012] (8) Cardiac Arrest Risk Triage (CART) Respiratory rate, heart rate, blood pressure, age ≥3 points
Royal College of Physicians [2012] (9) National Early Warning Score (NEWS) Heart rate, blood pressure, respiratory rate, temperature, level of consciousness, supplemental oxygen use, oxygen saturation monitoring ≥7 points
Royal College of Physicians [2017] (10) National Early Warning Score 2 (NEWS 2) Respiratory rate, oxygen saturation, blood pressure, pulse rate, level of consciousness (or new-onset confusion), temperature ≥7 points

SpO2, saturation of peripheral oxygen.

A substantial proportion of IHCA cases are considered preventable through early detection and timely intervention. Evidence indicates that systematic surveillance combined with Rapid Response Team (RRT) activation can significantly reduce emergency resuscitation events, lower mortality, and shorten hospital length of stay (4,16-18).

Many healthcare systems now integrate EWS into clinical workflows. These systems use routine physiological measurements—blood pressure, pulse rate, respiratory rate, temperature, and neurological status—as standardized inputs. Algorithms generate a risk score for potential deterioration, and when a predefined threshold is exceeded, automated alerts prompt immediate clinical reassessment or escalation of care.

Rationale and knowledge gap

Despite widespread adoption, automated early warning systems in highly subspecialized hospital wards often fail to account for individual patient characteristics such as gender, age, and pre-existing comorbidities (19,20). This limitation contributes to excessive alert frequency and high false-alarm rates, imposing cognitive and physical burdens on healthcare providers—a phenomenon known as alarm fatigue. With the rapid advancement of electronic medical record (EMR) systems, a broader range of real-time clinical information—including vital signs, laboratory data, and diagnostic findings—has become available. Leveraging EMR-based data enables the integration of previously overlooked but clinically significant variables into early warning evaluations (21,22).

Physiological abnormalities often emerge hours before cardiac arrest, indicating that many events are detectable through systematic monitoring. Early intervention improves clinical outcomes, underscoring the need for accurate risk-stratification tools to identify high-risk patients and reduce adverse events (5,23,24).

Disease prevalence and clinical manifestations vary significantly across populations. Most EWS research has been conducted in Western cohorts, where certain conditions common in other regions are relatively uncommon. As a result, Western-developed EWS models may not generalize well across diverse populations (25). This study addresses this gap by developing a localized predictive framework that incorporates region-specific disease characteristics to enhance predictive accuracy and patient safety.

This study integrates specialist physician and nursing assessment data into the Modified Early Warning Score (MEWS) system. Beyond the automated calculation of five physiological parameters, we developed an enhanced predictive model—MEWS+—that incorporates both established and novel variables to improve diagnostic precision and risk stratification for in-hospital mortality among patients admitted to pulmonary wards. This proactive clinical alert system aims to identify critical risk factors early, support timely clinical decision-making, guide resource allocation, and provide real-time recommendations to frontline staff. Ultimately, MEWS+ is designed to prevent unexpected clinical deterioration and facilitate timely transfer of patients to the intensive care unit (ICU).

Objective

The objective of this study is to develop and validate an enhanced predictive model, designated MEWS+, that extends the traditional MEWS framework by incorporating demographic, administrative, and clinical risk factors. Moving beyond conventional physiological scoring, this research aims to directly predict the primary clinical endpoint of in-hospital mortality among patients admitted to pulmonary wards. By integrating advanced machine-learning (ML) algorithms to improve risk-stratification accuracy and reduce false-alarm rates, this approach aims to provide early, actionable clinical decision support, enabling timely interventions and enhancing the quality and safety of acute care. We present this article in accordance with the TRIPOD reporting checklist (available at https://jphe.amegroups.com/article/view/10.21037/jphe-2026-0026/rc).


Methods

Data source and study population

This retrospective study analyzed electronic health records (EHRs) from a tertiary referral medical center between January and June 2021. The initial cohort included 4,108 admissions (Table 2). To ensure a homogeneous study population, the programmatic inclusion criteria were:

Table 2

Characteristics of the pulmonary wards of a medical center (N=4,108)

Characteristics Total (n=4,108) Training set (n=3,286) Testing set (n=822) P
Sex
   Male 1,579 (38.4) 1,251 (38.1) 328 (39.9)
   Female 2,529 (61.6) 2,035 (61.9) 494 (60.1) 0.49
Age group (years)
   18–44 415 (10.1) 335 (10.2) 80 (9.7)
   45–64 1,201 (29.3) 960 (29.2) 241 (29.3)
   ≥65 2,492 (60.6) 1,991 (60.6) 501 (60.9) 0.01
MEWS time
   Day 3,395 (82.6) 2,728 (83.0) 666 (81.0)
   Evening 196 (4.8) 148 (4.5) 48 (5.8)
   Night 517 (12.6) 410 (12.5) 108 (13.1) <0.001
MEWS score
   Green 3,031 (73.8) 2,411 (73.4) 620 (75.4)
   Yellow 509 (12.4) 416 (12.7) 93 (11.3)
   Orange 395 (9.6) 315 (9.6) 80 (9.7)
   Red 173 (4.2) 144 (4.4) 29 (3.5) <0.001
RRT
   No 4,069 (99.1) 3,258 (99.1) 811 (98.7)
   Yes 39 (0.9) 28 (0.9) 11 (1.3) 0.01
CPR history
   No 4,098 (99.8) 3,277 (99.7) 821 (99.9)
   Yes 10 (0.2) 9 (0.3) 1 (0.1) 0.61
ICU admission
   No 3,720 (90.6) 2,984 (90.8) 736 (89.5)
   Yes 388 (9.4) 302 (9.2) 86 (10.5) 0.08
Cancer
   No 2,447 (59.6) 1,970 (60.0) 477 (58.0)
   Yes 1,661 (40.4) 1,316 (40.0) 345 (42.0) 0.95
Obesity
   No 4,093(99.6) 3,274 (99.6) 819 (99.6)
   Yes 15(0.4) 12 (0.4) 3 (0.4) >0.99
Renal failure
   No 3,791 (92.3) 3,022 (92.0) 769 (93.6)
   Yes 317(7.7) 264 (8.0) 53 (6.4) >0.99
Diabetes
   No 2,697 (65.7) 2,153 (65.5) 544 (66.2)
   Yes 1,411 (34.3) 1,133 (34.5) 278 (33.8) 0.61
Hypertension
   No 2,060 (50.1) 1,643 (50.0) 417 (50.7)
   Yes 2,048 (49.9) 1,643 (50.0) 405 (49.3) 0.69
Heart failure
   No 3,827 (93.2) 3,061 (93.2) 766 (93.2)
   Yes 281(6.8) 225 (6.8) 56 (6.8) 0.86
COPD
   No 3,413 (83.1) 2,721 (82.8) 692 (84.2)
   Yes 695 (16.9) 565 (17.2) 130 (15.8) 0.39
Sign DNR status
   No 3,108 (75.7) 2,495 (75.9) 613 (74.6)
   Yes 1,000 (24.3) 791 (24.1) 209 (25.4) 0.01

Data are presented as n (%). COPD, chronic obstructive pulmonary disease; CPR, cardiopulmonary resuscitation; DNR, do-not-resuscitate; ICU, intensive care unit; MEWS, Modified Early Warning Score; RRT, Rapid Response Team.

  • Adult patients (aged ≥18 years);
  • Admission to a pulmonary ward;
  • Complete baseline physiological parameters required to compute the MEWS.

Patients were excluded if they had substantial missing data in essential operational predictors or outcome variables. After programmatic filtering, 4,108 valid records remained, comprising 3,886 survivors and 222 in-hospital mortality events, as shown in Figure 1. Baseline traditional MEWS values were automatically calculated in real time by the hospital’s Clinical Information System. Each score underwent mandatory dual verification by clinical nursing staff before being committed to the database to prevent input errors. The primary outcome was in-hospital mortality, defined using discharge status (DIS_STATUS: 0= survived/discharged; 1= deceased).

Figure 1 Flowchart of data preprocessing and dataset partitioning. This diagram illustrates the recruitment and exclusion criteria for the study population. A total of 4,108 valid cases from the pulmonary ward were included and randomly partitioned into a training set (80%, n=3,286) and a testing set (20%, n=822) to evaluate model generalization. HIS, hospital information system; SMOTE, Synthetic Minority Over-sampling Technique; SVM, support vector machine.

The study was conducted in accordance with the Declaration of Helsinki and its subsequent amendments. Ethical approval was obtained from the Ethics Committee of Changhua Christian Hospital on January 3, 2023 (No. 211241). Participation in the survey was based on informed consent.

Feature selection and variable encoding

Development of the enhanced MEWS+ framework integrated three categories of feature elements into the nursing assessment infrastructure:

  • Core elements: automated extraction and summation of the five physiological parameters used in the traditional MEWS (Table 3).
  • Reference elements: demographic variables (age and gender) and clinical records, including MEWS time, prior RRT activation, history of CPR, previous ICU admissions, and signed do-not-resuscitate (DNR) status.
  • Innovative elements: seven pulmonary-relevant comorbidities selected from the Elixhauser Comorbidity Index (15)—heart failure, hypertension, chronic pulmonary disease, diabetes mellitus, renal failure, obesity, and malignancy. The selection of these seven specific conditions was determined through a structured, two-fold approach combining a targeted literature review with formal clinical consensus established by our multidisciplinary research team in emergency and specialized pulmonary care.

Table 3

Modified Early Warning Score (MEWS) calculation

Parameter 3 2 1 0 1 2 3
Respiratory rate (breaths/min) <8 8 9–17 18–20 21–29 ≥30
Heart rate (bpm) <40 40–50 51–100 101–110 111–129 ≥130
Systolic BP (mmHg) ≤70 71–80 81–100 101–159 160–199 200–220 >220
Consciousness (GCS) 3 4–11 12–14 15
Body temp (℃) <35.0 35.05–36 36.05–38 38.05–38.5 38.55

Green =0–2 score; yellow =3 score; orange =4–5 score; red = greater than 6 score. BP, blood pressure; GCS, Glasgow Coma Scale.

By synthesizing these multidimensional inputs, the MEWS+ clinical alert system was designed to provide timely and precise decision support for deteriorating or high-risk patients in pulmonary wards, thereby optimizing clinical interventions and resource allocation.

Except for age (a continuous variable), all 15 clinical features were encoded using standardized numerical formats (Table 4).

Table 4

Clinical features were subjected to standardized numerical encoding

Parameter Category 1 Category 2 Category 3 Category 4
Sex 0= female 1= male
Age Continuous variable
Nursing shift 1= day (08:00–16:00) 2= evening (16:00–24:00) 3= night (00:00–08:00)
MEWS score 1= green 2= yellow 3= orange 4= red
RRT 0= no 1= yes
CPR history 0= no 1= yes
ICU admission 0= no 1= yes
Cancer 0= no 1= yes
Obesity 0= no 1= yes
Renal failure 0= no 1= yes
Diabetes 0= no 1= yes
Hypertension 0= no 1= yes
Heart failure 0= no 1= yes
COPD 0= no 1= yes
Sign DNR status 0= no 1= yes
Discharge status 0= survived 1= mortality

COPD, chronic obstructive pulmonary disease; CPR, cardiopulmonary resuscitation; DNR, do-not-resuscitate; ICU, intensive care unit; MEWS, Modified Early Warning Score; RRT, Rapid Response Team.

ML algorithms

To identify the optimal predictive framework for clinical deterioration, four widely used ML algorithms were implemented and compared: logistic regression (LR), support vector machine (SVM), random forest, and extreme gradient boosting (XGBoost) (26).

A 5-fold cross-validation (CV) procedure was applied exclusively within the training set for hyperparameter optimization to prevent overfitting. The independent testing set remained completely isolated throughout model development.

To evaluate the relative contribution of each clinical feature, a feature importance scaling analysis was implemented. Specifically, the Gain metric was utilized to compute the relative importance, which measures the fractional contribution of each feature brought by each split to the model’s informational gain. All 15 clinical predictors were sorted in descending order without any programmatic truncation to provide a transparent and complete ranking of feature contributions across the entire input matrix.

Statistical analyses

Descriptive statistics, chi-square tests, and non-parametric Spearman rank correlations (r_s) were performed using IBM SPSS Statistics (v26.0) to evaluate baseline characteristics and monotonic associations between predictors and in-hospital mortality (DIS_STATUS). For ML benchmarking, classifier performance metrics, including sensitivity, specificity, F1-score, and area under the receiver operating characteristic curve (AUC-ROC) with bootstrapped 95% confidence intervals, were computed using Python. Statistical significance was defined as two-tailed P<0.05.


Results

A total of 4,108 consecutive adult patients admitted to the pulmonary wards were included in the final analytical cohort. The dataset was randomly partitioned into a training set (n=3,286; 80%) and an independent testing set (n=822; 20%). Among all patients, 1,579 (38.4%) were male, and 2,529 (61.6%) were female. The cohort was predominantly older, with 2,491 patients (60.6%) aged 65 years or older, 1,202 (29.3%) aged 45–64 years, and 415 (10.1%) aged 18–44 years. Based on recalculated traditional MEWS scoring, 3,031 patients (73.8%) were classified as green (0–2), 509 (12.4%) as yellow (3), 395 (9.6%) as orange (4,5), and 173 (4.2%) as red (≥6). Additionally, 1,000 patients (24.3%) had a signed DNR order at baseline.

Regarding pre-existing multimorbidity, hypertension was the most prevalent condition (2,048 patients; 49.9%), followed by diabetes mellitus (1,411; 34.3%), chronic obstructive pulmonary disease (COPD) (695; 16.9%), and heart failure (281; 6.8%). A total of 222 in-hospital mortality events (5.4%) occurred during the study period.

Spearman rank correlations were calculated to evaluate associations between the 15 clinical features and in-hospital mortality (Table 5). The recalculated traditional MEWS score demonstrated the strongest positive monotonic correlation with mortality (ρs =0.430, P<0.05), followed by SIGN_DNR (ρs =0.383), MEWS time (ρs =0.292), and age (r_s =0.204).

Table 5

Univariate correlation matrix of clinical predictors and operational variables

Variable MEWS time MEWS score START CPR In ICU Sign DNR Sex Age Heart_fail Hypertension COPD Diabetes Kidney fail Obesity Cancer DIS_status
MEWS time 1
MEWS score −0.021 1
START −0.036 0.058* 1
CPR −0.002 0.049 0.376* 1
In ICU −0.083* 0.221* 0.106* 0.085* 1
Sign DNR 0.005 0.405* 0.03 −0.012 0.034 1
Sex 0.057* −0.006 −0.03 −0.042 −0.019 0.016 1
Age −0.094* 0.376* −0.035 0.002 0.043 0.339* −0.05 1
Heart_fail −0.001 0.133* 0.04 0.149* 0.054* 0.086* −0.063* 0.214* 1
Hypertension −0.032 0.129* 0.024 0.022 0.102* 0.091* −0.006 0.387* 0.160* 1
COPD −0.013 0.03 −0.047 −0.008 −0.018 0.092* 0.203* 0.146* 0.027 0.088* 1
Diabetes −0.043 0.143* 0.015 −0.008 0.085* 0.080* −0.032 0.176* 0.058* 0.278* −0.022 1
Kidney_fail −0.001 0.064* 0.017 0.083* 0.03 0.053 −0.037 0.097* 0.145* 0.163* −0.053 0.117* 1
Obesity 0.03 −0.022 −0.005 −0.004 0.019 −0.036 −0.021 −0.019 0.004 0.013 0.066* 0.008 −0.021 1
Cancer 0.122* −0.223* −0.046 −0.024 −0.253* −0.049 0.048 −0.281* −0.189* −0.137* −0.130* −0.103* −0.189* −0.07 1
DIS_status 0.292* 0.430* 0.014 0.076* 0.02 0.383* −0.038 0.204* 0.079* 0.035* 0.007 0.01 0.012 −0.022 −0.028 1

*, statistical significance at the P<0.05 level based on Spearman correlation analysis. COPD, chronic obstructive pulmonary disease; CPR, cardiopulmonary resuscitation; DIS, disease; DNR, do-not-resuscitate; ICU, intensive care unit; MEWS, Modified Early Warning Score; RRT, Rapid Response Team; START, Simple Triage and Rapid Treatment.

Chronic conditions showed weaker associations: heart failure (ρs =0.079) and hypertension (ρs =0.035) displayed minimal but statistically significant linear associations with in-hospital mortality. In contrast, other chronic comorbidities demonstrated completely negligible, non-significant univariate correlations with the mortality endpoint.

ML model development and oversampling procedures were performed exclusively within the training set (n=3,286), which included 3,111 survivors (94.6%) and 175 mortality events (5.4%). The predictive performance of four ML frameworks—LR, SVM, RF, and XGBoost—was evaluated across two distinct computational phases (Table 6, Figure 2). Model configurations were evaluated using the mean of 5-fold CV within the training partition and evaluated on the isolated independent testing set. Under phase I (unadjusted framework), models trained on the raw skewed dataset demonstrated limitations in detecting minority-class events. The XGBoost classifier achieved a 5-fold CV mean accuracy of 0.98 and a test AUC of 0.971, but sensitivity remained limited at 0.63, with a class 1 F1 score of 0.73. The linear LR framework showed a similar profile, with a testing AUC of 0.966, a 5-fold CV mean of 0.97, and a sensitivity of 0.68. The unadjusted SVM architecture failed to establish an effective decision boundary under the skewed distribution, yielding a sensitivity of 0.00 and a class 1 F1-score of 0.00, thereby classifying all mortality cases as survivors. Under phase II [Synthetic Minority Over-sampling Technique (SMOTE)-enhanced framework], where training vectors were balance-optimized to a 1:1 ratio (3,111 instances per class), model performance improved. With the balanced configuration, the LR framework increased its predictive sensitivity from 0.68 to 0.83 while maintaining a testing AUC of 0.965. XGBoost improved sensitivity from 0.63 to 0.77, with a 5-fold CV mean of 0.98, a test AUC of 0.968, and a class 1 F1 score of 0.73.

Table 6

Predictive performance across machine learning algorithms

Algorithm Training phase, 5-fold CV mean Independent testing set (N=822), evaluation accuracy Sensitivity (95% CI) Specificity (95% CI) F1-score (class 1) AUC (95% CI)
LR 0.965 0.962 0.915 (0.796–0.976) 0.965 (0.950–0.977) 0.735 0.972 (0.947–0.992)
XGBoost 0.966 0.966 0.872 (0.743–0.952) 0.972 (0.957–0.982) 0.745 0.970 (0.944–0.990)
Random forest 0.965 0.965 0.915 (0.796–0.976) 0.968 (0.953–0.979) 0.480 0.977 (0.955–0.994)
SVM 0.943 0.943 0.000 (0.000–0.075) 1.000 (0.995–1.000) 0.000 0.947 (0.889–0.988)

F1-score (class 1), F1-score for the clinical deterioration/mortality event. AUC, area under the curve; CI, confidence interval; CV, cross-validation; LR, logistic regression; SVM, support vector machine; XGBoost, extreme gradient boosting.

Figure 2 ROC curves for four machine learning algorithms. The ROC curves illustrate the diagnostic ability of the four models: logistic regression, SVM, random forest, and XGBoost. The blue line represents the XGBoost model, which achieved the highest AUC of 0.978. AUC, area under the curve; ROC, receiver operating characteristic; SVM, support vector machine; XGBoost, extreme gradient boosting.

XGBoost was selected to train the final clinical predictive model. Feature importance analysis identified the three most influential predictors as the MEWS score (0.402), signed DNR status (0.194), and MEWS time (0.136) (Figure 3). Among comorbidities, malignancy and COPD exhibited greater predictive influence than other chronic conditions.

Figure 3 Visualizing important features score. Ranking of 15 features based on their relative contribution to the model’s prediction. The MEWS score, MEWS time, and sign DNR status were the primary drivers of clinical risk stratification. COPD, chronic obstructive pulmonary disease; CNT, count; CPR, cardiopulmonary resuscitation; DNR, do-not-resuscitate; ICU, intensive care unit; MEWS, Modified Early Warning Score.

Discussion

The objective of this study was to develop a localized, ML-enhanced early warning system, MEWS+, to improve the identification of clinical deterioration in pulmonary wards. Our findings demonstrate that although the traditional MEWS remains foundational, integrating additional clinical decision-making factors and operational variables—specifically, DNR status and MEWS time—significantly enhances the model’s predictive precision.

Our feature contribution evaluation revealed that the recalculated traditional MEWS score, advanced directive SIGN DNR, and MEWS TIME served as the three primary algorithmic drivers contributing to the model’s overall predictive output. The global feature importance analysis underscores that the recalculated traditional MEWS score remains the absolute dominant predictor within the MEWS+ framework, commanding a normalized weight of 0.402.

While advanced directives like signed DNR status (0.194) and operational vectors like MEWS time (0.136) provide critical contextual optimization, they function as clinical filters rather than proxy pathophysiological drivers. The MEWS score acts as the fundamental anchor of our framework, ensuring that the ML system remains deeply responsive to real-time patient physiology while leveraging secondary contextual features to refine alert thresholds and effectively mitigate clinical alarm fatigue.

The SHAP Beeswarm plot further illustrates a critical pattern (Figure 4): while low MEWS scores cluster near a neutral impact, exceptionally high MEWS scores extend sharply to the right, with SHAP values reaching +8. This nonlinear pattern aligns with clinical reality, in which extreme physiological derangements pose an immediate, catastrophic risk rather than a linear progression.

Figure 4 SHAP for global feature importance and model interpretability. Each dot represents an individual patient case. The horizontal axis shows the SHAP value, which represents the impact on the model’s output. Red color indicates high feature values, while blue indicates low feature values. COPD, chronic obstructive pulmonary disease; CPR, cardiopulmonary resuscitation; DNR, do-not-resuscitate; ICU, intensive care unit; MEWS, Modified Early Warning Score; SHAP, Shapley Additive exPlanations.

In traditional MEWS frameworks, signed DNR status is often excluded to avoid potential bias. However, our results suggest that in subspecialized settings such as pulmonary wards, signed DNR status is an essential indicator of baseline clinical fragility and terminal disease trajectory. Patients with signed DNR orders frequently represent a population with advanced illness or multiple comorbidities—particularly malignancy and COPD—both of which emerged as influential predictors in our model.

The MEWS+ model also effectively incorporates MEWS time, functioning as a “digital safety net” that enhances vigilance during periods of reduced staffing. This feature directly addresses the challenge of alarm fatigue by generating high-precision alerts when human surveillance is most limited.

Refinement of comorbidity indicators

Although individual comorbidities such as hypertension and diabetes mellitus demonstrated weaker direct correlations with mortality, the XGBoost importance scores identified malignancy and COPD as key contributors to clinical deterioration in pulmonary patients. This pattern underscores the complex interplay between chronic respiratory compromise and systemic oncologic burden as a primary driver of unexpected decline.

Despite high discriminative stability, our framework manifests distinct limitations and abnormal computational behaviors. First, the standard SVM completely failed under the unadjusted phase, yielding a sensitivity and F1-score of 0.000. This anomaly underscores the geometric limitations of traditional kernel methods under extreme class imbalance, where mortality events comprised only 5.4% of the cohort. Standard SVM optimization privileges global accuracy, establishing a majority-dominated decision boundary that fails to capture critical deterioration, thereby highlighting the necessity of non-linear ensemble frameworks like XGBoost. Second, our post-hoc validation revealed probabilistic calibration distortions in the XGBoost model. Although synthetic oversampling (SMOTE) effectively augmented out-of-sample sensitivity from 0.63 to 0.77, artificially balancing the sample space inherently altered posterior probability outputs. Frontline clinicians should therefore interpret raw probability scores cautiously, focusing on the deterministic hard-threshold boundaries optimized by the F1-score. By integrating these specific Elixhauser comorbidities, the MEWS+ framework provides a localized predictive approach better suited to the patient population.

Conclusion and future directions

In conclusion, the MEWS+ system represents a transition from reactive to proactive clinical monitoring. By quantifying the contributions of signed DNR status and MEWS time through SHAP interpretability, the model offers clinicians transparent and actionable insights to support timely ICU transfers and reduce unexpected IHCA events. Future research should focus on prospective, multicenter validation to enhance generalizability and further strengthen the safety and effectiveness of acute care delivery.


Conclusions

This study successfully developed and validated MEWS+, an advanced ML-based clinical predictive framework that transitions patient risk stratification from a reactive protocol to a proactive surveillance paradigm by integrating multidimensional EMRs. Our findings demonstrate that while the traditional MEWS remains a foundational physiological tool, its predictive precision for identifying acute clinical deterioration can be substantially optimized by incorporating clinical records (MEWS time), advanced directives (signed DNR status), and targeted localized comorbidities—specifically heart failure and renal failure. Compared with conventional static aggregate thresholds, this dynamic, data-driven approach yields excellent discriminative capacity and high predictive stability across validations. Notably, tree-based ensemble frameworks, particularly XGBoost, exhibit superior clinical utility by effectively balancing sensitivity and operational precision, thereby offering an actionable solution to mitigate clinical alarm fatigue and optimize resource allocation in specialized respiratory care environments.

Moving forward, this framework provides a scalable and transparent blueprint for localized precision healthcare support, enabling frontline clinicians to leverage interpretable, SHAP-derived risk indicators for early clinical decision-making and timely intensive care interventions. Future research should focus on the prospective, multicenter clinical deployment of the MEWS+ system to evaluate its real-world generalizability and compatibility across diverse institutional workflows. Furthermore, exploring the real-time integration of evolving temporal vital-sign trajectories and conducting longitudinal assessments of this system’s direct impact on reducing unexpected IHCA rates represent essential next steps to further strengthen patient safety in acute care environments.


Acknowledgments

None.


Footnote

Provenance and Peer Review: This article was commissioned by the Guest Editor (Mellissa Withers) for the series “Towards Planetary Health Equity: A Global Call for Shared Solutions” published in Journal of Public Health and Emergency. The article has undergone external peer review.

Reporting Checklist: The authors have completed the TRIPOD reporting checklist. Available at https://jphe.amegroups.com/article/view/10.21037/jphe-2026-0026/rc

Data Sharing Statement: Available at https://jphe.amegroups.com/article/view/10.21037/jphe-2026-0026/dss

Peer Review File: Available at https://jphe.amegroups.com/article/view/10.21037/jphe-2026-0026/prf

Funding: None.

Conflicts of Interest: All authors have completed the ICMJE uniform disclosure form (available at https://jphe.amegroups.com/article/view/10.21037/jphe-2026-0026/coif). The series “Towards Planetary Health Equity: A Global Call for Shared Solutions” was commissioned by the editorial office without any funding or sponsorship. The authors have no other conflicts of interest to declare.

Ethical Statement: The authors are accountable for all aspects of the work in ensuring that questions related to the accuracy or integrity of any part of the work are appropriately investigated and resolved. The study was conducted in accordance with the Declaration of Helsinki and its subsequent amendments. Ethical approval was obtained from the Ethics Committee of Changhua Christian Hospital on January 3, 2023 (No. 211241). Participation in the survey was based on informed consent.

Open Access Statement: This is an Open Access article distributed in accordance with the Creative Commons Attribution-NonCommercial-NoDerivs 4.0 International License (CC BY-NC-ND 4.0), which permits the non-commercial replication and distribution of the article with the strict proviso that no changes or edits are made and the original work is properly cited (including links to both the formal publication through the relevant DOI and the license). See: https://creativecommons.org/licenses/by-nc-nd/4.0/.


References

  1. Akel MA, Carey KA, Winslow CJ, et al. Less is more: Detecting clinical deterioration in the hospital with machine learning using only age, heart rate, and respiratory rate. Resuscitation 2021;168:6-10. [Crossref] [PubMed]
  2. American Heart Association. AHA guidelines for cardiopulmonary resuscitation and emergency cardiovascular care. 2020.
  3. Churpek MM, Adhikari R, Edelson DP. The value of vital sign trends for detecting clinical deterioration on the wards. Resuscitation 2016;102:1-5. [Crossref] [PubMed]
  4. Morgan RJM, Williams F, Wright MM. An early warning scoring system for detecting developing critical illness. Clin Intensive Care 1997;8:100.
  5. Subbe CP, Kruger M, Rutherford P, et al. Validation of a modified Early Warning Score in medical admissions. QJM 2001;94:521-6. [Crossref] [PubMed]
  6. Jolliffe IT, Cadima J. Principal component analysis: a review and recent developments. Philos Trans A Math Phys Eng Sci 2016;374:20150202. [Crossref] [PubMed]
  7. Smith GB, Prytherch DR, Schmidt PE, et al. Review and performance evaluation of aggregate weighted 'track and trigger' systems. Resuscitation 2008;77:170-9. [Crossref] [PubMed]
  8. Smith ME, Chiovaro JC, O'Neil M, et al. Early warning system scores for clinical deterioration in hospitalized patients: a systematic review. Ann Am Thorac Soc 2014;11:1454-65. [Crossref] [PubMed]
  9. Royal College of Physicians. National Early Warning Score (NEWS) 2. 2017. Available online: https://www.rcp.ac.uk/resources/national-early-warning-score-news-2/.
  10. Royal College of Physicians. National Early Warning Score (NEWS) 2: Standardising the assessment of acute-illness severity in the NHS. 2017. Available online: https://www.rcp.ac.uk/improving-care/resources/national-early-warning-score-news-2/.
  11. Churpek MM, Yuen TC, Winslow C, et al. Multicenter Comparison of Machine Learning Methods and Conventional Regression for Predicting Clinical Deterioration on the Wards. Crit Care Med 2016;44:368-74. [Crossref] [PubMed]
  12. Fuhrmann L, Lippert A, Perner A, et al. Incidence, staff awareness and mortality of patients at risk on general wards. Resuscitation 2008;77:325-30. [Crossref] [PubMed]
  13. Henry KE, Giannini HM. Early Warning Systems for Critical Illness Outside the Intensive Care Unit. Crit Care Clin 2024;40:561-81. [Crossref] [PubMed]
  14. İlhan B, Irmak MF, Tutar D, et al. Physiological scoring systems for early identification of critically ill older adults in the emergency department: a prospective observational cohort study. BMC Emerg Med 2025;25:218. [Crossref] [PubMed]
  15. Mahmoodpoor A, Sanaie S, Saghaleini SH, et al. Prognostic value of National Early Warning Score and Modified Early Warning Score on intensive care unit readmission and mortality: A prospective observational study. Front Med (Lausanne) 2022;9:938005. [Crossref] [PubMed]
  16. McGaughey J, Fergusson DA, Van Bogaert P, et al. Early warning systems and rapid response systems for the prevention of patient deterioration on acute adult hospital wards. Cochrane Database Syst Rev 2021;11:CD005529. [Crossref] [PubMed]
  17. Ministry of Health and Welfare. Taiwan Patient Safety Reporting System 2024 TPR Annual Report [Taiwan Bingren Anquan Tongbao Xitong 2024 Nian TPR Nianbao]. 2024.
  18. Morrison LJ, Neumar RW, Zimmerman JL, et al. Strategies for improving survival after in-hospital cardiac arrest in the United States: 2013 consensus recommendations: a consensus statement from the American Heart Association. Circulation 2013;127:1538-63. [Crossref] [PubMed]
  19. Stevens JP, Dechen T, Schwartzstein RM, et al. Association of dyspnoea, mortality and resource use in hospitalised patients. Eur Respir J 2021;58:1902107. [Crossref] [PubMed]
  20. Winters BD, Pham J, Pronovost PJ. Rapid response teams: Walk, don’t run. JAMA 2006;296:1645-7.
  21. Patel D, Patel O, Dave D, et al. Predictive value of modified early warning score in identifying high-risk postoperative patients following abdominal surgery. Int Surg J 2025;12:1707-11.
  22. Rowland B, Saha A, Motamedi V, et al. Impact on Patient Outcomes of Continuous Vital Sign Monitoring on Medical Wards: Propensity-Matched Analysis. J Med Internet Res 2025;27:e66347. [Crossref] [PubMed]
  23. Cuthbertson BH. Optimising early warning scoring systems. Resuscitation 2008;77:153-4. [Crossref] [PubMed]
  24. Ludikhuize J, Smorenburg SM, de Rooij SE, et al. Identification of deteriorating patients on general wards; measurement of vital parameters and potential effectiveness of the Modified Early Warning Score. J Crit Care 2012;27:424.e7-13. [Crossref] [PubMed]
  25. Wu KH, Cheng FJ, Tai HL, et al. Predicting in-hospital mortality in adult non-traumatic emergency department patients: a retrospective comparison of the Modified Early Warning Score (MEWS) and machine learning approach. PeerJ 2021;9:e11988. [Crossref] [PubMed]
  26. Sim T, Cho EY, Kim JH, et al. Prospective external validation of a deep-learning-based early-warning system for major adverse events in general wards in South Korea. Acute Crit Care 2025;40:197-208. [Crossref] [PubMed]
doi: 10.21037/jphe-2026-0026
Cite this article as: Ku YP, Chang CF, Lin CC, Weng SJ. Machine learning-enhanced modified early warning system for predicting in-hospital mortality on pulmonary ward. J Public Health Emerg 2026;10:21.

Download Citation