Introduction

Sepsis is a life-threatening organ dysfunction caused by the dysregulated response of an organism to infection1. Sepsis and septic shock impact millions of people worldwide yearly, killing between one in three and one in six of those it affects. Sepsis-associated delirium (SAD) is a cerebral dysfunction that occurs during sepsis. SAD is among the most serious complications of sepsis and is an independent risk factor for death in patients with sepsis. Its pathophysiological mechanism is complex, with no standard, unified diagnosis or treatment method at present2. Early and accurate identification of high-risk patients and timely adoption of effective therapeutic measures are of great importance to improve patient prognosis. Currently, the acute physiology and chronic health evaluation II (APACHE II) and sequential organ failure assessment (SOFA) scores are most often applied in clinical practice to assess the condition of patients with sepsis and to evaluate the physiological function of organs, respectively3. The most recent clinical practice guidelines on delirium from the Society of Critical Care Medicine recommend regular assessment of delirium using validated tools, such as the Confusion Assessment Method for the Intensive Care Unit (CAM-ICU) or the Intensive Care Delirium Screening Checklist2. However, early assessment of SAD progress and prediction model sensitivity in patients with sepsis require further research. Risk prediction models have been widely applied in medical research to predict future onset. Although not an integral part of treatment, risk prediction is essential to improve clinical decision-making4. Moreover, risk prediction models are used to predict the likelihood or risk of the onset of a particular outcome or event in an individual and are often established through statistical methods based on disease etiology or related risk factors. The quantitative relationships between risk factors in a model are analyzed to predict the probability of a particular outcome event as well as the risk level of an event in a population with certain specific risk factors5,6. Therefore, the rapid identification of risk factors for sepsis onset and its progression to SAD may facilitate early medical prevention and interventions, which are important for improving patient prognosis and clinical outcomes. The Multiparameter Intelligent Monitoring in Intensive Care-II (MIMIC-II) database is the largest public clinical database7 in the field of emergency and critical care medicine. It was established in a joint effort of emergency medicine physicians, intensive care unit (ICU) physicians, and computer science experts from the Massachusetts Institute of Technology, Massachusetts General Hospital, and Beth Israel Deaconess Medical Center. In September 2016, the MIMIC-II database was upgraded to the Medical Information Mart for Intensive Care-III (MIMIC-III), and the latest version is the Medical Information Mart for Intensive Care-IV (MIMIC-IV)8.

In recent years, the MIMIC databases and various machine learning methods have gradually been applied in medical research. Compared with commonly used clinical indicators, predictive models established based on different clinical requirements and data characteristics that make full use of these repositories can better predict the onset of adverse outcomes9,10,11. Rahmatinejad et al. used disease scores combined with clinical variables to establish and effectively verify prediction models, which played an important role in early clinical prediction12.

The present study was designed to screen adult patients who met the diagnostic criteria for Sepsis 3 through the MIME-IV database, based on the third International consensus definition of sepsis and septic shock, or SAD, for key features of sepsis onset or progression to SAD. Based on these characteristics, a prediction model of risk factors for the onset or development of sepsis into SAD was constructed to facilitate early identification and intervention and improve the prognosis of patients.

Methods

Data source

Patient-related information was screened from the MIMIC-IV database, including demographic information, vital signs, laboratory tests, treatment, diagnosis, assessment, and prognosis. The data were verified by several studies to be of high quality. Access to the database was obtained for the present study (database authorization certificate ID: 57,771,514), and the database is available to all investigators who comply with the requirements for its use (https://mimic.physionet.org)13. Data were extracted from the database for all adult patients (aged ≥ 18 years) admitted to the ICU who met the inclusion criteria. Patients with significant missing information were excluded.

Study participants

In this study, Structured Query Language (SQL) via Navicat Premium (version 15.0) was used to extract meaningful baseline clinical data based on the “subject_id” of each patient in the ICU. If a patient’s data was measured multiple times, only the first measurement was used14. Patient information was extracted from the MIMIC-IV database according to the following inclusion criteria: (1) first admission to the ICU; (2) age of ≥ 18 years; (3) diagnosis of sepsis; (4) length of stay in the ICU of ≥ 24 h; and (5) completion of delirium assessment. The diagnosis of sepsis was based on the definition of Sepsis-3, including patients with documented or suspected infection, SOFA scores of ≥ 2, and microbial culture results that clearly indicate infection15,16. The CAM-ICU was used to screen and identify delirium. Patients with sepsis who had a positive delirium assessment were defined as having SAD, and those with delirium associated with drug or alcohol abuse, neurological disorders, mental disorders, and other conditions were excluded17,18. Finally, the modeling group in this study included 598 patients (358 men and 240 women). The validation group included 269 patients with sepsis or SAD who were admitted to the Department of Intensive Care Medicine of a grade A tertiary hospital in Xinjiang, China, between February 2018 and December 2022. This study complied with the medical ethics standards of the Declaration of Helsinki and was approved by the Ethics Committee of the First Affiliated Hospital of Xinjiang Medical University (ethics approval no.: K202301-43). The patient enrollment process of the study is illustrated in Fig. 1

Figure 1
figure 1

Flow chart of patient enrollment.

Data extraction

According to the key words "sepsis," "severe sepsis," and "septic shock," the original data of patients diagnosed with "sepsis," "severe sepsis," or "septic shock" were searched in the MIMIC-IV database, and the patients were further screened according to the inclusion and exclusion criteria. The detailed process of patient screening is shown in Fig. 1. The requirements for multivariate logistic regression analysis indicate a sample size of at least 10 times the number of variables19. In the present study, 598 patients who met the criteria were screened from the database. According to the allocation principle, the sample sizes of the modeling and verification groups accounted for 70% and 30% of the total sample size, respectively. The sample size of the verification group was calculated to be 269 patients for external verification.

Data collection

This study included the clinical data of all patients in the MIMIC-IV database who met the diagnostic criteria. These data included: (1) general demographic information (sex, age, etc.); (2) underlying comorbidities (myocardial infarction, heart failure, cerebrovascular disease, diabetes mellitus with chronic comorbidities, malignant neoplasm, and severe liver disease); (3) laboratory results within 24 h of admission to the ICU, including routine blood indicators (white blood cell count, neutrophil count, hemoglobin, platelet count, and albumin), coagulation indicators (international normalized ratio, prothrombin time, and activated partial thromboplastin time [aPTT]), and blood gas analysis (pH value, partial pressure of oxygen, partial pressure of carbon dioxide, blood potassium, blood sodium, and lactate); (4) biochemistry indices (creatinine, total bilirubin, alanine transaminase, alkaline phosphatase, aspartate transaminase, etc.); (5) prognostic scores assessed within 24 h of admission to the ICU that indicate patient prognosis (acute physiology scores, APACHE II scores, SOFA scores, and total length of stay in the ICU).

Data extraction and processing

Access to the data was granted after registering with the database website, obtaining a certificate following ethics training and an examination, signing a data usage agreement outlining appropriate data usage and safety standards, and obtaining permission to conduct the corresponding research. No further ethical approval was required20. Patients in the MIMIC-IV database between 2008 and 2019 were screened according to the inclusion criteria. SQL and PostgreSQL were used to extract basic patient data, underlying comorbidities, laboratory indices, and prognostic outcomes. The data were further filtered and processed using SQL based on the exclusion and rejection criteria (missing data ratio of > 30%). As the proportion of missing data in all extracted data was < 5%, these data were retained and subjected to multiple imputations21, based on which the data were further analyzed. Clinical data collection for this study was reviewed and approved by the institutional ethics committee (K202301-43).

Model construction

Uni- and multivariate logistic regression analyses were performed on the retrieved clinical data to screen for factors influencing in-hospital mortality. Based on the results of multivariate logistic regression, regression models for predicting mortality outcomes were established using the influencing factors as the main predictive indices and subject survival as the predictive outcome. The regression equation was visualized as a nomograph using the “rms” package in R, version 4.3.1. The values corresponding to each factor in the nomograph were identified, and the total score was calculated by summing all the values. The total score corresponded to the probability of 28-day mortality among patients with sepsis or SAD, in which a higher total score was associated with a higher probability of death22.

Statistical analysis

Data were extracted using SQL and PostgreSQL. Data entry and analyses were performed using Excel 2019 and IBM SPSS Statistics for Windows, version 26.0, respectively. R was used to construct the models and assess model performance. The Shapiro–Wilk test was performed to test for normality, and measurement data conforming to a normal distribution are expressed as‾x ± s. Comparisons were made using the two-sample independent t-test. Measures with skewed distributions are expressed as medians (quartiles), and intergroup comparisons were made using the rank-sum test. Count data are expressed as the percentages of cases (%), and intergroup comparisons were made using the chi-square test. P < 0.05 indicated statistical significance. Statistically significant variables were included in the multivariate analyses. Binary logistic regression analyses were used to screen independent risk factors and construct predictive models. Nomograms were made to visualize the predictive models. The predictive accuracy of the model was assessed by plotting the receiver operating characteristic (ROC) and calibration curves. The goodness-of-fit of the predictive model was determined using the Hosmer–Lemeshow (HL) test. Data from the validation group were substituted. ROC and calibration curves were plotted to determine the predictive accuracy of the model.

Results

Comparison of baseline data

Patients in the modeling and validation groups were categorized into survival and mortality groups based on patient outcomes on day 28 after admission. Overall, 598 adult patients (aged ≥ 18 years) diagnosed with sepsis combined with SAD were screened in the modeling group, of which 82 were in the mortality group. Nine indicators showed statistically significant differences between the groups (P < 0.05), including age, comorbidity of heart failure, acute physiology score, SOFA score, and total length of stay in the ICU. The validation group comprised 269 adult patients (aged ≥ 18 years) with sepsis combined with SAD or who progressed to SAD (survival group: 169 patients; mortality group: 100 patients). Table 1 shows the results of the comparisons of data of patients with sepsis and SAD in the modelling and validation groups.

Table 1 Comparison of general data, related scores, and laboratory indexes of patients with sepsis complicated with SAD between the modeling and verification groups.

Analysis of factors associated with sepsis onset or progression to SAD in patients in the modeling group

The risk factors with statistically significant differences in the univariate analyses (P < 0.05) screened in the modeling group were further subjected to multivariate logistic regression analysis. The results showed that five indicators (total length of stay in the ICU, hemoglobin, albumin, aPTT, and total bilirubin) were independent risk factors for 28-day mortality in patients with sepsis or SAD (P < 0.05) (Table 2).

Table 2 Results of multivariate logistic regression in the modeling group.

Prediction model development and validation

Based on the results of multivariate logistic regression analysis, the five independent risk factors were assigned values from X1 to X5. The following regression equation was then established based on the above results:

$${\text{Logit }}\left( {\text{P}} \right) \, = { 3}.{561 } + \, 0.{\text{196X1}} - \, 0.{\text{24X2 }} - { 1}.{\text{236X3 }} - \, 0.0{\text{33X4 }} + \, 0.0{\text{61X5}}$$

where P is the predicted probability of death within 28 days of admission for patients with sepsis complicated with delirium.

The R software package was used to construct a 28-day mortality prediction model for patients with sepsis or SAD (Fig. 2). The ROC curve of the predictive model indicated a sensitivity of 91.5%, a specificity of 76.4%, and an area under the ROC curve (AUC) of 90.4%. The predictive model was then applied to the validation group and showed a model sensitivity of 75%, a specificity of 81.1%, and an AUC of 83.3% (Figs. 3 and 4). The calibration curves for both the modeling and validation groups aligned with the actual curve, indicating that the model had a favorable prediction accuracy (Figs. 5 and 6). The results of the HL goodness-of-fit test showed χ2 = 8.518 and P = 0.385 (> 0.05) for the modeling group, suggesting that the predictive model had a high goodness-of-fit in both datasets.

Figure 2
figure 2

Nomogram of the risk prediction model for 28-day mortality among patients in the modelling group with sepsis or who progressed to SAD.

Figure 3
figure 3

Receiver operating characteristic (ROC) curve for predicting risk factors for 28-day mortality among patients in the modelling group.

Figure 4
figure 4

Receiver operating characteristic (ROC) curve for predicting the risk factors for 28-day mortality among patients in the validation group.

Figure 5
figure 5

Receiver operating characteristic (ROC) validation curve for predicting risk factors 28-day mortality among patients in the modelling group.

Figure 6
figure 6

Receiver operating characteristic (ROC) validation curve for predicting the risk factors 28-day mortality among patients in the validation group.

Discussion

SAD is a systemic organ and tissue injury caused by inflammation. Ely et al. found a high incidence of sepsis-associated encephalopathy in the ICU, with approximately 20–50% of patients with sepsis having delirium or disturbance of consciousness23. However, different cohort studies have also confirmed that sepsis-associated encephalopathy is closely related to increased short-term mortality in patients with sepsis24. Existing clinical scores, such as the APACHE-П, Simplified Acute Physiology Score-II, SOFA, quick SOFA (qSOFA), and systemic inflammatory response syndrome, are widely used to assess the risk degree of critically ill patients and predict poor prognosis. The use of objective and accurate prognostic scoring systems can help distinguish and manage complex patients, improve baseline indicators, and quantify disease severity25,26,27. However, studies on the severity and prognosis of sepsis with or without progressive delirium are relatively insufficient. Therefore, we constructed a prediction model of risk factors of 28-day mortality in sepsis with or without progressive delirium based on the MIMIC-IV database.

Independent risk factors in the modeling group to rapidly screen patients for sepsis onset or progression to SAD

The results of this study identified five indicators (total length of stay in the ICU, hemoglobin level, albumin level, aPTT, and total bilirubin level) as independent risk factors for 28-day mortality in patients with sepsis or those who progressed to SAD (P < 0.05). Multivariate logistic regression showed that the total length of stay in the ICU was positively correlated with the 28-day survival rate of patients with sepsis or advanced delirium (odds ratio, 1.217; 95% confidence interval, 1.165–1.271). The most direct harm caused by the reduction of hemoglobin levels is the weakening of oxygen transport capacity and hypoxia of tissue cells. This study demonstrated that the hemoglobin level of patients in the survival group was significantly higher than that in the mortality group, and the histogram indicated that the hemoglobin level was a protective factor for prognosis. These findings underscore the importance of maintaining appropriate hemoglobin levels in patients with sepsis or those who progressed to SAD. In addition, decreased hemoglobin and albumin levels are clear features of malnutrition, indicating an increased nutritional risk, which is highly likely to affect sepsis prognosis28. In recent years, several studies have demonstrated that inflammation and coagulation disorder in patients with sepsis promote and interact with each other, thus amplifying the cascade reaction. Coagulation disorder in sepsis is also a key factor that accelerates the progression of the disease and affects patient prognosis29, which is consistent with the results of the present study. Moreover, serum bilirubin levels were associated with mortality in patients with severe sepsis; in particular, elevated serum bilirubin levels within 72 h of admission were associated with increased mortality in patients with sepsis30,31. Bilirubin impairs the bactericidal properties of neutrophils, inhibits inducible nitric oxide synthase, and inhibits platelet aggregation by suppressing platelet activation32. These findings are consistent with the results of the present study, which indicate that total bilirubin was an independent risk factor for the prognosis of patients with sepsis. Furthermore, Xiao et al.33 demonstrated that the combination of bilirubin, creatinine, and qSOFA score had a high sensitivity and specificity in predicting sepsis progression and prognosis.

Construction of a risk prediction model for patients with sepsis and those who progress to SAD based on the MIMIC-IV database

We constructed a model to predict 28-day mortality in patients with sepsis or those who progressed to SAD, employing the following formula: Logit(P) = 3.561 + 0.196X1–0.24X2–1.236X3–0.033X4 + 0.061X5. The left side of the nomogram diagram displays the variables included in the prediction model. The corresponding line segment of each variable is marked with a scale, representing the value range of the variable, while the length of the line segment reflects the contribution of the factor to the outcome event. The total point represents the total score of the single scores corresponding to the values of all variables. The predicted probability of death within 28 days in patients with sepsis or those who progressed to SAD can be evaluated according to the total point of the column chart. The model was visualized as a nomogram to help clinicians assess the prognosis of the patients and provide targeted treatment at an early stage, offering valuable references for clinical practice. Regarding model performance evaluation, the results of the HL test showed a likelihood ratio chi-square value of 8.518 (df = 8, P > 0.05), indicating that the prediction model was well-fitted33,34. The differentiation of prediction models was measured by the AUC. An AUC of < 0.7 indicated poor evaluation efficiency of the model, an AUC of 0.7–0.9 indicated medium evaluation efficiency, and an AUC of > 0.9 indicated good evaluation efficiency35,36. The AUC values of the predictive model in the modeling and validation cohorts were 90.4% and 83.3%, respectively. These values indicate that the constructed model has a good degree of differentiation. The calibration curve reflects the consistency of the model. In the cartesian coordinate system in Figs. 3 and 5, the calibration curve of the model coincides with the height of the 45° straight line, indicating that the 28-day mortality risk predicted by the model was in good agreement with the actual mortality rate.

Risk prediction model for patients with sepsis or those who progressed to SAD may serve as a valuable guide in clinical practice

In this study, based on the existing challenges in clinical practice and with the help of a large clinical database, a prognostic model for patients with sepsis and those with occurring or progressing delirium was constructed for rapid screening and identification of sensitive early warning indices. Moreover, the relationship between prognosis and various blood pressure indices in the early stage of sepsis was explored. Based on five clinical variables for the occurrence of sepsis or SAD, the probability of mortality within 28 days in this patient group can be predicted. This tool may help clinicians evaluate disease severity, guide the stratification of disease risk, quickly adjust prevention and treatment plans, and improve the patient prognosis. In addition, the reliability and generalizability of the model were improved by scientifically screening the risk factors of 28-day mortality in patients with sepsis and applying clinical data for verification. The results of the present study may be used to identify risk factors and poor prognosis of high-risk groups early in clinical practice, guide personalized treatment and prevention programs to improve risk factor indicators, and reduce risk scores, which are important for early warning and improving the clinical outcomes of patients.

Strengths and limitations

In summary, a model was constructed to rapidly predict mortality in patients with sepsis or those who progressed to SAD within 28 days after ICU admission based on the MIMIC-IV database. Moreover, evaluation tools, such as the SOFA and APACHE-II scores, may be combined for a greater clinical reference that can assist in clinical decision-making, adjusting therapeutic plans, and preventing the onset of adverse outcomes37. However, some limitations must be addressed. The data retrieved from the MIMIC-IV database may be subject to variation in disease severity, treatment strategies, and risk factors. The extraction of some validation indicators was incomplete, the data of the validation group were mostly from retrospective studies, and the research results were for reference and application in clinical practice. Additionally, in the process of external verification, verification based on a limited number of medical records in a single center may have certain limitations. In the future, multicenter studies with increased sample sizes are required to further verify the validity of the model.