Abstract
Background:
Simulation is being increasingly integrated into medical education. Diabetes simulation is well-received by trainees and has demonstrated improved clinical results, including reduced adult inpatient hyperglycemia. However, no pediatric-specific diabetes simulation programs exist for use in medical education. None of the existing diabetes models incorporate ketones as an input or an output, which is essential for use in teaching pediatric diabetes management.
Methods:
We created a pediatric diabetes simulation incorporating both blood sugar and urine ketones as output. Ketone output is implemented as a state variable but is obfuscated to simulate hospital experience. Blood sugar output is similar to other models and incorporates the current blood sugar, insulin on board (IOB) and carbohydrates on board (COB), and insulin and carbohydrate sensitivities. The program calculates all IOB and COB every 15 minutes based on user input and provides written summary feedback at the end of the simulation about inaccurate dosing and timing.
Results:
The simulation realistically incorporated both blood glucose and urine ketones in clinically valid and actionable formats. After completing this simulation, 16/17 pediatric residents indicated that they wanted more simulated diabetes cases integrated into their curriculum.
Conclusion:
Implementing simulation into pediatric diabetes education was feasible and well-received. More work is needed to further study the role of simulation in pediatric diabetes education when used adjunctively or in lieu of lectures when time or resources are limited.
Introduction
Virtual case-based simulation has been shown to improve diabetes management among resident physicians.1-4 Previous studies have shown that emphasis on resident education lead to decreases in inpatient hyperglycemia in adult patients with diabetes, and online-trained residents experienced greater improvement in knowledge than classroom-educated residents.5,6 However, none of these simulation programs incorporated pediatric patients or scenarios.
The incidence of type 1 diabetes (T1D) in youth continues to rise. The hallmark of T1D is insulin deficiency which leads to hyperglycemia and ketosis. In contrast to adult patients with insulin resistance, a significant percentage of pediatric patients with new-onset T1D will present with ketosis or diabetic ketoacidosis (DKA) in addition to hyperglycemia.7-9 It is necessary to develop tools to enhance pediatric resident education in this area given the significant pediatric diabetes population, the critical differences between pediatric and adult diabetes care, and the lack of existing pediatric educational resources. 10
The glucose-insulin system and glucose-insulin-meal systems have been successfully modeled.11,12 These models have been utilized in large-scale in silico simulation experiments to test automated closed-loop devices. 13 Other educational simulations have used pharmacokinetic curves and averaged observed treatment effects in clinical trials. 2 However, these models do not include ketones, which limit their ability to be used in pediatric education. The purpose of this study was to create a model of pediatric diabetes that incorporated ketones and to use the model to develop a simulation that could be implemented in a pediatric residency curriculum. The patient urine ketone level was implemented as a state variable. We chose to use urine, rather than blood, ketones in this simulation due to ubiquity and rapid result availability. We obfuscated a percentage of outputs to the user to simulate the current practice while highlighting some of the inherent difficulties of urine ketone measurement.
Ketogenesis is the process by which fatty acids are metabolized into acetoacetate and beta-hydroxybutyrate. Ketone production is inhibited by two enzymes, hormone sensitive lipase and acetyl CoA carboxylase, which are regulated by circulating insulin levels. Ketone production is accelerated by a third enzyme, mitochondrial HMG coA synthase, which is stimulated by glucagon and epinephrine. 14 Thus, when there is an absolute or relative insulin deficiency (as in untreated or undertreated T1D), there is a propensity to generate ketone bodies. This can be thought of as a ratio—a high glucagon/insulin ratio favors ketogenesis and a low insulin/glucagon ratio inhibits it. 14 Thus, there is a threshold level of insulin that is transitioned through as the system moves from one state to the other, making ketone production and clearance amenable to threshold logic.
Methods
Model Creation
In order to meet our educational goal, our model needed to provide two separate outputs–blood sugar and ketones. Additionally, we wanted to reflect the increase in insulin sensitivity generally seen with clinical improvement,15,16 so we included ketones as an input to the blood sugar equation and modeled the ketone level using linear interpolation, explained below.
Blood sugar output
Input variables required to output a new blood sugar include the current blood sugar, carbohydrate sensitivity, carbohydrates on board (COB), ketone-modulated insulin sensitivity (K), insulin sensitivity factor (ISF), and insulin on board (IOB). Meal carbohydrates peak at 60 minutes and decay linearly over three hours after the peak. Rapid-acting carbohydrates peak at 15 minutes and decay linearly over 45 minutes. The total IOB includes both administered rapid- and long-acting insulin. Rapid-acting insulin follows the pharmacokinetic curve for insulin lispro. 17 The long-acting insulin reaches full effect after two hours and is constant (value = dose divided by 24) afterward to approximate the pharmacokinetics of glargine. 18 We chose to include long-acting insulin in the model and simulation because the majority of our pediatric patients are not using insulin pumps when in the hospital, as they are either newly diagnosed or ill.
Insulin sensitivity factor is calculated using the 1800 rule 19 and is further modulated by the presence of ketones using the K value. A linear interpolation function allows the presence and magnitude of ketones to modulate insulin sensitivity by introducing a proportionality constant that changes as the current ketone level changes.
Ketone output
The urine ketone level is modeled using a state variable with an initial value of 70. The ketone level declines by one every 15 minutes of simulated time if the IOB is above an upper IOB threshold, and it increases by one if the IOB is below a lower IOB threshold (±0.1 U). Ketone level is unchanged if the IOB is between the upper and lower thresholds. The output urine ketone level employs threshold logic using the following scale: trace ketones = 0, small ketones = 1 to 24, moderate ketones = 25 to 54, large ketones = 55 to 77, and DKA ≥ 78. The target IOB threshold was set to 1.5 × (Lantus/24) dose, as this represented the basal requirement along with the minimum calculated dose of corrections sustained over time. Rapid acting insulin dose is considered correct by the program if within ±0.5 U, and considers both carbohydrate and ketone coverage. This is primarily reflected in the blood sugar output, as increased ketone corrections would rapidly clear the patient’s ketones but ultimately result in hypoglycemia.
Given the approximate 24-hour duration of Lantus action, we estimated that ketone level would rise by 20% per hour that Lantus was not given after 24 hours. We set this parameter to approximate a one- to two-day time to DKA if Lantus was missed, depending on how much other insulin was given during the scenario.20,21
Carbohydrates
All meals are assumed to be 50 g of carbohydrates. Carbohydrates on board for each meal linearly increases to a peak value, achieved at 60 minutes, and then decreases linearly to zero over the next three hours. Additional carbohydrates can be given at any time in the form of juice (15 g). Carbohydrates on board for each juice administration also increases linearly to a peak value, achieved at 15 minutes, and then decreases linearly to zero by 45 minutes.
The simulation
Using the above model, we created a simulated pediatric diabetes patient presenting with new-onset T1D with hyperglycemia and ketosis. The simulation is hosted by GitHub pages and is written in Angular framework. It is currently viewable at https://slimgec.github.io/ds1. The pediatric residency program at the University of Iowa Stead Family Children’s hospital provided us a list of email addresses of all current pediatric residents (n = 46). We emailed a link to the simulation to all residents, and 17 (37%) completed it. The study protocol was exempted by the University of Iowa Institutional Review Board.
The interactive website first provides a clinical vignette, with relevant patient information including the patient’s age, weight in kilograms, and presenting blood glucose (BG) value. Once the diagnosis of diabetes mellitus with ketosis is established, participants are prompted to order insulin doses for meals and ketone correction. The orders are checked prior to advancing into the simulated phase, with feedback for incorrect answers provided. A total daily dose recommendation (in units of insulin/kg/day) is specified in order to prevent overlap in correct vs incorrect answers and allow the model to subsequently distinguish appropriate dosing and decision-making. Once a participant enters insulin orders, they advance to the interactive simulation. They are then prompted to treat the patient, with a goal of clearing the patient’s ketones. The simulation terminates in failure if the ketone level becomes too high due to ketoacidosis or if the patient becomes hypoglycemic.
Participants receive BG and urine ketones as outputs at standard times (preprandial, two hours postprandial, bedtime, midnight, and 03:00). Ketone output was obfuscated to 0.7 using a random number generator, meaning that urine ketones are only output 70% of the time to simulate hospital experience (ie, urine ketone value unavailable when clinical action may be necessary). The random number generator was set so that residents always received the first urine ketone output and any output that was trace, as the scenario terminated at that time. Obfuscation can be set to any level.
Participants respond to the scenario outputs by giving rapid-acting insulin, long-acting insulin, and carbohydrates. The scenario varies in length depending on these treatment decisions. Possible conclusions include resolution of ketones, progression to DKA, and hypoglycemia. We defined hypoglycemia as BG ≤ 70 mg/dL, but this value can also be changed to fit the objectives of the simulation.
In the event that ketones were positive, but BG was not high enough to treat with insulin without inducing hypoglycemia (ie, BG was ≤220 mg/dL preprandially or ≤240 mg/dL otherwise), 15 g of rapid-acting carbohydrates (labeled “juice” in the simulated interface) could be given to prevent hypoglycemia. Juice effect on BG peaked in 15 minutes and decayed linearly over 45 minutes. Table 1 documents values from a well-executed simulation and includes the information provided to the participant, the participant’s intervention based on that information, and the values calculated by the program.
Values Excerpted From a Well-executed Simulation.
Abbreviations: BG, blood glucose; COB, carbohydrates on board; IOB, insulin on board. Times in bold indicate times that a participant could make treatment decisions. Dashed lines indicate that no action of that type was taken at that time. Ellipses signify the continued passage of time and ongoing background calculation by the program and were included to save space.
The left-most four columns represent the information provided to the participants as part of the interactive simulation and include the current time, the meal carbohydrates, the current ketone status, and the current blood glucose. The middle three columns here represent the interventions performed. The right-most three columns represent values calculated by the program and are not viewable to the participant.
The program calculates the time in minutes since the last insulin was given, allowing for written summary feedback to be provided at the simulation’s conclusion. See Figure 1 for an example of simulator feedback.

Example feedback provided by the simulation. A missed ketone correction is depicted with a blue box. Inappropriate Lantus timing is depicted with a red box and demonstrates the ability of the program to track and report timing. An incorrect lispro dose is demonstrated in purple. An inappropriate ketone correction is depicted by a green box—this participant did not note that the current blood glucose was too low to safely administer extra insulin without first giving juice.
Results
A total of 16/17 residents want more simulation integrated into the curriculum. Common topics of interest included diagnosis and management of DKA using insulin drip, patients with T1D admitted for nondiabetes related problems, and transitioning a patient from an insulin drip back to insulin pump therapy. Table 2 illustrates basic information about the residents who completed the simulation.
Depicted Here is the Breakdown of Level of Training of 17 Residents Who Completed the Postsimulation Quiz, as well as the Total in Each Level of Training Category Who Wanted More Simulated Diabetes Scenarios in the Curriculum and Any Specific Comments Included as Free Text at the End of the Quiz.
There are no comments listed in the PL-1 category as they did not provide any comments. Both of the comments in the PL-2 category were provided by the same respondent.
Discussion
Type 1 diabetes occurs in approximately 1/500 children and adolescents, and DKA is common in children with T1D, occurring in about 10% of patients with T1D per year.22,23 Additionally, children may be seen in the emergency department with ketosis secondary to illness or insulin omission prior to development of DKA. It is crucially important for all medical providers to understand the principles underlying the treatment of ketosis with or without hyperglycemia. Primary care or emergency providers are often the first to see these patients, and in many areas of the country/the world, there is limited access to pediatric endocrinologists.24,25
Our residents rotate through a busy pediatric inpatient service in a tertiary medical center with 183 beds and an average arrival rate of new pediatric T1D patients of 10.4 per month (TrinetX data). They receive a noon-time lecture approximately every 18 months on T1D as part of the core curriculum. 26 However, our residents were still observed to have difficulty incorporating blood sugars and urine ketone levels into insulin dosing decisions. We hypothesized that pediatric residents had limited opportunity to come up with treatment plans and evaluate the outcome of their plans given work hour limitations leading to the lack of continuity and overall decreased autonomy in medical training. Thus, we opted to create an interactive simulation.
Conclusion
Pediatric residents in our program overwhelmingly enjoyed the simulation and wanted to see more diabetes simulation integrated into their residency program. Our simulation may be useful as a stand-alone or adjunct educational strategy for pediatric residents and could prove beneficial in time and/or resource-limited settings.
Limitations to our study include the low enrollment of residents who completed the simulation (17/46, 37%). Those who completed the simulation are likely to be early adopters. Thus, we may not have such positive experiences if all residents were required to complete the simulated exercise. Additionally, we did not configure the website to collect log-in data; thus, we do not know the average number of times residents completed the simulation, or on average, how long the simulation took to complete. Future studies of our simulation should be designed to capture these details. We are currently completing a study comparing resident performance and perception of the simulation vs standard lecture.
There are inherent limitations in our model. We chose to focus on the relationship between insulin and ketogenesis given our hypothesis, primary aim, and patient population. We addressed the effect of additional counter-regulatory hormones on insulin sensitivity by modifying the BG output by the ketone modifier constant. If additional scenarios are created where the presence of counter-regulatory hormones (via stress, illness, and exercise) or medications like SGLT inhibitors would accelerate ketogenesis, we will need to consider adding a similar type of interpolated function to modulate ketone output accordingly.27-29
Selecting urine ketones instead of blood ketones for the simulation’s output is another possible limitation given the newest sick day guidelines’ preference for blood ketone monitoring over urine ketone monitoring. 30 Utilization of blood ketone measurement for the management of sick days and DKA has copious benefits—primarily that blood ketone measurements detect β-hydroxybutyrate rapidly, while urine ketone measurements detect acetoacetate that reflects an average of urine ketone concentration from the last void. Also, urine ketone measurements can be much delayed in a dehydrated patient. 31 However, the limitations of urine ketone measurements are what drove the choice to output urine ketones. Given the cost and lack of insurance coverage for blood ketone monitoring, the majority of our patients are using urine ketone measurements at home. Our goal was to create a tool that would emphasize these limitations to our current trainees.
Footnotes
Acknowledgements
We thank the pediatric residents and residency administration at the University of Iowa for making this study possible. Dr Pinnaro wishes to thank the University of Iowa Physician Scientist Training Pathway (PSTP). We also appreciate our pediatric endocrinology colleagues, especially Dr Eva Tsalikian, Dr Michael Tansey, and Dr Andrew Norris, for resources and open ears.
Declaration of Conflicting Interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: Dr Pinnaro receives salary support from the Diabetes Research Training Program (T32DK112751) at the University of Iowa.
