Related Experiment Video
Updated: Jan 16, 2026

Improving IV Insulin Administration in a Community Hospital
Published on: June 11, 2012
Developing and Evaluating a Natural Language Processing Algorithm to Detect Insulin Pump and Continuous Glucose
Estelle Everett1,2,3, Ryan A Tiu4, Bing Zhu5
1Division of Endocrinology, Diabetes & Metabolism, Department of Medicine, David Geffen School of Medicine, University of California, Los Angeles, California, USA.
Objective:
We aimed to develop and validate natural language processing (NLP) algorithms to identify insulin pump and continuous glucose monitor (CGM) users using unstructured clinical note data from the electronic health record (EHR).
Methods:
We reviewed a random sample of outpatient clinical notes from endocrinologists to catalog how insulin pump and CGM use was documented. We translated these patterns into regular expressions and used them to build rule-based NLP algorithms, which we iteratively refined. We evaluated the final algorithms in a University of California Los Angeles (UCLA) holdout dataset that included the most recent note from 667 unique patients. We then externally validated the algorithms in a second health system with a different EHR and patient population. Manual chart review served as the gold standard. We assessed performance with measures including sensitivity and specificity. To contextualize algorithm performance, we evaluated the accuracy of billing codes for insulin pump and CGM use within the same UCLA holdout dataset.
Results:
In the UCLA holdout dataset, our insulin pump algorithm achieved a sensitivity of 0.90 and specificity of 0.89. The CGM algorithm achieved a sensitivity of 0.85 and specificity of 0.84. The combined algorithm identifying both insulin pump and CGM use showed a sensitivity of 0.76 and specificity of 0.92. In comparison, billing codes underperformed: International Classification of Diseases/Current Procedural Terminology (CPT) codes identified insulin pump use with a sensitivity of 0.09 and specificity of 1.00, whereas CPT codes identified CGM use with a sensitivity of 0.68 and specificity of 0.86. For combined device use, billing codes had a sensitivity of 0.06 and specificity of 1.00. External validation demonstrated similarly strong algorithm performance in the second health system.
Conclusions:
We showed that NLP can accurately identify insulin pump and CGM users from unstructured EHR notes, substantially outperforming billing code-based methods. This scalable approach can support system- and population-level evaluations of diabetes technologies.
Related Concept Videos
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...
Diabetes Mellitus: Type 2 and Gestational
Glucose Homeostasis: Pancreatic Islets and Insulin Secretion
Insulin and C-peptide are...
Pulse rhythm
Conversely, an irregular pulse pattern is termed dysrhythmia, stemming from disruptions in cardiac...
Insulin: Dosing Regimen and Adverse Effects
The basal dose constitutes about 40%-50% of the total daily dose, with the rest as premeal insulin. The mealtime insulin dose should mirror...
Feedback Loops

