Diabetes Phenotyping Using the Electronic Health Record