Keywords

1 Introduction

With the rapid increase of medical data, the collision between medical problems and medical data is also intensifying. It is an essential task in the medical field to determine the severity of a patient’s condition to assist clinical diagnosis and treatment. In particular, in some emergency and harsh situations, such as earthquakes, emergency medical events, and hurricanes. There is a severe shortage of medical personnel and medical equipment. Under such circumstances, some patients may miss the best opportunity for treatment because they cannot predict the patient’s condition in a timely and accurate manner.

Moreover, some patients may miss out on rescue opportunities and even lose their lives. Besides, in emergency medical events, medical equipment often cannot be put in place in one step, and many patients may not be monitored by professional equipment. Usually, physiological data can be used to determine whether a patient is at risk for decompensation before the patient’s condition worsens [1]. The current situation of the patient can be obtained through a method calculation based on clinical monitoring data, and intelligently assisted diagnosis and treatment in saving more lives. Therefore, in emergency and harsh situations, how to use artificial intelligence technology to combine with primary medical data in the past to determine the severity of a patient’s condition to assist clinical diagnosis and treatment has attracted significant attention from researchers.

In the past applied research on clinical data, most of the study focused on the application of electronic medical records. The directions involved are probably the prediction of mortality, the length of hospitalization, and the triage of patients. There are a large number of early studies using neural networks to predict the length of stay of hospitalized patients [2, 3]. Recently, it was shown that using 13 frequent clinical measurements based on machine learning to classify diagnoses in a pediatric intensive care unit (PICU) [4]. Besides, novel neural structures perform well in predicting inpatient mortality and diagnosing routine Electronic Health Record (EHR) data [5]. However, few studies have focused on monitoring data to predict physiological decompensation, that is, the rapid deterioration of the patient’s condition.

In emergency situations, many are in danger, and some even lose their lives. In the Haiti earthquake on January 12, 2010, the official government statistics of the dead and injured totaled 316,000 [6]. With the outbreak of COVID-19, as of May 14, 2020, over 4.33 million confirmed cases were reported all over the world. Over 295 thousand of them were dead [7]. The healthcare systems of some countries have been pushed to the brink. In emergencies, Therefore, the prediction of physiological decompensation is a significant task.

On the one hand, the prediction of physiological decompensation can help doctors to make a decision. On the other hand, the prediction of physical decompensation can relieve the pressure on the medical staff. Moreover, the prophecy of physiological decompensation can give early warning for critical patients under the condition of insufficient medical staff and medical equipment so that timely diagnosis and rescue measures can be taken for essential patients to save more lives.

In this paper, we propose a method for predicting decompensation for emergency medical and decision-making under emergency and harsh situations. The method includes components such as patient information collection, data selection, data processing, and decompensation prediction. We strive to reduce false early warnings of physiological decompensation due to data noise. Also, in the selection of data, we try to choose standard physiological variables that can be monitored without the complicated manual and bulky equipment. Finally, the Multiparameter Intelligent Monitoring in Intensive Care III (MIMIC-III) dataset was selected to verify the effectiveness of the method. Consequently, our main contributions in this paper can be summarized as follows:

  1. (1)

    We propose a novel method for decompensation prediction in emergency and harsh situations. The method can alert patients whose status is about to worsen based on fundamental physiological values.

  2. (2)

    We tried a series of machine learning models to predict physiological decompensation. The Bi-LSTM-attention model can pass information across multiple time steps to improve decompensation prediction based on changes before and after physiological values.

  3. (3)

    We try to reduce the essential physiological variables as much as possible for prediction to detect patients whose condition deteriorates rapidly in emergency and harsh situations. The experimental using MIMIC-III data results show that the Bi-LSTM-attention method, combined with eleven essential physiological variables, can be used to predict the decompensation of severe patients. The AUC-ROC can reach 0.8509. Furthermore, these eleven physiological variables can be easily monitored without the need for complicated manual and massive, costly instruments, which meet the real requirements under emergency and harsh situations.

The remaining part of the paper is organized as follows. In Sect. 2, we review prior works most related to ours. In Sect. 3, we introduced the methods and models we chose. Then we demonstrate the experiments based on a real-world database. Section 5 shows the results obtained. Finally, we give discussion and conclusions.

2 Related Work

There are currently many studies on intelligent assisted medical decision-making. In previous research, six can be used to support clinical care by applying clinical data: high-cost patients, readmission, triage, and decompensation (when the patient’s condition worsens), adverse events, and treatment optimization for diseases affecting multiple organ systems [1]. We try to emphasize research and methods that are relevant to us.

For the prediction of decompensation, there has been researched in this area in the early years. Ghali, JK, et al. have explored and found the potential predisposing factors that lead to cardiac decompensation and subsequent hospital admission for heart failure [8]. Ramachandran studied that overlapping infections with hepatitis E can cause severe decompensation in patients with chronic liver disease [9]. Annalisa et al. proved that obesity is an independent risk factor for clinical decompensation in patients with liver cirrhosis [10].

However, most of these early studies used manual calculations of decompensated early warning scores on smaller data sets, and they were usually aimed at predicting disease. Recent studies have proven that we can use the current electronic medical system to effectively use past clinical data to make comprehensive decompensation predictions for patients (that is, predict patients who are about to deteriorate). In particular, new neural structures perform well in predicting decompensation [11]. Feedforward networks [12] and spatiotemporal convolutional networks [13] have been used to predict decompensation based on the clinical time series. For example, large-scale clinical monitoring data and electronic medical records are used to predict decompensation and length of hospital stay for patients [14]. Long Short-Term Memory (LSTM) is a kind of time recurrent neural network. It is specially designed to solve the long-term dependency problem of general RNN (recurrent neural network) [15]. It is also very suitable for solving our current.

The prediction of medical problems with the help of deep learning is inseparable from the construction of standard data sets [16, 17]. Because the raw data of clinical databases are involved, there are a large number of early studies using databases to construct standard data sets [18, 19]. These data sets are used in all aspects of intelligently assisted medical decision making. For example, RNN is used in the detection of electronic medical records of medical events [20]. Recursive networks combined with an attention for diagnostic prediction in healthcare [21].

However, none of these efforts solve the problem of assisting smart medical decision-making through decompensation prediction in emergency and harsh situations. Most studies focus on the availability of adequate medical personnel and medical equipment in ordinary life. In the face of unexpected medical and health events, we are working to find a way to reduce the stress of intensive care and save more lives.

3 Methods and Models

In previous studies, most of them focused on predicting decompensation for patients with a single disease under normal conditions (with adequate medical staff and equipment). Moreover, the alarm is usually a false positive due to the noise of the data. So, some information on decompensation is often incorrectly predicted. Therefore, after collecting patient information, it is necessary to reduce data noise and accurately predict patients with worsening conditions. So, we propose a method for decompensation prediction in emergency and harsh situations. The method includes components such as patient information collection, data selection, data processing, and decompensation prediction. Based on this, the Bi-LSTM-attention model is selected for the prediction of physiological decompensation because the model can capture long-distance dependencies and is suitable for modeling time series.

3.1 Methods

In this section, we introduce the method for decompensation in emergency and harsh situations, and briefly introduce our component settings. As shown in Fig. 1, we show a conceptual diagram of our approach. Under unpredictable earthquakes and difficult-to-control infectious diseases, the number of medical staff and medical equipment is in short supply. Patients may lose their lives because they cannot be treated on time. Therefore, a large number of existing patients need to identify who currently needs to be processed by a doctor. We propose a method to predict decompensation (the patient’s condition worsens). In our method, we need to collect patient information through cooperation with hospitals or other means. These patients may be children or adults. Patients of different ages should have different decompensation processes. Our method attempts to use adults as the research object to predict patients who are about to deteriorate.

Fig. 1.
figure 1

The method for decompensation prediction.

To make our method suitable for emergency and harsh environments, we should minimize the use of patient information in the process of decompensation prediction. Each less information means less use of a device, a test, or a doctor. The decompensation method is divided into four components. The first step is the patient information collection, the second step is data selection, the third step is data processing, and the fourth step is decompensation prediction. Each step is divided into more detailed sub-processes, and then specific processing operations are selected according to each sub-process. Secondly, according to our goal is that to apply the method to the condition in emergency and harsh and assist intelligent decision-making, we set filtering conditions in the data selection step.

Information Collection.

The collection of patient information is the first and most essential step in the method. We want to use the previous medical data to assist intelligent diagnosis and treatment, and we need to collect and select medical information from former patients. At present, most hospitals in the world have adopted electronic systems to record patient information, including diagnosis, medication, electronic medical records, and patient monitoring data in the hospital. These electronic records may appear in the form of text or the kind of tables. With the development and treatment of patients in the hospital period, it has a particular auxiliary medical application value. However, in our method application, these data are certainly not all inputs. Therefore, the first step in our method is to target the source of data (tables or text, etc.) that we need in the electronic system. After locking the required forms and writing in the electronic system, we enter the second component of the method.

Data Selection.

Data selection is the second component in the method and the key to the method’s suitability for emergency and harsh situations. There is a large amount of data in the records of the hospital electronic system. In the first component, we selected the required data source. However, the data in these data sources are many and complicated. For example, a spreadsheet record may record a series of measurements during the entire hospitalization of a patient from the emergency department. There may be hundreds of monitoring records. About ten essential physiological monitoring records are selected as input data for the final decompensation prediction. These data should have the following characteristics. First, it should be detectable without the need for sufficient professional medical staff. That is because, in some emergencies (earthquakes or medical emergencies, etc.), medical staff is often insufficient. Secondly, it should be able to be monitored without the aid of extremely complex instruments. That is because, in the event of a sudden large-scale health event, professional equipment often cannot meet the demand in a short time.

Data Processing.

Data Processing. Data processing is the third component in the method and the cornerstone of final decompensation prediction. In the previous step, we selected essential physiological value monitoring records as input data for the final decompensation prediction. However, previous studies have shown that the data directly extracted from the database will have much noise. So, the probability of real decompensation prediction is about 50% [1]. That means that the direct use of this data often leads to false early warnings of decompensation.

On the one hand, the information is noisy in the original record. For example, the unit of the data is incorrect, or the physiological value is abnormally high or low due to the error; on the other hand, a patient may be admitted to the hospital multiple times due to different diseases, or even transferred to the hospital during the change of the condition. In our method, we propose data processing components to make the data more standardized for our practice. First, because children and adults have different reference ranges for physiological values, we select patients older than 18 in the selection process. Second, we proposed an independent mechanism for multiple inpatient records for the same patient and created different examples of inpatients to avoid inaccurate predictions of compensation due to admission transfers effectively. Then, we clean the data. These operations may include correction of error units, handling of outliers outside the reference range, and so on. Finally, we get a set of standard experimental data for each physiological value.

Decompensation Prediction.

Decompensation prediction is the last component in the method and the final decisive component to support intelligent medical decisions. In early studies, patients with abnormal physiological functions would trigger alerts. These warnings were implemented through old warning scores, such as the Modified Early Warning Score (MEWS) [22], the VitalPAC Early Warning Score (ViEWS) [23], and the National Early Warning Score (NEWS) [24]. But these ratings are often manual. The alert score summarizes patient status through an overall score and a trigger summary based on abnormally low values. In an emergency and harsh environment, medical staff and medical equipment are seriously inadequate. Detecting patients who are rapidly deteriorating can reduce the pressure on medical care, and timely warning of decompensation information can enable more patients to be treated in time and save more lives. In our decompensation prediction component, we implement it with a combination of machine learning methods. In the process of predicting decompensation, we have inherited previous research. We describe the decompensation benchmark task as a binary classification problem, where the target label indicates whether the patient died within the next 24 h. We use the area under the receiver operator characteristic curve (AUC-ROC) and area under the precision-recall curve (AUC-PR) as evaluation indicators, which are the two most commonly used indicators in clinical prediction tasks.

3.2 Models

In this section, we used bidirectional LSTM and attention mechanisms to predict the decompensation in Fig. 2. Due to its unique design structure, it is suitable for processing and predicting important events with very long intervals and delays in time series. In our method, the data are monitored values with timestamps. Based on the method, the original monitoring data passes through a series of preprocessing. We discretize the time series into equal durations. The final input sequence is \( x_{t} \) with length T. We will briefly describe the theoretical basis of our method below.

Fig. 2.
figure 2

Bi-LSTM-attention network architecture. Vectors in the hidden state sequence \( h_{t} \) are fed into the learnable function \( a\left( {h_{t} } \right) \) to produce a probability vector \( \alpha \). The vector c is computed as a weighted of \( h_{t} \), with weighting given by \( \alpha \).

Bi-LSTM.

Although a unidirectional LSTM can capture long-term dependency problems, the LSTM can only predict the output of the next moment based on the timing information of the previous moment. However, according to the characteristics of patient physiological monitoring values, the current physiological values may be related to the previous and upcoming ones. Therefore, the output at the present moment is related to not only the former state but also the future state. So, we add-ed a bidirectional LSTM layer. There are two parallel LSTM layers: forward LSTM layer and backward LSTM layer. In this way, the model can learn and store values monitored by specific variables at earlier time steps, such as storing the maximum PH or the minimum blood glucose value.

$$ f_{t} = \sigma \left( {W_{f} \left[ {h_{t - 1 } ,x_{t} } \right] + b_{f} } \right) $$
(1)
$$ i_{t} = \sigma \left( {W_{i} \left[ {h_{t - 1 } ,x_{t} } \right] + b_{i} } \right) $$
(2)
$$ o_{t} = \sigma \left( {W_{o} \left[ {h_{t - 1 } ,x_{t} } \right] + b_{o} } \right) $$
(3)
$$ \hat{C}_{t} = tanh\left( {W_{C} \left[ {h_{t - 1 } ,x_{t} } \right] + b_{C} } \right) $$
(4)
$$ C_{t} = f_{t} *C_{t - 1} + i_{t} *\hat{C}_{t} $$
(5)
$$ h_{t} = o_{t} *tanh\left( {C_{t} } \right) $$
(6)
$$ \widehat{{D_{T} }} = \sigma \left( {w^{\left( D \right)} h_{T} + b^{D} } \right) $$
(7)
$$ p_{t} = L\left( {\left[ {u_{t} ;c_{t} } \right],p_{t - 1} } \right) $$
(8)
$$ q_{t} = L\left( {\left[ {\overleftarrow {{u_{t} }} ;\overleftarrow {{c_{t} }} } \right],q_{t - 1} } \right) $$
(9)
$$ u_{t} = \left[ {p_{t}^{\left( k \right)} ;\overleftarrow {{q_{t}^{\left( k \right)} }} } \right] $$
(10)
$$ H_{t} = L\left( {u_{t} ,H_{t - 1} } \right) $$
(11)

The σ (sigmoid) and tanh functions are applied element-wise. The W matrices and b vectors are the trainable parameters of the LSTM. where L stands for LSTM.

Attention.

The attention mechanism is a solution to the problem that mimics human attention and aims to quickly screen out high-value information from a large amount of data. The attention mechanism can solve the problem that it is difficult to obtain a final reasonable representation when the LSTM model input sequence is long. In this article, we also added the attention mechanism and adopted the attention idea of adding the activation function and summing it. The idea is to add a tanh activation function after the weight calculation and add it after calculating the weight.

Adam.

Adam is a first-order optimization algorithm that can replace the traditional stochastic gradient descent (SGD) process [25]. It can iteratively update neural network weights based on training data.

$$ m_{t} = \beta_{1} m_{t - 1} + \left( {1 - \beta_{1} } \right)g_{t} $$
(12)
$$ v_{t} = \beta_{2} v_{t - 1} + \left( {1 - \beta_{2} } \right)g_{t}^{2} $$
(13)
$$ \hat{m}_{t} = \frac{{m_{t} }}{{1 - \beta_{1}^{t} }} $$
(14)
$$ \hat{v}_{t} = \frac{{v_{t} }}{{1 - \beta_{2}^{t} }} $$
(15)
$$ W_{t + 1} = W_{t} - \frac{\eta }{{\sqrt {\hat{v}_{t} + \in } }}\hat{m}_{t} $$
(16)

Among them, A and B are first-order momentum terms and second-order momentum terms, respectively.

Loss Function.

The loss functions we use to train these models are:

$$ .{\mathcal{L}}_{t} = CE\left( {D_{T} ,\widehat{{D_{T} }}} \right) $$
(17)

where \( CE\left( {y,\hat{y}} \right) \) is the binary cross-entropy defined over the C class.

$$ CE\left( {y,\hat{y}} \right) = - \left( {y \cdot { \log }\left( {\hat{y}} \right) + \left( {1 - y} \right) \cdot log\left( {1 - \hat{y}} \right)} \right) $$
(18)

4 Experiments

In this section, we try to implement our method. First, we introduced the data processing process in the selected database and decompensation method. Then we added our basic ideas and parameter settings in the process of predicting decompensation.

Dataset.

To implement our method, we first need to get the data. Because patient information is often kept secret in hospitals, it is not easy to manually collect it. Therefore, we chose the MIMIC-III database-a real-world database [26]. It is the only publicly available critical care database and needs to finish online courses and tests to get access. MIMIC-III contains data associated with 53,423 distinct hospital admissions for adult patients admitted to critical care units between 2001 and 2012. It covers 38,597 distinct adult patients and 49,785 hospital admissions. Moreover, it contains data for 7870 neonates admitted between 2001 and 2008. Given the data richness and authenticity of MIMIC-III, we chose it as our data source for the research.

Information Collection.

The MIMIC-III database contains all the information from the patient’s emergency department to the discharge. This information is recorded in 26 tables, including physiological measurements, medical records, doctor’s orders, discharge summary, disease diagnosis, medication time, etc. However, in our decompensation prediction method, we do not need to collect all the information of patients. That is because, to make our method applicable to emergency and harsh situations, our goal is to select physiological variables that are easy to monitor and use these variables to predict decompensation to assist intelligent medical decision-making. Therefore, we have locked the following tables containing this information in MIMIC-III database. We extracted data for the tables as follows: ADMISSIONS (every unique hospitalization for each patient); PATIENTS (every unique patient); ICUSTAYS (every unique Intensive Care Unit (ICU) stay); D_ICD_DIAGNOSES (dictionary of International Statistical Classification of Diseases and Related Health Problems codes relating to diagnoses); DIAGNOSES_ICD (hospital assigned diagnoses, using the International Statistical Classification of Diseases and Related Health Problems system); CHARTEVENTS (all charted observations for patients); LABEVENTS (laboratory measurements for patients both within the hospital and in outpatient clinics); and OUTPUTEVENTS (output information for patients while in the ICU).

Data Selection.

The MIMIC-III database contains monitoring records of more than 40 physiological variables. However, in emergencies (such as earthquakes, infectious diseases), medical equipment is often in short supply. We can’t provide all the equipment to every patient in need in a short time. Therefore, we should minimize the types of physiological variables and try to select physiological indicators that can be easily monitored. Based on this, we extracted the physiological variables record from these tables. We decided 11 basics physiological variables. These 11 physiological variables can be easily monitored without the need for complicated manual and massive, costly instruments. The selected physiological variables include the Glasgow coma scale total, PH, Weight, Temperature, Systolic blood pressure, Respiratory rate, Mean blood pressure, Height, Heart Rate, Glucose, and Diastolic blood pressure.

Data Processing.

First, due to physiological differences between children and adults, we select the ICU stays where the patients are over 18 years at the time of ICU admission. That is because the proportion of adults in ICU patients is much higher than that of children, and the normal range of physiological values for adults and children is different. Second, for each patient, we only use their single admission without complex and transferred information. That is because each patient may have multiple hospitalization records, and some may cause discontinuity of measurement data during the transfer of the ward. Therefore, we sorted the data and targeted them at their single admission. It was done to prevent possible information interference in the analysis.

To get the final experimental data, we further cleaned the data, including correction and deletion. The data extracted from MIMIC-III database has lots of erroneous entries, including noise, missing values, outlier low, outlier high, and measurement unit error. Our goal is to eliminate as much as possible to avoid false early warning of final physiological decompensation. For missing values, we determine alternative operations for missing values based on different situations (such as calculating the median of the two previous and subsequent measurements within the most recent time of the missing value) or leaving the missing value blank. For outliers, we will delete or correct them. For errors in measurement units, we perform corrective actions. That yields 3,431,000 instances. We briefly describe the data acquisition process in Fig. 3.

Fig. 3.
figure 3

Experimental data acquisition process using MIMIC-III database as an example.

Decompensation.

We have combined our method with the two LSTM-based approaches (LSTM and Bi-LSTM-attention) from the previous chapters. That is because of the nature of the continuous monitoring time series of clinical data, the current state of an instance is closely related to its pre- and post-states and LSTM can learn long-term dependence information. Besides, we also selected a simple baseline model—a multi-nominal logistic regression (LR) model. The goal of our decompensation prediction is to warn patients whether their condition worsens or even die within the next 24 h. We use the data of the same 20% patients of the predefined training set as validation data and train the models on the remaining 80%. When discretizing the data, we set the length of the regular interval to one hour. For the above model, during the development process, we found that applying dropout to embedding can improve the performance of data sets. To prevent overfitting, we used a dropout rate of 30%, and β1 = 0.9. We used Adam optimizer with a learning rate of 0.001 and fixed the hyperparameters (i.e., dropout values, learning rate) on the validation set.

5 Results

We demonstrate the method using MIMIC-III data and use the bootstrap method to estimate the confidence interval of the score. The bootstrap method has been used to estimate the standard deviation of the evaluation method, calculate the statistical differences between different models, and report the 95% bootstrap confidence interval of the model. To estimate the 95% confidence interval, we resampled the test set 1000 times. Calculate the scores of the resampled set; and use 2.5% and 97.5% of these scores as our confidence interval estimates.

The results of the decompensation prediction task are reported in Fig. 4 and Table 1 respectively. Figure 4 is a visualization of the average value of one of the indicators (AUC-ROC). Table 1 is a table listing the result values of all models and the 95% confidence interval obtained by the bootstrap test set.

Fig. 4.
figure 4

Schematic diagram of the ROC curve and AUC area results under the three models, the blue represents multi-nominal logistic regression, the yellow represents LSTM, and the red represents Bi-LSTM-attention (Online).

Table 1. Experimental results under different models

Experimental results show that these 11 physiological variables can be easily monitored without the need for complicated manual and massive, costly instruments, which meet the real requirements under emergency and harsh situations. Therefore, our method is suitable for saving patients by alerting patients who are about to worsen in the event of a medical emergency.

6 Discussion

We describe a method for decompensation prediction in emergency and harsh situations. Our method can select the most basic physiological variables for clinical monitoring data. These variables are easy to detect and avoid complicated labor. Therefore, in an emergency, early warning of dangerous patients can alleviate the pressure of medical care and save more lives. In the process of implementing the method, we chose a model that can rely on the information before and after learning clinical monitoring data.

However, in our current approach, it is purely data-driven and does not contain human knowledge. In clinical practice, each physiological variable has its normal range, and experts for specific diseases have rich practical experience. Besides, to avoid irregular data, we prevent a small number of children, which limits the scope of our method.

7 Conclusions

In this article, we used large-scale data, explored how to save more lives in emergencies and harsh conditions, and gave our method. With the abnormal shortage of medical staff and medical facilities, our method for predicting physical decompensation is sufficient to alert patients who are at risk of dying within the next 24 h, thereby providing intelligent decision support and saving more lives. With the richness and authenticity of the data, our results are credible. Although specific tasks inspire our method, it has the potential to be generalized to other clinical duties. For example, the prediction of physiological decompensation can be migrated to intelligent diagnosis, which can relieve the pressure of medical care. In future work, on the one hand, the data of pediatric patients can be incorporated into our method, so that the method has a broader scope of application; on the other hand, we will consider integrating human knowledge to get more accurate decompensation result.