Diabetes phenotype
Name phenotype_diabetes
Chapter Endocrine, nutritional, metabolic/Diabetes
Definition
Classification of diabetes as type 1, type 2, unclassified diabetes or no diabetes on a particular index date per patient. The algorithm uses only diagnosis information (not medication) recorded on or before the index date; this avoids the problem of immortal time bias (patients who survive are more likely to have their diabetes classified as type 1 or type 2; those that die are more likely to remain unclassified). The age at diagnosis is frequently unclear so it is not used in this algorithm. The algorithm combines information from specific diagnostic codes for type 1 and type 2 diabetes with less specific codes for 'insulin dependent diabetes' (IDDM) and 'non-insulin dependent diabetes' (NIDDM).

This algorithm is designed primarily to detect patients with type 2 diabetes who can be on any medication, so medication is not particularly helpful for identifying these patients. Further refinements and validation would be required to detect a patients with type 1 diabetes with greater recall.
Data sources GPRD, HES
Dictionaries Read, ICD 10
Repeated No
Agreed 31/10/2013 (Revision 1)
Implementation
IF there is at least one record for code for type 2 diabetes (diabdiag_gprd = 4)
    and no record for type 1 diabetes (no record with diabdiag_gprd = 3)
    then classify the patient as type 2 diabetes

ELSE if there is at least one record for code for type I diabetes (diabdiag_gprd = 3)
    and no record for type 2 diabetes (no record with diabdiag_gprd = 4)
    then classify the patient as type 1 diabetes

ELSE if there is at least one record of type 1 diabetes (diabdiag_gprd = 3)
    and type 2 diabetes (diabdiag_gprd = 4)
    then classify as diabetes of uncertain type

ELSE if there are no diabdiag_gprd records for this patient:

    If there is at least one record for NIDDM (dm_gprd = 4 or dm_hes = 4)
        and no record for IDDM (no record with dm_gprd = 3 or dm_hes = 3)
        then classify the patient as type 2 diabetes

    ELSE there is at least one record for IDDM (dm_gprd = 3 or dm_hes = 3)
        and no record for NIDDM (no record with dm_gprd = 4 or dm_hes = 4)
        then classify the patient as type 1 diabetes

    ELSE if there is at least one record of diabetes (dm_gprd or dm_hes category 3, 4 or 6)
        then classify as diabetes of uncertain type

ELSE classify as no diabetes
Phenotype components
Variable TitleCategories
diabdiag_gprd GP diagnosis of diabetes
dm_gprd Diabetes diagnosis (primary care)
dm_hes Diabetes diagnosis (secondary care)
Codelist version
Codelist authors
Creation date
Warning! Unless explicitly noted otherwise, three-digit ICD10/OPCS4 codes also include all codes below them.
Category (code) Read code Read term CPRD Medcode
()
comments powered by Disqus