Validation of EHR medication fill data obtained through electronic linkage with pharmacies

BACKGROUND: Recent linkages between electronic health records (EHRs) and pharmacy data hold opportunity for up-to-date assessment of medication adherence at the point of care. OBJECTIVE: To validate linked EHR-pharmacy data, which can be used for point-of-care interventions for concordance with insurance claims data for patients in a large health care delivery system. METHODS: We performed a retrospective cohort study of adult patients with an active antihypertensive medication order and seen as outpatients between August 25, 2019, and August 31, 2019. Pharmacy fill information was obtained from the EHR via linkages with Surescripts pharmacy and pharmacy benefit manager data, as well as from insurance claims available at our institution. We matched antihypertensive medication fills observed in the linked EHR-pharmacy database with available fills in the insurance claims database and calculated the percentage of medication fills that were available in each database. We estimated medication adherence using proportion of days covered in the linked EHR-pharmacy database and in the insurance claims database. RESULTS: Of 26,679 patients with hypertension, 23,348 (87.5%) had at least 1 antihypertensive medication fill recorded in the linked EHR-pharmacy database. Of 1,501 patients matched with the insurance database and with a documented medication fill, a fill was present for 1,484 (98.9%) and 1,259 (83.9%) patients in the linked EHR-pharmacy and insurance databases, respectively. Of 12,109 medication fills recorded in the insurance data, we found an overlap of 11,060 (91.3%) fills with the linked EHR-pharmacy database. The linked EHR-pharmacy database also contained 18,232 of 19,281 (94.6%) medication fills present in either database. Measured medication adherence was higher for patients when based on linked EHR-pharmacy data compared with insurance claims data (42% vs 30%, P < 0.001). CONCLUSIONS: Linked EHR-pharmacy data captured medication fills for the vast majority of patients and resulted in higher estimates of adherence than insurance claims. Our results suggest that pharmacy fill data available in the EHR have sufficient reliability to be used for point-of-care assessment of medication adherence.


OBJECTIVE:
To validate linked EHR-pharmacy data, which can be used for point-of-care interventions for concordance with insurance claims data for patients in a large health care delivery system.

METHODS:
We performed a retrospective cohort study of adult patients with an active antihypertensive medication order and seen as outpatients between August 25, 2019, and August 31, 2019. Pharmacy fill information was obtained from the EHR via linkages with Surescripts pharmacy and pharmacy benefit manager data, as well as from insurance claims available at our institution. We matched antihypertensive medication fills observed in the linked EHR-pharmacy database with available fills in the insurance claims database and calculated the percentage of medication fills that were available in each database. We estimated medication adherence using proportion of days covered in the linked EHR-pharmacy database and in the insurance claims database.

RESULTS:
Of 26,679 patients with hypertension, 23,348 (87.5%) had at least 1 antihypertensive medication fill recorded in the linked EHR-pharmacy database. Of 1,501 patients matched with the insurance database and with a documented medication fill, a fill was present for 1,484 (98.9%) and 1,259 (83.9%) patients in the linked EHR-pharmacy and insurance databases, respectively. Of 12,109 medication fills recorded in the insurance data, we found an What is already known about this subject • Pharmacy claims data are commonly used to assess medication adherence, but in general, these data are not available for clinic-based point-ofcare interventions.
• Data linkages between electronic health records (EHRs) and pharmacies offer the opportunity to assess medication adherence at the point of care, although the validity of EHRbased medication fill data has not been assessed in health systems with patients who use varied pharmacies and insurers.

What this study adds
• This study demonstrated that a linked EHR-pharmacy database contains up-to-date pharmacy fill data that are more complete than insurance claims data.
• In a cohort from a large health care delivery system, linked EHR-pharmacy data contained pharmacy data for 87.5% of patients with hypertension and over 90% of medication fills recorded in insurance claims.
• Medication adherence was significantly higher when measured using EHRpharmacy data compared with using insurance claims data (42% vs 30%).
Pharmacy claims data are commonly used to measure adherence and currently are considered the best approach for population-based adherence measurement. 1 However, applications of pharmacy claims data to clinical care have been limited to populations for whom these data are readily available, such as beneficiaries of given insurance providers or patients within a closed health system that includes a pharmacy. [2][3][4] Recent uptake of electronic prescribing has led to linkages between electronic health records (EHRs) and pharmacy data that are updated in real time when a medication is filled. This data linkage holds opportunity as a component of point-of-care interventions to address gaps in medication adherence. 5 However, for such interventions to be successful, providers must trust the reliability of the underlying data. The purpose of our study was to validate linked EHRpharmacy data with insurance claims data for patients with hypertension in a large health care delivery system. We also compared medication adherence for these patients as measured by the linked EHR-pharmacy database and by the insurance claims database.

Methods
We performed a retrospective cohort study of patients seen in ambulatory clinics at NYU Langone Health in the week of August 25, 2019-August 31, 2019. NYU Langone Health is an academic health system that uses a single EHR system (Epic, Epic Systems) and includes over 500 ambulatory locations that are primarily located in the greater New York City area. 6 The primary data source was the EHR system at NYU Langone Health, which also contains linked EHR-pharmacy medication fill data available via Surescripts (Surescripts, LLC). Surescripts supports electronic prescriptions from EHRs to pharmacies and also links EHRs with medication fill information from pharmacies and pharmacy benefit managers. 7 Our secondary data source was an insurance claims database for patients that is attributable to our health system by 5 insurance companies. These data are available in our health system through agreements with these private insurance carriers and are used locally for population health management.
For this study, we included patients who were aged at least 18 years at the time of clinic visits and had an active order for any antihypertensive medication. We then limited our cohort to patients who were in the insurance claims database, as defined by patients who had insurance enrollment and had at least 1 insurance claim for a medication fill, regardless of medication type. For this cohort, we identified all pharmacy fill information available in the linked EHRpharmacy database via Surescripts for antihypertensive medications filled from January 1, 2018, through the time of the data pull on October 1, 2019.
Since our medication fills were retrospectively analyzed, we primarily focused on medication refills rather than new prescriptions; this approach was done to mimic adherence measurement that would occur at the time of the clinical visit. We also obtained medication fill data from insurance claims for these patients during the same time period. In our health system, the insurance claims database is updated monthly for such patients; we queried our insurance database on October 14, 2019.
We matched medication fill information between the linked EHR-pharmacy data and insurance claims data based on an exact match of Medical Record Number (MRN), National Drug Code (NDC) number, and medication fill date. We calculated the percentage of patients in the cohort who had any claims in each of these databases. We also calculated the percentage of all claims that were available in the linked EHR-pharmacy database, the insurance claims database, and matched in both databases.
Since we observed insurance claim fills to be available only through March 31, 2019, at the time of our data pull, we limited all medication fills to the period before this date for our primary analysis. The lag in available insurance claims was the result of a combination of an average of 2-3 months delay in receipt of claims from the 5 insurance payers plus another 3 months for the data to be normalized across payers for our institutional database.
We then calculated medication adherence for all active antihypertensive therapies for patients in our cohort using the linked EHR-pharmacy database and the insurance claims database. Adherence was based on proportion of days covered (PDC), which is calculated as the number of days covered by medication fills in a given time period overlap of 11,060 (91.3%) fills with the linked EHR-pharmacy database. The linked EHR-pharmacy database also contained 18,232 of 19,281 (94.6%) medication fills present in either database. Measured medication adherence was higher for patients when based on linked EHR-pharmacy data compared with insurance claims data (42% vs 30%, P < 0.001).
CONCLUSIONS: Linked EHR-pharmacy data captured medication fills for the vast majority of patients and resulted in higher estimates of adherence than insurance claims. Our results suggest that pharmacy fill data available in the EHR have sufficient reliability to be used for point-of-care assessment of medication adherence.
PDC from February 13, 2019, to August 15, 2019, for patients with an initial order before February 15, 2019, to ensure that complete fill information was available for the full 6-month period. We then assessed adherence in the linked EHR-pharmacy database and the insurance database and compared them using paired Wilcoxon and chi-square tests, as appropriate.
This study was approved by the NYU School of Medicine Institutional Review Board. Matching analyses were performed using Stata, version 13 (StataCorp), and PDC analyses were performed using R statistical software (R Foundation for Statistical Computing).

Results
In a 1-week period (August 25, 2019-August 31, 2019), 26,679 adult outpatients with active orders for antihypertensive medications were seen in our health system. Of these patients, who were not restricted to a given insurance, 23,348 (87.5%) had at least 1 antihypertensive medication fill recorded in the linked EHR-pharmacy database. These fills reflected the up-to-date medication fill information from January 1, 2018, through the time of the data pull on October 1, 2019, that could be used for point-of-care interventions for all patients, regardless of insurance status or payer.
We successfully matched 1,645 of the 23,348 patients seen in our health system with the insurance claims database (Figure 1). Of these matched patients, 1,501 had at least 1 antihypertensive medication fill recorded in either the linked EHR-pharmacy database or the insurance claims database before March 31, 2019. Among matched patients with any antihypertensive medication fill, 98.9% patients had a fill recorded in the EHR database, and 83.9% had a fill recorded in the insurance database (Figure 1).
For the matched patients, there were 19,281 antihypertensive medication fills observed in either the linked EHR-pharmacy database or the insurance claims database. Of these medication fills, 94.6% were in the linked EHRpharmacy database, and 62.8% were in the insurance claims database. Of 12,109 fills recorded in the insurance claims database, we found an overlap of 11,060 (91.3%) with the linked EHR-pharmacy database.
Among patients with antihypertensive medication orders and who were in the insurance claims database, 1,049 had at least 1 antihypertensive medication that was initially ordered before September 1, 2018. During the period from September 1, 2018, to February 28, 2019, the mean PDC was 42% when using the linked EHR-pharmacy data and 30% when using the insurance claims data for divided by the number of days in that time period. 8,9 For this study, we used a lookback period of 6 months, from February 28, 2019, to guarantee complete information from the insurance claims database. To ensure that we had 6 months of medication fill information, we limited our cohort to patients who had an initial order for the medication before September 1, 2019.
For patients with multiple medications, we took the average PDC for all medications. 8 We measured PDC as a continuous variable and as a binary variable, in which a patient was considered adherent to therapy when the PDC was greater than or equal to 80%. 8,9 We estimated adherence using the linked EHR-pharmacy database and the insurance claims database. We then compared adherence rates estimated by each database using a paired Wilcoxon test for continuous PDC and a chi-square test for category of PDC greater than or equal to 80%.
We also performed a secondary analysis to reflect calculated PDC that would be available at the point of care during the time of the clinic visit. To do this, we calculated we also found that antihypertensive medication adherence was higher, and presumably more accurate, when measured using linked EHR-pharmacy data compared with when measured with insurance claims data. The improved capture of medication fill information in the linked EHR-pharmacy database points to some limitations in insurance claims data that have limited its utility for real-time clinical interventions, despite its frequent use in measuring adherence retrospectively. 4,[10][11][12][13][14] First and foremost, insurance claims data are only available for patients covered under a given insurer. In the case of our study, our available data from 5 large insurers included data for only about 6% of the population we examined; conversely, the linked EHR-pharmacy database had fill information for close to 90% of our cohort. Second, there is typically a lag in obtaining insurance claims data in most clinical settings, making them less useful in understanding current adherence measurement. In our case, we found a delay of 6 months in a clinical database that is used for population health management at our institution. Conversely, the linked EHR-pharmacy database had up-todate fill information compared with available insurance claims, making the linked database more suitable for point-of-care interventions. 15 Even when we accounted for these limitations in the insurance claims database by examining a cohort of insured patients from an earlier time period, the linked EHR-pharmacy database had a higher rate of medication fill data, which also equated to a higher measured PDC in the linked EHR-pharmacy database compared with the insurance database. This finding may be because the linked EHR-pharmacy data can detect refills if fully paid by the patient (eg, EHR-pharmacy data compared with insurance data (30% vs 1%, P < 0.001) during this period.

Discussion
We found that medication fill data available in the EHR through electronic linkage with pharmacies had data on medication fills for nearly 90% of outpatients on antihypertensive therapy. Furthermore, these data appear to have high reliability: of medication fills available in an insurance claims database (a commonly used source for such data), over 90% were found to have an exact match in the linked EHR-pharmacy database.
In addition, we found the linked EHR-pharmacy database to have substantially more medication fills compared with insurance claims data, even when we limited our cohort to account for delays in delivery of insurance claims data. As a result, these patients (P < 0.001 for difference between groups; primary analysis in Figure 2). The percentage of these patients considered adherent (ie, those with a PDC ≥ 80%) was 26%, using the linked EHR-pharmacy database vs 17% using the insurance claims database (P < 0.001).
We then assessed PDC that would be calculated at the point of care during a clinic visit, using all medication fills through August 15, 2019. There were 1,400 patients with an initial medication order at least 6 months before this time period. During the period from February 15, 2019, to August 15, 2019, PDC levels were significantly higher for these patients when based on linked EHR-pharmacy data compared with insurance claims data (50% vs 17%, P < 0.001; secondary analysis in Figure 2). Rates of patients considered adherent were also higher when estimated using linked injectables that are administered through different routes. Finally, we could not determine if any patients had secondary insurance coverage for medications, which could have contributed to the lower number of medication fills observed in the insurance claims database.

Conclusions
Medication fill data available in the EHR were available for the vast majority of patients on antihypertensive therapy. These linked pharmacy-EHR data captured over 90% of medication fills found in insurance claims. Medication adherence measured using linked pharmacy-EHR data was higher than when measured using an insurance claims database. These results suggest that pharmacy fill data available in the EHR have sufficient reliability to be used for point-of-care assessment of medication adherence.

DISCLOSURES
This study was supported by grant R01HL155149 from the National Heart, Lung, and Blood Institute. Allen Thorpe provided funding for the NYU Langone Health Learning Health System Program, which helped fund this project. The authors have nothing to disclose. implementation in clinical decision support. 7,19 LIMITATIONS This study should be considered in the context of its limitations. First, we only validated the linked EHR-pharmacy fill data among a subset of patients who were beneficiaries of a limited number of insurance plans. Although Surescripts data primarily rely on pharmacy fill data, which should be comparable for most patients, the database is enhanced with records from claims-related fills from pharmacy benefit managers. Thus, capture of medication in the linked EHRpharmacy database may not be as high for uninsured patients-or patients using other insurance providerscompared with our study sample.
Second, the study was limited in generalizability, since we only assessed data for patients in 1 health system and used linked pharmacy data obtained through the Surescripts vendor.
Third, we had no true gold standard for medication fills. As a result, the EHR-pharmacy database and the insurance claims database were subject to misclassification and may not have reflected actual medication-taking behavior. Nonetheless, medication fills have been associated with more specific definitions of medication-taking behaviors, including electronic drug monitoring and clinical biomarkers. 1,[20][21][22] Fourth, the insurance claims data were delayed by 6 months, making them an imperfect comparator with the linked EHR-pharmacy data, which did not have significant lag in availability.
Fifth, these results were specific to antihypertensive medications and may not be generalizable to medications for other conditions, medications with different dosing schedules, or medications such as uninsured, out-of-pocket payments) and thus not billed to insurers. Also, insurance claims data do not capture medication fills for patients who lack continuous insurance coverage or switch insurance carriers. 15,16 Nonetheless, about 9% of the insurance claims were not present in the linked EHR-pharmacy database. This likely reflected a limitation in the linked EHR-pharmacy database to capture prescriptions that were filled at a pharmacy and used a pharmacy benefit manager that was not linked to the Surescripts database. Alternatively, these differences in claims may be related to discrepancies between the insurance claims database and the linked EHRpharmacy database in patient name spellings, current address, or other demographic details.
Our findings suggest that linked EHR-pharmacy data have good reliability for evaluation of medication fills and measuring adherence. We found that 87.5% of patients had pharmacy data available, which was comparable to findings in another study where 88% of patients had pharmacy fill information in a Surescripts database that was not linked to the EHR. 17 Furthermore, we demonstrated that adherence measurement was more complete with linked EHR-pharmacy data than with insurance claims.
These findings suggest that clinicians can feel comfortable in using linked EHR-pharmacy data for measuring adherence and for use in interventions such as EHR-based alerts to initiate counseling related to antihypertensive medication adherence. To date, similar data have been used for adherence measurement in a small number of studies. 3,4,17,18 Clinical application of these datasets continue to expand with increased uptake of EHR-pharmacy linkages and as EHR vendors build platforms for their