['Sudden cardiac death (SD) and ventricular arrhythmias (VAs) caused by medications have arisen as an important public health concern in recent years. The validity of diagnostic codes in identifying SD/VA events originating in the ambulatory setting is not well known. This study examined the positive predictive value (PPV) of hospitalization and emergency department encounter diagnoses in identifying SD/VA events originating in the outpatient setting.', 'We selected random samples of hospitalizations and emergency department claims with principal or first-listed discharge diagnosis codes indicative of SD/VA in individuals contributing at least 6 months of baseline time within 1999-2002 Medicaid and Medicare data from five large states. We then obtained and reviewed medical records corresponding to these events to serve as the reference standard.', 'We identified 5239 inpatient and 29 135 emergency department events, randomly selected 100 of each, and obtained 119 medical records, 116 of which were for the requested courses of care. The PPVs for an outpatient-originating SD/VA precipitating hospitalization or emergency department treatment were 85.3% (95% confidence interval [CI] = 77.6-91.2) overall, 79.7% (95%CI = 68.3-88.4) for hospitalization claims, and 93.6% (95%CI = 82.5-98.7) for emergency department claims.'] Does validation of diagnostic codes for outpatient-originating sudden cardiac death and ventricular arrhythmia in Medicaid and Medicare claim data?