Related Experiment Video
Updated: Jan 25, 2026

TBase - an Integrated Electronic Health Record and Research Database for Kidney Transplant Recipients
Published on: April 13, 2021
Developing a case definition for type 1 diabetes mellitus in a primary care electronic medical record database: an
B Cord Lethebe1, Tyler Williamson2, Stephanie Garies2
1Department of Community Health Sciences (Lethebe, Williamson, Garies, McBrien, Soos, Shaw), Clinical Research Unit (Lethebe), Department of Family Medicine (Garies, McBrien, Leduc, Drummond) and Department of Medicine (Butalia), University of Calgary, Calgary, Alta.; Department of Family Medicine (Drummond), University of Alberta, Edmonton, Alta. bcletheb@ucalgary.ca.
Background:
Identifying cases of disease in primary care electronic medical records (EMRs) is important for surveillance, research, quality improvement and clinical care. We aimed to develop and validate a case definition for type 1 diabetes mellitus using EMRs.
Methods:
For this exploratory study, we used EMR data from the Southern Alberta Primary Care Network within the Canadian Primary Care Sentinel Surveillance Network (CPCSSN), for the period 2008 to 2016. For patients identified as having diabetes mellitus according to the existing CPCSSN case definition, we asked family physicians to confirm the diabetes subtype, to create the reference standard. We used 3 decision-tree classification algorithms and least absolute shrinkage and selection operator logistic regression to identify variables that correctly distinguished between type 1 and type 2 diabetes cases.
Results:
We identified a total of 1309 people with type 1 or type 2 diabetes, 110 of whom were confirmed by their physicians as having type 1 diabetes. Two machine learning algorithms were useful in identifying these cases in the EMRs. The first algorithm used "type 1" text words or age less than 22 years at time of initial diabetes diagnosis; this algorithm had sensitivity 42.7% (95% confidence interval [CI] 33.5%-52.5%), specificity 99.3% (95% CI 98.6%-99.7%), positive predictive value 85.5% (95% CI 72.8%-93.1%) and negative predictive value 94.9% (95% CI 93.5%-96.1%). The second algorithm used a combination of free-text terms, insulin prescriptions and age; it had sensitivity 87.3% (95% CI 79.2%-92.6%), specificity 85.4% (95% CI 83.2%-87.3%), positive predictive value 35.6% (95% CI 29.9%-41.6%) and negative predictive value 98.6% (95% CI 97.7%-99.2%).
Interpretation:
We used machine learning to develop and validate 2 case definitions that achieve different goals in distinguishing between type 1 and type 2 diabetes in CPCSSN data. Further validation and testing with a larger and more diverse sample are recommended.
Related Concept Videos
Diabetes Mellitus: Type 2 and Gestational
Diabetes Mellitus: Overview and Type I Subtype
Type 1 diabetes is an autoimmune disease in which the immune system mistakenly attacks and destroys the insulin-producing beta cells in the pancreas. As a result, the body is unable to produce sufficient insulin, and individuals with...
Types of Records I: Unit and Nurses Records
Unit records can be divided into two main types: administrative records and clinical records.
Administrative records in...
Types of Records II: Educational and Administrative Records
Piaget's Stage 1 of Cognitive Development
Exploration...
Definite Integral

