Electronic health records (EHR) are widely used sources of real-world data in pharmacoepidemiologic research. As there is no end-to-end guidance for generating medication safety evidence with EHR, this study conducted a systematic review to determine the current and recommended practices in the literature. PubMed, Scopus, and CINAHL were searched for English articles published between 1 January 2010 and 11 June 2020. Selected articles were published in peer-reviewed journals, conducted in the United States, analyzed structured EHR data, and defined drug exposure and adverse drug events (ADEs). The study evaluated methodological quality with a modified Newcastle-Ottawa Scale (NOS) score ranging from 0 to 9 points. Data synthesis was performed with thematic analysis. Twenty-six from 3885 articles were selected. The majority were cohort studies (85%). The studies were well designed, with a median NOS score of 9. Drug exposure was defined with dispensing (58%) and prescribing (31%) records. ADEs were defined across five categories: diagnosis codes (77%), validated outcome algorithms (35%), objective measures (35%), treatment procedures (19%), and antidotes (2%). Common covariates were age (89%), gender (85%), comorbidities (81%), and medication-co-medication use (73%).Four studies (15%) empirically defined covariates in a data-driven manner. Twentytwo (85%) analyzed covariates as confounders or effect modifiers in their analyses.Results were analyzed with either intention-to-treat (73%) or as-treated (39%) approaches. Key recommendations include selecting dispensing rather than prescribing records, considering a proxy date of dispensation where applicable, selecting new instead of prevalent drug users, improving adoption of validated outcome algorithms, and not utilizing objective measures as the primary indicator of ADEs.