Skip to main content

Table 2 Baseline characteristics and performance of candidate algorithms among people in the derivation cohort, stratified by diabetes type. Candidate algorithms developed using encounter codes (“code algorithms”) or prescriptions (“prescription algorithms”) are also shown. For each algorithm, values in the Type 1 and 2 columns indicate the number and percentage of individuals satisfying the algorithm (sensitivity). Positive predictive values for classifying type 1 diabetes are shown in the right column. The best 4 algorithms are indicated by the letters in parentheses (A–D; see text for selection criteria)

From: Development and validation of algorithms to classify type 1 and 2 diabetes according to age at diagnosis using electronic health records

 Type 1 (n = 60)Type 2 (n = 10,136)Positive Predictive Value (%)
Demographic Characteristics
 Age at diagnosis (years; mean, standard deviation)22.7 (12.6)55.9 (11.4) 
   < 1816 (26.7)20 (0.2)
  18–3933 (55.0)768 (7.6)
   ≥ 40 years11 (18.3)9348 (92.3)
 Female32 (53.3)4456 (43.9)
Coding Characteristics*
 Number of type 1 codes (median, interquartile range)3.0 (4.0)0.0 (0.0) 
  Total number of type 1principal codes (median, interquartile range)2.0 (2.5)0.0 (0.0)
  Total number of type 1 mixed codes (median, interquartile range)1.0 (2.0)0.0 (0.0)
 Number of type 2 codes (median, interquartile range)0.0 (1.0)1.0 (3.0)
  Total number of type 2 principal codes (median, interquartile range)0.0 (0.0)1.0 (2.0)
  Total number of type 2 mixed codes (median, interquartile range)0.0 (0.0)1.0 (2.0)
Candidate Code Algorithms*
 At least 1 type 1 code50 (83.3)142 (1.4)26.0
  At least 1 type 1 principal code42 (70.0)65 (0.6)39.2
  At least 1 type 1 mixed code38 (63.3)108 (1.1)26.0
 At least 1 type 2 code43 (71.7)92 (0.9)31.8
  At least 1 type 2 principal code29 (48.3)25 (0.2)53.7
  At least 1 type 2 mixed code21 (35.0)66 (0.6)24.1
 Ratio of type 1 to type 2 codes ≥ 0.5 (A)50 (83.3)97 (1.0)34.0
 Ratio of type 1 to type 2 codes ≥ 0.7549 (81.7)81 (0.8)37.7
 Ratio of type 1 to type 2 codes ≥ 149 (81.7)78 (0.8)38.6
 Ratio of type 1 to type 2 codes ≥ 247 (78.3)47 (0.5)50.0
 Ratio of type 1 to type 2 codes ≥ 346 (76.7)38 (0.4)54.8
 Ratio of type 1 to type 2 codes ≥ 4 (B)43 (71.7)32 (0.3)57.3
Candidate Prescription Algorithms
 At least 1 insulin prescription59 (98.3)3408 (33.6)1.7
  within 90 days (C)58 (96.7)615 (6.1)8.6
  within 180 days58 (96.7)715 (7.1)7.5
  within 365 days58 (96.7)844 (8.3)6.4
 At least 1 insulin prescription with no other glucose-lowering medication prescription36 (60.0)80 (0.8)31.0
  within 90 days43 (71.7)362 (3.6)10.6
  within 180 days44 (73.3)483 (4.8)8.4
  within 365 days45 (75.0)653 (6.4)6.4
 At least 1 insulin prescription with no other glucose-lowering medication prescription except metformin50 (83.3)275 (2.7)15.4
  within 90 days53 (88.3)451 (4.4)10.5
  within 180 days54 (90.0)566 (5.6)8.7
  within 365 days54 (90.0)727 (7.2)6.9
 Multiple daily injections47 (78.3)273 (2.7)14.7
  within 90 days7 (11.7)5 (0.0)58.3
  within 180 days8 (13.3)9 (0.1)47.1
  within 365 days12 (20.0)13 (0.1)48.0
 Multiple daily injections with no other glucose-lowering medication prescription (D)32 (53.3)9 (0.1)78.0
  within 90 days7 (11.7)2 (0.0)77.8
  within 180 days8 (13.3)6 (0.1)571
  within 365 days12 (20.0)11 (0.1)52.2
 Multiple daily injections with no other glucose-lowering medication prescription except metformin42 (70.0)26 (0.3)61.8
  within 90 days7 (11.7)2 (0.0)77.8
  within 180 days8 (13.3)6 (0.1)57.1
  within 365 days12 (20.0)11 (0.1)52.2
 At least 1 metformin prescription22 (36.7)8979 (88.6)0.2
 Other glucose-lowering medication prescription excluding insulin and metformin10 (16.7)7673 (75.7)0.2
  1. *In our dataset, encounter codes were classified as “principal” (principal diagnoses from hospital discharge abstracts) or “mixed” (including secondary diagnoses from hospital discharge abstracts and encounter codes from hospital outpatient clinics). Type 1 codes are defined as International Classifications of Diseases Ninth Revision (ICD-9) codes 250.x1 or 250.x3; type 2 codes are defined as ICD-9 codes 250.x0 or 250.x2
  2. We only included long-term insulin prescriptions (duration ≥ 28 days). See Appendix Table 4 for prescriptions algorithms using renal function criteria. All indicated durations are counted from the diagnosis date. If no duration is indicated, all data were utilized (up to 2016)
  3. Multiple daily injections: defined as prescriptions for long-acting and short-acting insulin (both initiated within the same time frame as specified)
  4. See Supplementary Table 4 (Additional File 1) for algorithms using renal function criteria