Overprescription of opioids after surgery remains common. Residual and unnecessarily prescribed opioids can provide a reservoir for nonmedical use. This study therefore tested the hypothesis that a decision-support tool embedded in electronic health records guides clinicians to prescribe fewer opioids at discharge after inpatient surgery.


This study included 21,689 surgical inpatient discharges in a cluster randomized multiple crossover trial from July 2020 to June 2021 in four Colorado hospitals. Hospital-level clusters were randomized to alternating 8-week periods during which an electronic decision-support tool recommended tailored discharge opioid prescriptions based on previous inpatient opioid intake. During active alert periods, the alert was displayed to clinicians when the proposed opioid prescription exceeded recommended amounts. No alerts were displayed during inactive periods. Carryover effects were mitigated by including 4-week washout periods. The primary outcome was oral morphine milligram equivalents prescribed at discharge. Secondary outcomes included combination opioid and nonopioid prescriptions and additional opioid prescriptions until day 28 after discharge. A vigorous state-wide opioid education and awareness campaign was in place during the trial.


The total postdischarge opioid prescription was a median [quartile 1, quartile 3] of 75 [0, 225] oral morphine milligram equivalents among 11,003 patients discharged when the alerts were active and 100 [0, 225] morphine milligram equivalents in 10,686 patients when the alerts were inactive, with an estimated ratio of geometric means of 0.95 (95% CI, 0.80 to 1.13; P = 0.586). The alert was displayed in 28% (3,074 of 11,003) of the discharges during the active alert period. There was no relationship between the alert and prescribed opioid and nonopioid combination medications or additional opioid prescriptions written after discharge.


A decision-support tool incorporated into electronic medical records did not reduce discharge opioid prescribing for postoperative patients in the context of vigorous opioid education and awareness efforts. Opioid prescribing alerts might yet be valuable in other contexts.(Anesthesiology 2023; 139:186–96)

Editor’s Perspective
What We Already Know about This Topic
  • Opioid overprescription at the time of surgery may lead to leftover opioids available for diversion or misuse
  • Decision-support tools embedded in electronic health records have been shown to improve outcomes in other contexts
What This Article Tells Us That Is New
  • In this cluster randomized multiple crossover trial, four hospitals were randomized to alternating 8-week periods with an electronic decision-support tool that recommended tailored discharge opioid prescriptions based on previous inpatient opioid intake
  • There was no difference in the primary outcome of oral morphine milligram equivalents prescribed at discharge
  • In the setting of extensive education and increasing awareness of the risks of overprescription, electronic opioid prescription guidance did not significantly reduce opioid prescribing