In the decades prior to the introduction of electronic health records (EHRs), the best source of electronic information to support clinical research was claims data. The use of claims data in research has been criticised for capturing only demographics, diagnoses and procedures recorded for billing purposes that may not fully reflect the patient's condition. Many important details of the patient's clinical status are not recorded. EHRs can overcome many limitations of claims data in research, by capturing a more complete picture of the observations and actions of a clinician recorded when patients are seen. EHRs can provide important details about vital signs, diagnostic test results, social and family history, prescriptions and physical examination findings. As a result, EHRs present a new opportunity to use data collected through the routine operation of a clinical practice to generate and test hypotheses about the relationships among patients, diseases, practice styles, therapeutic modalities and clinical outcomes. This article describes the clinical research information infrastructure at four institutions: the University of Pennsylvania, Regenstrief Institute/Indiana University, Partners Healthcare System and the University of Virginia. We present models for applying EHR data successfully within the clinical research enterprise.