EHRs provide a rich source of patient data that can be used for epidemiological research. They allow for the integration of clinical, demographic, and behavioral data, which can be analyzed to identify trends, risk factors, and outcomes of diseases. EHRs also facilitate real-time surveillance and outbreak detection.