Fig. 4: Safety outcomes and clinical outcomes stratified by AIDE predictions.

The total sample size consisted of 14,989 patients (7506 in the intervention group and 7483 in the control group). Within this cohort, the subgroup sizes were as follows: ECG-hyperkalemia (n = 158), ECG-hypokalemia (n = 364), and ECG-normal (n = 14,467). The error bars denote 95% confidence intervals. All the significance tests were based on the Cox proportional hazard mixed effect model. Each p value was two-sided, with no adjustment for multiple comparisons. a Results for the overall population. b Prespecified subgroup analyses of AI-ECG prediction. The p value for interactions was two-sided, with no adjustment for multiple comparisons. For treatment-induced hypokalemia, we included only events after hyperkalemia-related treatment (calcium chloride, insulin, potassium-binding resin, β2-agonist, loop diuretics, sodium bicarbonate, or hemodialysis). For treatment-induced hyperkalemia, we included only events that occurred after hypokalemia-related treatment (intravenous potassium chloride, oral potassium gluconate, and oral potassium chloride). In the analysis for discharge within 14 days, patients who were not hospitalized and who directly left the ED were considered to be discharged within 0 days. A hazard ratio (HR) > 1 was better for the intervention group than for the control group for discharge within 14 days, and an HR < 1 was better for the intervention group than for the control group for the other outcomes. Source data are provided as a Source Data file.