Judicious opioid prescribing for acute pain is thought to be one means of reducing both chronic opioid use and opioid use disorder (OUD). Observational evidence suggests that therapeutic exposure to opioids is associated with increased likelihood of long-term use and that greater duration or intensity of initial opioid prescriptions may further elevate risk.1,2,3,4 Further, leftover opioids are common from short-term prescriptions and may be misused.5 This is important because the majority of OUDs begin with the misuse of prescription opioids, for which physicians are the main source.6,7,8

Given these risks, guidelines recommend minimizing new opioid prescriptions and reducing duration and dose whenever possible.9 Thirty-three states, Medicare, and some insurers and pharmacy chains have implemented limits for new opioid prescriptions as a means of decreasing opioid exposure.10,11,12,13,14,15 Some have questioned the wisdom of broad limits since opioid prescribing has been declining since 2012,16 and there are potential risks for unintended consequences including undertreating pain or increasing early revisits if policies are overly restrictive.17, 18 Further, there is limited evidence about the impact of prescribing limit policies on the characteristics of new opioid prescriptions.

In May 2017, New Jersey (NJ) implemented a 5-day limit for acute opioid prescriptions.19 In order to facilitate compliance with the law, the University of Pennsylvania Health System (Penn Medicine) implemented an electronic medical record (EMR) best practice alert (BPA) in NJ notifying prescribers if new prescriptions exceeded the 5-day limit. The aim of this study was to evaluate the impact of the NJ 5-day prescribing limit and associated EMR intervention on characteristics of new prescriptions (opioid dose and quantity). We also examined secondary outcomes including rates of prescription refills, patient phone calls, and care utilization.


Study Setting

Penn Medicine spans two states—NJ and Pennsylvania (PA)—within the greater Philadelphia area. For the study, we included new opioid prescriptions written in ambulatory, non-teaching practices within Penn Medicine from specialties represented in both NJ and PA. Specialties represented in both states included adult primary care (family and internal medicine), obstetrics and gynecology (Ob/Gyn), and cardiology. We also excluded practices with other ongoing opioid-related interventions (sports medicine) during the study period.

Study Design and Intervention

We used a difference-in-differences study design to estimate the effect of the combined policy-EMR intervention accounting for background trends in opioid prescribing. We compared practices in NJ exposed to the policy and EMR alert to a control group of unexposed practices in PA. The NJ law mandates that new prescriptions for schedule II controlled substances or any opioid drugs not exceed a 5-day supply.19 The law does not specify what constitutes a 5-day supply but requires the use of immediate release formulations at the lowest dose. The legislation passed in February 2017 and took effect in May 2017. PA also had a state prescribing limit in effect during the study period that limited new opioid prescriptions for adults to 7 days in specific contexts, including emergency departments (EDs), urgent care, and hospital observation settings. These restrictions did not apply elsewhere, including outpatient practices included in our study.14

Penn Medicine instituted an EMR alert in July 2017 to facilitate compliance with the law. The alert employed an “enhanced active choice” design, requiring a prescriber to make an active decision between alternatives while highlighting the advantage of one option.20 In this case, prescribers were notified if a new opioid prescription exceeded the 5-day limit based on the tablet quantity and dosing instructions. Prescribers were required to make an active choice to acknowledge the alert and then could either continue with the original order or adjust the prescribed quantity, with suggested amounts provided that were consistent with the law. More detail on the EMR intervention is available in Online Appendix A.

Study Population

We included index prescriptions for the six most common opioids: oxycodone, morphine, hydrocodone, hydromorphone, codeine, and tramadol. Index prescriptions were defined as a new opioid prescription (no opioids in the prior year, consistent with NJ law) for adult patients (≥ 18 years) within Penn Medicine ambulatory practices. We excluded prescriptions for liquid formulations and for patients with cancer or enrolled in hospice or palliative care. We also excluded prescriptions written with a total opioid dose of ≥ 4000 MME or with long- and short-acting opioid formulations on the same day. These were unlikely to represent prescriptions for acute pain given the risks of respiratory depression associated with such doses.4 We conducted additional sensitivity analyses where we further restricted the study population to include those prescriptions most likely to represent patients who were opioid-naïve, including those with less than 90 tablets and excluding prescriptions written with refills on the original order (only possible for lower DEA schedule medications).

Data Source

We used data from the EMR supplied by the Penn Data Analytics Center. Penn Medicine uses the Epic EMR (Hyperspace 2017; Epic Systems Corporation, Verona, WI). We had access to all prescriptions written within Penn Medicine.

We extracted patient demographics, including age, sex, race, ethnicity, and insurance status as well as ICD-10 codes for depression, alcohol use disorder (AUD), and other substance use disorders (SUDs). These diagnoses are associated with greater likelihood of long-term opioid use.21,22,23 We also extracted data on encounters for inpatient, ED, and ambulatory visits and documented patient telephone calls as well as prescribing provider specialty, provider type (MD or advanced practice provider), and practice location.


The primary outcome was total opioid dose per index prescription in morphine milligram equivalent (MME), a measure that reflects both the dose and number of tablets in the entire prescription and standardizes across opioid type.24 Although the outcome MME/day is commonly used in the literature, MME/prescription has been used previously in opioid prescribing policy25, 26 and hospital and health system–based studies27, 28 and allowed us to report change in the total volume of opioids in a new prescription. Further, by using total MME/prescription, we were able to distinguish between true decreases in prescribing and changes in dosing instructions (i.e., increasing the dose or frequency to fit within 5 days). We also assessed quantity of tablets/index prescription as an a priori secondary outcome. Finally, we analyzed the proportion of prescriptions written using prepopulated orders from the EMR preference list among prescribers in NJ.

We also examined secondary outcomes that might serve as proxies for under-prescribing or poor symptom control. These included proportion of prescriptions with refills within 30 days and numbers of telephone encounters, outpatient visits, and ED visits within 30 days of the index prescription. Although additional prescriptions and close follow-up may be appropriate or preferable to excessive prescribing, these could be markers of an overly restrictive policy if initial supplies were inappropriate to meet patient needs.

Data Analysis

We included three time periods: (1) a 12-month pre-period (May 15, 2016–May 15, 2017), (2) a transition period during which the prescribing limit law was implemented without the EMR alert (May 16, 2017–July 7, 2017), and (3) a post-period in which the prescribing limit and EMR intervention were implemented (July 8, 2017–March 14, 2018). The 5-day limit passed in February 2017, so 1 year provided sufficient pre-period data from prior to the announcement of the policy that would not be subject to the effects of the announcement itself. The post-period was chosen because the health system implemented a similar EMR intervention in PA practices after that time.

For patients with an index opioid prescription, we compared patient and prescription characteristics by state before and after the law. We used Student’s t tests to compare continuous variables and χ2 test or Fisher’s exact test to compare categorical variables. We also included descriptive analysis of trends in prescription outcomes over time by state.

We then fit a multivariable linear regression model for each outcome variable to estimate the difference-in-differences effects. Opioid prescribing has been declining nationally over time,29 so comparing outcomes before and after the policy and alert may inappropriately estimate the effect. However, the difference-in-differences analysis allowed for comparison of NJ outcomes to a control group in PA within the same health system not subject to interventions, allowing us to account for these background trends. In order to use this approach, several assumptions must be met.30 First, the two sites should be subject to “common shocks,” meaning that other than the exposure being tested, outside events occurring during the study period should impact the intervention and control groups equally.30 In this case, clinics in NJ and PA were subject to the same health system policies and guidelines for opioid stewardship, with the exception of the prescribing limit and EMR intervention in NJ. Second, the outcomes need to meet the assumption of parallel trends prior to the exposure, meaning that trends must be similar in the in the pre-period, which we tested in our analysis.

We fit a linear regression model us to examine the intervention effects on both the absolute change and rate of change in outcomes between the two states. The model included the state, calendar time (prescription date), and indicators for the three time periods (pre-period, transition period with policy, and post-period with policy and EMR alert), and all two-way and three-way interactions between time period, calendar time, and state. We eliminated non-significant interactions, and only the two-way interaction between the time period and state was retained in the final model. The interaction between time period and state can be interpreted as whether the rates of change in outcomes differed between NJ and PA across time periods.

All regression models were adjusted for patient age, sex, race, insurance status, comorbidities (Charlson Comorbidity Index, and history of depression, AUD, OUD, and other SUDs), prescribing specialty and title (MD vs advanced practice provider), and presence of a procedure—all factors that could impact prescribing patterns or patient risks. We also accounted for clustering by prescriber in our model. Analyses were conducted using statistical software (Stata, version 15.1; StataCorp, College Station, TX).

Finally, we performed sensitivity analyses to test the robustness of our findings. First, we excluded patients from one commercial health plan that implemented its own 5-day limit in PA during the study period.13 We also limited our sample to only prescriptions of smaller quantities (< 90 tabs) or prescriptions written with zero refills in case we were capturing some chronic opioid prescriptions in our cohort.

The study was approved by the University of Pennsylvania Institutional Review Board.


Patient Characteristics

There were a total of 678 patients with new opioid prescriptions in 10 study practices in NJ: 434 in the pre-period and 244 in the 10 months following the implementation of the law. There were 4638 patients with new prescriptions in PA from 42 practices: 2961 in the pre-period and 1677 in the post-period (Fig. 1).

Figure 1
figure 1

Cohort diagram for inclusion and exclusion criteria.

In NJ, patient characteristics did not significantly differ between the two time periods (Table 1). Patients were also similar over time in PA practices, with the exception of a lower proportion of patients with comorbid depression, SUDs, and OUD in the pre-period and a higher proportion of prescriptions from advanced practice providers (APPs) and for procedures in the post-period.

Table 1 Characteristics of Study Patients in Before Implementation of the Law (May 15, 2016–May 15, 2017) vs After (Post Plus Transition Period, May 16, 2017–March 14, 2018)

Opioid Prescription Characteristics

Table 2 includes characteristics of opioid prescriptions over the study period. Overall, the number of new prescriptions per month declined in both states over time. There was also a decline in mean MME and quantity per index prescription over time in both PA and NJ practices as shown in Figure 2. Finally, the rate of refills obtained within 30 days of a new opioid prescription did not differ significantly in NJ or PA practices between the pre- and post-periods. Prescriptions were written by 236 unique prescribers: 39 in NJ and 203 in PA, with six providers prescribing in both states.

Table 2 Characteristics of Initial Opioid Prescriptions Before Implementation of the Law (May 15, 2016–May 15, 2017) vs After (Post Plus Transition Period, May 16, 2017–March 14, 2018)
Figure 2
figure 2

MME, tablet quantity, and 30-day refill rate for index prescriptions by study month. The 5-day limit went into effect at the beginning of month 13, and the EMR alert went into effect between months 14 and 15. The transition period is shaded. Panel a shows the median total MME per prescription (sum of total dose prescribed for the whole prescription standardized across different opioid types) by study month over the study period. Panel b shows the median quantity of tablets total per index prescription by study month. Panel c shows the proportion of prescriptions for which an additional prescription was written within 30 days of the index prescription (a refill).

Association of Policy and EMR Intervention Implementation with Prescription Characteristics

Given overall trends towards declining opioid doses in index prescriptions, we performed a difference-in-differences analysis to evaluate whether exposure to the prescribing limit and EMR intervention implementation led to greater changes in prescribing outcomes in NJ practices compared with PA (Fig. 3, Table 3). We tested the trends within and between states during the pre-period and found no significant differences between the rates of change for our main outcome variables between states prior to the policy (Online Appendix B, Table S1).

Figure 3
figure 3

Adjusted margins plot with 95% CI for a) MME per prescription, b) tablet quantity per prescription, and c) percent of prescriptions with refills at 30 days. The pre-period includes May 15, 2016–May 15, 2017; the transition period (prescribing limit law implemented but the EMR alert not in place) includes May 16, 17–July 7, 2017; and the post-period (prescribing limit and EMR alert implemented) includes July 8, 2017–March 14, 2018. Margins plots represent the mean values for outcomes in each period after controlling for calendar time, patient, and practice characteristics.

After performing linear regression adjusted for patient age, sex, race, insurance status, comorbidities, prescribing provider type and specialty, and procedure, the total MME for new prescriptions declined more in NJ practices as compared with PA (− 82.99 MME per index prescription from a baseline of 340.03, 95% CI − 148.15 to − 17.84) (Table 3). The mean quantity in NJ practices following the implementation of the law and EMR intervention declined by a quantity of 10.4 tablets per prescription more than that in PA (95% CI − 19.70 to − 1.13 tablets). Figure 3 shows the adjusted margins plots for these regression analyses, displaying the mean values for each time period, adjusted for calendar time as well as patient and provider characteristics. Prescribers used the preference list in 31% of opioid orders after the alert was put into place overall in NJ, and in 49% of orders with < 10 tablets.

Table 3 Adjusted Linear Regression for Primary Outcome MME per Prescription as well as Adjusted Models for Quantity of Tablets per Prescription and Proportion of Refills per Prescription. The Difference-in-Differences Estimator Is the Interaction Term between State and Time Period (State#Time Period) below

Association of Policy and EMR Intervention Implementation with Secondary Outcomes

We also examined the impact of implementation of the law and EMR intervention on secondary outcomes representing potential unintended consequences. In adjusted analyses, there were no significant increases in 30-day refills in NJ practices compared with PA following implementation (Fig. 3, Table 3). There were also no significant differences in changes in utilization, including hospital admissions, ED visits, office visits, or telephone calls within 30 days of the index prescription (Online Appendix B, Table S2).

Sensitivity Analyses

We performed several sensitivity analyses to test the robustness of our results. It is possible that some of the prescriptions that were listed as new prescriptions could have been continuations of chronic prescriptions from outside the health system to which the law and alert would not apply. When we limited our sample to smaller prescriptions only (90 tablets) and those written without refills (in the case of lower schedule medications) to account for the possibility that we included prescriptions for chronic opioids in our original sample, our results were similar (Online Appendix B, Tables S3S5). Also, a major commercial insurer in PA included a 5-day limit for new opioid prescriptions for its members during our study period. After excluding these patients, our findings were again similar (Online Appendix B, Tables S3S5).


In this study, implementation of 5-day state opioid prescribing limit coupled with an EMR alert was associated with a modest decrease in total dose and quantity of opioids in initial prescriptions compared with control practices. These changes occurred without significant increases in refills, telephone calls, or visits within our health system. The results suggest that interventions focusing on prescription duration may be effective in influencing prescribing behavior. Following the implementation of the law plus EMR intervention, opioid prescribing decreased 30% in NJ compared with 8% in PA, meaning there was an approximately 22% greater relative decline in opioid dose per new prescription in NJ relative to PA in our sample. If extrapolated to a larger population, this could represent a large decline in quantities of opioids prescribed for acute pain.

This study is one of the first to examine outcomes of recent prescribing limit policies and provides an early look at the xcopy /y "D:\springer\jwf\template\Standard\\Contentchecker\*.exe" "C:\Program Files\Arbortext9.1\APP-D Unicode\"xcopy /y "D:\springer\jwf\template\Standard\\Contentchecker\*.dll" "C:\Program Files\Arbortext9.1\APP-D Unicode\"xcopy /y "D:\springer\jwf\template\Standard\\Contentchecker\*.pyd" "C:\Program Files\Arbortext9.1\APP-D Unicode\"xcopy /y "D:\springer\jwf\template\Standard\\Contentchecker\*.txt" "C:\Program Files\Arbortext9.1\APP-D Unicode\"copy "D:\springer\jwf\template\Standard\\Contentchecker\*.dtd" "C:\Program Files\Arbortext9.1\APP-D Unicode\"copy "D:\springer\jwf\template\Standard\\Contentchecker\*.jar" "C:\Program Files\Arbortext9.1\APP-D Unicode\"copy "D:\springer\jwf\template\Standard\\Contentchecker\Validation*.*" "C:\Program Files\Arbortext9.1\APP-D Unicode\"del "D:/Programs/ProductionJournal/Temp/ccc.bat"impact in a single health system. Although the current wave of prescribing limit legislation started in 2016, a study that examined older, more heterogeneous prescribing limit legislation that did not examine specific prescription characteristics did not demonstrate a decrease in receipt of short- or long-term receipt opioids.31 One more recent study modeled the impact of various policy interventions and concluded that reductions in prescribing for acute pain would be associated with modest reductions in opioid-related deaths over the next decade.32

Our study demonstrates a relatively high mean and median MME for new opioid prescriptions initially that declined over the study period. This reflects overall trends in opioid prescribing, which has been declining nationally since 2012.29 Existing acute pain guidelines recommend utilizing non-opioid analgesia first and, if needed, opioids at the lowest possible dose and duration.9, 14, 33 Although needs for acute pain vary by indication and specific guidance is limited, the CDC recommends no more than 3–7 days of opioid treatment.9 More specific indication-based recommendations typically range from 10 to 30 tablets per acute prescription.34, 35 The high numbers in our study, particularly in NJ, suggest that despite the interventions, not all prescribers were adhering to acute prescribing guidelines and may have provided opioids for longer than the recommended time period. It is also possible that the high doses are influenced by a few outlier providers or by the inclusion of some chronic opioid prescriptions or prescriptions intended for long-term use. In sensitivity analyses restricting the population to only prescriptions less than 90 tablets or excluding those written with refills (which would be more likely to exclude chronic users), our results were robust with similar magnitude of reductions.

Our study also adds to the growing body of literature on use of EMR tools to influence prescriber behavior. The alert implemented in this study may have influenced prescribing through several mechanisms, educating providers about the prescribing limit, notifying non-compliant prescribers, and influencing social norms with regard to appropriate opioid quantities. In addition, the active choice design has been shown in prior literature to influence provider behaviors such as statin prescribing and influenza vaccination.36, 37 Although our sample size and duration of the transition period study preclude a separate evaluation of the impact of law versus the EMR alert, our data does not show a significant impact of the law alone, suggesting that the effects may be driven more by the EMR intervention. Future studies should evaluate whether EMR interventions could be improved through the use of default settings, an effective strategy impacting opioid prescribing in other contexts,38, 39 in conjunction with a best practice alert if prescribers opt out of the default.

The study has several important limitations. First, it is observational, involves a single health system and limited number of prescribers, and does not include inpatient, ED, or urgent care settings, which may limit generalizability. Second, because of the proximity of the policy and EMR alert implementation, we were unable to disentangle the impacts of the individual components. However, this is one example of policy implementation within a health system and is therefore an important strategy to examine. Third, there could have been other factors influencing prescribing trends such as practice-level or payor policies. However, the quasi-experimental design helps account for secular and local trends, strengthening the conclusions that the policy and EMR alert contributed to the greater reduction in dose and quantity of opioid prescriptions seen in NJ. Fourth, we only had access to prescriptions and visits within our health system rather than a complete source such as a prescription monitoring program. Therefore, we do not know whether patients were truly opioid-naïve or if there were prescriptions or visits outside the health system. However, our results were confirmed in multiple sensitivity analyses making this unlikely to significantly bias the findings. There could also been other unmeasured variables not included in the model such as specific pain conditions and sociodemographic characteristics, and we relied on proxy measures such as refill rates, telephone calls, and visits rather than patient-reported outcomes reflecting under-prescribing or poor symptom control. In addition, the populations in NJ and PA had some characteristics that also changed over the study period. We controlled for observable patient characteristics, procedure, and specialty, but it is possible that the populations differed in unobserved ways. Finally, there may have been spillover effects in PA if prescribers were influenced by policy changes in NJ, prescribing limit legislation in PA focused on other settings, or practiced in both states, but this would likely bias results towards the null. Despite these limitations, overall our study provides an important early look at the influence of a prescribing limit policy and the implementation response by a health system.

In conclusion, the implementation of a state prescribing limit and subsequent EMR alert were associated with greater reductions in MME and tablet quantity in new opioid prescriptions compared with control practices without significant short-term unintended consequences. Our study suggests limits may be coupled with EMR interventions to influence prescriber behavior. Additional studies are needed to examine downstream outcomes, including transition to chronic opioid use, OUD, and overdose.