Skip to main content
Journal of Managed Care & Specialty Pharmacy logoLink to Journal of Managed Care & Specialty Pharmacy
. 2021 Oct;27(10):10.18553/jmcp.2021.27.10.1482. doi: 10.18553/jmcp.2021.27.10.1482

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

Saul Blecker 1,*, Samrachana Adhikari 2, Hanchao Zhang 2, John A Dodson 1, Sunita M Desai 2, Lisa Anzisi 3, Lily Pazand 4, Antoinette M Schoenthaler 1, Devin M Mann 1
PMCID: PMC8759289  NIHMSID: NIHMS1768172  PMID: 34595945

Abstract

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.


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 EHR-pharmacy 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-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 EHR-pharmacy 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 EHR-pharmacy 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 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 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).

FIGURE 1.

FIGURE 1

Flow Diagram of Patient Inclusion and Record of Medication Fill in EHR and Insurance Claims Databases

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 EHR-pharmacy 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 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).

FIGURE 2.

FIGURE 2

Medication Adherence as Measured by PDC Using Linked EHR-Pharmacy Database vs Insurance Claims Databasea

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 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, 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-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-to-date 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, 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 EHR pharmacy 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 HER vendors build platforms for their 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 EHR-pharmacy database may not be as high for uninsured patients—or patients using other insurance providers—compared 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-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 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.

REFERENCES

  • 1.Kini V, Ho PM. Interventions to improve medication adherence: a review. JAMA. 2018;320(23):2461-73. [DOI] [PubMed] [Google Scholar]
  • 2.Kumamaru H, Lee MP, Choudhry NK, et al. Using previous medication adherence to predict future adherence. J Manag Care Spec Pharm. 2018;24(11):1146-55. doi: 10.18553/jmcp.2018.24.11.1146 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 3.Go AS, Fan D, Sung SH, et al. Contemporary rates and correlates of statin use and adherence in nondiabetic adults with cardiovascular risk factors: The KP CHAMP study. Am Heart J. 2017;194:25-38. [DOI] [PubMed] [Google Scholar]
  • 4.Hansen RA, Voils CI, Farley JF, et al. Prescriber continuity and medication adherence for complex patients. Ann Pharmacother. 2015;49(3):293-302. [DOI] [PubMed] [Google Scholar]
  • 5.Comer D, Couto J, Aguiar R, Wu P, Elliott D. Using aggregated pharmacy claims to identify primary nonadherence. Am J Manag Care. 2015;21(12):e655-60. [PubMed] [Google Scholar]
  • 6.Mann DM, Chen J, Chunara R, Testa PA, Nov O.. COVID-19 transforms health care through telemedicine: evidence from the field. J Am Med Inform Assoc. 2020;27(7):1132-35. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 7.Surescripts. Why it matters: prescribers can now access accurate medication history data for virtually every American. May 31, 2019. Accessed April 15, 2021. https://surescripts.com/news-center/intelligence-in-action/interoperability/why-it-matters-prescribers-can-now-access-accurate-medication-history-data-for-virtually-every-american/.
  • 8.Choudhry NK, Shrank WH, Levin RL, et al. Measuring concurrent adherence to multiple related medications. Am J Manag Care. 2009;15(7):457-64. [PMC free article] [PubMed] [Google Scholar]
  • 9.Martin BC, Wiley-Exley EK, Richards S, Domino ME, Carey TS, Sleath BL. Contrasting measures of adherence with simple drug use, medication switching, and therapeutic duplication. Ann Pharmacother. 2009;43(1):36-44. [DOI] [PubMed] [Google Scholar]
  • 10.Chang TE, Ritchey MD, Park S, et al. National rates of nonadherence to antihypertensive medications among insured adults with hypertension, 2015. Hypertension. 2019;74(6):1324-32. [DOI] [PubMed] [Google Scholar]
  • 11.Rashid N, Vassilakis M, Lin KJ, Kristy R, Ng DB. Primary nonadherence to overactive bladder medications in an integrated managed care health care system. J Manag Care Spec Pharm. 2017;23(4): 484-93. doi: 10.18553/jmcp.2017.23.4.484 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 12.Curtis LH, Mi X, Qualls LG, et al. Transitional adherence and persistence in the use of aldosterone antagonist therapy in patients with heart failure. Am Heart J. 2013;165(6):979-86.e1. [DOI] [PubMed] [Google Scholar]
  • 13.Lauffenburger JC, Franklin JM, Krumme AA, et al. Predicting adherence to chronic disease medications in patients with long-term initial medication fills using indicators of clinical events and health behaviors. J Manag Care Spec Pharm. 2018;24(5):469-77. doi: 10.18553/jmcp.2018.24.5.469 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14.Nieuwlaat R, Wilczynski N, Navarro T, et al. Interventions for enhancing medication adherence. Cochrane Database Syst Rev. 2014(11):CD000011. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 15.Kronish IM, Ye S. Adherence to cardiovascular medications: lessons learned and future directions. Prog Cardiovasc Dis. 2013;55(6):590-600. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 16.Lam WY, Fresco P. Medication adherence measures: an overview. Biomed Res Int. 2015;2015:217047. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 17.Toscos T, Drouin M, Pater JA, et al. Medication adherence for atrial fibrillation patients: triangulating measures from a smart pill bottle, e-prescribing software, and patient communication through the electronic health record. JAMIA Open. 2020;3(2):233-42. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 18.Kripalani S, Hart K, Schaninger C, Bracken S, Lindsell C, Boyington DR. Use of a tablet computer application to engage patients in updating their medication list. Am J Health Syst Pharm. 2019;76(5):293-300. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 19.Sullivan T. Epic, Cerner, CVS align with Surescripts to make personalized prescription benefit, pricing info available in EHRs. Healthcare IT News. November 7, 2017. Accessed April 15, 2021. https://www.healthcareitnews.com/news/epic-cerner-cvs-align-surescripts-make-personalized-prescription-benefit-pricing-info-available.
  • 20.Choo PW, Rand CS, Inui TS, et al. Validation of patient reports, automated pharmacy records, and pill counts with electronic monitoring of adherence to antihypertensive therapy. Med Care. 1999;37(9):846-57. [DOI] [PubMed] [Google Scholar]
  • 21.Mehta SJ, Asch DA, Troxel AB, et al. Comparison of pharmacy claims and electronic pill bottles for measurement of medication adherence among myocardial infarction patients. Med Care. 2019;57(2):e9-e14. [DOI] [PubMed] [Google Scholar]
  • 22.Pladevall M, Williams LK, Potts LA, Divine G, Xi H, Lafata JE. Clinical outcomes and adherence to medications measured by claims data in patients with diabetes. Diabetes Care. 2004;27(12):2800-05. [DOI] [PMC free article] [PubMed] [Google Scholar]

Articles from Journal of Managed Care & Specialty Pharmacy are provided here courtesy of Academy of Managed Care Pharmacy

RESOURCES