Predicting opioid dependence from electronic health records with machine learning.
ABSTRACT: Background:The opioid epidemic in the United States is averaging over 100 deaths per day due to overdose. The effectiveness of opioids as pain treatments, and the drug-seeking behavior of opioid addicts, leads physicians in the United States to issue over 200 million opioid prescriptions every year. To better understand the biomedical profile of opioid-dependent patients, we analyzed information from electronic health records (EHR) including lab tests, vital signs, medical procedures, prescriptions, and other data from millions of patients to predict opioid substance dependence. Results:We trained a machine learning model to classify patients by likelihood of having a diagnosis of substance dependence using EHR data from patients diagnosed with substance dependence, along with control patients with no history of substance-related conditions, matched by age, gender, and status of HIV, hepatitis C, and sickle cell disease. The top machine learning classifier using all features achieved a mean area under the receiver operating characteristic (AUROC) curve of ~?92%, and analysis of the model uncovered associations between basic clinical factors and substance dependence. Additionally, diagnoses, prescriptions, and procedures prior to the diagnoses of substance dependence were analyzed to elucidate the clinical profile of substance-dependent patients, relative to controls. Conclusions:The predictive model may hold utility for identifying patients at risk of developing dependence, risk of overdose, and opioid-seeking patients that report other symptoms in their visits to the emergency room.
Project description:Importance:As opioid-related mortality continues to increase, naloxone remains a critical intervention in preventing overdose death. Opportunities to expand access through the health care setting should be optimized. Objective:To determine the characteristics of naloxone prescribing for US patients at high risk of opioid overdose. Design, Setting, and Participants:This retrospective cohort study used Truven Health MarketScan data from October 1, 2015, through December 31, 2016, of individuals with International Statistical Classification of Diseases and Related Health Problems, Tenth Revision codes related to opioid use, misuse, dependence, and overdose. The cohort included 138 108 commercially insured individuals aged 15 years or older in the United States with claims related to opioid misuse or dependence, opioid-related overdose, or both. Exposures:Outpatient naloxone pharmacy claims. Main Outcomes and Measures:Demographic characteristics, clinical characteristics, health care service use, and proportion prescribed naloxone were included in multivariable logistic regression analyses to test the association of opioid risk group with naloxone claim. Results:Of 138 108 high-risk individuals (mean [SD] age, 43.4 [0.4] years; 72 435 [52.4%] men), 2135 (1.5%) were prescribed naloxone. Having prior diagnoses of both opioid misuse or dependence and overdose was associated with a greater likelihood of receiving naloxone (odds ratio [OR], 2.32; 95% CI, 1.98-2.72; P < .001) compared with having a prior diagnosis of opioid misuse or dependence without overdose. Having a prior diagnosis of opioid overdose alone was associated with a decreased likelihood of receiving naloxone (OR, 0.73; 95% CI, 0.57-0.94; P = .01) compared with having a prior diagnosis of opioid misuse or dependence without overdose. Factors associated with lower naloxone prescription included being aged 30 to 44 years (OR, 0.72; 95% CI, 0.62-0.84; P < .001) and being from the Midwest (OR, 0.62; 95% CI, 0.54-0.71; P < .001) or West (OR, 0.85; 95% CI, 0.74-0.98; P = .03). Opioid use disorder treatment, such as use of medication-assisted therapy (OR, 1.68; 95% CI, 1.53-1.86; P < .001), visiting a detoxification facility (OR, 1.51; 95% CI, 1.31-1.76; P < .001), or receiving other substance use disorder treatment (OR, 1.16; 95% CI, 1.04-1.30; P = .01), were associated with increased likelihood of receiving naloxone, as were receiving outpatient care from a pain specialist (OR, 1.57; 95% CI, 1.40-1.76; P < .001), psychologist (OR, 1.49; 95% CI, 1.29-1.70; P < .001), or surgeon (OR, 1.19; 95% CI, 1.08-1.32; P < .001). Overall, 98.5% (n = 135 973) of high-risk patients did not received naloxone, despite many interactions with the health care system, including 88 618 hospitalizations, 229 680 emergency department visits, 298 058 internal medicine visits, and 568 448 family practice visits. Conclusions and Relevance:Patients at high risk of opioid overdose rarely received prescriptions for naloxone despite numerous interactions with the health care system. Prescribing in emergency, inpatient, and outpatient settings represents an opportunity to improve access.
Project description:BACKGROUND:Any opioid-related hospitalization is an indicator of opioid-related harm and should ideally trigger carefully monitored decreases in opioid prescribing after inpatient stays in many, if not most, cases. However, past studies on opioid prescribing after hospitalizations have largely been limited to overdose related visits. It is unclear whether prescribing is different for other opioid-related indications such as opioid dependence and abuse and how that may compare with hospitalizations for overdose. OBJECTIVE:To examine opioid-prescribing patterns before and after opioid-related hospitalizations for all opioid-related indications, not limited to overdose. RESEARCH DESIGN:Retrospective cohort analysis of Veterans Health Administration (VHA) administrative claims from 2011 to 2014. SUBJECTS:VHA patients who were hospitalized between fiscal years 2011 and 2014 and had at least 1 prescription opioid medication filled through the VHA pharmacy before their hospitalization. MEASURES:Opioid dispensing trajectories after hospitalization by opioid-related indication (ie, opioid dependence and/or abuse vs. overdose) compared with prescribing patterns for non-opioid-related hospitalizations. RESULTS:Overall, opioid dosage dropped significantly (66% for dependence/abuse, 42% for overdose, and 3% for nonopioid diagnoses; P<0.001) across all 3 categories when comparing dose 57-63 days after admission to 57-63 days before hospitalization. However, 47% of the patients remained on the same dose or increased their opioid dose at 60 days after an opioid-related hospitalization. After adjusting for covariates, patients with a primary diagnosis of dependence/abuse had higher odds of having their dose discontinued compared with those with overdose: odds ratio (OR) 2.17 (1.19-3.96). Patients with admissions for opioid dependence and/or abuse had a statistically significant higher prevalence of depression, posttraumatic stress disorder, anxiety, and substance use disorders compared with those with an opioid overdose hospitalization. CONCLUSIONS:Opioid prescribing and patient risk factors before and after opioid-related hospitalizations vary by indication for hospitalization. To reduce costs and morbidity associated with opioid-related hospitalizations, opioid deintensification efforts need to be tailored to indication for hospitalization.
Project description:OBJECTIVES:To estimate heroin overdose trends among insured individuals and characterize patients and healthcare utilization preceding overdose to inform scale-up of effective prevention and treatment. STUDY DESIGN:Retrospective descriptive analysis. METHODS:We analyzed 2010 to 2014 IBM MarketScan Databases and calculated annual heroin overdose rates. For a subset of patients, we describe their comorbidities, where they accessed health services, and select prescription histories prior to their first heroin overdose. RESULTS:Heroin overdose rates were much lower, but increased faster, among the commercially insured compared with Medicaid enrollees from 2010 to 2014 (270.0% vs 94.3%). By 2012, rates among the commercially insured aged 15 to 24 years reached the overall rates in the Medicaid population. All patients had healthcare encounters in the 6 months prior to their first heroin overdose; two-thirds of commercially insured patients had outpatient visits, whereas two-thirds of Medicaid patients had emergency department visits. One month prior to overdose, 24.5% of Medicaid and 8.6% of commercially insured patients had opioid prescriptions. Fewer Medicaid patients had buprenorphine prescriptions (17.8% vs 27.3%) despite similar rates of known substance-related disorders. A higher proportion of Medicaid patients had non-substance-related comorbidities. CONCLUSIONS:Heroin overdose rates were persistently higher among the Medicaid population than the commercially insured, with the exception of those aged 15 to 24 years. Our findings on healthcare utilization, comorbidities, and where individuals access services could inform interventions at the point of care prior to a first heroin overdose. Outpatient settings are of particular importance for the growing cohort of young, commercially insured patients with opioid use disorders.
Project description:In response to rising rates of opioid abuse and overdose, U.S. states enacted laws to restrict the prescribing and dispensing of controlled substances. The effect of these laws on opioid use is unclear.We tested associations between prescription-opioid receipt and state controlled-substances laws. Using Medicare administrative data for fee-for-service disabled beneficiaries 21 to 64 years of age who were alive throughout the calendar year (8.7 million person-years from 2006 through 2012) and an original data set of laws (e.g., prescription-drug monitoring programs), we examined the annual prevalence of beneficiaries with four or more opioid prescribers, prescriptions yielding a daily morphine-equivalent dose (MED) of more than 120 mg, and treatment for nonfatal prescription-opioid overdose. We estimated how opioid outcomes varied according to eight types of laws.From 2006 through 2012, states added 81 controlled-substance laws. Opioid receipt and potentially hazardous prescription patterns were common. In 2012 alone, 47% of beneficiaries filled opioid prescriptions (25% in one to three calendar quarters and 22% in every calendar quarter); 8% had four or more opioid prescribers; 5% had prescriptions yielding a daily MED of more than 120 mg in any calendar quarter; and 0.3% were treated for a nonfatal prescription-opioid overdose. We observed no significant associations between opioid outcomes and specific types of laws or the number of types enacted. For example, the percentage of beneficiaries with a prescription yielding a daily MED of more than 120 mg did not decline after adoption of a prescription-drug monitoring program (0.27 percentage points; 95% confidence interval, -0.05 to 0.59).Adoption of controlled-substance laws was not associated with reductions in potentially hazardous use of opioids or overdose among disabled Medicare beneficiaries, a population particularly at risk. (Funded by the National Institute on Aging and others.).
Project description:Strategies are needed to identify at-risk patients for adverse events associated with prescription opioids. This study identified prescription opioid misuse in an integrated health system using electronic health record (EHR) data, and examined predictors of misuse and overdose. The sample included patients from an EHR-based registry of adults who used prescription opioids in 2011 in Kaiser Permanente Northern California, a large integrated health care system. We characterized time-at-risk for opioid misuse and overdose, and used Cox proportional hazard models to model predictors of these events from 2011 to 2014. Among 396,452 patients, 2.7% were identified with opioid misuse and 1044 had an overdose event. Older patients were less likely to meet misuse criteria or have an overdose. Whites were more likely to be identified with misuse, but not to have an overdose. Alcohol and drug disorders were related to higher risk of misuse and overdose, with the exception that marijuana disorder was not related to opioid misuse. Higher daily opioid dosages and benzodiazepine use increased the risk of both opioid misuse and overdose. We characterized several risk factors associated with misuse and overdose using EHR-based data, which can be leveraged relatively quickly to inform preventive strategies to address the opioid crisis.
Project description:INTRODUCTION:With increasing rates of opioid overdoses in the US, a surveillance tool to identify high-risk patients may help facilitate early intervention. OBJECTIVE:To develop an algorithm to predict overdose using routinely-collected healthcare databases. METHODS:Within a US commercial claims database (2011-2015), patients with ?1 opioid prescription were identified. Patients were randomly allocated into the training (50%), validation (25%), or test set (25%). For each month of follow-up, pooled logistic regression was used to predict the odds of incident overdose in the next month based on patient history from the preceding 3-6 months (time-updated), using elastic net for variable selection. As secondary analyses, we explored whether using simpler models (few predictors, baseline only) or different analytic methods (random forest, traditional regression) influenced performance. RESULTS:We identified 5,293,880 individuals prescribed opioids; 2,682 patients (0.05%) had an overdose during follow-up (mean: 17.1 months). On average, patients who overdosed were younger and had more diagnoses and prescriptions. The elastic net model achieved good performance (c-statistic 0.887, 95% CI 0.872-0.902; sensitivity 80.2, specificity 80.1, PPV 0.21, NPV 99.9 at optimal cutpoint). It outperformed simpler models based on few predictors (c-statistic 0.825, 95% CI 0.808-0.843) and baseline predictors only (c-statistic 0.806, 95% CI 0.787-0.26). Different analytic techniques did not substantially influence performance. In the final algorithm based on elastic net, the strongest predictors were age 18-25 years (OR: 2.21), prior suicide attempt (OR: 3.68), opioid dependence (OR: 3.14). CONCLUSIONS:We demonstrate that sophisticated algorithms using healthcare databases can be predictive of overdose, creating opportunities for active monitoring and early intervention.
Project description:BACKGROUND:Opioids are commonly prescribed in the hospital; yet, little is known about which patients will progress to chronic opioid therapy (COT) following discharge. We defined COT as receipt of ≥ 90-day supply of opioids with < 30-day gap in supply over a 180-day period or receipt of ≥ 10 opioid prescriptions over 1 year. Predictive tools to identify hospitalized patients at risk for future chronic opioid use could have clinical utility to improve pain management strategies and patient education during hospitalization and discharge. OBJECTIVE:The objective of this study was to identify a parsimonious statistical model for predicting future COT among hospitalized patients not on COT before hospitalization. DESIGN:Retrospective analysis electronic health record (EHR) data from 2008 to 2014 using logistic regression. PATIENTS:Hospitalized patients at an urban, safety net hospital. MAIN MEASUREMENTS:Independent variables included medical and mental health diagnoses, substance and tobacco use disorder, chronic or acute pain, surgical intervention during hospitalization, past year receipt of opioid or non-opioid analgesics or benzodiazepines, opioid receipt at hospital discharge, milligrams of morphine equivalents prescribed per hospital day, and others. KEY RESULTS:Model prediction performance was estimated using area under the receiver operator curve, accuracy, sensitivity, and specificity. A model with 13 covariates was chosen using stepwise logistic regression on a randomly down-sampled subset of the data. Sensitivity and specificity were optimized using the Youden's index. This model predicted correctly COT in 79% of the patients and no COT correctly in 78% of the patients. CONCLUSIONS:Our model accessed EHR data to predict 79% of the future COT among hospitalized patients. Application of such a predictive model within the EHR could identify patients at high risk for future chronic opioid use to allow clinicians to provide early patient education about pain management strategies and, when able, to wean opioids prior to discharge while incorporating alternative therapies for pain into discharge planning.
Project description:Opioid therapy offers the promise of reducing the burden of chronic pain in not just individual patients, but among the broad population of patients with chronic pain. Randomized trials have demonstrated that opioid therapy for up to 12-16weeks is superior to placebo, but have not addressed longer-term use. In the United States, opioid sales have quadrupled during 2000-2010, with parallel increases in opioid accidental overdose deaths and substance abuse admissions. Clinical use of long-term opioid therapy is characterized by a pattern of adverse selection, where high-risk patients are prescribed high-risk opioid regimens. This adverse selection may link these trends in use, abuse, and overdose. Long-term opioid therapy appears to be associated with iatrogenic harm to the patients who receive the prescriptions and to the general population. The United States has, in effect, conducted an experiment of population-wide treatment of chronic pain with long-term opioid therapy. The population-wide benefits have been hard to demonstrate, but the harms are now well demonstrated.
Project description:PURPOSE:To enhance automated methods for accurately identifying opioid-related overdoses and classifying types of overdose using electronic health record (EHR) databases. METHODS:We developed a natural language processing (NLP) software application to code clinical text documentation of overdose, including identification of intention for self-harm, substances involved, substance abuse, and error in medication usage. Using datasets balanced with cases of suspected overdose and records of individuals at elevated risk for overdose, we developed and validated the application using Kaiser Permanente Northwest data, then tested portability of the application using Kaiser Permanente Washington data. Datasets were chart-reviewed to provide a gold standard for comparison and evaluation of the automated method. RESULTS:The method performed well in identifying overdose (sensitivity = 0.80, specificity = 0.93), intentional overdose (sensitivity = 0.81, specificity = 0.98), and involvement of opioids (excluding heroin, sensitivity = 0.72, specificity = 0.96) and heroin (sensitivity = 0.84, specificity = 1.0). The method performed poorly at identifying adverse drug reactions and overdose due to patient error and fairly at identifying substance abuse in opioid-related unintentional overdose (sensitivity = 0.67, specificity = 0.96). Evaluation using validation datasets yielded significant reductions, in specificity and negative predictive values only, for many classifications mentioned above. However, these measures remained above 0.80, thus, performance observed during development was largely maintained during validation. Similar results were obtained when evaluating portability, although there was a significant reduction in sensitivity for unintentional overdose that was attributed to missing text clinical notes in the database. CONCLUSIONS:Methods that process text clinical notes show promise for improving accuracy and fidelity at identifying and classifying overdoses according to type using EHR data.
Project description:Importance:Opioid-tolerant only (OTO) medications, such as transmucosal immediate-release fentanyl products and certain extended-release opioid analgesics, require prior opioid tolerance for safe use, as patients without tolerance may be at increased risk of overdose. Studies using insurance claims have found that many patients initiating these medications do not appear to be opioid tolerant. Objectives:To measure prevalence of opioid tolerance in patients initiating OTO medications and to determine whether linked electronic health record (EHR) data contribute evidence of opioid tolerance not found in insurance claims data. Design, Setting, and Participants:This retrospective cohort study used a national database of deidentified longitudinal health information, including medical and pharmacy claims, insurance enrollment, and EHR data, from January 1, 2007, to December 31, 2016. Data included 131?756 US residents with at least 183 days of continuous enrollment in commercial or Medicare Advantage insurance (including medical and pharmacy benefits) who had received an OTO medication and who had no inpatient stays in the 30 days prior to starting an OTO medication; of these, 20?044 individuals had linked EHR data within the prior 183 days. Data were analyzed from July 1, 2017, to August 31, 2018. Exposures:Initiating an OTO medication. Main Outcomes and Measures:Prior opioid tolerance demonstrated through pharmacy fills or EHR data on prescriptions written. Results:Among 153?385 OTO use episodes identified, 89?029 (58.0%) occurred among women, 62?900 (41.0%) occurred among patients with Medicare Advantage insurance, 39?394 (25.7%) occurred in the Midwest, 17?366 (11.3%) occurred in the Northeast, 73?316 (47.8%) occurred in the South, and 23?309 (15.2%) occurred in the West. Less than half of use episodes (73?117 episodes [47.7%]) involved patients with evidence in claims data of opioid tolerance prior to initiating therapy with an OTO medication, including 31?392 of 101?676 episodes (30.9%) involving transdermal fentanyl, 1561 of 2440 episodes (64.0%) involving transmucosal fentanyl, 36?596 of 43?559 episodes (84.0%) involving extended-release oxycodone, and 3568 of 5710 episodes (62.5%) involving extended-release hydromorphone. Among 20?044 OTO use episodes with linked EHR and claims data, less than 1% of OTO episodes identified in claims had evidence of opioid tolerance in structured EHR data that was not present in claims data (108 episodes [0.5%]). After limiting the sample to OTO episodes identified in claims with a matching OTO prescription within 14 days in the structured EHR data, only 40 of 939 episodes (4.0%) occurred among patients with evidence of tolerance that was not present in claims data. Conclusions and Relevance:This cohort study found that most patients initiating OTO medications did not have evidence of prior opioid tolerance, suggesting they were at increased risk of opioid-related harms, including fatal overdose. Data from EHRs did not contribute substantial additional evidence of opioid tolerance beyond the data found in prescription claims. Future research is needed to understand the clinical rationale behind these observed prescribing patterns and to quantify the risk of harm to patients associated with potentially inappropriate prescribing.