A related editorial discusses the findings of this study, highlighting that avoiding the first prescription in opioid-naive patients may reduce incident long-term use and associated harms. Additionally, it may be useful to develop protocols to pursue nonopioid analgesic use before opioid use during hospitalisations and to attempt to taper opioid doses before discharge.