Skip to main content

Thank you for visiting You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

Point-of-care artificial intelligence-enabled ECG for dyskalemia: a retrospective cohort analysis for accuracy and outcome prediction


Dyskalemias are common electrolyte disorders associated with high cardiovascular risk. Artificial intelligence (AI)-assisted electrocardiography (ECG) has been evaluated as an early-detection approach for dyskalemia. The aims of this study were to determine the clinical accuracy of AI-assisted ECG for dyskalemia and prognostic ability on clinical outcomes such as all-cause mortality, hospitalizations, and ED revisits. This retrospective cohort study was done at two hospitals within a health system from May 2019 to December 2020. In total, 26,499 patients with 34,803 emergency department (ED) visits to an academic medical center and 6492 ED visits from 4747 patients to a community hospital who had a 12-lead ECG to estimate ECG-K+ and serum laboratory potassium measurement (Lab-K+) within 1 h were included. ECG-K+ had mean absolute errors (MAEs) of ≤0.365 mmol/L. Area under receiver operating characteristic curves for ECG-K+ to predict moderate-to-severe hypokalemia (Lab-K+ ≤3 mmol/L) and moderate-to-severe hyperkalemia (Lab-K+ ≥ 6 mmol/L) were >0.85 and >0.95, respectively. The U-shaped relationships between K+ concentration and adverse outcomes were more prominent for ECG-K+ than for Lab-K+. ECG-K+ and Lab-K+ hyperkalemia were associated with high HRs for 30-day all-cause mortality. Compared to hypokalemic Lab-K+, patients with hypokalemic ECG-K+ had significantly higher risk for adverse outcomes after full confounder adjustment. In addition, patients with normal Lab-K+ but dyskalemic ECG-K+ (pseudo-positive) also exhibited more co-morbidities and had worse outcomes. Point-of-care bloodless AI ECG-K+ not only rapidly identified potentially severe hypo- and hyperkalemia, but also may serve as a biomarker for medical complexity and an independent predictor for adverse outcomes.


Potassium (K+) is the principal intracellular cation and functions to maintain the electrical gradient across cell membranes. The concentration of K+ in plasma is determined by the distribution of K+ between intracellular and extracellular fluid (ECF) and by renal K+ excretion. Thus, dyskalemias, including hypokalemia and hyperkalemia, usually arises from derangements of transcellular K+ shift1 and/or defective renal/extrarenal K+ excretion2. Dyskalemia causes cardiovascular, neuromuscular, renal and metabolic disturbances, and is a common electrolyte abnormality associated with cardiovascular complications and increased mortality3,4. Up to 20–50% of patients hospitalized for acute illnesses have hypokalemia (plasma K+ value ≤3.5 mmol/L) and 2–5% have hyperkalemia (K+ ≥5.5 mmol/L)5. In our recent study, 22% and 2% of all patients visiting the emergency department (ED) had hypokalemia and hyperkalemia, respectively6. Traditionally, the diagnosis of dyskalemia relies on blood tests with varying turnaround times7.

Electrocardiography (ECG), as a prompt, non-invasive, and convenient bedside tool, may detect electrical changes associated with dyskalemias, including altered PR interval, QRS, ST-segment, T-wave amplitude, and/or corrected QT interval8. However, these morphologic ECG changes associated with dyskalemias may not be easily recognized even by experienced physicians or cardiologists. With the revolution and advancement of artificial intelligence (AI) techniques, deep learning models (DLM)9 have been shown to achieve human-level performance and effectively detect cardiac diseases with large annotated ECG datasets10,11,12,13,14,15,16. Based on analysis of an annotated 66,000-ECG dataset, we have successfully used DLM to develop ECG12Net for the rapid quantitative estimation of blood K+ concentration to detect dyskalemias in the ED6. However, a “black-box pragmatic study“17 to validate the accuracy of bloodless detection of dyskalemias based on AI-ECG is still warranted before integration into routine clinical workflows.

Laboratory dyskalemia is widely known to be associated with higher morbidity and mortality in populations with different diseases such as diabetes mellitus, chronic kidney disease, acute myocardial infarction and chronic heart failure3,5,18,19,20,21. However, the clinical applicability and significance of AI-enhanced ECG for the detection of dyskalemia remains unclear. Moreover, the association between ECG-dyskalemia and outcomes has not been evaluated. Since ECG is more germane to the underlying pathophysiological and electrical changes in the heart, both systemic and cardiac disorders may cause abnormal ECGs. We hypothesize that abnormal ECG-K+ with normal Lab-K+ may be a surrogate for underlying cardiac conditions portend worse outcomes than patients with both normal values.

In this retrospective cohort over 1.5 years, we aimed to determine the clinical accuracy of real-time AI-assisted ECG for dyskalemia with external validation and examined patient outcomes in a large cohort with different combinations of ECG-K+ and Lab-K+. As shown in the Graphical abstract, our AI-enabled ECG system rapidly calculated ECG-K+ for point-of-care support in the ED and achieved comparable accuracy to previous studies6,10,22 in detecting moderate-to severe dyskalemia. In addition, when ECG-K+ and Lab-K+ were discordant, ECG-K+ was more predictive of subsequent all-cause mortality, hospitalizations, and ED revisits.


Timing and incidence of ECG and lab-based dyskalemia

At the medical center, the wait time between order entry and ECG test and blood draw were 21.5 ± 17.9 and 26.2 ± 9.3 min, respectively; the Lab-K+ resulted at 64.3 ± 16.5 min. At the community hospital, the wait time for ECG and blood draw were 20.8 ± 15.2 and 24.6 ± 9.1 min, respectively, and the Lab-K+ resulted at 54.9 ± 15.5 min. The ECG-K+ was available much sooner than the Lab-K+ at both the academic medical center (42.8 ± 22.5 min) and community hospital (34.1 ± 18.8 min). For Lab-K+, there were 7,313 (21.0%) visits with mild to severe hypokalemia and 745 (2.1%) visits with mild to severe hyperkalemia at the academic medical center. There were 1151 (17.7%) visits with mild to severe hypokalemia and 92 (1.4%) visits with mild to severe hyperkalemia at the community hospital. For ECG-K+, there were 4331/719 (12.4%/2.1%) visits with ECG-K+ ≤3.5 mmol/L/ECG-K+ ≥ 5.5 mmol/L at the academic medical center and 778/114 (12.0%/1.8%) visits at the community hospital. Compared to Lab-K+, the distribution of ECG-K+ was more concentrated (Fig. 1B), suggesting that abnormal values of ECG-K+ might be more important due to the algorithm’s tendency to make more conservative predictions.

Fig. 1: Study cohorts’ summary.
figure 1

A Dataset generation based on emergency department visits to an academic medical center and a community hospital; (B) The distributions of ECG-K+ and Lab-K+ at the academic medical center and community hospital.

Accuracy of AI-ECG detection for dyskalemia

The mean absolute errors (MAEs) of Lab-K+ and ECG-K+ were 0.365 and 0.364 mmol/L at the medical center and community hospital, respectively. The ECG-K+ calculated with 12 leads was more accurate than using any one lead (Supplementary Fig. 1). As shown in Fig. 2, for the detection of severe hypokalemia (Lab-K+ ≤2.5) and hyperkalemia (Lab-K+ ≥6.5), ECG-K+ achieved area under curves (AUCs) of 0.9497/0.9658 with sensitivities of 93.3%/93.8% and specificities of 84.7%/91.8% at the academic medical center; the AUCs were 0.9194/0.9865 with sensitivities of 93.3%/100.0% and specificities of 85.4%/92.3% at the community hospital. Although the AUCs declined modestly for the detection of moderate (Lab-K+ ≤3.0 or Lab-K+ ≥6.0) to mild (Lab-K+ ≤3.5 or Lab-K+ ≥5.5) dyskalemia, the values were still higher than 0.85 except for mild hypokalemia. The positive and negative predictive values were 29.1–34.2% and 90.8–91.5%, respectively, for detecting hypokalemia (Lab-K+ ≤3.5 mmol/L). Due to the low prevalence of hyperkalemia (1.4–2.1%), the positive and negative predictive values were 10.4–14.7% and 99.7–99.8%, respectively, for detecting hyperkalemia (Lab-K+ ≥5.5 mmol/L). As shown in Supplementary Fig. 2, mild hypokalemia as predicted by ECG-K+ was significantly associated with increasing age and co-morbidities including diabetes mellitus (DM), hypertension (HTN), chronic kidney disease (CKD), stroke (STK), heart failure (HF), and chronic obstruction pulmonary disease (COPD). This suggests that these patients are likely sicker with underlying organ dysfunction than patients with lab-hypokalemia but normal ECG-K+ (false negative). ECG-K+ performance was strong across all degrees of hyperkalemia. Comparing the performance of 12 leads versus each lead, the AI-enabled algorithm using 12 leads was more accurate in all analyses (Supplementary Fig. 3).

Fig. 2: Performance of ECG-K+ for detecting mild to severe hypo/hyperkalemia.
figure 2

The ROC curves for varying degrees of hypo- and hyperkalemia at the academic medical center (A) and community hospital (B). The cut-of-points for each plot were defined previously, which are the same between the two hospitals. Stratified analyses with the most significant differences are shown in (C).

Patients’ characteristics in lab and AI-ECG dyskalemia

Patients’ characteristics are shown in Supplementary Table 1. Between the academic medical center and community hospital, the prevalence of co-morbidities were HTN 39.1%/51.4%, hyperlipidemia (HLP) 31.8%/43.1%, coronary artery disease (CAD) 25.8%/32.0%, DM 24.9%/32.5%, STK 18.3%25.0%, COPD 15.6%/27.6%, CKD 14.9%/15.2%, and HF 12.2%/14.9%. Elevated blood sugar, creatinine, CRP, PCT, pBNP, D-dimer, and proteinuria were frequently observed in these ED visits (40.1%/42.8%), suggesting that each ED visit was related to different stress conditions, such as acute or chronic renal failure, infections with or without sepsis, cardiovascular, cardiopulmonary, or metabolic complications.

Patients with hyperkalemic Lab-K+ (≥5.5 mmol/L) exhibited significantly greater age, predilection for DM, HTN, CKD, CAD, HF, and lower blood pressure than patients with normal Lab-K+ (3.6–5.4 mmol/L) and hypokalemic Lab-K+ (≤3.5 mmol/L) (Fig. 3). Significantly higher plasma creatinine, blood urea nitrogen (BUN), NT-pro-B type natriuretic peptide (pBNP), D-dimer, glucose, procalcitonin (PCT), C-reactive protein (CRP), SGOT/SGPT and lower hemoglobin, albumin, sodium (Na+), bicarbonate (HCO3) and blood pH value were also observed. Patients with hypokalemic Lab-K+ did not show significant differences compared to those with normal Lab-K+ with regards to age, co-morbidities (DM, HTN, HLP, CKD, CHF, and CAD), and most laboratory data (renal function, liver function, pBNP, glucose, D-dimer, hemoglobin, albumin, HCO3, and blood pH value) except for slightly higher white blood count (WBC) and CRP.

Fig. 3: Distributions of selected patients’ characteristics in each ECG-K+ and Lab-K+ group.
figure 3

Bars represent the mean or proportion where appropriate and corresponding 95% conference intervals, which are adjusted by hospital.

Like hyperkalemic Lab-K+, patients with predicted hyperkalemic ECG-K+ (≥5.5 mmol/L) were more complex, including older age, more co-morbidities (DM, HTN, CKD, and HF) and significantly higher glucose, CRP, pBNP, D-dimer, proteinuria, and lower serum albumin compared with those with normal ECG-K+ (3.6–5.4 mmol/L) or hypokalemia (≤3.5 mmol/L) (Fig. 3). Patients with hypokalemic ECG-K+ had significantly higher glucose, CRP, pBNP, D-dimer, proteinuria, and lower serum albumin compared to those with normal ECG-K+. Compared to hypokalemic Lab-K+, patients with hypokalemic ECG-K+ had older age, more co-morbidities (DM, HTN, CKD, and HF) with significantly higher glucose, CRP, pBNP, D-dimer, proteinuria and lower serum albumin. Details of the relationship between other patients’ characteristics and K+ concentrations are shown in Supplementary Fig. 4.

Risk relationship between AI-ECG and lab dyskalemia

During a median follow-up of 3.9 months (interquartile range: 0.5–10.7 months) for the medical center and 4.5 months (0.5–11.2 months) for the community hospital, the gross mortality rates were 4.1% (1414/34,803) and 2.8% (179/6492) at the medical center and community hospital, respectively. There was a significantly increased risk of death (HR 3.66, 95% CI 3.02–4.44) in patients with hyperkalemic Lab-K+ (≥5.5 mmol/L) but not in those with hypokalemic Lab-K+ (≤3.5 mmol/L) [hazard ratio (HR) 1.03, 95% confidence interval (CI) 0.91–1.16] compared with normokalemia (Lab-K+ 3.6–5.4 mmol/L) (Fig. 4A). Using the ECG-K+, increased mortality was seen in both ECG-hypokalemia (HR 1.43, 95% CI 1.25-1.63) and ECG-hyperkalemia (HR 2.69, 95% CI 2.15–3.36). The relationships between all-cause mortality and the range of measured Lab-K+ and predicted ECG-K+ from 2 to 7 mmol/L are shown in Fig. 4B. The lowest risk for all-cause mortality occurred in Lab-K+ between 2 and 4.5 mmol/L, with increasing risk above 4.5 mmol/L and the highest risk for Lab-K+ ≥6 mmol/L (more than fourfold risk). The relationship between ECG-K+ and all-cause mortality revealed a prominent U-shape, with ECG-K+ <3 mmol/L carrying higher risk. The concordance index (C-index) of ECG-K+ for all-cause mortality in the baseline model was 0.615 (95% CI 0.600–0.630), which was significantly better than Lab-K+ (0.598, 95% CI 0.582–0.614, p = 0.002).

Fig. 4: The relationship between ECG-K+ and Lab-K+ on adverse outcomes in combined analysis from both hospitals.
figure 4

A The Kaplan–Meier curve analysis of all-cause mortality in hypo- and hyperkalemia as defined by ECG-K+ and Lab-K+. The hazard ratio (HR) was adjusted by hospital site; (B) Continuous association of ECG-K+ and Lab-K+ on adverse outcomes. The solid line and dashed line are point estimation and corresponding 95% conference interval, respectively. The baseline model of combined analysis is adjusted to each hospital site and based on Cox proportional hazard model or logistic regression as appropriate for each outcome. The multivariable analyses include significant variables in risk-effect analyses (All-cause mortality: gender, Age, SBP, DBP, HLP, Hb, HCO3, Blood pH, Na, AST, ALT, Alb, CRP, pBNP, and D-dimer; Hospitalization: gender, age, BMI, DBP, smoke, HLP, STK, HF, WBC, Hb, PLT, HCO3, PH, Na, Cl, tCa, GLU, AST, CK, Alb, CRP, TnI, and D-dimer; ED revisits in 30 days: gender, DM, CAD, STK, COPD, Hb, and Na).

We further explored the reasons behind the predictive ability of ECG-K+. Supplementary Fig. 5 shows the risk-effect analyses of patient characteristics with Lab-K+ and ECG-K+. Gender, age, systolic blood pressure (SBP), diastolic blood pressure (DBP), HLP, hemoglobin (Hb), HCO3, blood pH, sodium (Na+), aspartate aminotransferase (AST), alanine aminotransferase (ALT), Alb, CRP, pBNP, and D-dimer were independently correlated with all-cause mortality. After adjusting for these risk factors, the C-index of ECG-K+ (C-index 0.834, 95% CI 0.826–0.843) was no longer significantly different (p = 0.891) from that of Lab-K+ (C-index 0.835, 95% CI 0.826–0.844).

The hospitalization rates were 38.3% (13,330/34,803) and 37.8% (2452/6492) at the medical center and community hospital, respectively. In the hospitalization analysis (Fig. 4B), both ECG-K+ and Lab-K+ showed a U-shaped relationship between K+ and the risk of hospitalization. Although the risk curves between hyperkalemic values of ECG-K+ and Lab-K+ and hospitalization were similar, the risk between hypokalemic ECG-K+ and hospitalization was more pronounced than that of Lab-K+. The AUC of ECG-K+ on hospitalization in the baseline model was 0.605 (95% CI 0.599-0.610), significantly higher (p < 0.001) than that of Lab-K+ (0.579, 95% CI 0.573–0.585). Age, gender, body mass index (BMI), smoke, DBP, HLP, STK, HF, WBC count, Hb, platelet (PLT), HCO3, Blood pH, Na+, chloride (Cl), total calcium (tCa++), GLU, AST, creatine kinase (CK), Alb, CRP, troponin I (TnI), and D-dimer were significantly associated with the risk of hospitalization (Supplementary Fig. 5). After full adjustment, the predictive ability of ECG-K+ for hospitalization was still significantly higher than that of Lab-K+ (p = 0.010).

ED revisits within 30 days were 13.2% (2,836/21,473) and 15.8% (637/4,040) at the medical center and community hospital, respectively. There was a U-shaped relationship between plasma K+ and the probability of ED revisits (Fig. 4B). The C-index of ECG-K+ on ED revisits in the baseline model was 0.544 (95% CI 0.534-0.554), significantly higher (p = 0.018) than that of Lab-K+ (0.534, 95% CI 0.524–0.544). Gender, DM, CAD, STK, COPD, Hb, and Na+ were independent risk factors for ED revisits besides Lab-K+ and ECG-K+ (Supplementary Fig. 5). After full adjustment, the predictive ability of ECG-K+ for ED revisits was similar to that of Lab-K+.

Characteristics and risk analysis in patients with discrepant Lab-K+ and ECG-K+

Patients with a normal Lab-K+ but abnormal ECG-hypokalemia (ECG-K+ ≤3.5 mmol/L or false-positive hypokalemia) were more medically complex, including older age and more co-morbidities (DM, HTN, CKD, and HF), compared to those with normal Lab-K+ and ECG-K+ (3.6–5.4 mmol/L) (Fig. 5). Patients with ECG-dyskalemia but normal Lab-K+ also had significantly higher glucose, CRP, pBNP, D-dimer, proteinuria, and lower serum albumin. Patients with hypokalemic Lab-K+ but normal ECG-K+ (false-negative hypokalemia) were less medically complex, presenting with younger age, fewer co-morbidities (DM, HTN, CKD, HF, or proteinuria), lower stress markers (glucose, CRP, pBNP, D-dimer), and higher Alb than those with normal Lab-K+ and ECG-K+. This trend was less obvious in patients with hyperkalemic Lab-K+ but normal ECG-K+. Details of other characteristics are shown in Supplementary Fig. 6.

Fig. 5: Selected patients’ characteristics in different ECG-K+ and Lab-K+ groups.
figure 5

Bars represent the mean or proportion where appropriate and corresponding 95% conference intervals, which are adjusted by hospital and Lab-K+ via linear or logistic regression (*p < 0.05; **p < 0.01; ***p < 0.001).

Outcome analyses in patients with various combinations of Lab-K+ and ECG-K+ are shown in Fig. 6. Compared with patients with both normal Lab-K+ and ECG-K+ (3.6–5.4 mmol/L), those with concordant hyperkalemia (≥5.5 mmol/L by ECG and lab) and hypokalemia (≤3.5 mmol/L) had higher all-cause mortality within 30 days (HR for the former and the latter, 4.2 (95% CI 3.22–5.47) and 1.46 (95% CI 1.22–1.73), respectively). Patients with normal Lab-K+ but dyskalemic ECG-K+ exhibited higher HR for all-cause mortality in both extremes (HR 1.4, 95% CI 1.16–1.69 for hypokalemic ECG-K+ and HR 1.49, 95% CI 1.00–2.24 for hyperkalemic ECG-K+). However, the all-cause mortality risk were significantly lower in patients with abnormal Lab-K+ but normal ECG-K+ (HR 0.87 vs. 1.46 for the lab-hypokalemia group, and HR 3.35 vs. 4.2 for the lab-hyperkalemia group). In terms of hospitalization, the findings were similar to all-cause mortality. Patients with normal Lab-K+ but dyskalemic ECG-K+ had significantly higher risk for hospitalization [hypokalemic ECG-K+: odds ratio (OR) 1.42, 95% CI 1.34–1.51 and hyperkalemic ECG-K+: OR 1.95, 95% CI 1.72–2.21]. Similar trends were found regarding hypokalemic ECG-K+ on ED revisits, which persisted in adjusted models.

Fig. 6: Risk matrices of different ECG-K+ and Lab-K+ groups on adverse outcomes in combined analysis.
figure 6

The baseline model of combined analysis is adjusted to each hospital site and based on Cox proportional hazard model or logistic regression as appropriate for each outcome. The color gradient represents the risk of the corresponding group and non-significant results are colored white. Model 1 includes significant demographic data (All-cause mortality: gender, Age, SBP, and DBP; Hospitalization: gender, age, BMI, DBP, and smoke; ED revisit in 30 days: gender). Model 2 includes the variables in model 1 and additional significant disease histories (All-cause mortality: HLP; Hospitalization: HLP, STK, and HF; ED revisit in 30 days: DM, CAD, STK, and COPD). Model 3 includes the variables in model 2 and additional significant laboratory tests (All-cause mortality: Hb, HCO3, Blood pH, Na, AST, ALT, Alb, CRP, pBNP, and D-dimer; Hospitalization: WBC, Hb, PLT, HCO3, PH, Na, Cl, tCa, GLU, AST, CK, Alb, CRP, TnI, and D-dimer; ED revisit in 30 days: Hb and Na).

Based on the risk contribution from patients with discordant Lab-K+ and ECG-K+, we analyzed the added effect of ECG-K+ on each outcome. Compared to Lab-K+ alone, the integration of ECG-K+ with Lab-K+ yielded higher C-indices on all-cause mortality (C-index 0.634 vs. 0.598, p < 0.001), hospitalization (AUC 0.612 vs. 0.579, p < 0.001), and ED revisits (C-index 0.585 vs. 0.582, p < 0.001) (Supplementary Fig. 7). In fully-adjusted risk prediction models incorporating patient demographic, medical history, and other lab data, the addition of ECG-K+ further improved predictions for hospitalization but not all-cause mortality or ED revisits.

ECG morphology and risk analysis in patients with discordant Lab-K+ and ECG-K+

Patients with normal Lab-K+ but abnormal ECG-hyperkalemia (ECG-K+ ≥5.5 mmol/L or false-positive hyperkalemia) had lower prevalence of sinus rhythm and higher prevalence of atrial fibrillation/flutter, junctional rhythm, premature ventricular complex, supraventricular tachycardia, atrioventricular block, left bundle branch block, and left ventricular hypertrophy, compared to those with normal Lab-K+ and ECG-K+ (3.6–5.4 mmol/L) (Fig. 7A). The false-positive hypokalemia group (ECG-K+ ≤3.5 mmol/L and 3.5 < Lab-K+ < 5.5 mmol/L) also had lower prevalence of sinus rhythm and higher prevalence of prolonged QT interval, premature ventricular complex, supraventricular tachycardia, atrioventricular block, and left ventricular hypertrophy, compared to those with normal Lab-K+ and ECG-K+ (3.6–5.4 mmol/L). Figure 7B shows the protective association of sinus rhythm and detrimental association of other morphologies on adverse outcomes.

Fig. 7: ECG morphology analysis of combinations of ECG-K+ and Lab-K+ on adverse outcomes.
figure 7

A Distributions of ECG morphology in each ECG-K+ and Lab-K+ group. Bars represent the mean or prevalence where appropriate and corresponding 95% conference intervals, which are adjusted by hospital. B Risk analysis of selected ECG morphologies on adverse outcomes. The hazard ratios and odds ratios were adjusted by hospital. Red, gray, and blue bars denote significantly positive, non-significant, and negative associations, respectively, with the corresponding outcomes.

Sensitivity analysis

As shown in Supplementary Fig. 8, model performances were similar before and after the COVID-19 pandemic except for severe hypokalemia detection (K+ ≤ 2.5 vs. K+ > 2.5) at the community hospital due to the small sample size before the pandemic began (n = 6 vs. n = 3,134). Moreover, risk curves were similar between included (ECG and lab <1 h apart) and excluded patients (ECG and lab >1 h apart) for all-cause mortality and ED revisits (Supplementary Fig. 9) although the risk curve was significantly less pronounced for hospitalization. This was likely due to these patients having received treatment in the ED.

Illustrations of patients with discordant Lab-K+ and ECG-K+

Supplementary Figs. 1013 present ECGs from four patients with discordant Lab-K+ and ECG-K+. In each case, the AI model detected multiple concerning features and predicted an abnormal ECG-K+. These four patients all suffered poor outcomes despite their initially normal Lab-K+.


In this retrospective cohort study, we evaluated the diagnostic accuracy of AI-ECG for dyskalemias and clinical outcomes in >30,000 patients with both ECG-K+ and Lab-K+ data available. We found that AI-enabled ECG identified moderate-to-severe dyskalemia with good performance and faster than the laboratory. Stratified analyses showed that mild hypokalemia was called more often by ECG in the elderly with more co-morbidities. The U-shaped relationships between K+ concentration and adverse outcomes were more prominent for ECG-K+ than for Lab-K+. The HRs were high, with at least 4-fold increase in the risk for all-cause mortality among patients with both hyperkalemic ECG-K+ and Lab-K+. Compared to hypokalemic Lab-K+, patients with hypokalemic ECG-K+ had significantly higher risk for all-cause mortality, hospitalization and ED revisits after full confounder adjustment. Patients with normal Lab-K+ but abnormal ECG-K+ also exhibited more co-morbidities and incurred worse outcomes. The addition of ECG-K+ to Lab-K+ generally achieved better outcome prediction.

ECGs are commonly used as point-of-care (POC) tests to measure the electrical activity of the heart. Certain electrical changes in the ECG have been associated with dyskalemia, which can be confirmed by laboratory examination8. However, prompt recognition of dyskalemia-associated ECG changes prior to laboratory results is still fraught with great challenge in emergent situations. With advanced AI techniques9, ECG-based DLMs using large datasets of annotated ECGs have been developed that learn useful and subtle features over what is possible with manual interpretation6,10,22. In this retrospective study, longer ECG signals (10 s vs. 2.5 s) were found to achieve better diagnostic accuracy with lower MAE (0.365 vs. 0.531 mmol/L) than other recently-published retrospective studies6,23. The early or almost simultaneous collection of ECG with bloodwork reduced the chance of Lab-K+ biased by treatment, in stark contrast to other reports in which ECGs were obtained 1 to 6 h before or after blood tests. As expected, the complete 12-lead analysis performed better than any single lead. Of note, the present AUCs of 0.932-0.942 for detecting Lab-K+ ≥5.5 mmol/L were higher than others using 2 to 4 leads (AUCs 0.853-0.901)10.

In our ED patients, the prevalence of hyperkalemia was approximately 2%, which is in line with other reports of hyperkalemia occurring in 2–5% of ED patients5. Despite AUC greater than 0.93 for hyperkalemia detection, the positive predictive value is low (10.4–14.7%) in the setting of low prevalence of hyperkalemia. Although this seemingly high false positivity rate of AI-ECG for hyperkalemia may cause anxiety and inconvenience for clinicians and patients, pseudo-positive EKG-K+ for hyperkalemia, importantly, predicts adverse outcomes due to ECG changes directly reflecting underlying cardiac and non-cardiac disorders. This finding is similar to the “previvor” patients in a recent study of AI-enabled ECG analysis for left ventricular systolic dysfunction24, which showed that those individuals with apparently false-positive AI-ECG findings had a fourfold increased risk of developing ventricular dysfunction over the ensuing 5 years14.

Both hyperkalemia and hypokalemia are associated with significant morbidity and mortality. The U-shaped association between dyskalemic Lab-K+ and mortality has been well documented in patients with different diseases such as DM, CKD, AMI, and HF. For example, hyperkalemia, commonly seen in patients with CKD and HF, is an independent predictor for mortality19 and also confer a higher risk of cardiovascular events and hospitalization25. Hyperkalemia per se can reduce heart rate, cardiac function, and induce severe arrhythmias as well as circulatory collapse26,27,28,29. In this study, we evaluated the outcomes associated with laboratory dyskalemia in ED patients with different underlying diseases and acute illnesses. We found that patients with hyperkalemia had higher mortality, hospitalization, and ED revisits compared to those with normokalemia. However, patients with hypokalemia did not have significantly higher mortality despite higher hospitalization rate and ED revisits. This finding was similar to those of some prior reports5 but not others3,4. In fact, the association between laboratory hypokalemia and mortality remains controversial, depending on the study design and different studied populations. Hypokalemia directly affects cardiac function, induces arrhythmias, and indirectly serves as a surrogate marker for the severity of underlying diseases, such as CHF, AMI, and even CKD19,28. At the same time, hypokalemia in patients with acute illnesses (frequently seen in the ED) can also be an epiphenomenon for stress and enhanced sympathetic activity, causing acute K+ shift into cells. Our null finding on a hard outcome (mortality) but positive findings on outcomes subject to physician and patient interpretation (hospitalization and ED revisits), suggest that laboratory hypokalemia may often be a marker for severe stress.

This study investigated the association between abnormal ECG-K+ and outcomes in ED patients. Overlapping curves for mortality, hospitalization, and ED revisits were observed for patients with hyperkalemic ECG-K+ and Lab-K+ but not for those with hypokalemic ECG-K+ and Lab-K. In contrast to no association for laboratory hypokalemia, hypokalemic ECG-K+ was associated with a 1.5-fold increased risk for mortality. There are several important differences between hypokalemic Lab-K+ and ECG-K+. The prevalence of ECG-K+ of ≤3.5 mmol/L was lower than Lab-K+ ≤3.5 mmol/L and the ECG-K+ was relatively less sensitive for detecting mild to moderate lab-hypokalemia. However, we found that patients with hypokalemic ECG-K+ were more medically complex than those with hypokalemic Lab-K+. Our stratified analysis for detecting mild ECG-K+ hypokalemia showed the intensity of association became significantly higher in the elderly with more co-morbidities. Conversely, patients with normal ECG-K+ but hypokalemic Lab-K+ were less likely to be elderly and in better physical condition. Typically, less than 50% of hypokalemic patients exhibit visible ECG changes30, implying the ECG changes picked up by ECG-K+ mark pathophysiology beyond just an abnormal electrolyte. These findings suggest that hypokalemic ECG-K+ may be thought of like a cardiac troponin, a reflection of myocardial injury which may be caused by a variety of cardiac and non-cardiac etiologies and portending worse outcomes.

Further evidence of this comes from patients with normal Lab-K+ but abnormal ECG-K+ (detection error by ECG-K+), who had older age, more co-morbidities (DM, HTN, CKD, and HF), and multiple laboratory abnormalities. They clearly demonstrated adverse outcomes with higher HR for all-cause mortality (HR 1.40 and 1.49 for hypokalemic and hyperkalemic ECG-K+, respectively). In contrast, false-negative patients for ECG-K+ detection (normal ECG-K+ but dyskalemic Lab-K+) had significantly lower risk for all-cause mortality (HR = 0.87 vs. HR = 1.46 for hypokalemia and HR = 3.35 vs. HR = 4.20 for hyperkalemia). Why the ECG-K+ encodes additional prognostic information beyond the electrolyte value is an interesting question. Another group has shown that a DLM could be trained to detect systolic dysfunction using the ECG14. Patients with hypo- and hyperkalemia were enriched with conditions such as DM, AMI, CKD and HF compared to patients with normokalemia. In the training process for our DLM, besides learning the ECG differences between normal and dyskalemias, it also learned the subtle ECG differences ascribed to diseases that contribute to K+ abnormalities. Hence, discrepant ECG-K+ and Lab-K+ could be a useful signal to treating physicians to be more careful and cast a larger differential when treating those patients.

There are several clinical applications to using ECG-K+ to detect dyskalemia. ECG is a simple, cheap, and non-invasive test to provide specific K+ value with similar timeliness to point-of-care (POC) tests. The very good accuracy of our ECG-K+ means a background monitoring system could be implemented in the ED to actively calculate ECG-K+ for every ECG, not limited to acute myocardial infarction and atrial fibrillation. It has been reported that patients with severe dyskalemia may develop sudden fatal cardiac arrhythmias within 1 h of triage—prior to the laboratory report31,32,33. The ~40 min lead time afforded by ECG-K+ means severe dyskalemias can be prioritized on the differential, potentially life-saving interventions readied at the bedside, and given immediately upon receipt of a concordant lab result. If the results are discordant, these are still opportunities for physicians to think more carefully about the patients’ underlying conditions due to the higher mortality and other adverse outcomes.

There were some limitations of this study. First, although our study demonstrated that ECG-K+ was quicker than the central lab, we did not evaluate early interventions based on the ECG-K+. Second, our patient population is East Asian and ECG characteristics may vary by race although the diagnostic performance of DLM may still be stable, especially within the same population12. An international study involving different racial and ethnic groups should be conducted to validate the performance of ECG-K+ in different settings. Third, patients may have visited other EDs or expired at other hospitals, which would not be captured in our EMR. We believe the likelihood of incomplete capture is low as a previous study of readmissions in Taiwan using the government’s National Health Insurance Research Database found only 0.16% of readmissions occurred at a different hospital34. Fourth, the “black box” of DLM necessitates our ECG-K+ being more transparent35. Given the relatively poor discriminative ability of well-known ECG changes in dyskalemias, further exploration of other relevant ECG morphologies is needed. Finally, POC-K+ has been used to detect dyskalemias early. We did not compare the accuracy of ECG-K+ to POC-K+.

In conclusion, this multi-site retrospective study not only validated the accuracy of ECG-K+, especially in moderate-to-severe dyskalemia, but also revealed meaningful differences between ECG-K+ and Lab-K+. The ECG-K+ holds promise as a biomarker for adverse ED outcomes. Before clinicians take advantage of AI-ECG-K to rapidly diagnose and support treatment decisions for patients with severe dyskalemia, a large-scale, international trial with ECG-K+-based intervention is needed to validate its clinical application.


Ethical statement

This study was approved by the institutional review board of Tri-Service General Hospital, Taipei, Taiwan (IRB NO. C202005055). Patients’ consent was waived because data were collected retrospectively and in anonymized files and encrypted from the hospital to the data controller.

Study design and population

We performed a black-box pragmatic study in the EDs of two hospitals within the Tri-Service General Hospital health care system between May 1, 2019 and December 31, 2020. Data were transmitted in real time to an integration engine and database server where the ECG-K+ were calculated and stored without display to clinical providers. The hospital electronic medical record system was re-designed to maximize data completeness in this study. Where possible, all relevant data items were changed to required fields to reduce missing values for this study. The first site was an academic medical center (NeiHu General Hospital) with 1,800 beds and accommodating 100,000 ED visits annually before the COVID-19 pandemic. The second site was a community hospital (Tingzhou Branch Hospital) with 100 beds and accommodating 15,000 ED visits annually before the pandemic. Because the COVID-19 pandemic was in study period, we conducted a sensitivity analysis to explore its potential impact on the accuracy of ECG-K+ due to a shift to fewer low-acuity patients in the ED36.

The algorithm for collecting patient data with ED visits at both hospitals are shown in Fig. 1A. There were 50,358 and 8223 ED visits to the participating medical center and community hospital, respectively. All ED visits started with an initial assessment at the triage station. Those whose interval between ECG and Lab-K+ measurement was longer than 1 h were also excluded, due to the possibility of having received treatments which alter the ECG during the long time interval. In total, 34,803 ED visits from 26,499 patients to the medical center and 6492 visits from 4747 patients to the community hospital were recruited for analysis. A sensitivity analysis to compare outcome predictions between included and excluded patients was conducted.

Measurement of ECG-K+ and Lab-K+

ECGs were obtained when patients were supine, using a standard 10 s, 12-Lead Philips ECG machine (PH080A). The ECG-K+ ranged from 1.5 mmol/L to 7.5 mmol/L, estimated by ECG12Net, a DLM with 82 convolutional layers developed previously. This system is configured to visualize the basis for the AI predictions using class activation mappings and attention mechanism6. We used complete signals of 10 seconds instead of the conventional 2.5 s. Nine overlapping sequences of length 1024 were used to generate predictions and averaged to yield the final prediction as previously described16,37,38,39.

Lab-K+ determination was based on central laboratory methods. Laboratory peudo-dyskalemia were excluded based on evidence of hemolysis and plasma K+ interference indices. We divided the data into seven categories based on Lab-K+ concentrations: severe hypokalemia (≤2.5 mmol/L), moderate hypokalemia (2.5 < Lab-K+ ≤ 3.0 mmol/L), mild hypokalemia (3.0 < Lab-K+ ≤ 3.5 mmol/L), normal (3.5 < Lab-K+ < 5.5 mmol/L), mild hyperkalemia (5.5 ≤ Lab-K+ < 6.0 mmol/L), moderate hyperkalemia (6.0 ≤ Lab-K+ < 6.5 mmol/L), and severe hyperkalemia (≥6.5 mmol/L). The same classification was applied to ECG-K+.

Study covariates

Study covariates, including demographics, medical co-morbidities, and laboratory tests, were obtained from the electronic medical record. We used International Classification of Diseases, Ninth Revision and Tenth Revision to define diabetes mellitus (DM), hypertension (HTN), hyperlipidemia (HLP), chronic kidney disease (CKD), coronary artery disease (CAD), stroke (STK), heart failure (HF), and chronic obstruction pulmonary disease (COPD). In addition to Lab-K+, we also collected other laboratory values in the ED, including complete blood cell count, blood pH, bicarbonate (HCO3), electrolytes, liver and renal function profiles, glucose (GLU), creatine kinase (CK), albumin (Alb), C-reactive protein (CRP), procalcitonin (PCT), troponin I (TnI), NT-pro-B type natriuretic peptide (pBNP), D-dimer, and urine protein. Missing data were imputed using multiple imputations in multivariate analysis40. We selected certain important ECG morphology based on the structured findings statements that are standard on the Philips system. These included sinus rhythm, atrial fibrillation/flutter, junctional rhythm, prolonged QT interval, atrial premature complex, ventricular premature complex, supraventricular tachycardia, atrioventricular block, left bundle branch block, and left ventricular hypertrophy.

Outcome variables

The outcomes of interest included all-cause mortality, hospitalization, and ED revisit. For mortality, the survival time was calculated with reference to the date of the ED visit. Patient status (dead/alive) was captured through the electronic medical record. Moreover, data for alive visits were censored at the patient’s last known hospital alive encounter to limit bias from incomplete records. The end of follow-up in this study was January 31, 2021.

For hospitalizations, each ED visit was assigned a disposition at discharge, including mortality, admission, and discharge home. For ED revisits, we analyzed the discharged patients for revisits within 30 days. Patients with ED revisit or re-admission were assigned as positive events. We calculated the follow-up duration from the original date of ED visit. Negative samples were censored at the patient’s last known hospital activity and the end of follow-up was January 31, 2021.

Statistical analysis

This study included two parts, the accuracy analysis and outcome analysis. All statistical analyses were done by R version 3.4.4. The significance level was set at p < 0.05. For the accuracy analysis, we primarily focused on the discrimination between different severities of hypo/hyperkalemia. The ECG-K+ was used to generate receiver operating characteristic curves and AUC to evaluate performance. Pearson correlation coefficients (COR) and MAE were used to demonstrate the relationship between ECG-K+ and Lab-K+.

Outcome analysis used subjects from both study sites to expand sample size. We also adjusted for the hospital site as a confounder. We first explored differences in characteristics of each ECG-K+ group sharing the same Lab-K+. Linear or logistic regression were used for statistical analyses where appropriate. Cox proportional hazard model was used to analyze the impact of ECG-K+, Lab-K+, and study covariates on outcomes of interest. We used the “pspline” function with a degree of freedom of 2 in the “survival” package to examine the U-shaped relationship in analyses involving ECG-K+ and Lab-K+. The other variables were used as linear predictors in a stepwise program based on significant tests. The significance levels of forward and backward regressions were set at 0.0001 and 0.001 based on Bonferroni correction, respectively. We divided these selected variables into three categories (demographic profile, disease history, and laboratory test) for hierarchical adjustment. Hazard ratios (HRs) and 95% conference intervals (CIs) were computed for risk estimation of each group. A series of integration models were evaluated using the C-index the marker of global performance to explore the additional contribution of ECG-K+.

Reporting summary

Further information on research design is available in the Nature Research Reporting Summary linked to this article.

Data availability

The data analyzed in this study is not publicly available due to privacy and security concerns. The data may be shared with a third party upon execution of data sharing agreement for reasonable requests, such requests should be addressed to C.L. (e-mail: or S.H.L.

Code availability

The code may be made available from the authors upon reasonable request subject to permission and approval from the corresponding organizations and institutional review boards.


  1. Fontaine, B. Periodic paralysis. Adv. Genet. 63, 3–23 (2008).

    CAS  Article  Google Scholar 

  2. Kardalas, E. et al. Hypokalemia: a clinical update. Endocr. Connect. 7, R135–R146 (2018).

    CAS  Article  Google Scholar 

  3. Kovesdy, C. P. et al. Serum potassium and adverse outcomes across the range of kidney function: a CKD Prognosis Consortium meta-analysis. Eur. Heart J. 39, 1535–1542 (2018).

    CAS  Article  Google Scholar 

  4. Jensen, H. K., Brabrand, M., Vinholt, P. J., Hallas, J. & Lassen, A. T. Hypokalemia in acute medical patients: risk factors and prognosis. Am. J. Med. 128, 60–67.e61 (2015).

    CAS  Article  Google Scholar 

  5. Conway, R., Creagh, D., Byrne, D. G., O’Riordan, D. & Silke, B. Serum potassium levels as an outcome determinant in acute medical admissions. Clin. Med. 15, 239–243 (2015).

    Article  Google Scholar 

  6. Lin, C. S. et al. A deep-learning algorithm (ECG12Net) for detecting hypokalemia and hyperkalemia by electrocardiography: algorithm development. JMIR Med. Inform. 8, e15931 (2020).

    Article  Google Scholar 

  7. Asirvatham, J. R., Moses, V. & Bjornson, L. Errors in potassium measurement: a laboratory perspective for the clinician. North Am. J. Med. Sci. 5, 255–259 (2013).

    Article  Google Scholar 

  8. Diercks, D. B., Shumaik, G. M., Harrigan, R. A., Brady, W. J. & Chan, T. C. Electrocardiographic manifestations: electrolyte abnormalities. J. Emerg. Med. 27, 153–160 (2004).

    Article  Google Scholar 

  9. LeCun, Y., Bengio, Y. & Hinton, G. Deep learning. Nature 521, 436–444 (2015).

    CAS  Article  Google Scholar 

  10. Galloway, C. D. et al. Development and validation of a deep-learning model to screen for hyperkalemia from the electrocardiogram. JAMA Cardiol. 4, 428–436 (2019).

    Article  Google Scholar 

  11. Attia, Z. I. et al. An artificial intelligence-enabled ECG algorithm for the identification of patients with atrial fibrillation during sinus rhythm: a retrospective analysis of outcome prediction. Lancet 394, 861–867 (2019).

    Article  Google Scholar 

  12. Noseworthy, P. A. et al. Assessing and mitigating bias in medical artificial intelligence: the effects of race and ethnicity on a deep learning model for ECG analysis. Circulation. Arrhythm. Electrophysiol. 13, e007988 (2020).

    Article  Google Scholar 

  13. Hannun, A. Y. et al. Cardiologist-level arrhythmia detection and classification in ambulatory electrocardiograms using a deep neural network. Nat. Med. 25, 65–69 (2019).

    CAS  Article  Google Scholar 

  14. Attia, Z. I. et al. Screening for cardiac contractile dysfunction using an artificial intelligence-enabled electrocardiogram. Nat. Med. 25, 70–74 (2019).

    CAS  Article  Google Scholar 

  15. Liu, W. T. et al. A deep-learning algorithm-enhanced system integrating electrocardiograms and chest X-rays for diagnosing aortic dissection. Can. J. Cardiol. (2021).

  16. Liu, W. C. et al. A Deep-Learning Algorithm for Detecting Acute Myocardial Infarction. EuroIntervention: journal of EuroPCR in collaboration with the Working Group on Interventional Cardiology of the European Society of Cardiology, (2021).

  17. Kang, M. A. et al. Real-time risk prediction on the wards: a feasibility study. Crit. Care Med. 44, 1468–1473 (2016).

    Article  Google Scholar 

  18. Einhorn, L. M. et al. The frequency of hyperkalemia and its significance in chronic kidney disease. Arch. Intern. Med. 169, 1156–1162 (2009).

    Article  Google Scholar 

  19. Nakhoul, G. N. et al. Serum potassium, end-stage renal disease and mortality in chronic kidney disease. Am. J. Nephrol. 41, 456–463 (2015).

    CAS  Article  Google Scholar 

  20. Goyal, A. et al. Serum potassium levels and mortality in acute myocardial infarction. Jama 307, 157–164 (2012).

    CAS  Article  Google Scholar 

  21. Aldahl, M. et al. Associations of serum potassium levels with mortality in chronic heart failure patients. Eur. Heart J. 38, 2890–2896 (2017).

    CAS  Article  Google Scholar 

  22. Kwon, J. M. et al. Artificial intelligence for detecting electrolyte imbalance using electrocardiography. Annals of Noninvasive Electrocardiology: The Official Journal of The International Society For Holter and Noninvasive Electrocardiology, Inc, e12839, (2021).

  23. Raghunath, S. et al. Prediction of mortality from 12-lead electrocardiogram voltage data using a deep neural network. Nat. Med. 26, 886–891 (2020).

    CAS  Article  Google Scholar 

  24. Attia, Z. I., Harmon, D. M., Behr, E. R. & Friedman, P. A. Application of artificial intelligence to the electrocardiogram. Eur. heart J. (2021).

    Article  PubMed  Google Scholar 

  25. Go, A. S., Chertow, G. M., Fan, D., McCulloch, C. E. & Hsu, C. Y. Chronic kidney disease and the risks of death, cardiovascular events, and hospitalization. N. Engl J. Med. 351, 1296–1305 (2004).

    CAS  Article  Google Scholar 

  26. Priori, S. G. & Blomström-Lundqvist, C. 2015 European Society of Cardiology Guidelines for the management of patients with ventricular arrhythmias and the prevention of sudden cardiac death summarized by co-chairs. Eur. Heart J. 36, 2757–2759 (2015).

    Article  Google Scholar 

  27. Epstein, M. et al. Evaluation of the treatment gap between clinical guidelines and the utilization of renin-angiotensin-aldosterone system inhibitors. Am. J. Manag. Care 21, S212–220 (2015).

    PubMed  Google Scholar 

  28. Edner, M., Benson, L., Dahlström, U. & Lund, L. H. Association between renin-angiotensin system antagonist use and mortality in heart failure with severe renal insufficiency: a prospective propensity score-matched cohort study. Eur. Heart J. 36, 2318–2326 (2015).

    CAS  Article  Google Scholar 

  29. Maggioni, A. P. et al. Are hospitalized or ambulatory patients with heart failure treated in accordance with European Society of Cardiology guidelines? Evidence from 12,440 patients of the ESC heart failure long-term registry. Eur. J. Heart Fail. 15, 1173–1184 (2013).

    CAS  Article  Google Scholar 

  30. El-Sherif, N. & Turitto, G. Electrolyte disorders and arrhythmogenesis. Cardiol. J. 18, 233–245 (2011).

    PubMed  Google Scholar 

  31. Freeman, K. et al. Effects of presentation and electrocardiogram on time to treatment of hyperkalemia. Academic Emerg. Med. 15, 239–249 (2008).

    Article  Google Scholar 

  32. Kovesdy, C. P. et al. Potassium homeostasis in health and disease: a scientific workshop cosponsored by the National Kidney Foundation and the American Society of Hypertension. J. Am. Soc. Hypertension 11, 783–800 (2017).

    CAS  Article  Google Scholar 

  33. Clase, C. M. et al. Potassium homeostasis and management of dyskalemia in kidney diseases: conclusions from a Kidney Disease: Improving Global Outcomes (KDIGO) Controversies Conference. Kidney Int. 97, 42–61 (2020).

    CAS  Article  Google Scholar 

  34. Huang, P. F., Kung, P. T., Chou, W. Y. & Tsai, W. C. Characteristics and related factors of emergency department visits, readmission, and hospital transfers of inpatients under a DRG-based payment system: a nationwide cohort study. PloS ONE 15, e0243373 (2020).

    CAS  Article  Google Scholar 

  35. Castelvecchi, D. Can we open the black box of AI? Nature 538, 20–23 (2016).

    CAS  Article  Google Scholar 

  36. Chen, J. Y. et al. Impact of the COVID-19 pandemic on the loading and quality of an emergency department in Taiwan: enlightenment from a low-risk country in a public health crisis. J. Clin. Med. 10, (2021).

  37. Chang, D.-W. et al. Detecting digoxin toxicity by artificial intelligence-assisted electrocardiography. Int. J. Environ. Res. Public Health 18, 3839 (2021).

    CAS  Article  Google Scholar 

  38. Lin, C. et al. Artificial intelligence-assisted electrocardiography for early diagnosis of thyrotoxic periodic paralysis. J. Endocr. Soc. 5, bvab120 (2021).

    Article  Google Scholar 

  39. Lin, C.-S. et al. Deep learning algorithm for management of diabetes mellitus via electrocardiogram-based glycated hemoglobin (ECG-HbA1c): a retrospective cohort study. J. Pers. Med. 11, 725 (2021).

    Article  Google Scholar 

  40. Buuren, S. V. & Groothuis-Oudshoorn, K. mice: multivariate imputation by chained equations in R. J. Stat. Softw. 45, 1–68 (2010).

    Google Scholar 

Download references


We are much indebted to Dr. Chia-Ter Chao for his invaluable and insightful critiques. This study was supported by funding from the Ministry of Science and Technology, Taiwan (MOST 108-2314-B-016-001, MOST 109-2314-B-016-026, MOST110-2314-B-016-010-MY3), the National Science and Technology Development Fund Management Association, Taiwan (MOST 108-3111-Y-016-009, MOST 109-3111-Y-016-002, and MOST110-3111-Y-016-005), and the Cheng Hsin General Hospital, Taiwan (CHNDMC-109-19 and CHNDMC-110-15).

Author information

Authors and Affiliations



All authors participated in designing the study, generating hypotheses, interpreting the data, and critically reviewing the paper. C.L. and S.H.L. wrote the first draft, and T.C., C.S.L., H.S.S., and D.J.L. contributed substantially to the writing of subsequent versions. Statistical analyses were designed and conducted by C.L. with support from W.H.F., C.C.L., C.H.W., and S.H.L. All authors had full access to all the data in the study and accept responsibility for the decision to submit for publication. CL and CCL verified all the data used in this study. The corresponding author (S.H.L.) attests that all listed authors meet authorship criteria and that no others meeting the criteria have been omitted. S.H.L. had final responsibility for the decision to submit for publication.

Corresponding author

Correspondence to Shih-Hua Lin.

Ethics declarations

Competing Interests

The authors declare no competing interests.

Additional information

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Supplementary information

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Lin, C., Chau, T., Lin, CS. et al. Point-of-care artificial intelligence-enabled ECG for dyskalemia: a retrospective cohort analysis for accuracy and outcome prediction. npj Digit. Med. 5, 8 (2022).

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI:


Quick links

Nature Briefing

Sign up for the Nature Briefing newsletter — what matters in science, free to your inbox daily.

Get the most important science stories of the day, free in your inbox. Sign up for Nature Briefing