NU_Type2Diabetes_pseudocode.doc
Pseudocode to select T2DM (type 2 diabetes mellitus) cases & controls:
Data to retrieve from the EMR by patient (specific codes and medications listed in the phenotype definition document):
- Number of dates with T2DM ICD-9 codes in patient’s encounters, problem list, and medical history, by these diagnostic sources
- Number of dates with T1DM ICD-9 codes in patient’s encounters, problem list, and medical history, by these diagnostic sources
- Insulin, insulin supply, & Symlin prescription dates (at least the last date)
- T2DM medications prescription dates (at least the last date)
- Fasting blood glucose lab values (at least the maximum)
- Random blood glucose lab values (at least the maximum)
- HBA1c lab values (at least the maximum)
For selecting controls also need this data:
- diabetes family history
- Related diabetes conditions’ ICD-9 codes
If you have any questions about this pseudocode, please contact:
Jennifer S. Allen
NUgene Informatics Lead
312-695-0712
Page 1 of 4
NU_Type2Diabetes_pseudocode.doc
Flowchart for selecting cases:Algorithm for the Identification of Subjectswith Type 2 Diabetes:
Page 1 of 4
NU_Type2Diabetes_pseudocode.doc
From theEMRdata, use the following logic to determine if a patient could be a case:
(Numbering below matches the numbers in the boxes in the above diagram)
IF a patient with at least 2 clinic (face-to-face outpatient clinic) visits:
1)is diagnosed with T2DMin an encounter, problem list, or in the medical history, AND :
- is currently prescribedonly insulin or Symlin or insulin supplies (T1DM meds)
AND has been prescribed T2DM medication in the past
OR:
- is currently prescribed only insulin or Symlin or insulin supplies (T1DM meds)
AND does not have any T1DM diagnoses
AND has been diagnosed on >= 2 dates with T2DM in encounter(s) or problem list
OR:
- is prescribed T2DM medication;
and ifalso prescribed insulin or Symlin, prescribed at same time or before T2DM medicationprescribed
OR:
- NOTprescribed any (T1 or T2) DM medication
AND has an abnormal lab*
OR:
2)is NOT diagnosed with T2DM NOR T1DM
- AND is prescribed T2DM medication
AND has an abnormal lab*
THEN the patient has T2DM.
* abnormal lab:= random (not a glucose tolerance test nor part of a pregnancy screen) blood glucose level >200 mg/dL OR fasting blood glucose level > 125 mg/dL OR (glyco)hemoglobin A1c >= 6.5%
Flowchart for selecting controls:
From theEMRdata, use the following logic to determine if a patient could be a control:
IF a patient hasat least 2 clinic (face-to-face outpatient clinic) visits**:
AND is NOTdiagnosed with diabetes or related conditions
AND has NOT been prescribed insulin or Symlin or T2DM medicationsor any diabetic supplies
AND has a glucose lab** AND it is < 110 mg/dL
AND IFthe patient has an HBA1c lab, it is < 6.0%
AND IFthe patient has family history data, there is no history of diabetes
THEN the patient can bea T2DM CONTROL.
**These criteria help to ensure that we are only using patients as controls if they have enough data in their EMR in order for us to safely assume they meet the control criteria.
Page 1 of 4