The use of EHR in research has increased in recent years and many researchers have been pushing for more use of EHR and less use of claims-based research. Assessing the differences and similarities between EHR and claims-based data is important step in improving research quality. From a national EHR and claims integrated database (Optum EHR), we selected patients who had a THA or TKA between 2011 and 2018. From this cohort we first assessed if the patient had a surgery in both EHR and claims or just one of the two. Among those who had a matching surgery we assessed if the surgery matched on exact procedure date, admission date, discharge date, elective surgery status, discharge status (community discharge or not), and 30-day readmission. There were 30,103 surgeries matching in EHR and insurance claims, resulting in a match rate of 89.9% among those with a surgery in EHR and 84.9% among those who had a surgery in claims. Among the matches, discharge location matched in 93.1% and 30-day readmission matched in 97.6%. Overall, there was a high degree of agreement between EHR and claims across three areas of assessment: surgery type/date, discharge setting, and 30-day readmission.