Introduction: The initiation of insulin is significantly delayed in patients with type 2 diabetes. To facilitate primary care doctors for decision making we have written a simple computer program using Python.

Methods: The program incorporates evidence based recommendations for insulin initiation in insulin naive, outpatient, non-pregnant, adult participants with type 2 diabetes. The program modules answer three questions: 'Does your patient need insulin?’, 'Which insulin should you initiate ?' & 'What dose of insulin to initiate ?'

Ten clinicians volunteered for the study. The program was retrospectively deployed on the Electronic health record (EHR) data of 500 patients treated by the clinicians. The decision making regarding insulin initiation by the computer was compared with the decision made by the clinicians. The clinicians were then asked to use the program in the subsequent 500 eligible patients.

Results: When the computer program was deployed on the EHR data, we found insulin was initiated in 112 of 500 patients by the clinicians, while the computer recommended insulin initiation in 163 patients. There were no cases in which the clinician initiated insulin, and the computer recommended against it.

When used prospectively, the clinicians initiated insulin in 159 patients while the computer recommended insulin initiation in 164 patients. The clinicians made a manual override of the decision only in 5 patients. There was a 28% improvement in insulin initiation when the clinicians used the program. The improvement in insulin initiation using the computer program compared to the same prior to using the program was statistically significant. (p=0.037)

Conclusion: A simple python program can potentially improve insulin initiation by clinicians.


O.J.Lakhani: Advisory Panel; FITTERFLY, Speaker's Bureau; Eli Lilly and Company, Novo Nordisk Global Business Services, Sanofi, Stock/Shareholder; Zydus Cadilla.

Readers may use this article as long as the work is properly cited, the use is educational and not for profit, and the work is not altered. More information is available at