Development of an Algorithm to Link Electronic Health Record Prescriptions with Pharmacy Dispense Claims

Published In

Journal Of The American Medical Informatics Association: JAMIA

Document Type


Publication Date



Objective: Medication adherence is an important aspect of chronic disease management. Electronic health record (EHR) data are often not linked to dispensing data, limiting clinicians' understanding of which of their patients fill their medications, and how to tailor care appropriately. We aimed to develop an algorithm to link EHR prescribing to claims-based dispensing data and use the results to quantify how often patients with diabetes filled prescribed chronic disease medications.

Materials and Methods: We developed an algorithm linking EHR prescribing data (RxNorm terminology) to claims-based dispensing data (NDC terminology), within sample of adult (19-64) community health center (CHC) patients with diabetes from a network of CHCs across 12 states. We demonstrate an application of the method by calculating dispense rates for a set of commonly prescribed diabetes and cardio-protective medications. To further inform clinical care, we computed adjusted odds ratios of dispense by patient-, encounter-, and clinic-level characteristics.

Results: Seventy-six percent of cardio-protective medication prescriptions and 74% of diabetes medications were linked to a dispensing record. Age, income, ethnicity, insurance, assigned primary care provider, comorbidity, time on EHR, and clinic size were significantly associated with odds of dispensing.

Discussion: EHR prescriptions and pharmacy dispense data can be linked at the record level across different terminologies. Dispensing rates in this low-income population with diabetes were similar to other populations.

Conclusion: Record linkage resulted in the finding that CHC patients with diabetes largely had their chronic disease medications dispensed. Understanding factors associated with dispensing rates highlight barriers and opportunities for optimal disease management.



Persistent Identifier