The Opioid Crisis in Data
By: Tara Boyle
Tags: Towards Data Science, Data Science, Drugs, Python, Exploratory Data Analysis

It’s no secret that the United States is in the midst of an opioid crisis.

What can be debated is the reason for this crisis. Coming from a pharmacy background, I was interested in prescriptions. Specifically, if I could find a correlation between opioid prescribing and overdose deaths.

Background

The opioid epidemic is a nationwide problem involving both prescription painkillers and illegal opioids, both of which can lead to potentially fatal overdoses.

It began in the late 1990s when pharmaceutical companies began promoting prescription painkillers with promises of pain relief without addiction.

Doctors began prescribing them more frequently and opioid sales skyrocketed.

Thousands of individuals began abusing the pain relievers, many of whom became addicted or overdosed.

OxyContin Abuse

Oxycontin debuted in 1996, and was heavily marketed by its maker, Purdue Pharma, for providing 12 hour pain relief.

However, even before hitting the market, clinical trials showed patients were only getting about 8 hours of pain relief. As the effects wear off, patients experience withdrawal symptoms — including intense drug cravings — which promotes addiction and dependence.

As stated in this LA Times Article over 7 million Americans have abused OxyContin — the drug that is often blamed with kickstarting the opioid epidemic.

Opioid Overview

Opioids are a class of highly addictive narcotic substances, both legal and illegal that are derived from the opium poppy plant. They can be prescription painkillers (Percocet, MS Contin, Duragesic) or street drugs (Heroin).

All opioids stimulate the opioid receptors in the brain. While they vary in how powerful they are, all depress the central nervous system (slowing down body functions — including breathing) and reduce both physical and psychological pain.

Opioid Effects

Opioids have many beneficial effects, most notably being pain relief. They can also cause feelings of relaxation and well-being, drowsiness, and can suppress coughing.

Unfortunately, they also have many adverse effects. Some of the most common negative effects include constipation, nausea and vomiting, lethargy, and mood swings.

Opioid use can also lead to addiction, and in cases of overdose, respiratory failure and death.

The Data

Data was sourced from several publicly available sources.

Medicaid Data : This dataset reports drug utilization data for covered outpatient drugs that are paid for by state Medicaid agencies. The data include the state, drug name, NDC, number of prescriptions, and dollars reimbursed.

: This dataset reports drug utilization data for covered outpatient drugs that are paid for by state Medicaid agencies. The data include the state, drug name, NDC, number of prescriptions, and dollars reimbursed. 2016 Medicare D Opioid Prescriber Summary File: This presents the opioid prescribing rates of providers who participate in the Medicare Part D program. It is a prescriber level dataset with information on the number and percentage of opioid claims with prescriber specialty, state, and ZIP code.

A single provider wrote over 21,000 opioid prescriptions in 2016 — just for Medicare Part D patients!

Medicare Provider Utilization and Payment Dataset: This file contains drug level information, listed by brand and generic name, for prescriptions by Part D participating providers.

This file contains drug level information, listed by brand and generic name, for prescriptions by Part D participating providers. Drug Data: Drug data is from the HEDIS Medication List Directory. Drugs are listed by brand and generic names, and drug class.

Drug data is from the HEDIS Medication List Directory. Drugs are listed by brand and generic names, and drug class. Death Data: Death data was obtained from CDC WONDER. Data are based on death certificates and contains the single underlying cause of death and up to 20 additional multiple causes of death.

Querying CDC WONDER

CDC WONDER is an online system that “makes the information resource of the Centers for Disease Control and Prevention (CDC) available to the public. . . With CDC WONDER you can search for and read published documents on public health concerns . . . and query numeric data sets on CDC’s information systems.” In this case we are interested in the mortality data.

Deaths are classified using ICD-10 codes. Drug-poisoning deaths are identified using underlying cause-of-death codes:

X40–X44 (accidental poisoning)

X60–X64 (intentional self-poisoning)

X85 (assault by drugs)

Y10–Y14 (poisoning by undetermined intent)

Drug Poisoning Deaths are further classified by ICD-10 Category Codes:

T40.0 Opium

T40.1 Heroin

T40.2 Other Opioids(Oxycodone, Hydrocodone, Morphine, Hydromorphone)

T40.3 Methadone

T40.4 Other Synthetic Narcotics (Fentanyl, Tramadol)

T40.5 Cocaine

T40.6 Other and Unspecified Narcotics

T40.7 Cannabis Derivatives

T40.8 Lysergide (LSD)

T40.9 Other and Unspecified Psychodysleptics (Hallucinogens)

Feature Engineering and Data Cleaning

Because the data is from five different sources, significant cleaning was required. I began by filtering drug data on Morphine Equivalent Dose (MED). MED is used by clinicians to compare the relative strengths of different opioids. Using the HEDIS drug data, I dropped all rows where MED was null, as non-opioid drugs will not have a MED. Next I used the opioid only drug data to filter out rows of interest in the Medicare and Medicaid datasets.

To combine the datasets, I merged all data on state, the common element.

Lastly, I engineered new features including units per prescription, days supply per beneficiary, and means and medians.

Exploratory Analysis

First we see opioids prescribed by specialty. Something interesting here is that general practitioners in family practice and internal medicine prescribed the greatest number of opioids.

While this could be due to a greater number prescribers in family practice than in a specialty like pain management, it would be something interesting to investigate further.