For heart failure, hypertension, and diabetes, diagnosis is classified in two ways: (i) use of one or more of the relevant codes identified in the EHR and (ii) a ‘secure’ diagnosis based on the code identified in addition to an associated medication in the last 12 months (loop diuretic therapy, antihypertensive medications, or oral antidiabetic/insulin, respectively). Here, INS is linked to heart failure.