using ehr to diagnose patients