Avoidable Serum Potassium Testing in the Cardiac ICU: Development and Testing of a Machine-Learning Model

Pediatr Crit Care Med. 2021 Apr 1;22(4):392-400. doi: 10.1097/PCC.0000000000002626.


Objectives: To create a machine-learning model identifying potentially avoidable blood draws for serum potassium among pediatric patients following cardiac surgery.

Design: Retrospective cohort study.

Setting: Tertiary-care center.

Patients: All patients admitted to the cardiac ICU at Boston Children's Hospital between January 2010 and December 2018 with a length of stay greater than or equal to 4 days and greater than or equal to two recorded serum potassium measurements.

Interventions: None.

Measurements and main results: We collected variables related to potassium homeostasis, including serum chemistry, hourly potassium intake, diuretics, and urine output. Using established machine-learning techniques, including random forest classifiers, and hyperparameter tuning, we created models predicting whether a patient's potassium would be normal or abnormal based on the most recent potassium level, medications administered, urine output, and markers of renal function. We developed multiple models based on different age-categories and temporal proximity of the most recent potassium measurement. We assessed the predictive performance of the models using an independent test set. Of the 7,269 admissions (6,196 patients) included, serum potassium was measured on average of 1 (interquartile range, 0-1) time per day. Approximately 96% of patients received at least one dose of IV diuretic and 83% received a form of potassium supplementation. Our models predicted a normal potassium value with a median positive predictive value of 0.900. A median percentage of 2.1% measurements (mean 2.5%; interquartile range, 1.3-3.7%) was incorrectly predicted as normal when they were abnormal. A median percentage of 0.0% (interquartile range, 0.0-0.4%) critically low or high measurements was incorrectly predicted as normal. A median of 27.2% (interquartile range, 7.8-32.4%) of samples was correctly predicted to be normal and could have been potentially avoided.

Conclusions: Machine-learning methods can be used to predict avoidable blood tests accurately for serum potassium in critically ill pediatric patients. A median of 27.2% of samples could have been saved, with decreased costs and risk of infection or anemia.

Publication types

  • Research Support, Non-U.S. Gov't

MeSH terms

  • Boston
  • Child
  • Humans
  • Intensive Care Units
  • Machine Learning*
  • Potassium*
  • Retrospective Studies


  • Potassium