# Monitoring of Serum Potassium and Calcium Levels in End-Stage Renal Disease Patients by ECG Depolarization Morphology Analysis

^{1}

^{2}

^{3}

^{4}

^{5}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Materials

## 3. Methods

#### 3.1. ECG Pre-Processing

#### 3.2. QRS Descriptors

#### 3.2.1. Computation of Mean Warped QRS Complexes

#### 3.2.2. QRS Duration and Amplitude Markers

- $QR{S}_{\mathrm{w}}$, which represented the QRS width calculated from QRS onset to end (expressed in ms) [40].
- $QR{S}_{\mathrm{a}}$, which represented the QRS amplitude calculated from the minimum to maximum amplitude of the QRS complex (expressed in mV).

#### 3.2.3. QRS Morphology Markers

- ${d}_{\mathrm{w},\mathrm{Q}}^{\mathrm{u}}$, which represented temporal variations in QRS morphology (expressed in ms),
- ${d}_{\mathrm{a},\mathrm{Q}}$, which represented amplitude variations in QRS morphology (expressed as a percentage),
- ${d}_{\mathrm{w},\mathrm{Q}}^{\mathrm{NL}}$, which represented nonlinear temporal variations in QRS morphology (expressed in ms),
- ${d}_{\mathrm{a},\mathrm{Q}}^{\mathrm{NL}}$, which represented nonlinear amplitude variations in QRS morphology (expressed as a percentage).

#### 3.3. Statistical Analysis

#### 3.4. Uni- and Multivariable Estimation of $\left[{\mathrm{K}}^{+}\right]$ and $\left[{\mathrm{Ca}}^{2+}\right]$

- For an HD stage-specific (S) estimator, which estimates the electrolyte level at stage ${h}_{i}$ of a given patient q from the marker’s values of the remaining patients at that stage, the vector $\widehat{\beta}$ was calculated from the vector $\mathbf{j}=\left[\begin{array}{cccc}1& 1& \cdots & 1\end{array}\right]$ of dimension 1$\times Q$, with Q being the total number of patients minus 1, the vector ${\mathbf{x}}_{b}=\left[\begin{array}{cccc}{b}_{i,1}& {b}_{i,2}& \cdots & {b}_{i,Q}\end{array}\right]$ containing the values of the marker b = ${d}_{\mathrm{w},\mathrm{Q}}^{\mathrm{u}}$ or ${d}_{\mathrm{w},\mathrm{T}}^{\mathrm{u}}$ at stage i from patients 1, …, Q (all except for patient q) and the vector $\mathbf{y}=\left[\begin{array}{cccc}\left[{\mathrm{K}}^{+}\right]{}_{i,1}& \left[{\mathrm{K}}^{+}\right]{}_{i,2}& \cdots & \left[{\mathrm{K}}^{+}\right]{}_{i,Q}\end{array}\right]$ containing the measured $\left[{\mathrm{K}}^{+}\right]$ values at stage i. The vector $\mathbf{y}$ was defined analogously for $\left[{\mathrm{Ca}}^{2+}\right]$. This procedure was carried out for each HD stage, ${h}_{i}$, separately.
- For a patient-specific (P) estimator, which estimates the electrolyte level at stage ${h}_{i}$ of a given patient q from the marker’s values at the remaining stages for that same patient, the vector $\widehat{\beta}$ was calculated from the vector $\mathbf{j}=\left[\begin{array}{ccccc}1& 1& \cdots & 1& 1\end{array}\right]$ of dimension 1 $\times 6$ (if ${h}_{i}$ is ${h}_{0}$ or ${h}_{48}$) or 1 $\times 7$ (if ${h}_{i}$ was different from ${h}_{0}$ or ${h}_{48}$), ${\mathbf{x}}_{b}$ = $\left[\begin{array}{cccccc}{b}_{0,q}& {b}_{0,q}& {b}_{1,q}& \cdots {b}_{{4}^{-},q}& {b}_{48,q}& {b}_{48,q}\end{array}\right]$ containing the values of the marker b = ${d}_{\mathrm{w},\mathrm{Q}}^{\mathrm{u}}$ or ${d}_{\mathrm{w},\mathrm{T}}^{\mathrm{u}}$ for patient q at the different time points except for ${h}_{i}$, with ${h}_{0}$ and ${h}_{48}$ being duplicated. The vector $\mathbf{y}$ was defined as $\mathbf{y}\phantom{\rule{3.33333pt}{0ex}}=\phantom{\rule{3.33333pt}{0ex}}[\phantom{\rule{1.0pt}{0ex}}\left[{\mathrm{K}}^{+}\right]{}_{0,q}\phantom{\rule{2.0pt}{0ex}}\left[{\mathrm{K}}^{+}\right]{}_{0,q}\phantom{\rule{2.0pt}{0ex}}\left[{\mathrm{K}}^{+}\right]{}_{1,q}\phantom{\rule{2.0pt}{0ex}}\cdots \left[{\mathrm{K}}^{+}\right]{}_{{4}^{-},q}\phantom{\rule{2.0pt}{0ex}}\left[{\mathrm{K}}^{+}\right]{}_{48,q}\phantom{\rule{2.0pt}{0ex}}\left[{\mathrm{K}}^{+}\right]{}_{48,q}\phantom{\rule{1.0pt}{0ex}}]$ containing the measured $\left[{\mathrm{K}}^{+}\right]$ values for patient q at all time points except for ${h}_{i}$. An analogous definition of vector $\mathbf{y}$ was applied for $\left[{\mathrm{Ca}}^{2+}\right]$. This process was repeated for each patient individually.
- For a global (G) estimator, which estimates the electrolyte level at stage ${h}_{i}$ of a given patient q from the marker values at all other time points from all other patients, the vector $\widehat{\beta}$ was calculated by defining vectors ${\mathbf{x}}_{b}$ and $\mathbf{y}$ to contain the marker values and the electrolyte measures from all patients at all stages except for patient q at time i.

- ${T}_{S/\sqrt{A}}$ represented the ratio between the maximal downward slope (in absolute value) and the square root of the amplitude of the T wave [12].

## 4. Results

#### 4.1. Characterization of QRS Complex Changes during and after HD

#### 4.2. Contribution of $\left[{\mathrm{K}}^{+}\right]$, $\left[{\mathrm{Ca}}^{2+}\right]$ and HR Variations to QRS Complex Changes

#### 4.3. Uni- and Multivariable Estimation of $\left[{\mathrm{K}}^{+}\right]$ and $\left[{\mathrm{Ca}}^{2+}\right]$

## 5. Discussion

#### 5.1. Characterization of QRS Complex Amplitude, Duration and Morphology in ESRD Patients during and after HD

#### 5.2. Multivariable Predictors of $\left[{\mathrm{K}}^{+}\right]$ and $\left[{\mathrm{Ca}}^{2+}\right]$ Based on Depolarization and Repolarization Characteristics

#### 5.3. Study Limitations and Future Research

## 6. Conclusions

## Supplementary Materials

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Acknowledgments

## Conflicts of Interest

## References

- Weiss, J.N.; Qu, Z.; Shivkumar, K. Electrophysiology of hypokalemia and hyperkalemia. Circ. Arrhythmia Electrophysiol.
**2017**, 10, e004667. [Google Scholar] [CrossRef][Green Version] - Noordam, R.; Young, W.J.; Salman, R.; Kanters, J.K.; van den Berg, M.E.; van Heemst, D.; Lin, H.J.; Barreto, S.M.; Biggs, M.L.; Biino, G.; et al. Effects of calcium, magnesium, and potassium concentrations on ventricular repolarization in unselected individuals. J. Am. Coll. Cardiol.
**2019**, 73, 3118–3131. [Google Scholar] [CrossRef] [PubMed] - Soar, J.; Perkins, G.D.; Abbas, G.; Alfonzo, A.; Barelli, A.; Bierens, J.J.; Brugger, H.; Deakin, C.D.; Dunning, J.; Georgiou, M.; et al. European Resuscitation Council Guidelines for Resuscitation 2010 Section 8. Cardiac arrest in special circumstances: Electrolyte abnormalities, poisoning, drowning, accidental hypothermia, hyperthermia, asthma, anaphylaxis, cardiac surgery, trauma, pregnancy, electrocution. Resuscitation
**2010**, 81, 1400–1433. [Google Scholar] [PubMed] - Levis, J.T. ECG diagnosis: Hypokalemia. Perm. J.
**2012**, 16, 57. [Google Scholar] [CrossRef] [PubMed] - Lv, J.C.; Zhang, L.X. Prevalence and disease burden of chronic kidney disease. Adv. Exp. Med. Biol.
**2019**, 1165, 3–15. [Google Scholar] [PubMed] - El-Sherif, N.; Turitto, G. Electrolyte disorders and arrhythmogenesis. Cardiol. J.
**2011**, 18, 233–245. [Google Scholar] - Lanari, A.; Chait, L.O.; Capurro, C. Electrocardiographic effects of potassium. I. Perfusion through the coronary bed. Am. Heart J.
**1964**, 67, 357–363. [Google Scholar] [CrossRef] - Van Mieghem, C.; Sabbe, M.; Knockaert, D. The clinical value of the ECG in noncardiac conditions. Chest
**2004**, 125, 1561–1576. [Google Scholar] [CrossRef] [PubMed] - Severi, S.; Corsi, C.; Haigney, M.; DeBie, J.; Mortara, D. Noninvasive potassium measurements from ECG analysis during hemodialysis sessions. In Proceedings of the 2009 36th Annual Computers in Cardiology Conference (CinC), Park City, UT, USA, 13–16 September 2009; pp. 821–824. [Google Scholar]
- Corsi, C.; DeBie, J.; Napolitano, C.; Priori, S.; Mortara, D.; Severi, S. Validation of a novel method for non-invasive blood potassium quantification from the ECG. In Proceedings of the 2012 Computing in Cardiology, Krakow, Poland, 9–12 September 2012; pp. 105–108. [Google Scholar]
- Corsi, C.; Cortesi, M.; Callisesi, G.; De Bie, J.; Napolitano, C.; Santoro, A.; Mortara, D.; Severi, S. Noninvasive quantification of blood potassium concentration from ECG in hemodialysis patients. Sci. Rep.
**2017**, 7, 42492. [Google Scholar] [CrossRef][Green Version] - Attia, Z.I.; DeSimone, C.V.; Dillon, J.J.; Sapir, Y.; Somers, V.K.; Dugan, J.L.; Bruce, C.J.; Ackerman, M.J.; Asirvatham, S.J.; Striemer, B.L.; et al. Novel bloodless potassium determination using a signal-processed single-lead ECG. J. Am. Heart Assoc. Cardiovasc. Cerebrovasc. Dis.
**2016**, 5, 1. [Google Scholar] [CrossRef][Green Version] - Dillon, J.J.; DeSimone, C.V.; Sapir, Y.; Somers, V.K.; Dugan, J.L.; Bruce, C.J.; Ackerman, M.J.; Asirvatham, S.J.; Striemer, B.L.; Bukartyk, J.; et al. Noninvasive potassium determination using a mathematically processed ECG: Proof of concept for a novel “blood-less, blood test”. J. Electrocardiol.
**2015**, 48, 12–18. [Google Scholar] [CrossRef][Green Version] - Pilia, N.; Severi, S.; Raimann, J.G.; Genovesi, S.; Dössel, O.; Kotanko, P.; Corsi, C.; Loewe, A. Quantification and classification of potassium and calcium disorders with the electrocardiogram: What do clinical studies, modeling, and reconstruction tell us? APL Bioeng.
**2020**, 4, 041501. [Google Scholar] [CrossRef] [PubMed] - Yoon, D.; Lim, H.S.; Jeong, J.C.; Kim, T.Y.; Choi, J.; Jang, J.; Jeong, E.; Park, C.M. Quantitative evaluation of the relationship between T-wave-based features and serum potassium level in real-world clinical practice. BioMed Res. Int.
**2018**, 2018, 3054316. [Google Scholar] [CrossRef] [PubMed][Green Version] - Di Iorio, B.; Bellasi, A. QT interval in CKD and haemodialysis patients. Clin. Kidney J.
**2013**, 6, 137–143. [Google Scholar] [CrossRef] [PubMed][Green Version] - Khosoosi Niaki, M.R.; Saravi, M.; Oliaee, F.; Akbari, R.; Noorkhomami, S.; Bozorgi Rad, S.H.; Fallahpoor, K.; Ramezani, M.S. Changes in QT interval before and after hemodialysis. Casp. J. Intern. Med.
**2013**, 4, 590–594. [Google Scholar] - Sohal, P.M.; Goel, A.; Gupta, D.; Aslam, N.; Sandhu, J.; Sandhu, J.S.; John, E.E.; Sharma, D. Effect of hemodialysis on corrected QT interval and QTc dispersion. Indian J. Nephrol.
**2018**, 28, 335–338. [Google Scholar] - Matsumoto, Y.; Mori, Y.; Kageyama, S.; Arihara, K.; Sato, H.; Nagata, K.; Shimada, Y.; Nojima, Y.; Iguchi, K.; Sugiyama, T. Changes in QTc interval in long-term hemodialysis patients. PLoS ONE
**2019**, 14, e0209297. [Google Scholar] [CrossRef][Green Version] - Malhis, M.; Al-Bitar, S.; Farhood, S.; Zaiat, K.A. Changes in QT intervals in patients with end-stage renal disease before and after hemodialysis. Saudi J. Kidney Dis. Transplant.
**2010**, 21, 460–465. [Google Scholar] - Kim, E.D.; Watt, J.; Tereshchenko, L.G.; Jaar, B.G.; Sozio, S.M.; Kao, W.; Estrella, M.M.; Parekh, R.S. Associations of serum and dialysate electrolytes with QT interval and prolongation in incident hemodialysis: The predictors of arrhythmic and cardiovascular risk in end-stage renal disease (PACE) study. BMC Nephrol.
**2019**, 20, 133. [Google Scholar] [CrossRef][Green Version] - Lorincz, I.; Mátyus, J.; Zilahi, Z.; Kun, C.; Karányi, Z.; Kakuk, G. QT dispersion in patients with end-stage renal failure and during hemodialysis. J. Am. Soc. Nephrol. JASN
**1999**, 10, 1297–1302. [Google Scholar] [CrossRef] - Covic, A.; Diaconita, M.; Gusbeth-Tatomir, P.; Covic, M.; Botezan, A.; Ungureanu, G.; Goldsmith, D.J. Haemodialysis increases QTc interval but not QTc dispersion in ESRD patients without manifest cardiac disease. Nephrol. Dial. Transplant.
**2002**, 17, 2170–2177. [Google Scholar] [CrossRef][Green Version] - Ozportakal, H.; Ozkok, A.; Alkan, O.; Bulut, A.S.; Boyraz, M.; Inanir, M.; Acar, G.; Odabas, A.R. Hemodialysis-induced repolarization abnormalities on ECG are influenced by serum calcium levels and ultrafiltration volumes. Int. Urol. Nephrol.
**2017**, 49, 509–515. [Google Scholar] [CrossRef] - Floccari, F.; Aloisi, E.; Nostro, L.; Caccamo, C.; Crisafulli, A.; Barillà, A.; Aloisi, C.; Romeo, A.; Corica, F.; Ientile, R.; et al. QTc interval and QTc dispersion during haemodiafiltration. Nephrology
**2004**, 9, 335–340. [Google Scholar] [CrossRef] [PubMed] - Schüttler, D.; Schönermarck, U.; Wenner, F.; Toepfer, M.; Rizas, K.D.; Bauer, A.; Brunner, S.; Hamm, W. Large potassium shifts during dialysis enhance cardiac repolarization instability. J. Nephrol.
**2021**, 34, 1301–1305. [Google Scholar] [CrossRef] [PubMed] - Rodrigues, A.S.; Petrėnas, A.; Paliakaitė, B.; Kušleikaitė-Pere, N.; Jaruševičius, G.; Bumblytė, I.A.; Laguna, P.; Marozas, V. Noninvasive monitoring of potassium fluctuations during the long interdialytic interval. IEEE Access
**2020**, 8, 88488–188502. [Google Scholar] [CrossRef] - Bukhari, H.A.; Palmieri, F.; Ferreira, D.; Potse, M.; Ramírez, J.; Laguna, P.; Sánchez, C.; Pueyo, E. Transmural ventricular heterogeneities play a major role in determining T-wave morphology at different extracellular potassium levels. In Proceedings of the 2019 Computing in Cardiology (CinC), Singapore, 8–11 September 2019; pp. 1–4. [Google Scholar]
- Bukhari, H.A.; Palmieri, F.; Ramirez, J.; Laguna, P.; Ruiz, J.E.; Ferreira, D.; Potse, M.; Sanchez, C.; Pueyo, E. Characterization of T wave amplitude, duration and morphology changes during hemodialysis: Relationship with serum electrolyte levels and heart rate. IEEE Trans. Biomed. Eng.
**2021**, 68, 2467–2478. [Google Scholar] [CrossRef] [PubMed] - Palmieri, F.; Gomis, P.; Ferreira, D.; Ruiz, J.E.; Bergasa, B.; Martín-Yebra, A.; Bukhari, H.A.; Pueyo, E.; Martínez, J.P.; Ramírez, J.; et al. Monitoring blood potassium concentration in hemodialysis patients by quantifying T-wave morphology dynamics. Sci. Rep.
**2021**, 11, 3883. [Google Scholar] [CrossRef] - Srinivasan, S.; Bukhari, H.A.; Laguna, P.; Sánchez, C.; Pueyo, E. Analysis of T wave nonlinear dynamics for serum potassium monitoring in end-stage renal disease patients. In Proceedings of the 2020 Computing in Cardiology, Rimini, Italy, 13–16 September 2020; pp. 1–4. [Google Scholar]
- Palmieri, F.; Gomis, P.; Ruiz, J.E.; Ferreira, D.; Martín-Yebra, A.; Pueyo, E.; Martínez, J.P.; Ramírez, J.; Laguna, P. Nonlinear T-wave time warping-based sensing model for non-invasive personalized blood potassium monitoring in hemodialysis patients. Sensors
**2021**, 21, 2710. [Google Scholar] [CrossRef] - Bukhari, H.A.; Sánchez, C.; Srinivasan, S.; Palmieri, F.; Potse, M.; Laguna, P.; Pueyo, E. Estimation of potassium levels in hemodialysis patients by T wave nonlinear dynamics and morphology markers. Comput. Biol. Med.
**2022**, 143, 105304. [Google Scholar] [CrossRef] - Parham, W.A.; Mehdirad, A.A.; Biermann, K.M.; Fredman, C.S. Hyperkalemia revisited. Tex. Heart Inst. J.
**2006**, 33, 40–47. [Google Scholar] - Astan, R.; Akpinar, I.; Karan, A.; Kacmaz, F.; Sokmen, E.; Baysal, E.; Ozeke, O.; Selçuk, M.T. The effect of hemodialysis on electrocardiographic parameters. Ann. Noninvasive Electrocardiol.
**2015**, 20, 253–257. [Google Scholar] [CrossRef] - Curione, M.; Castro, C.; Cammarota, C.; Tonnarini, G.; Pasquali, M. Progressive loss in circulating volume during haemodialysis can be monitored by time voltage integral area of QRS complex: Pilot study. Arch. Med Sci. AMS
**2013**, 9, 544–547. [Google Scholar] [CrossRef] [PubMed] - Ojanen, S.; Kööbi, T.; Korhonen, P.; Mustonen, J.; Pasternack, A. QRS amplitude and volume changes during hemodialysis. Am. J. Nephrol.
**1999**, 19, 423–427. [Google Scholar] [CrossRef] [PubMed] - An, J.N.; Lee, J.P.; Jeon, H.J.; Kim, D.H.; Oh, Y.K.; Kim, Y.S.; Lim, C.S. Severe hyperkalemia requiring hospitalization: Predictors of mortality. Crit. Care
**2012**, 16, R225. [Google Scholar] [CrossRef] [PubMed][Green Version] - Ramirez, J.; Orini, M.; Tucker, J.D.; Pueyo, E.; Laguna, P. Variability of ventricular repolarization dispersion quantified by Time-warping the morphology of the T-Waves. IEEE Trans. Biomed. Eng.
**2017**, 64, 1619–1630. [Google Scholar] - Martínez, J.P.; Almeida, R.; Olmos, S.; Rocha, A.P.; Laguna, P. A wavelet-based ECG delineator: Evaluation on standard databases. IEEE Trans. Biomed. Eng.
**2004**, 51, 570–581. [Google Scholar] [CrossRef] [PubMed] - Castells, F.; Laguna, P.; Sörnmo, L.; Bollmann, A.; Roig, J.M. Principal component analysis in ECG signal processing. EURASIP J. Adv. Signal Process.
**2007**, 2007, 1–21. [Google Scholar] [CrossRef][Green Version] - Fisher, R.A. Statistical methods for research workers. In Breakthroughs in Statistics: Methodology and Distribution; Ser. Springer Series in Statistics, Kotz, S., Johnson, N.L., Eds.; Springer: New York, NY, USA, 1992; pp. 66–70. [Google Scholar]
- Rencher, A.C.; Christensen, W.F. Methods of Multivariate Analysis; Wiley: Hoboken, NJ, USA, 2012. [Google Scholar]
- Freedman, D. Statistical Models: Theory and Practice; Cambridge University Press: New York, NY, USA, 2005. [Google Scholar]
- Bland, J.M.; Altman, D.G. Statistical methods for assessing agreement between two methods of clinical measurement. Lancet
**1986**, 1, 307–310. [Google Scholar] [CrossRef] - Hnatkova, K.; Smetana, P.; Toman, O.; Schmidt, G.; Malik, M. Sex and race differences in QRS duration. Europace
**2016**, 18, 1842–1849. [Google Scholar] [CrossRef] - Pueyo, E.; Sornmo, L.; Laguna, P. QRS slopes for detection and characterization of myocardial ischemia. IEEE Trans. Biomed. Eng.
**2008**, 55, 468–477. [Google Scholar] [CrossRef] - Romero, D.; Ringborn, M.; Laguna, P.; Pahlm, O.; Pueyo, E. Evaluation of depolarization changes during acute myocardial ischemia by analysis of QRS slopes. J. Electrocardiol.
**2011**, 44, 416–424. [Google Scholar] - Kharche, S.; Callisesi, G.; Stary, T.; Bracci, A.; Severi, S. Simulating the effects of serum potassium on the ECG. In Proceedings of the 2012 Computing in Cardiology, Krakow, Poland, 9–12 September 2012; pp. 225–228. [Google Scholar]
- Frohnert, P.P.; Giuliani, E.R.; Friedberg, M.; Johnson, W.J.; Tauxe, W.N. Statistical investigation of correlations between serum potassium levels and electrocardiographic findings in patients on intermittent hemodialysis therapy. Circulation
**1970**, 41, 667–676. [Google Scholar] [CrossRef] [PubMed][Green Version] - Palmieri, F.; Gomis, P.; Ferreira, D.; Ruiz, J.E.; Bergasa, B.; Martín-Yebra, A.; Bukhari, H.A.; Pueyo, E.; Martínez, J.P.; Ramírez, J.; et al. T-wave morphology changes as surrogate for blood potassium concentration in hemodialysis patients. In Proceedings of the 2019 Computing in Cardiology (CinC), Singapore, 8–11 September 2019; pp. 1–4. [Google Scholar]
- Ettinger, P.O.; Regan, T.J.; Oldewurtel, H.A. Hyperkalemia, cardiac conduction, and the electrocardiogram: A review. Am. Heart J.
**1974**, 88, 360–371. [Google Scholar] [CrossRef] - Aslam, S.; Friedman, E.A.; Ifudu, O. Electrocardiography is unreliable in detecting potentially lethal hyperkalaemia in haemodialysis patients. Nephrol. Dial. Transplant.
**2002**, 17, 1639–1642. [Google Scholar] [CrossRef][Green Version] - Montague, B.T.; Ouellette, J.R.; Buller, G.K. Retrospective review of the frequency of ECG changes in hyperkalemia. Clin. J. Am. Soc. Nephrol. CJASN
**2008**, 3, 324–330. [Google Scholar] [CrossRef] - Martinez-Vea, A.; Bardají, A.; Garcia, C.; Oliver, J.A. Severe hyperkalemia with minimal electrocardiographic manifestations: A report of seven cases. J. Electrocardiol.
**1999**, 32, 45–49. [Google Scholar] [CrossRef] - Fisch, C. Relation of electrolyte disturbances to cardiac arrhythmias. Circulation
**1973**, 47, 408–419. [Google Scholar] [CrossRef][Green Version] - Velagapudi, V.; O’Horo, J.C.; Vellanki, A.; Baker, S.P.; Pidikiti, R.; Stoff, J.S.; Tighe, D.A. Computer-assisted image processing 12 lead ECG model to diagnose hyperkalemia. J. Electrocardiol.
**2017**, 50, 31–138. [Google Scholar] [CrossRef] - Lin, C.S.; Lin, C.; Fang, W.H.; Hsu, C.J.; Chen, S.J.; Huang, K.H.; Lin, W.S.; Tsai, C.S.; Kuo, C.C.; Chau, T.; et al. A deep-learning algorithm (ECG12Net) for detecting hypokalemia and hyperkalemia by electrocardiography: Algorithm development. JMIR Med. Inform.
**2020**, 8, 3. [Google Scholar] [CrossRef] - Galloway, C.D.; Valys, A.V.; Shreibati, J.B.; Treiman, D.L.; Petterson, F.L.; Gundotra, V.P.; Albert, D.E.; Attia, Z.I.; Carter, R.E.; Asirvatham, S.J.; et al. Development and validation of a deep-learning model to screen for hyperkalemia from the electrocardiogram. JAMA Cardiol.
**2019**, 4, 428–436. [Google Scholar] [CrossRef] - Kwon, J.M.; Jung, M.S.; Kim, K.H.; Jo, Y.Y.; Shin, J.H.; Cho, Y.H.; Lee, Y.J.; Ban, J.H.; Jeon, K.H.; Lee, S.Y.; et al. Artificial intelligence for detecting electrolyte imbalance using electrocardiography. Ann. Noninvasive Electrocardiol.
**2021**, 26, e12839. [Google Scholar] [CrossRef] [PubMed] - Naksuk, N.; Hu, T.; Krittanawong, C.; Thongprayoon, C.; Sharma, S.; Park, J.Y.; Rosenbaum, A.N.; Gaba, P.; Killu, A.M.; Sugrue, A.M.; et al. Association of serum magnesium on mortality in patients admitted to the intensive cardiac care unit. Am. J. Med.
**2017**, 130, 229.e5–229.e13. [Google Scholar] [CrossRef] [PubMed][Green Version] - Jhang, W.K.; Lee, Y.J.; Kim, Y.A.; Park, S.J.; Park, Y.S. Severe hypermagnesemia presenting with abnormal electrocardiographic findings similar to those of hyperkalemia in a child undergoing peritoneal dialysis. Korean J. Pediatr.
**2013**, 56, 308–311. [Google Scholar] [CrossRef] [PubMed] - Van den Bergh, W.M.; Algra, A.; Rinkel, G.J. Electrocardiographic abnormalities and serum magnesium in patients with subarachnoid hemorrhage. Stroke
**2004**, 35, 644–648. [Google Scholar] [CrossRef][Green Version]

**Figure 1.**Diagram of the study protocol. ${h}_{0}$ to ${h}_{48}$ are the time points (in minutes) for blood sample extraction. Reproduced with permission from Bukhari et al., Computers in Biology and Medicine; published by Elsevier, 2022.

**Figure 2.**Flow chart showing the ECG processing steps performed in this study, from the collection of raw ECGs to the estimation of $\left[{\mathrm{K}}^{+}\right]$ and $\left[{\mathrm{Ca}}^{2+}\right]$.

**Figure 3.**Time warping of QRS complexes. Panel (

**a**) shows the reference (blue) and investigated (red) QRS complexes obtained from an ECG segment during HD. Panel (

**b**) shows the warped QRS complexes, which had the same duration whilst keeping the original amplitude. Panel (

**c**) depicts the warped QRS complexes after normalization by their L2-norms. The yellow area in panel (

**d**) represents ${d}_{\mathrm{w},\mathrm{Q}}^{\mathrm{u}}$, which quantified the total amount of warping. The green solid line is the linear regression function ${\gamma}_{l}^{*}\left({t}^{r}\right)$ best fitted to ${\gamma}^{*}\left({t}^{r}\right)$.

**Figure 4.**Panels (

**a**–

**f**): changes in $QR{S}_{\mathrm{w}}$, $QR{S}_{\mathrm{a}}$, ${d}_{\mathrm{w},\mathrm{Q}}^{\mathrm{u}}$, ${d}_{\mathrm{a},\mathrm{Q}}$, ${d}_{\mathrm{w},\mathrm{Q}}^{\mathrm{NL}}$ and ${d}_{\mathrm{a},\mathrm{Q}}^{\mathrm{NL}}$ during HD stages. Panels (

**g**–

**i**): corresponding variations in $\left[{\mathrm{K}}^{+}\right]$, $\left[{\mathrm{Ca}}^{2+}\right]$ and RR. In panels (

**a**–

**i**), * denotes $p<0.05$ and ** denotes $p<0.01$. In each panel, the central white dot indicates the median. Each dot corresponds to an individual patient. Panel (

**j**): MWQRS (red) of a patient at different HD stages and reference MWQRS (blue). $\Delta $ denotes the change in $\left[{\mathrm{K}}^{+}\right]$ with respect to the end of HD (${h}_{4}$).

**Figure 5.**Pearson correlation coefficients between QRS markers ($QR{S}_{\mathrm{w}}$, $QR{S}_{\mathrm{a}}$, ${d}_{\mathrm{w},\mathrm{Q}}^{\mathrm{u}}$, ${d}_{\mathrm{a},\mathrm{Q}}$, ${d}_{\mathrm{w},\mathrm{Q}}^{\mathrm{NL}}$ and ${d}_{\mathrm{a},\mathrm{Q}}^{\mathrm{NL}}$) and $\left[{\mathrm{K}}^{+}\right]$ (black), $\left[{\mathrm{Ca}}^{2+}\right]$ (red) and RR (blue) for all patients at all HD points. The central white dot indicates the median. Each dot corresponds to an individual patient.

**Figure 6.**Actual (black) and estimated $\left[{\mathrm{K}}^{+}\right]$ and $\left[{\mathrm{Ca}}^{2+}\right]$ for a patient using stage-specific (red), patient-specific (green) and global (blue) approaches. Univariable ${d}_{\mathrm{w},\mathrm{Q}}^{\mathrm{u}}$-based estimation is shown in (panel

**a**), ${d}_{\mathrm{w},\mathrm{T}}^{\mathrm{u}}$-based in (panel

**b**) and multivariable ${d}_{\mathrm{w},\mathrm{Q}}^{\mathrm{u}}$- ${d}_{\mathrm{w},\mathrm{T}}^{\mathrm{u}}$-based in (panel

**c**).

**Figure 7.**Box plots of $\left[{\mathrm{K}}^{+}\right]$ and $\left[{\mathrm{Ca}}^{2+}\right]$ estimation errors ${e}_{v}$ during HD stages for all patients using ${d}_{\mathrm{w},\mathrm{Q}}^{\mathrm{u}}$(black), ${d}_{\mathrm{w},\mathrm{T}}^{\mathrm{u}}$(red) and the combination of ${d}_{\mathrm{w},\mathrm{Q}}^{\mathrm{u}}$ and ${d}_{\mathrm{w},\mathrm{T}}^{\mathrm{u}}$ (blue) for stage-specific (

**top**), patient-specific (

**middle**) and global (

**bottom**) approaches. The central line indicates the median, whereas top and bottom edges show the 25th and 75th percentiles.

**Figure 8.**QRS and T wave variations at the start (red) and end (blue) of the HD session. Panels (

**a**,

**b**) show the waveforms related to the QRS complex and the T wave, respectively.

**Table 1.**Characteristics of the study population. Values are expressed as number (%) for categorical variables and median (interquartile range, IQR) for continuous variables. Reproduced with permission from Bukhari et al., Computers in Biology and Medicine; published by Elsevier, 2022.

Characteristics | Quantity |
---|---|

Age [years] | $75\phantom{\rule{4pt}{0ex}}\left(12\right)$ |

Gender [male/female] | 20 (69%)/9 (31%) |

Electrolyte concentrations | |

$\left[{\mathrm{K}}^{+}\right]$ [Pre HD] (mM) | $5.05\phantom{\rule{4pt}{0ex}}\left(1.57\right)$ |

$\left[{\mathrm{K}}^{+}\right]$ [End HD] (mM) | $3.35\phantom{\rule{4pt}{0ex}}\left(0.62\right)$ |

$\left[{\mathrm{Ca}}^{2+}\right]$ [Pre HD] (mM) | $2.15\phantom{\rule{4pt}{0ex}}\left(0.18\right)$ |

$\left[{\mathrm{Ca}}^{2+}\right]$ [End HD] (mM) | $2.32\phantom{\rule{4pt}{0ex}}\left(0.2\right)$ |

#Patients (%) | |

HD session duration | |

240 min | $26\phantom{\rule{4pt}{0ex}}(90\%)$ |

210 min | $3\phantom{\rule{4pt}{0ex}}(10\%)$ |

Dialysate composition | |

Potassium (1.5 mM) | $21\phantom{\rule{4pt}{0ex}}(73\%)$ |

Potassium (3 mM) | $5\phantom{\rule{4pt}{0ex}}(17\%)$ |

Potassium (variable mM) | $3\phantom{\rule{4pt}{0ex}}(10\%)$ |

Calcium (0.75 mM) | $8\phantom{\rule{4pt}{0ex}}(28\%)$ |

Calcium (0.63 mM) | $21\phantom{\rule{4pt}{0ex}}(72\%)$ |

**Table 2.**p-values from the parametric test (t-test) to evaluate statistical significance of non-zero mean Fisher z-transformed Pearson correlation coefficients between QRS markers and $\left[{\mathrm{K}}^{+}\right]$, $\left[{\mathrm{Ca}}^{2+}\right]$ and RR.

p-Values | ${\mathit{QRS}}_{\mathbf{w}}$ | ${\mathit{QRS}}_{\mathbf{a}}$ | ${\mathit{d}}_{\mathbf{w},\mathbf{Q}}^{\mathbf{u}}$ | ${\mathit{d}}_{\mathbf{a},\mathbf{Q}}$ | ${\mathit{d}}_{\mathbf{w},\mathbf{Q}}^{\mathbf{NL}}$ | ${\mathit{d}}_{\mathbf{a},\mathbf{Q}}^{\mathbf{NL}}$ |
---|---|---|---|---|---|---|

$\left[{\mathrm{K}}^{+}\right]$ | $0.01$ | $<$0.01 | $<$0.01 | $<$0.01 | $<$0.01 | $<$0.01 |

$\left[{\mathrm{Ca}}^{2+}\right]$ | $0.09$ | $<$0.01 | $<$0.01 | $0.02$ | $<$0.01 | $<$0.01 |

$RR$ | $0.37$ | $0.94$ | $0.48$ | $0.12$ | $0.23$ | $0.60$ |

**Table 3.**Actual and estimated $\left[{\mathrm{K}}^{+}\right]$ and $\left[{\mathrm{Ca}}^{2+}\right]$ values over the study population at each HD stage using multivariable (m) estimation and stage-specific (S), patient-specific (P) and global (G) approaches. Values are expressed as median (IQR) and the units are mM.

Actual vs. Estimated $\left[{\mathbf{K}}^{+}\right]$ | ${\mathit{h}}_{0}$ | ${\mathit{h}}_{1}$ | ${\mathit{h}}_{2}$ | ${\mathit{h}}_{3}$ | ${\mathit{h}}_{4}^{-}$ | ${\mathit{h}}_{48}$ |
---|---|---|---|---|---|---|

$\left[{\mathrm{K}}^{+}\right]$ | 5.10 (1.30) | 3.90 (0.86) | 3.64 (0.81) | 3.40 (0.71) | 3.40 (0.56) | 5.08 (1.53) |

$\left[{\widehat{\mathrm{K}}}^{+}\right]{}_{m}^{\mathrm{S}}$ | 5.31 (0.43) | 4.03 (0.18) | 3.70 (0.08) | 3.49 (0.09) | 3.43 (0.05) | 4.56 (1.21) |

$\left[{\widehat{\mathrm{K}}}^{+}\right]{}_{m}^{\mathrm{P}}$ | 4.76 (1.90) | 4.01 (1.33) | 3.84 (1.16) | 3.46 (0.97) | 3.28 (0.44) | 4.43 (1.46) |

$\left[{\widehat{\mathrm{K}}}^{+}\right]{}_{m}^{\mathrm{G}}$ | 4.50 (0.71) | 4.33 (0.40) | 4.07 (0.33) | 3.97 (0.26) | 3.84 (0.19) | 4.57 (0.75) |

$\left[{\mathrm{Ca}}^{2+}\right]$ | 2.15 (0.20) | 2.23 (0.20) | 2.29 (0.19) | 2.31 (0.23) | 2.36 (0.21) | 2.17 (0.20) |

$\left[\widehat{\mathrm{C}}{\mathrm{a}}^{2+}\right]{}_{m}^{\mathrm{S}}$ | 2.13 (0.02) | 2.21 (0.05) | 2.25 (0.02) | 2.31 (0.05) | 2.28 (0.03) | 2.07 (0.13) |

$\left[\widehat{\mathrm{C}}{\mathrm{a}}^{2+}\right]{}_{m}^{\mathrm{P}}$ | 2.06 (0.29) | 2.27 (0.23) | 2.21 (0.26) | 2.29 (0.20) | 2.25 (0.23) | 2.18 (0.20) |

$\left[\widehat{\mathrm{C}}{\mathrm{a}}^{2+}\right]{}_{m}^{\mathrm{G}}$ | 2.19 (0.04) | 2.20 (0.02) | 2.22 (0.02) | 2.23 (0.01) | 2.23 (0.01) | 2.19 (0.04) |

**Table 4.**Intra-patient Pearson correlation coefficient r between actual and estimated $\left[{\mathrm{K}}^{+}\right]$ using univariable and multivariable estimators, with stage-specific (S), patient-specific (P) and global (G) approaches. Values are expressed as median (IQR).

${\mathit{r}}_{\left[{\mathbf{K}}^{+}\right],\left[{\widehat{\mathbf{K}}}^{+}\right]}$ | ${\mathit{d}}_{\mathbf{w},\mathbf{Q}}^{\mathbf{u}}$ | ${\mathit{d}}_{\mathbf{w},\mathbf{T}}^{\mathbf{u}}$ | ${\mathit{d}}_{\mathbf{w},\mathbf{Q}}^{\mathbf{u}}$, ${\mathit{d}}_{\mathbf{w},\mathbf{T}}^{\mathbf{u}}$ |
---|---|---|---|

S | 0.98 (0.08) | 0.96 (0.06) | 0.93 (0.30) |

P | 0.56 (0.75) | 0.55 (0.90) | 0.75 (0.51) |

G | 0.75 (0.15) | 0.82 (0.35) | 0.86 (0.32) |

**Table 5.**Intra-patient Pearson correlation coefficient r between actual and estimated $\left[{\mathrm{Ca}}^{2+}\right]$ using univariable and multivariable estimators, with stage-specific (S), patient-specific (P) and global (G) approaches. Values are expressed as median (IQR).

${\mathit{r}}_{\left[{\mathrm{Ca}}^{2+}\right],\left[\widehat{\mathrm{C}}{\mathrm{a}}^{2+}\right]}$ | ${\mathit{d}}_{\mathrm{w},\mathrm{Q}}^{\mathrm{u}}$ | ${\mathit{d}}_{\mathrm{w},\mathrm{T}}^{\mathrm{u}}$ | ${\mathit{d}}_{\mathrm{w},\mathrm{Q}}^{\mathrm{u}}$, ${\mathit{d}}_{\mathrm{w},\mathrm{T}}^{\mathrm{u}}$ |

S | 0.88 (0.38) | 0.88 (0.22) | 0.80 (0.78) |

P | 0.88 (0.22) | 0.63 (0.59) | 0.63 (0.37) |

G | 0.64 (0.73) | 0.64 (0.49) | 0.70 (0.55) |

**Table 6.**Estimation errors (e) using stage-specific (S), patient-specific (P) and global (G) approach-based $\left[{\mathrm{K}}^{+}\right]$ estimators, from all patients at all HD time points. Values are expressed as mean ± standard deviation and the units are mM.

e | S | P | G |
---|---|---|---|

${d}_{\mathrm{w},\mathrm{Q}}^{\mathrm{u}}$ | $-0.041\pm 0.831$ | $-0.091\pm 1.419$ | $-0.204\pm 0.971$ |

${d}_{\mathrm{w},\mathrm{T}}^{\mathrm{u}}$ | $0.004\pm 0.806$ | $-0.147\pm 0.809$ | $-0.169\pm 0.959$ |

${T}_{S/A}$ | $0.005\pm 0.792$ | $-0.157\pm 1.120$ | $-0.213\pm 0.996$ |

${T}_{S/\sqrt{A}}$ | $0.003\pm 0.811$ | $-0.149\pm 1.422$ | $-0.238\pm 1.048$ |

${d}_{\mathrm{w},\mathrm{Q}}^{\mathrm{u}}$ and ${d}_{\mathrm{w},\mathrm{T}}^{\mathrm{u}}$ | $0.073\pm 0.808$ | $-0.035\pm 1.113$ | $-0.144\pm 0.883$ |

**Table 7.**Estimation errors (e) using stage-specific (S), patient-specific (P) and global (G) approach-based $\left[{\mathrm{Ca}}^{2+}\right]$ estimators, from all patients at all HD time points. Values are expressed as mean ± standard deviation and the units are mM.

e | S | P | G |
---|---|---|---|

${d}_{\mathrm{w},\mathrm{Q}}^{\mathrm{u}}$ | $0.117\pm 0.134$ | $-0.007\pm 0.300$ | $0.018\pm 0.175$ |

${d}_{\mathrm{w},\mathrm{T}}^{\mathrm{u}}$ | $0.0003\pm 0.170$ | $0.024\pm 0.178$ | $0.018\pm 0.172$ |

${T}_{S/A}$ | $-0.002\pm 0.179$ | $0.025\pm 0.191$ | $0.023\pm 0.180$ |

${T}_{S/\sqrt{A}}$ | $-0.002\pm 0.183$ | $0.027\pm 0.201$ | $0.020\pm 0.183$ |

${d}_{\mathrm{w},\mathrm{Q}}^{\mathrm{u}}$ and ${d}_{\mathrm{w},\mathrm{T}}^{\mathrm{u}}$ | $0.023\pm 0.180$ | $0.010\pm 0.125$ | $0.016\pm 0.174$ |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Bukhari, H.A.; Sánchez, C.; Ruiz, J.E.; Potse, M.; Laguna, P.; Pueyo, E. Monitoring of Serum Potassium and Calcium Levels in End-Stage Renal Disease Patients by ECG Depolarization Morphology Analysis. *Sensors* **2022**, *22*, 2951.
https://doi.org/10.3390/s22082951

**AMA Style**

Bukhari HA, Sánchez C, Ruiz JE, Potse M, Laguna P, Pueyo E. Monitoring of Serum Potassium and Calcium Levels in End-Stage Renal Disease Patients by ECG Depolarization Morphology Analysis. *Sensors*. 2022; 22(8):2951.
https://doi.org/10.3390/s22082951

**Chicago/Turabian Style**

Bukhari, Hassaan A., Carlos Sánchez, José Esteban Ruiz, Mark Potse, Pablo Laguna, and Esther Pueyo. 2022. "Monitoring of Serum Potassium and Calcium Levels in End-Stage Renal Disease Patients by ECG Depolarization Morphology Analysis" *Sensors* 22, no. 8: 2951.
https://doi.org/10.3390/s22082951