Introduction

Acute kidney injury (AKI) is a major clinical problem affecting a significant number of patients globally, with high rates of mortality and morbidity1. Given the lack of validated injury markers, the diagnosis of AKI is often delayed because of the time lag between the onset of injury and functional decline2,3. Early recognition of AKI is particularly challenging in emergency department (ED) settings because of the narrow time window for clinical decisions and the quick discharge of many patients4,5. Even mild AKI in patients discharged from the ED is significantly associated with an increased risk of death or requirement of dialysis6,7.

AKI due to nephrotoxic exposure accounts for a substantial proportion of all AKI cases. In particular, iodinated radiocontrast media is a major source of nephrotoxicity8. Millions of intravascular contrast media procedures are annually performed in North America9, and computed tomography (CT) utilization within ED has been continuously increasing worldwide10. Although the true incidence of contrast-induced AKI (CI-AKI) has been a subject of debate due to variable definitions and many confounders affecting kidney function11,12, sufficient data support the negative impact of postcontrast AKI (contrast-associated AKI, CA-AKI) on short- and long-term outcomes13,14.

CA-AKI can be minimized using preventive strategies and hypervigilance8. A predictive approach to identifying AKI risk in ED patients who undergo contrast exposure may offer opportunities for clinical intervention, within a short window, and ensure inpatient or outpatient follow-up. This is particularly important in the ED, where intravenous contrast media for enhanced CT cannot be withheld given the clinical urgency15,16,17. However, considering the fast-paced ED workflow and narrow time window for clinical decision-making, accurately assessing the risk of CA-AKI development at an individual level, with sufficient context, is challenging. Thus, an automated and straightforward prediction tool that incorporates various clinical factors for objective clinical decision-making is needed. Considering the lack of real-time biomarkers for AKI detection and the emerging role of machine-learning in AKI prediction18,19, we tested models based on machine-learning and developed a prediction tool for CA-AKI in unselected ED patients who underwent contrast-enhanced CT (CE-CT).

Methods

This retrospective study was conducted in the ED of a tertiary urban academic medical center in Seoul, Korea, with two million outpatients annually and 1,975 inpatient beds. The ED has 69 beds, with an average annual patient volume of 75,000–80,000 patients. This study was approved by the Institutional Review Board (IRB) of Samsung Medical Center (IRB no. 2023–09–030). The requirement for informed consent was waived due to the use of de-identified data for analysis and the retrospective and observational design of the study. All methods were performed and reported in accordance with the 1975 Declaration of Helsinki and the ‘Strengthening the Reporting of Observational Studies in Epidemiology’ guidelines20.

Study population

Patients who underwent CE-CT in the ED between January 2016 and December 2020 were identified using an electronic medical record (EMR) system. Patients who met the following criteria were excluded: (1) those aged < 18 years old; (2) with end-stage kidney disease on dialysis; and (3) those with missing data on serum creatinine levels needed for a CA-AKI diagnosis, both before and after CT.

Data collection

The EMR system used in this study is an internally developed system that was rolled out in July 2016, replacing the previous internally developed EMR. The new EMR is part of a hospital information system called Data Analytics and Research Window for Integrated kNowledge (DARWIN). DARWIN is a comprehensive system that contains computerized order entries from physicians; nurses; pharmacists; and billing and research support departments. It even includes patient portals and web services.

Patient characteristics, past diagnoses, prescription history, laboratory test records, and ED status during their visit were extracted from the Clinical Data Warehouse of the study site. Patient data included age, sex, weight, height, body mass index (BMI), whether they underwent angiography during their ED visit, and history of previous CT contrast exposure within three months prior to the ED visit. The International Classification of Disease codes for the past year were used to define comorbidities including diabetes mellitus, hypertension, heart failure, cancer, cardiac arrhythmia, liver cirrhosis, chronic kidney disease, kidney transplantation, and myocardial infarction. Prescription histories during the past year were collected. The collected medication records included angiotensin receptor blockers, angiotensin-converting enzyme inhibitors, diuretics, nonsteroidal anti-inflammatory drugs, chemotherapeutic agents, immunosuppressants, and aminoglycoside antibiotics.

The following laboratory data were collected: hemoglobin, blood urea nitrogen (BUN), serum creatinine, albumin, uric acid, sodium, potassium, chloride, low-density lipoprotein (LDL) cholesterol, triglyceride (TG), urine albumin, urine protein to creatinine ratio, and urine albumin to creatinine ratio.

The initial status of the patients at the time of ED arrival was collected, focusing on trauma, sepsis, and the use of ambulance or transfer from another hospital. Severity was assessed using the Korean Triage and Acuity Scale (KTAS), and the AVPU scale. The vital signs (systolic blood pressure, diastolic blood pressure, pulse rate, respiration rate, body temperature, and O2 saturation) upon arrival were collected.

Definition of CA-AKI

CA-AKI was the primary outcome and was defined as either an absolute increase in serum creatinine of at least 0.5 mg/dL or a relative increase of at least 25% from the baseline within seven days of contrast administration21. Baseline creatinine levels were collected within 24 h of CT contrast exposure. If multiple assessments were conducted, the serum creatinine value closest to the time of CT was considered the baseline value. If creatinine levels within 24 h were missing, the median value of all creatinine levels measured in the three months prior to CT was considered the baseline value. The post-CT creatine level was defined as the highest creatinine level measured in the two to seven days following contrast exposure.

Statistical analysis

For descriptive analysis, continuous variables are presented in terms of the medians (interquartile range, IQR), and categorical variables are presented as counts and percentages. The Mann–Whitney U test was used to compare continuous variables, and the chi-square test was performed for categorical variables. P-values < 0.01 were considered statistically significant. All analyses were performed using R version 4.2.3 (R Foundation for Statistical Computing, Vienna, Austria) and Python version 3.9.7.

Data preprocessing and model development

For the collected patient characteristics and clinical features, such as height, weight, and laboratory data, outliers were removed based on the clinical context. Categorical variables were processed using one-hot encoding, which created separate binary features for each category. Our dataset was randomly divided into an 80% development set and a 20% validation set. Missing data were imputed using multiple imputations by chained equations, as this exhibited the closest representation of the spread of the original data, compared with other imputation methods. We applied five machine-learning models: logistic regression (LR), random forest (RF), extreme gradient boosting (XGB), light gradient boosting (LGB), and multilayer perceptron (MLP). The hyperparameters were optimized using both random search and grid search with five-fold cross-validation.

We computed the optimal threshold using Youden’s J statistic for model evaluation. The performance of each algorithm was ranked according to the area under the receiver operating characteristic (ROC) curve (AUROC). Accuracy, sensitivity (recall), specificity, positive predictive value (PPV; precision), negative predictive value (NPV), and F1 score were calculated. The F1 score is the harmonic mean of precision and recall: F = 2 × Precision × Recall/(Precision + Recall). It provides better representation when dealing with an imbalanced dataset.

Model interpretation

Shapley additive explanation (SHAP) was used to interpret the results. SHAP uses a game-theoretic approach to evaluate how each feature contributes to and interferes with the model outcome. The SHAP values help identify the key features that significantly influence the model. The marginal contribution of each variable to the outcome variable was visualized using SHAP plots of individual cases22,23.

To understand the clinical relationship between significant features identified by unbiased machine-learning models, we additionally developed an AutoScore model24. AutoScore is a recently developed framework that uses RF plots to rank variables and generates clinical risk-scores. Each variable is automatically divided into interval ranges. The generated score table assigns a higher point on the variable range, which indicates a more significant contribution to the risk. The final score is the sum of all the breakpoints, and a higher final score indicates a higher risk of an outcome. The model provides area under the curves (AUC), sensitivity, specificity, PPV, and NPV values as performance metrics.

Results

Among the 369,469 patients who visited our ED between 2016 and 2020; 110,845 patients who underwent CT scans during their visit were screened. After excluding pediatric patients; those with end-stage kidney disease; and those who did not receive contrast media; 51,837 patients with contrast exposure were identified. After further exclusion of the patients who did not have baseline or follow-up serum creatinine measurements; a total of 22,984 patients were included in the final analysis (Fig. 1), of whom 1862 (8.1%) developed CA-AKI.

Fig. 1
figure 1

Patient flow diagram. CA-AKI, contrast-associated AKI; CT, computed tomography; ED, emergency department.

Baseline characteristics

The baseline characteristics of the study participants are presented in Table 1. More patients in the CA-AKI group underwent CT angiography and had a history of prior exposure to CT contrast, compared with those in the no CA-AKI group. Ambulance arrivals and transfers from other hospitals were more common in the CA-AKI group. The proportions of patients with estimated glomerular filtration rate (eGFR) < 30 mL/min/1.73 m2 or eGFR ≥ 90 mL/min/1.73 m2, and proteinuria were higher in the CA-AKI group than in the no CA-AKI group. The patients in the CA-AKI group had more comorbidities including diabetes, hypertension, heart failure, and arrhythmia, and had more exposure to renin-angiotensin system blockers, diuretics, and chemotherapeutic agents, compared with those in the no CA-AKI group.

Table 1 Baseline characteristics of study participants.

Model construction and comparison

Forty-two features were selected as inputs for the models to predict the risk of CA-AKI. We tested five machine-learning models in the training set, including LR, RF, XGB, LGB, and MLP. The training and test sets consisted of 18,387 (80%) and 4,597 (20%) patients, respectively, randomly selected from the full cohort (Fig. 2). The performance metrics of the five machine-learning models are presented in Table 2. Figure 3 shows the ROC curves. The LGB model achieved the best predictive effects for CA-AKI with an AUROC of 0.731, whereas the LR model exhibited the lowest performance.

Fig. 2
figure 2

Schematic of model development. AUROC, area under the receiver operating characteristic curve; EMR, electronic medical record; LGB, light gradient boosting; LR, logistic regression; RF, random forest; XGB, extreme gradient boosting; MLP, multi-layer perception; MICE, multiple imputation by chained equations.

Table 2 Model performance evaluated on the test set.
Fig. 3
figure 3

Receiver operating characteristic curves of machine learning models. AUC, area under the curve; ROC, receiver operating curve.

Model interpretation

Figure 4 shows the feature importance in the LGB model. The features, in order of their feature importance, were serum creatinine, systolic blood pressure, serum albumin, eGFR, BUN, body weight, serum uric acid, hemoglobin, TG, body temperature, age, chief complaint, serum potassium, pulse rate, diastolic blood pressure, LDL, height, serum sodium, and serum chloride levels.

Fig. 4
figure 4

Feature importance of LGB model. BUN, blood urea nitrogen; eGFR, estimated glomerular filtration rate; LGB, light gradient boosting; LDL, low-density lipoprotein.

To explain the effect of each feature on the decision of the prediction model, we illustrated the individual contributions of the variables of our trained LGB model using SHAP. Figure 5A and Fig. 5B display the individual contributions of features to the SHAP plots for patients with and without CA-AKI, respectively. Baseline serum creatinine and albumin levels were the most critical predictive features for the model output. Systolic blood pressure and albuminuria were also important predictive factors for CA-AKI.

Fig. 5
figure 5

SHAP plots of LGB model, depicting the CA-AKI risk for two example patients. The red arrow represents the impact values that are positive while the blue represents negative. The length of the arrow bar represents the absolute value of the impact. CA-AKI, contrast-associated acute kidney injury; KTAS, Korean Triage and Acuity Scale; LGB, light gradient boosting; SHAP, Shapley additive explanation.

Furthermore, to obtain a more detailed understanding of the associations between CA-AKI and the main features identified by the unbiased machine-learning model, we built the AutoScore model. Seventeen variables were selected based on their identified prognostic value from the LGB model (baseline serum creatinine, systolic blood pressure, body weight, serum albumin, serum uric acid, age, hemoglobin, pulse rate, serum potassium, serum chloride, serum sodium, proteinuria, diuretic use, sex, sepsis, and diabetes). The scoring table for the AutoScore model is presented in Table 3. The final scores ranged from 0 to 17. The baseline serum creatinine concentration had the highest score. High systolic blood pressure (≥ 170 mmHg), hypoalbuminemia (≤ 2.4 g/dL), and hyponatremia (≤ 124 mmol/L) also had high scores (> 10). The other variables associated with higher scores were hyperuricemia (≥ 7.5), proteinuria, use of diuretics, and sepsis. The AUROC evaluated on the test dataset was 0.715 (95% confidence interval, 0.679–0.750).

Table 3 Scoring table for AutoScore.

Discussion

Among undiagnosed patients who underwent CE-CT for various indications in the ED of a tertiary hospital, 8.1% developed AKI after CT contrast exposure. We created a machine-learning-based prediction model that relied on 42 clinical parameters to predict the risk of CA-AKI. Among various models, the LGB model exhibited the best performance in our study. This model can be used as a personalized tool for identifying patients at higher risks of AKI development after CE-CT scans in the ED.

Considering the current lack of validated injury markers for AKI detection, AKI diagnosis relies on serum creatinine and urine output criteria, according to the current guidelines25. However, serum creatinine rises in a delayed fashion, and changes in urine output can be difficult to distinguish from physiological variations26. This often leads to a delay in AKI diagnosis and initiation of appropriate interventions26. Accordingly, early clinical recognition of AKI has been identified as an important target for EMR-based predictive modeling18,19. An early prediction tool for AKI could be particularly useful in ED settings, where treatment decisions are made before the clinical signs of AKI become apparent27. Early interventions have the potential to improve outcomes2,3and allow ED clinicians to make informed decisions regarding discharge planning and future treatment trajectories4,5.

Although several studies have reported CA-AKI predictive models using machine-learning algorithms28,29,30,31,32,33, no study has investigated predictive tools for CA-AKI in unselected ED-visiting populations. Few studies targeted patients who underwent CE-CT scans, and most previous studies were based on patients who underwent percutaneous coronary angiographies28,29,30,31,32,33. The present study is the first to demonstrate a predictive model of CA-AKI in ED patients who underwent intravenous CE-CT scans. We tested various machine-learning models, including LR, RF, XGB, LGB, and MLP. Among them, the LGB model exhibited the best performance.

Although the exact mechanism by which radiocontrast media contributes to AKI is not fully understood, widely accepted mechanisms include direct cytotoxicity to renal tubular epithelial cells and vasoconstrictive effects on renal microcirculation, leading to ischemic injury of the renal medulla34,35,36,37. Thus, patients under oxidative stress, vasoconstriction, and/or endothelial dysfunction are likely to have increased susceptibility to CI- or CA-AKI. In accordance with the consensus that preexisting kidney dysfunction is the most significant risk factor for CI-AKI38, baseline serum creatinine concentrations had the highest feature importance in our model, as expected. Systolic blood pressure had the second-highest feature importance, followed by baseline creatinine levels. This trend was consistently observed in our AutoScore model, showing a positive correlation between blood pressure and scores, which aligns with data from a recent meta-analysis39. Given the vasoconstrictive effect of contrast media that leads to medullary hypoxia35,40, microcirculation impairment due to damaged renal arterioles and endothelial dysfunction in patients with hypertension might have exacerbated existing susceptibility to medullary hypoxia. The serum albumin level was also a strong predictive factor in our model. Previous epidemiologic studies have consistently reported an inverse relationship between serum albumin concentrations and AKI risk; in a previous systematic review41, the risk of CA-AKI was 2.6-fold higher in patients with hypoalbuminemia42. However, it is uncertain whether hypoalbuminemia is a contributing factor for CA-AKI or has a role as a surrogate marker of malnutrition and severity of illness. The effect of exogenous albumin pre-infusion in patients with hypoalbuminemia who undergo CE-CT scans could be a topic of future studies.

Risk prediction tools for CA-AKI are possibly unsuitable for decision-making regarding the deferral of contrast use43. Contrast exposure may not be the sole etiology for many CA-AKI cases, and uncertain causal relationships between contrast exposure and postcontrast status have been reported38,44,45. Particularly in ED settings, where CE-CTs are performed urgently as a life-saving diagnostic procedure, a delay in diagnosis and treatment due to withholding CE-CT would increase the risk of mortality and long-term complications in patients15,17. The benefits of using radiocontrast often outweigh its risks in many ED cases16. Therefore, this predictive tool could be used for identifying patients who need more intensive nephroprotective measures, such as hemodynamic stabilization, volume status optimization, early glycemic control, and avoidance of nonessential nephrotoxic medication, as well as serial measures of kidney function25,26. Given the low outpatient follow-up rates after contrast exposure46and the poorer outcomes observed in patients with AKI discharged from ED6,7, this predictive model can be valuable for informed decision-making. Low-risk patients may be eligible for early discharge, while high-risk patients can be scheduled for close follow-up of kidney function. Although there are no proven effective medications for CI-AKI, volume expansion with intravenous crystalloid infusion can reduce the risk of CA-AKI. Studies suggest that larger volume expansions (e.g., 1.6 L over 17 h) lead to greater risk reduction in CA-AKI9,47. This highlights the potential benefit of delaying the discharge of patients with high risk for CA-AKI, and allowing for extended periods of intravenous volume infusion, unless this is contraindicated by volume overload. We believe that our predictive tool can aid in identifying these high-risk patients for intravenous volume infusion, optimizing resource utilization.

The current study has several limitations. First, although the sample size was substantial, the single-center nature of the study limits generalizability, as our patient population was primarily Asian. Moreover, the severities of the illnesses were relatively high, with a greater prevalence of comorbidities such as malignancy, reflecting the nature of our academic tertiary referral hospital. Future studies are warranted to validate the present predictive model using different patient cohorts. Second, our model did not account for the volume of contrast media used during CT, which affects AKI risk. Additionally, many patients with preexisting kidney impairment received pre- and post-hydration with intravenous crystalloid fluids as a preventative measure for CA-AKI, as per hospital protocol. The volume and duration of the infusions may have influenced outcomes as effect modifiers; however, we did not incorporate this aspect into our model. Finally, there may have been other contributing factors in AKI development in many patients categorized as having CA-AKI. Our data did not allow us to determine whether exposure to contrast media was the main causative factor of AKI (CI-AKI). As our study cohort exclusively included patients who underwent CE-CT scans, without an unexposed control group in the dataset, we could not directly assess the independent contributions of other AKI-associated risk factors outside the context of contrast exposure. While our machine-learning model incorporated these variables during training and interpretation, it did not establish causality or differentiate the impact of contrast media from potential confounders. However, real-world AKI scenarios often involve multiple and overlapping etiologies48. Thus, our model prioritized the identification of patients who are likely to develop AKI after contrast exposure over the precise recognition of AKI cases solely caused by contrast media (CI-AKI).

Conclusion

Machine-learning models using EMR data were developed to identify ED patients at high risk of developing CA-AKI. Considering the difficulties associated with predicting CA-AKI development in ED settings; our model can potentially improve the outcomes of ED patients who undergo CE-CT scans and high-risk patients with CA-AKI, through the application of an AKI-specific point of care.