Sentiment Analysis for Necessary Preview of 30-Day Mortality in Sepsis Patients and the Control Strategies

This study was to preview the risk of 30-day mortality in sepsis patients using sentiment analysis. The clinical data of patients and nursing notes were collected from the Medical Information Mart for Intensive Care (MIMIC-III) database. The factors influencing 30-day mortality were analyzed using the Cox regression model. And, the prognostic index (PI) was estimated. The receiver operating characteristic (ROC) curve was used to determine the PI cut-off point and assess the prediction ability of the model. In total, 1844 of 3560 patients were eligible for the study, with a 30-day mortality of 37.58%. Multivariate Cox analysis showed that sentiment polarity scores, sentiment subjectivity scores, simplified acute physiology score (SAPS)-II, age, and intensive care unit (ICU) types were all associated with the risk of 30-day mortality (P < 0.05). In the preview of 30-day mortality, the area under the curve (AUC) of ROC was 0.78 (95%CI: 0.74–0.81,P < 0.001) when the cut-off point of PI was 0.467. The documented notes from nurses were described for the first time. Sentiment scores measured in nursing notes are associated with the risk of 30-day mortality in sepsis patients and may improve the preview of 30-day mortality.


Introduction
Sepsis, a complicated disorder, develops as an aberrantly regulated host response to the infection, and it is related to acute organ dysfunction and a high-risk mortality [1]. e incidence of sepsis is high, but the true incidence is unknown. A population-based study showed that the incidence of sepsis came up to 535 cases per 100,000 persons annually and was rising [2]. In two inpatient cohorts, sepsis was found to be conductive to 1 in every 2-3 deaths, and most patients were subjected to sepsis at admission [3]. Although effective measures about the prevention and treatment have been taken, and outcomes have improved, the mortality is still higher than 25%-30%, reaching up to 40%-50% when shock appears [4,5].
At present, the mortality in the intensive care unit (ICU) can be previewed by several common methods where the severity of illness scores (SOI) is often used, such as sequential organ failure assessment (SOFA), simplified acute physiology score (SAPS), and acute physiology and chronic health evaluation (APACHE) [6][7][8]. e SOI system is developed based on the patient's clinical data mainly obtained from the electronic health record (EHR). Nevertheless, in the common EHR, unstructured data like clinical notes are also present.
ere are evidences suggesting that clinicians have capabilities to reasonably predict the mortality in the ICU [9,10]. It is, thus, clear that the clinical notes written by clinicians contain valuable information on the health status of patients. As a technique of processing the natural language, sentiment analysis contributes to identifying the attitudes or impressions of clinicians towards patients through computational algorithms to extract subjective information in the written text and classify subjective properties [11][12][13]. Previous studies have demonstrated that there is a close association of sentiments identified in clinical notes with both hospital readmission and mortality in the ICU [14,15].
In this study, we used a sentiment analysis method to preview the risk of 30-day mortality in sepsis patients based on Medical Information Mart for Intensive Care (MIMIC-III) database, hoping to provide more valuable information for improving the outcomes of patients in the ICU.

Study Design and Population.
A total of 1,844 sepsis cases from the MIMIC-III database between 2001 and 2012 were enrolled in the retrospective study. e mortality from the date of ICU admission to 30 days after discharge (30-day mortality) was considered as the primary outcome of the present study. ese patients were divided into the survived (n � 1151) and dead (n � 693) groups. e clinical data of patients and nursing notes were available from MIMIC-III database, a large-scale critical care database. MIMIC-III comprises information associated with the patients hospitalized in critical care units of large tertiary care hospitals, such as demographics, medications, laboratory measurements, vital signs, hospital length of stay, nursing notes, and survival data [16]. e data applied in the present study were from the MIMIC-III database (https://mimic.physionet.org/ ), a freely accessible database developed by the MIT Lab for Computational Physiology, comprising deidentified health data associated with −60,000 intensive care unit admissions. e data collected in the MIMIC-III was approved by the Ethics Review Board of the Beth Israel Deaconess Medical Center, and all private information has been carried out the desensitization.
Patients were screened based on the inclusion and exclusion criteria. Inclusion criteria included (1) being diagnosed as sepsis, severe sepsis, and septic shock (International Classification of Diseases 9 (ICD-9) codes: 99591, 99592, and 78552) in the MIMIC-III database and (2) having complete clinical data. Exclusion criteria incorporated (1) lack of nursing notes and (2) notes written <12 h before the death and those identified by clinicians as errors. e diagnostic criteria of sepsis were based on Sepsis-2 [17]. Patients with sepsis were screened according to the ICD code in MIMIC-III. e ICD is presented in the form of code, which classifies diseases according to their causes, locations, pathology, and clinical manifestations, so as to realize statistical analysis, comprehensive utilization, and scientific management of diseases in hospitals. e description of nurses who had more direct contact with patients was used. Nurses can observe the early signs of deterioration in the patient's health, highlight any abnormal clinical measures, and record their judgments or concerns in their documentation. Examples are listed in Table 1. is is a retrospective study. All behaviors of medical staff were not intervened. e collection of nursing notes is a normal part of the hospital's work, so the operations of medical staff will not be affected by this study.

Sentiment
Analysis. Sentiment is usually described as the relative polarity of a text string, with the score from −1 (very negative) to 1 (very positive) [18]. ere are also other sentiment dimensions like subjectivity, emotion, and strength that can be assessed by common sentiment analysis methods [15]. In this study, Python programming language and TextBlob natural language processing library (https:// textblob.readthedocs.io/en/dev/) were both used to calculate sentiment scores in the nursing notes. NLTK language processing tool was used for word segmentation; that is, nursing notes were divided into several words, and the "pattern" was used for polarity scoring to obtain several polarity scores and subjective scores. e mean of polarity scores and subjective scores was used as the final score. e sentiment polarity was returned by TextBlob as a number from −1 to 1, and the subjectivity was returned as a number from 0 to 1. e higher the scores were, the more positive and subjective the sentiment was.

Collection of Information.
For each patient, the following information was collected, including age, gender, sentiment polarity, and subjectivity scores in nursing notes measured by sentiment analysis, SAPS-II, and ICU types. SAPS-II, a known predictor of ICU mortality, was composed of the patient's age, 12 physiology variables, 3 underlying disease variables, and admission types [19]. In the present study, it was computed based on the data accessed from MIMIC-III database and SQL scripts in the MIT Laboratory for Computational Physiology Git Repository.

Statistical
Analysis. SPSS 22.0 software (IBM Corp., Armonk, NY, USA) and Python text analysis (version 3.7) were used to manage the data. Normally-distributed measurement data were expressed as the mean ± standard deviation (x ± s), which were compared using t-test; those with abnormal distribution were manifested as the median and interquartile (M (Q1, Q3)), which were compared through the Mann-Whitney U rank-sum test. χ 2 test was employed to compare the enumeration data manifesting as n (%). e influencing factors of 30-day mortality in sepsis patients were determined using the Cox regression model, and hazard ratio (HR) with 95% confidence interval (CI) was used to estimate these associations. Univariate Cox regression analysis was performed on baseline variables, and variables with statistical significance were included in the multivariate Cox regression model. e prognostic index (PI) was estimated with the formula (PI � β 0 + X 1 β 1 + X 2 β 2 + . . . + X k β k ). e larger the PI value, the worse the prognosis. A receiver operating characteristic (ROC) curve was drawn to determine the PI cut-off point and evaluate the preview ability of the model. SAPS-II consists of 17 factors and is not calculated using linear functions. e effect of collinearity between age and APS-II is limited, and its variance inflation factor is 1.118; thus, the effect of collinearity can be ignored. e P value less than 0.05 showed significant difference.

e Preview
Model. C-statistic reflected the degree of consistency between the predictive result and actual event occurrence. In the Cox proportional hazard regression model, event occurrence could be described by whether it occurred or not and occurrence time. erefore, for the Cox model, it was necessary to compare the actual occurrence time of the event with the event occurrence time previewed by the model to evaluate model discrimination.
For a cohort with an observation period of t, the actual survival time of the participants was recorded as t 1 , t 2 , . . . (if no event occurred until the end of the observation period, then t . � t), and the survival time estimated by the model was recorded as t ′ , t 2 ′ , . . . en, for two different participants (i, j), the following was met: In other words, if the inequality had the same direction, the model preview result was considered to be "consistent." If the inequality was in the opposite direction, it was considered "inconsistent." If the expected survival time of the two was the same, namely, it was considered "uncertain." In survival analysis, the survival time of an individual was difficult to preview, but there was a one-to-one corresponding relation between survival time and survival function, and the survival function could be directly calculated by the Breslow method. e survival functions of the participant at time T were recorded as S 1 , S 2 , . . . If the expected survival time of i(t i ′ ) was longer than the expected survival time of j(t j ′ ), then the probability of t i ′ > T (S i ) should be greater than the probability of t j ′ > T (S j ), and vice versa. At this time, formulas (1)-(3) could be rewritten as It could be seen that not every pair of participants could give an evaluation of whether it was consistent or not. When the survival time of two participants was the same, if there was no event at the end of the observation period (t i � t j � T), the above definition could not be used for evaluation. At this time, the pair of participants would not be taken into consideration when calculating model discrimination. In addition, for participants who were lost to followup or withdraw during the observation period, their survival time was not comparable to that of other participants (the life expectancy of participants censored at time t; was not necessarily less than that of participants who died at time t j (>t j ), so it should not be taken into consideration in the analysis.
Assuming that no participants left the cohort halfway, except for events of concern to the research, C-statistic was the consistency rate of the result predicted by the Cox proportional hazard regression model among all participants (with varying survival time) taken into consideration: If Presumptive diagnosis is Lemierre given the h/o severe sore throat and neck pain followed by hypoxia as well as the CTchest c/w septic emboli in setting of growing anaerobic GNRs at the OSH. However, the CT of the neck was negative for thrombophlebitis although this is only positive in 30%-40% of cases. Other potential sources include an abdominal source given her original presentation including abdominal pain and concern for an acute abdomen. Potential alternatives include bacterial pneumonia/ CAP, and atypical pneumonia, although these are less likely. TTE ruled out endocarditis as a source of septic emboli.
2 Yesterday her HCP decided to withdraw care by turning down the tidal volume, the FIO 2 to room air, and the PEEP to 0. is was done today. She remained on 500 mcg/hr of fentanyl and 20 mg/hr of versed as well as 20 mg methadone q8hr. Her eyes were open but did not follow commands, and her limbs were flaccid.
π c � P t i < t j and S i < S j , or t i > t j and S i > S j � P t i < t j and S i < S j + P t i > t j and S i > S j , π d � P t i < t j and S i > S j , or t i > t j and S i < S j � P t i < t j and S i > S j + P t i > t j and S i < S j , then P(t i ≠ t j ) � π c + π d + π u , and formula (5) could be written as follows: e unbiased estimates of π c , π d , and π u were where n was the number of participants in the cohort, n(n − 1) represented the pair number of all possible participants in the case that i was not equal to j and c ij took 1 when it met the definition of (4) "consistent" and took 0 in other cases. c ij was a consistent pair number; likewise, d ij was an inconsistent pair number, and u ij was an uncertain pair number. If the pair number of all participants with unequal survival time was recorded as en, C could also be expressed as e 95%CI of C could pass the consistency rate P C , the inconsistency rate P d , and the uncertainty rate P u , and the following estimated the number N of people in the cohort:

Baseline Information of Included Patients.
In the MIMIC-III database, there were a total of 3,560 patients admitted in the ICU. In 1,128 patients without sepsis, 356 cases lacking sentiment polarity and subjectivity scores, 172 with missing SAPS-II, and 60 with missing survival data were excluded, and 1,844 cases were finally involved in the present study (Figure 1). Among these patients, 693 cases (37.58%) were dead within 30days from hospital admission to discharge. e median survival time of all included sepsis patients was 7.03 (2.53, 18.28) days. e baseline information of survived and dead patients is presented in Table 2. Compared with the dead patients, the survived patients had higher sentiment polarity scores (P < 0.001) and lower SAPS-II scores (P < 0.001).
ere were significant differences between the survived and dead patients in age (P < 0.001) and ICU types (P < 0.001), but not sentiment subjectivity score, SOFA score, and gender (Table 2). e proportion distributions of the sentiment polarity score, sentiment subjectivity score, SAPS-II score, SOFA score, age, gender, and ICU types are shown in Figure 2. e possible effects of the missing data of lacking sentiment polarity and subjectivity scores have been analyzed in Table 3.

Discussion
In total, 1,844 cases of sepsis were enrolled in this study, with the overall 30-day mortality of 37.58%. Multivariate Cox analysis showed that sentiment polarity scores and sentiment subjectivity scores were both statistically significant determines, even in the presence of known determines for 30-day mortality in sepsis patients. rough the ROC curve, it can be observed that the AUC of the model was 0.78 when the cut-off point of PI was 0.467, highlighting a better diagnostic accuracy in the preview of 30-day mortality. All these findings suggested that the sentiment scores measured in nursing notes were conductive to previewing the risk of 30-day mortality in sepsis patients; the nursing notes rich in information could serve as an indicator for clinical outcomes.
It is well-known that the brief fragments in the text can reflect the author's feelings on a given topic, and language processing tools are conductive to characterizing these feelings including the sentiment in text documents [20]. Sentiment, a metric usually used to explore the negative or Table 3: Difference analysis between the missing and nonmissing data, n (%) or (x ± s).

Variables
Missing ( positive opinion within messages, is weighed using a number from −1 (very negative) to 1 (very positive) [13,18]. Sentiment analysis allows the words and symbols used within a message to be checked for the intensity of negative and positive emotions and opinions [13]. In the Twitter-based healthcare research field, sentiment analysis has been the mainstream. Recently, sentiment analysis has begun to be used in the medical settings, such as encounter notes of patients with critical illness [21], and virtual visits for Parkinson's disease [22]. e studies have demonstrated that   sentiment analysis can help us understand the attitudes of clinicians towards patients by categorizing the subjective expressions written in the clinical notes, thereby playing a certain role in predicting the outcomes of patients [23][24][25].
In this study, sentiment polarity scores and sentiment subjectivity scores were both identified as the significant determines for 30-day mortality in sepsis patients, indicating that the sentiment scores were associated with the risk of 30day mortality. is was supported by the results concluded by McCoy et al. that higher positive sentiment at discharge was related to a notably reduced risk of hospital readmission [14]. In addition, our results also exhibited that the sentiment scores can improve the preview of 30-day mortality in sepsis patients as presented by the AUC of ROC. Hence, in the preview models of clinical outcomes, unstructured information in nursing notes should also be comprised except for traditionally used structured data [26,27]. is was the first population-based study to preview the risk of 30-day mortality in sepsis patients using sentiment analysis. e sentiment scores in nursing notes were computed using Python programming language and TextBlob natural language processing library, which was easy to operate. Moreover, our results might be more credible because the nursing notes written <12 h before the patient's death were not included. Nevertheless, some limitations in this study remained to be concerned. First, according to the mean sentiment scores, the variation in sentiment can only be characterized at the patient level instead of the clinician level. With plenty of information on clinicians, sentiment measurement would be beneficial to identification of the clinician-level factors probably affecting the outcomes. Second, the data of MIMIC-III database were obtained from a large-scaled hospital, but the nursing notes in our study only represented a part of nurses. e clinicians with different work experiences and environments may take the nursing notes with polytropic features. ird, a single-center MIMIC-III database with distinct clinical culture may affect the way of taking notes for nurses, thus leading to a limitation in generalizability of the relationship between mortality and sentiment measured in nursing notes. Text data in the health record by nurses depend on the time restraint. at is, when nurses are too busy to write for dying patients, their text information may be reduced. erefore, more accurate sentiment measurement, biomarkers related to sepsis, and multi-center data may improve the effectiveness of models that previewed the 30-day mortality risk in sepsis patients. In addition, external validation is a necessary measure for the application of the preview model in clinical practice.

Concluding Remarks
e documented notes from nurses were described for the first time. Our results suggest that the sentiment scores measured in nursing notes are associated with the risk of 30day mortality in sepsis patients, which may contribute to improving the preview of 30-day mortality.
Data Availability e data applied in the present study were from the MIMIC-III database (https://mimic.physionet.org/), a freely accessible database developed by the MIT Lab for Computational Physiology, comprising deidentified health data associated with 60,000 intensive care unit admissions.

Conflicts of Interest
e authors declare that there are no conflicts of interest regarding the publication of this paper.   Journal of Healthcare Engineering