Development and Validation of a Deep Learning Model to Screen Hypokalemia from Electrocardiogram in Emergency Patients
Hypokalemia, defined as a serum potassium concentration below 3.5 mmol/L, is one of the most common electrolyte disturbances encountered in clinical practice. It is a potentially life-threatening condition that requires rapid diagnosis and intervention, especially in emergency settings. Traditionally, the detection of serum potassium concentration through blood tests has been the gold standard for diagnosing hypokalemia. However, this method has limitations, including long detection times and poor repeatability, which can delay clinical intervention and worsen patient outcomes. Given these challenges, there is a pressing need for non-invasive, rapid screening methods to detect hypokalemia, particularly in emergency departments where timely diagnosis is critical.
Electrocardiograms (ECGs) have long been recognized as a valuable tool for detecting hypokalemia. Hypokalemia can cause a series of well-defined ECG abnormalities, such as T-wave changes, ST-segment depression, QT-interval prolongation, and U waves with amplitudes ≥0.1 mV. However, physicians in clinical practice often do not pay sufficient attention to these ECG changes when diagnosing electrolyte disturbances. This oversight can lead to missed or delayed diagnoses, particularly in emergency settings where rapid decision-making is essential.
In recent years, artificial intelligence (AI) and deep learning models (DLMs) have shown significant promise in the field of medicine, particularly in cardiovascular disease. These models have been used to predict left ventricular systolic function, atrial fibrillation, and even cardiac arrest. The application of AI in ECG analysis offers a unique opportunity to improve the detection of hypokalemia by leveraging the power of deep learning to identify subtle ECG changes that may be indicative of low serum potassium levels.
This study aimed to develop and validate a deep learning model capable of screening for hypokalemia using 12-lead ECGs from emergency patients. The model was trained and tested using a large dataset of ECGs collected from the Second Affiliated Hospital of Nanchang University in China. The goal was to create a reliable, non-invasive screening tool that could quickly and accurately detect hypokalemia, thereby improving patient outcomes in emergency settings.
The study utilized a total of 9,908 ECGs from emergency patients admitted to the Second Affiliated Hospital of Nanchang University between September 2017 and October 2020. The ECGs were recorded using a Nippon Optoelectronics Tomioka Co., Ltd. ECG-1150 device, with each lead recorded at 500 data points per second for 10 seconds. Blood samples were drawn within 10 minutes before or after the ECG examination to ensure that the serum potassium levels accurately reflected the patient’s condition at the time of the ECG. Patients who had received potassium supplementation or other medical interventions during this period were excluded from the study to avoid confounding factors.
The deep learning model was developed using a convolutional neural network (CNN) framework built on the Anaconda platform using Python and TensorFlow. The CNN consisted of 11 layers, with the first 10 layers being convolutional and the final layer being a fully connected SoftMax layer. The model was trained using 12-lead ECGs (leads I, II, III, aVR, aVL, aVF, and V1–6) to detect hypokalemia, defined as a serum potassium concentration below 3.5 mmol/L. The dataset was divided into a training set (6,904 ECGs), an internal validation set (1,726 ECGs), and an external validation set (1,278 ECGs) from the Jiangling branch of the Second Affiliated Hospital of Nanchang University.
The performance of the deep learning model was evaluated using the area under the receiver operating characteristic curve (AUC), sensitivity, specificity, positive predictive value (PPV), and negative predictive value (NPV). The model achieved an AUC of 0.80 (95% CI: 0.77–0.82) for the internal validation set, with a sensitivity of 71.4% and a specificity of 77.1%. For the external validation set, the AUC was 0.77 (95% CI: 0.75–0.79), with a sensitivity of 70.0% and a specificity of 69.1%. These results indicate that the model performed well in both internal and external validation, demonstrating its potential as a reliable screening tool for hypokalemia.
The study also explored the model’s performance using a single-lead ECG (lead II), which is commonly used in wearable devices. However, the AUC for the single-lead model was lower, at 0.68 for the internal validation set and 0.64 for the external validation set. This suggests that while single-lead ECGs may be useful for preliminary screening, the full 12-lead ECG provides more accurate and reliable results for detecting hypokalemia.
To further evaluate the model’s robustness, the study tested its performance on ECGs with confounding factors such as atrial fibrillation (AF), complete left bundle branch block (CLBBB), complete right bundle branch block (CRBBB), and pacing rhythms. The model performed best on pacing ECGs, with an accuracy of 100%, and worst on CLBBB ECGs, with an accuracy of 16.7%. For AF ECGs, the model achieved a sensitivity of 74.2% and a specificity of 72.0%, with an overall accuracy of 72.1%. These results indicate that while the model is generally robust, certain ECG abnormalities, such as CLBBB, can significantly impact its performance.
The study’s findings have important implications for the early detection and management of hypokalemia in emergency settings. The deep learning model developed in this study offers a non-invasive, rapid screening tool that can be used to identify patients at risk of hypokalemia based on their ECGs. This could be particularly valuable in resource-limited settings where access to laboratory testing is limited or in situations where rapid diagnosis is critical, such as in emergency departments or during pre-hospital care.
Moreover, the model’s ability to detect hypokalemia using 12-lead ECGs opens up the possibility of integrating this technology into existing ECG monitoring systems in hospitals. This could allow for real-time monitoring of patients’ potassium levels, enabling early intervention and potentially preventing adverse outcomes. Additionally, the model’s performance on single-lead ECGs suggests that it could be adapted for use in wearable devices, allowing for continuous monitoring of patients at risk of hypokalemia in outpatient settings.
However, the study also highlights some limitations of the current model. The performance of the model was lower on ECGs with certain abnormalities, such as CLBBB, indicating that further refinement is needed to improve its accuracy in these cases. Additionally, the model was developed and validated using data from a single hospital, and its performance may vary in different populations or settings. Prospective studies are needed to validate the model’s performance in real-world clinical practice and to determine whether it can improve patient outcomes.
In conclusion, this study demonstrates the potential of deep learning models to screen for hypokalemia using 12-lead ECGs. The model achieved good performance in both internal and external validation, indicating its potential as a reliable, non-invasive screening tool for hypokalemia in emergency settings. While further research is needed to refine the model and validate its performance in different populations, the findings of this study represent an important step forward in the early detection and management of hypokalemia.
doi.org/10.1097/CM9.0000000000001650
Was this helpful?
0 / 0