Predicting Inpatient Medication Orders From Electronic Health Record Data

Clin Pharmacol Ther. 2020 Jul;108(1):145-154. doi: 10.1002/cpt.1826. Epub 2020 Apr 11.


In a general inpatient population, we predicted patient-specific medication orders based on structured information in the electronic health record (EHR). Data on over three million medication orders from an academic medical center were used to train two machine-learning models: A deep learning sequence model and a logistic regression model. Both were compared with a baseline that ranked the most frequently ordered medications based on a patient's discharge hospital service and amount of time since admission. Models were trained to predict from 990 possible medications at the time of order entry. Fifty-five percent of medications ordered by physicians were ranked in the sequence model's top-10 predictions (logistic model: 49%) and 75% ranked in the top-25 (logistic model: 69%). Ninety-three percent of the sequence model's top-10 prediction sets contained at least one medication that physicians ordered within the next day. These findings demonstrate that medication orders can be predicted from information present in the EHR.

Publication types

  • Comparative Study
  • Research Support, N.I.H., Extramural

MeSH terms

  • Academic Medical Centers
  • Adolescent
  • Adult
  • Aged
  • Aged, 80 and over
  • Deep Learning*
  • Electronic Health Records / statistics & numerical data*
  • Female
  • Hospitalization
  • Humans
  • Inpatients
  • Logistic Models
  • Machine Learning*
  • Male
  • Medical Order Entry Systems / statistics & numerical data*
  • Middle Aged
  • Time Factors
  • Young Adult