Use of the Electronic Health Records to facilitate phenotyping, comorbidity analysis, and genomics