Using Electronic Health Record Data to Explore the Challenges of Opioid Prescribing: A Short Communication

Heather R. Walker1*, Heather Mueller1, Tyson Christensen1, Heidi Cozart1, Scott R. Junkins2

1University of Utah Health, Medical Group, Utah, USA

2University of Utah Health, Department of Anesthesiology, Utah, USA

Background: Following the publication of the Center for Diseases Control and Prevention Guidelines for Prescribing Opioids in Primary Care, providers and institutions alike have been modifying practices and policies for prescribing controlled substances (2016).

Study Setting:The University of Utah Health implemented a series of data-driven adaptive and innovative programs and initiatives to improve opioid prescribing across its connected hospital and ambulatory health centers.

Data Collection: Using data mined from the electronic heath record system, researchers have been developing a data-driven approach with a collaborative team spanning clinical and data analytics backgrounds.

Objective: This article discusses those collaborative initiatives and presents a discussion of mindfulness in prescribing practices.

Conclusion: The multi-tiered data-driven approach taken by the University of Utah collaborative team demonstrates a model of change that other health care systems can emulate.

Introduction & Background

People with chronic illness and pain, in our medical establishment, face many barriers to adequate and appropriate care1. System-wide responses to the opioid crisis have created additional hoops and hurdles for people who categorically need opioids. Adding to the developing issue are the racial and ethnic disparities known to pervade pain management care in medical institutions across the United States2. State and federal systems have adapted during the COVID pandemic to make innovative solutions like telehealth more available, which has been necessary considering the United States has seen record numbers of opioid overdoses during this time3,4. Yet, despite efforts to reduce disparities during the pandemic, persistent barriers, like access to care and medical racism, remain. We argue that mitigating these persistent barriers requires we look at institution-wide big data as a guide for creating changes to opioid prescribing practices. Accessing, analyzing, and operationalizing our institution’s big data has allowed us, at the University of Utah, to be more mindful about how we systematically prescribe opioids. Our approach has developed over time and takes into consideration CDC guidelines and opioid prescribing efforts attempted by other institutions.

In 2016, The Center for Disease Control and Prevention (CDC) published a Guideline for Prescribing Opioids for Chronic Pain2. The guidelines focused on when to initiate opioid therapy, the choice of specific medications, and the assessment of risk and benefits for treatment of chronic conditions. Further clarification in 2019 highlighted areas of misapplication of these guidelines outside of primary care treatment of patients older than 18 years such as patients experiencing post-surgical pain or active cancer treatment5. On-going efforts to establish best practices of how to taper or reduce opioids are also necessary in order to avoid abrupt tapering of opioids or the use of hard limits on opioid prescribing. The risks and benefits of opioid therapy in specific patient groups, diagnoses, and treatment conditions should inform future versions of the guidelines and healthcare system-level data can inform these updates.

While the widely shared CDC prescribing guidelines include an argument for the careful consideration of prescribing on a case-by-case basis, many patients with chronic pain still face insurmountable barriers2. One recent study found that not only does chronic pain increase suicidality, but also that adequate pain management significantly reduces suicidality6. Taken together, the opioid epidemic is problematic on two counts: first as a leading cause of death7, and second as an issue of inequitable access to treatment for pain management. Thus, we argue that an effective response the opioid epidemic needs to address both over- and under-prescribing. Given the added challenges and forced adaptations that stemmed from the COVID-19 pandemic3, an effective approach requires we consider complexity, flexibility, and mindfulness in opioid prescribing policies at an institutional level.

Take for example, our patient, a Caucasian woman in her 70s, who has been treated at our Pain Management Center for nearly 10 years. She was referred to us after many years of struggling with pain due to arthritis following a traumatic car accident. As is common in patients with persistent pain, she also was navigating severe depression. With treatment, she maintained functionality as a contributing member of her family and community. However, over time, kidney and liver disease set in and limited her ability to use medications like ibuprofen or acetaminophen to manage her pain. Furthermore, she endured surgeries and struggled with the complications of a failed knee replacement. To continue living her life fully, her pain management regimen then required a low dose opioid medication. The decision to trial opioid therapy was made based on shared decision making between her and her medical team, clear communications of risk and side effects, and a focus on utilizing all aspects of care available. The care we provide her involves a combination of seeing a psychiatrist, medications to manage constipation, and periodic therapy services. Receiving care at our center is not fully covered by her insurance, so she has to pay a portion out of pocket. Paying for care, is thus a socioeconomic risk. So, for her, opioid therapy is not without financial risk or potential side effects. However, given the limitations of therapeutic options for chronic pain, a pragmatic approach that includes opioid therapy has provided her an avenue for relief. With our big data informed policies around opioid prescribing and general approach to holistic care, she is still achieving the quality of life she needs to live fully. Stories like our patient’s affirm the direction we have taken at the University of Utah Health. We, thus, strongly advocate for data driven solutions to provide guidance at institutional, local, and state-wide levels. So, in line with researchers and providers at Washington State University, we argue that before attempting to institute changes toward a reduction in opioid-related mortality, we must first track and understand opioid prescribing metrics in our health systems8.

In this article, you will find what we, at the University of Utah Health (UUH), have done to track opioid prescribing metrics before and after implementing changes at an institutional level. We put forward our efforts as a model of a data analytics process and the operationalization of interventions designed based on those metrics. It is our hope that this article generates the kind of creative dialogue that breeds further innovation in health systems beyond our own.

Our Approach to Mindful Opioid Prescribing

While the CDC Guidelines provided a framework of recommendations that was needed to chart a path towards balanced use of opioid therapies, the application across health care systems has led to a number of intended and unintended consequences, such as lower rates of opioid prescribing and reduced access for people in minority groups, respectively. Smaller and shorter prescriptions for opioids after surgeries are often appropriate for patients and reduce unused opioids in the community2. However, as was highlighted by our patient’s story and the argument we’ve presented in this article, more restrictive opioid prescribing policies do not serve every type of patient or case.

Despite inclusion in the controlled substance database since 1995 and instituted policies requiring prescribers to ascertain continuing medical education, over the last 10 years Utah has been in the worst 10 states for overdose deaths9. Though we had the fourth highest rate of opioid-related mortality across the US in 2014, we were able to bring cases down for the first time in 201710. This decrease is due in part to legislation declaring opioid overdose as a public health emergency and urging health systems across the state to put forth effort to its end. Said more plainly, the new legislation turned our attentions and priorities toward addressing the crisis for our health center and the population we serve. Considering the risks of both over- and under-prescribing, leaders at UUH have encouraged individual providers and groups of clinicians to review prescribing practices in the context of their specific clinical care settings.

To bring mindfulness to our prescribing practices, we have taken a number of innovative steps, some of which we have outlined here. While previous work has characterized aspects of the opioid epidemic in Utah11,12 here we focus on recent “grass roots” efforts by groups of providers and organizations within UUH. As with any large academic health care system, “bottom-up” and “top-down” initiatives together improve patient care. What follows is an annotated list of the programs, studies, and initiatives happening simultaneously at UUH that have, at some point, been informed by system-wide data provided by our data analytics team. After detailing the work we’re doing to create change in institution-wide opioid prescribing policies and practices, we discuss how we have used data from the EHR to get closer to creating palpable change in this area.

First, our perioperative prescribing policies shifted following quality improvement initiatives that reviewed the perioperative use of prescribed opioids for postoperative pain. Dr. Lyen Huang and his team in the Department of Surgery found that providing home disposal kits for use after surgery fostered collaborative practices with pharmacists and promoted opportunities to reduce unintended distribution of opioids in the community13. Implementing a policy that encourages appropriate opioid disposal benefits patients and the wider community. It also forges connections and collaborations with seemingly disparate provider groups within our hospital system, bringing us together to look at and evaluate the same big data sets.

Additionally, the Substance Use in Pregnancy Recovery Addiction Dependence Clinic (SUPeRAD), which is a specialty prenatal clinic which integrates maternal fetal medicine, addiction specialists, and resource management to address opioid use and addiction during pregnancy has provided much needed care for a previously marginalized patient population. The SUPeRAD Clinic efforts have fostered further collaboration across specialties and extended innovative approaches to care in rural and underserved parts of Utah14, yet another example of disparate groups within our health system coming together to share and analyze data for the common good.

Further, The University of Utah's Department of Internal Medicine, Division of Epidemiology's Program for Addiction Research, Clinical Care, Knowledge, and Advocacy (PARCKA) was founded in 2018. It has become a beacon for inter-disciplinary care, research and collaboration related to patients with addictions or who are medically vulnerable. As part of PARCKA, since 2019 the Greater Intermountain Node has expanded the National Institute of Drug Abuse Clinical Trials Network and promoted groundbreaking insights into addiction and opioid research, demonstrating the far-reaching impact of our efforts at UUH.

Similar to other health care institutions, UUH initially created an Opioid Taskforce to provide an internal network for coordination of programs and external efforts to interface with government and civil society amidst on-going opioid concerns. Further intersections between institutional needs and improvements in patient care have occurred with the renewal of the Community Health Needs Assessment15, which involves community members in setting priorities and sharing efforts and successes. The Opioid Stewardship Committee works intimately with our data analytics team and helps to disseminate results across the institution.

Connecting these institution-wide prescription-regulating initiatives and projects, is the data-driven approach we use to support individual providers who want to review or improve prescribing practices. Our providers and clinicians work with internal data analysts to create dashboards specific to the needs of their project. When we started looking at this data in 2016, however, the medications included, definitions of clinical states, and fidelity with other similar data sources was still unclear. So, we pushed further and carved out system-wide methodologies and definitions to more fully understand and reflect on our prescribing practices at an institutional level. Again, we argue that both institution-wide programmatic initiatives and a comprehensive mapping and visualization of EHR data is necessary to address the problem of opioid over- and under- prescribing. Said another way, neither is sufficient on its own.

Developing Metrics to Deepen Understanding

When we first set out to understand the prescribing patterns in our institution, we formed a collaboration consisting of data analysts and representatives of the Opioid Stewardship Committee. At the outset, we took interest in standardized metrics such as: 1) number of patients who have opioid prescriptions (prevalence); 2) average oral morphine equivalent (OME) per patient; 3) average OME prescribing rate per provider for a 13-month period; 4) number of patients being prescribed opioids and concurrent prescribing of other AHFS-classified medications known to increase risk of side effects/risk; 5) initial OME prescribed to patient; and 6) percentage of new patients being prescribed opioids in their first appointment. In order to build the logic of these metrics, we used enterprise data warehouse assets to query our electronic health record (EHR) system at the patient and prescription levels. With data from 10 EPIC Clarity standard tables and structures (namely, ORDER_MED, CLARITY_MEDICATION, ORDER_DISP_INFO, RX_MED_AHFS, ZC_ADMIN_ROUTE, PAT_ENC, PATIENT, CLARITY_DEP, CLARITY_SER, and V_CODING_ALL_DX_PX), we use Tableau and Toad software for data management16-18. We decided on these metrics based on a priori need. That is, we began our journey of trying to understand the social phenomena around opioid prescribing and use from theoretical and observational perspectives.

Next, we created a dashboard to visualize these metrics and found that the number of new patients being prescribed opioids during the first visit was not a major area of over-prescribing (about 1% of new patients). Also, we played around with how to make the data most accessible to our providers. For example, after some experimenting, we found that when we look at the data using a per 1000 rate, the visuals and tables become more intuitive and understandable. Similarly, we grouped patients by number of continuous 30-day periods with an opioid prescription. Using a mathematical equation put forth by the CDC19, we generated a representative number for OME. Figure 1 shows the percent of patients who fall into each duration category (bars) and the average OME rate for patients in each group over a 13-month period (dots).


Figure 1: Continuous 30-day Periods with Opioid Prescriptions over 13-months.

From this visualization, we are able to see some interesting and insightful trends. For example, 56.5% of our patients who meet the criteria to be included in this visualization, have had 24 or more 30-day periods with an opioid prescription. Also, there is something happening to boost average OME rates between patients who have had 7-12 and 13-18 continuous 30-day periods with and opioid prescription. As a form of validation, we also look into patient characteristics in these groups to understand the populations better.

Thus, upon further investigation, we determined that the population of patients with opioid prescriptions was not monolithic and required sub-division. So, we built a three-bucket classification system to sort patient data into: acute (any series of opioid prescriptions that do not meet the criteria for a chronic series), chronic (a series of opioid prescriptions that each have 21+ days’ supply in a 30-day period for 3+ consecutive 30 day periods), and continuous (a series of opioid prescriptions that each have 21+ days’ supply in a 30-day period for 4+ continuous 30 day periods).

Measuring these metrics gave us a baseline from which we began examining transitions between the three levels of clinical contexts. Interactions and changes between levels interested us the most because they highlighted points of potential intervention. When, how, and why are patients transitioning from acute use to chronic use? What level of Naloxone prescribing is appropriate for promoting public health? And, what about the long-haulers, the patients who have been continuously taking opioids? Are their OME levels soaring due to loss of effectiveness overtime? How does co-prescribing naloxone impact safety and cost-effectiveness for specific other patient cohorts (pain related to cancer vs. opioid addiction)?

Now a year into taking a data-driven approach to answering these questions and four years into programmatic initiatives to increase mindfulness in prescribing opioids, we saw a 47.8% decrease in the number of patients prescribed opioids in an ambulatory setting (rate per thousand) from 2016-2020. Figure 2 shows a simplified visualization of our 5-year trend.


Figure 2: Five-year trend: Patients with an Opioid Prescription Rate per 1000.

Using our institution’s Tableau server, which is updated monthly, we have provided access to big data dashboards to individual providers, members of the UUH Opioid Stewardship Committee. We argue that the act of looking into this data serves as an intervention itself. Having knowledge of our baseline rates motivates leaders in our institution as well as prescribing providers to be more mindful.

With that said, we are still navigating the data. To better contextualize patient care, we’re working to get this data to specific groups and providers across campus so they can apply it at the patient level. Using data to inform practice can be a pain point for providers. As such, translating knowledges gained from analyzing and interpreting data requires institutional and community buy-in and provider trust. We are still figuring out best practices for doing so. After packaging data-driven knowledge in a way that is legible to our institution and providers, our goal is to then extend it to the state so that it can inform thoughtful and mindful legislation.

Data drives clinical care and institutional policies, but to create broader lasting impact, we need bi-directional policy-level changes and adaptations. We need to be combining knowledge gained from big data and aspects of unique patient clinical context. Looking at either in isolation is futile. Data can’t stand on its own, it has to be contextualized by providers and people whether it is at the legislature or in the clinic. Looking at complex issues like the opioid crisis requires a complex and multitiered approach.


With much of our population spread widely across the intermountain west, Utah faces unique challenges of providing high quality access to complex care for people with chronic conditions. The delicate balance between compassionate care and harm reduction requires attention to individual patient situations using the best data available. Clinical context must be considered on a patient-by-patient basis, and such data can enrich institutional policies or public health priorities. With strict adherence to policies that mandate the removal or tapering off of opioids, patients may actually experience more harm20. This can be a challenging message to convey to clinicians, politicians, or patients. Data can help contextualize patients’ stories, but refining the conclusions for applications like policy, law, or guideline is required. It is our hope that our work can be leveraged and generalized by others with the knowledge that there will be localized implementation nuances which may need to be iterated to improve effectiveness. As we move forward with our endeavor to incorporate data-driven approaches at UUH, we intend to comparatively look at specific settings like emergency department and post-operative settings to see differences in outcomes for patients prescribed opioids.


No funding was received for this work.

Conflict of Interest

No authors report any conflicts of interest.


  1. Dunn KM, Saunders KW, Rutter CM, et al. Opioid Prescriptions for Chronic Pain and Overdose: a cohort study. Ann Intern Med. 2010; 152(2): 85-92. Available from:
  2. Lappin R. CDC issues new opioid prescribing guideline. Emergency Medicine. Quadrant Healthcom Inc. 2016; 48: p 150-1.
  3. Kelley AT, Dungan MT, Gordon AJ. Barriers and Facilitators to Buprenorphine Prescribing for Opioid Use Disorder in the Veterans Health Administration During COVID-19. J Addict Med. 2020.
  4. B. AF, M. RL, P. S. Provisional drug overdose death counts. 2020.
  5. Dowell D, Haegerich T, Chou R. No Shortcuts to Safer Opioid Prescribing. N Engl J Med. 2019; 380(24): 2285-7.
  6. Racine M. Chronic pain and suicide risk: A comprehensive review. Prog Neuropsychopharmacol Biol Psychiatry. 2018; 87(Pt B): 269-280.
  7. NIDA. Utah: Opioid-Involved Deaths and Related Harms. 2020. Available from:
  8. Fulton-Kehoe, Deborah Lofy KH, Le V, et al. Opioid-Prescribing Metrics inWashington State: Trends and Challenges. J Public Heal Manag Pract. 2020; 26(3): 214-21.
  9. Utah Department of Health. Opioid Overdose Recent Release Report 2019 Utah Opioid Overdose Fatality Review Recent Release Report. Salt lake City. 2019. Available from:
  10. Wiseman J. Data Driven Approaches to Fighting the Opioid Crisis. 2019. Available from:
  11. Webster LR, Cochella S, Dasgupta N, et al. An analysis of the root causes for opioid-related overdose deaths in the United States. Pain Med. 2011; 12(SUPPL. 2): S26-35.
  12. Porucznik CA, Johnson EM, Sauer B, et al. Studying adverse events related to prescription opioids: The Utah experience. Pain Med. 2011; 12 Suppl 2: S16-25.
  13. Stokes SM, Kim RY, Jacobs A, et al. Home Disposal Kits for Leftover Opioid Medications After Surgery: Do They Work? J Surg Res. 2020; 245: 396-402.
  14. Rizk AH, Simonsen SE, Roberts L, et al. Maternity Care for Pregnant Women with Opioid Use Disorder: A Review. J Midwifery Womens Health. 2019; 64(5): 532-544.
  15. Health U of U. Community Needs Health Assessment. 2021. Available from:,-2021-2023.pdf
  16. Hoelscher J, Mortimer A. Using Tableau to visualize data and drive decision-making. J Account Educ. 2018; 44: 49-59.
  17. Software Q. Toad for Oracle: Find the right edition for you. 2021. Available from:
  18. Epic Clarity. Data Analytics Center. Perelman School of Medicine at the University of Pennsylvania. Available from:
  19. Centers for Disease Control and Prevention. Guidelines for Prescribing Opioids for Chronic Pain Factsheet. 2018. Available from:
  20. Oliva EM, Bowe T, Manhapra A, et al. Associations between stopping prescriptions for opioids, length of opioid treatment, and overdose or suicide deaths in US veterans: Observational evaluation. BMJ. 2020; 368: m283.

Article Info

Article Notes

  • Published on: July 10, 2021


  • Opioid crisis
  • Big data
  • Data-driven approach
  • Patient-centered care


Dr. Heather R. Walker,
Social Scientist, University of Utah Health, Medical Group, Utah, USA;