This study establishes a new EMR standard definition of diabetes (individuals with ≥2 abnormal plasma glucose tests, or diabetes on the problem list, or insulin prescription, or ≥2 oral anti-diabetic agents, or HbA1c ≥6.5%) and provides an alternative definition, depending on the completeness of EMR diagnoses. Here, INS is linked to diabetes mellitus.