Pharmacy dispensing of electronically discontinued medications. 
Most physician offices do not transmit orders for medication discontinuation to the pharmacy, creating the potential for errors in dispensing of previously prescribed medications.  Electronic health records offer the potential to assess this patient safety concern.  To assess the frequency of and potential patient harm associated with pharmacy dispensing of discontinued medications in the ambulatory setting.  Retrospective cohort study.  Multispecialty group practice in eastern Massachusetts using an electronic health record.  30 406 adult patients with an electronic discontinuation order for antihypertensive, antiplatelet, anticoagulant, oral hypoglycemic, and statin medications between November 2008 and October 2009.  Dispensing of discontinued medications within 12 months and associated potential patient harm.  Among 83 902 targeted medications that were electronically discontinued, 1218 (1.5% [95% CI, 1.4% to 1.5%]) were subsequently dispensed by the pharmacy a mean of 1.0 (SD, 0.3) time during the 12-month follow-up.  Among the top 10 most frequently electronically discontinued medications, the rate of subsequent dispensing by a pharmacy ranged from 0.9% for metformin to 2.5% for metoprolol.  Manual chart review of 416 medication-dispensing events that were predefined as high risk according to an automated algorithm identified potential harm in 50 (12%) cases, including clinical reactions (n = 18), laboratory abnormalities (n = 17), duplicated medication classes dispensed (n = 8), and potential allergic reactions (n = 7).  Information on pharmacy dispensing was available for only 52% of medication orders.  The dispensing of discontinued medications represents an important ambulatory patient safety concern.  Electronic health records should be used to facilitate better communication between providers and pharmacies and improve medication safety.  National Institutes of Health.