Opioids play an important role in pain management after surgery but also increase the risk of prolonged opioid use in patients. The identification of patients who are more likely to use opioids after intended short-term treatment is critical for employing alternative management approaches or targeted interventions for the prevention of opioid-related problems. We used patient-reported data (PRD) and electronic health record information to identify factors predictive of prolonged opioid use after surgery.