- Open Access
Evaluation of an open access software for calculating glucose variability parameters of a continuous glucose monitoring system applied at pediatric intensive care unit
BioMedical Engineering OnLine volume 14, Article number: 37 (2015)
Continuous Glucose Monitoring (CGM) has become an increasingly investigated tool, especially with regards to monitoring of diabetic and critical care patients. The continuous glucose data allows the calculation of several glucose variability parameters, however, without specific application the interpretation of the results is time-consuming, utilizing extreme efforts. Our aim was to create an open access software [Glycemic Variability Analyzer Program (GVAP)], readily available to calculate the most common parameters of the glucose variability and to test its usability.
The GVAP was developed in MATLAB® 2010b environment. The calculated parameters were the following: average area above/below the target range (Avg. AUC-H/L); Percentage Spent Above/Below the Target Range (PATR/PBTR); Continuous Overall Net Glycemic Action (CONGA); Mean of Daily Differences (MODD); Mean Amplitude of Glycemic Excursions (MAGE). For verification purposes we selected 14 CGM curves of pediatric critical care patients. Medtronic® Guardian® Real-Time with Enlite® sensor was used. The reference values were obtained from Medtronic®’s own software for Avg. AUC-H/L and PATR/PBTR, from GlyCulator for MODD and CONGA, and using manual calculation for MAGE.
The Pearson and Spearman correlation coefficients were above 0.99 for all parameters. The initial execution took 30 minutes, for further analysis with the Windows® Standalone Application approximately 1 minute was needed.
The GVAP is a reliable open access program for analyzing different glycemic variability parameters, hence it could be a useful tool for the study of glycemic control among critically ill patients.
Continuous glucose monitoring (CGM) is primarily applied in diabetes care for both clinical investigations and decision making. There are several promising studies suggesting that CGM could be a useful method for monitoring of critically ill patients [1-5]. However, the current guideline does not recommend CGM-based therapeutic decisions under intensive care circumstances without surveillance. This guideline also advocates further investigations about the reliability of CGM devices in clinical settings . The final goal of monitoring glucose changes in critically ill patients is to maintain blood glucose levels within a narrow range, i.e. avoiding fluctuations of glycemia. This goal could be achieved in many cases by insulin therapy, or even by cortisone supplementation. Intensive care glucose changes are resultant of multiple interactions of glucose load, insulin secretion, and stress conditions mediated by cortisone or catecholamine secretion or autonomic nervous system activity. There are several models to describe glucose-insulin interaction taking into account many factors such as insulin sensitivity, insulin clearance, endogenous glucose production etc. Common feature of all the insulin-glucose models from the minimal model  through the pharmacokinetic model  to the most complex Sorensen model  is the consideration of glucose concentrations in the interstitial compartment, being the interstitial fluid the field of cellular insulin action. In the process of developing an appropriate algorithm for glucose regulation in the intensive care unit, the variability of interstitial glucose changes could not be neglected.
Applying CGM devices in the clinical practice or research needs appropriate, goal oriented data handling methods. For instance Medtronic® CGM device can be evaluated by a Windows- or Web-based program (Medtronic® CareLink® Professional/Personal), which are widely used applications by physicians and diabetic patients. The main advantage of the above programs is that they provide clinically important graphical reports, trends, areas and different parameters of glucose homeostasis with individually adjustable threshold values. Reports contain, however, limited information as far as glycemic variability is concerned; most accepted parameters, such as Mean of Daily Differences (MODD), Mean Amplitude of Glycemic Excursions (MAGE) and Continuous Overall Net Glycemic Action (CONGA) are not available, raising an issue for researchers. Raw data can be retrieved from both Medtronic® CareLink® Professional and Personal, thus separate calculation of these parameters is possible. Recently, softwares have been developed and found useful for the calculation of glycemic variability. The GlyCulator is an application designed for the evaluation of glycemic variability based on data collected by means of a CGM device and the program has been made accessible in a web-based, interface independent version . Unfortunately, in this tool glucose thresholds are not adjustable representing a disadvantage for research purposes. Another application called CGM-GUIDE© (Continuous Glucose Monitoring-Graphical User Interface for Diabetes Evaluation) calculates the most extensively used glucose homeostasis parameters and variability metrics, exported from the CGM device in a standard Excel data format . It provides a user-friendly graphical interface, but it is not widely available.
Recent studies suggested a linkage between glycemic variability and critical care mortality. Elevated MAGE and standard deviation (SD) were found to be associated with increased in-hospital mortality . Signal et al. demonstrated that the odds of living had been higher for those patients who had spent more time in the normoglycemic range of 72–126 mg/dL . On the basis of the above observations we carried out a clinical study at a pediatric intensive care unit (PICU) setting with the aim to investigate glycemic variability. For this purpose our team designed a CGM data handling and analyzer program called Glycemic Variability Analyzer Program (GVAP). In this study we evaluated the reliability of GVAP, compared to reference values and determined the applicability of the software based on its user documentation. In the near future we will make the software available for open access usage, with the advantages of open access source code, adjustable thresholds and graphical user interface.
Interstitial glucose level was monitored by Guardian® REAL-Time (Medtronic®, USA) CGM. The flexible platinum Enlite® sensor was inserted in the subcutaneous tissue of the left or right lateral thigh and covered by transparent dressing. The calibration protocol can be found in our previous publication . The study was approved by the Research Ethical Committee (number: TUKEB 2012/4) of the Semmelweis University, Budapest.
Developmental model and software testing
Our applied software designed for special application has several different outputs and mathematical algorithms as for certain data source. For the purposes of the development, incremental method was applied and each algorithm was written and tested in decomposed way. Following the algorithm design the next step involved the programming environment selection. Our choice was influenced by the main task being rather mathematical, therefore special software package application seemed to be optimal. Accordingly, MATLAB® (MathWorks®, USA) software was chosen. The GVAP program was tested in three consecutive steps: during the (1) static test an expert programmer read the source code row by row; (2) dynamic test addressed the evaluated data and algorithm precision during process, throughout this step the source code was considered as a black-box; (3) verification.
In this application the main input was data on glucose concentration. The data chart contained a sequential series of glucose concentrations at 5 minute intervals. Taking into consideration the occasionally missing values, (e.g. secondary to late calibration) a calculation of the missing data with linear interpolation was incorporated into the initial steps, when applicable. During the processing the following parameters were calculated based on their formulas (Table 1): Average area above/below the target range (Avg. AUC-H/L); Percentage spent Above/Below the Target Range (PATR/PBTR); CONGA; MODD; MAGE; Excursion Frequency (EF).
Within the whole programming process, the formulation of MAGE was found to be the biggest challenge. Previously published algorithms were studied [15,16] and one of them (Baghurst’s algorithm, Approach 1) was opted for use with minor modifications. The MAGE algorithm embraced three main steps. The first element was the identification of the turning points of the glucose data. Then, the turning points that were associated with uncountable excursions on both sides were deleted, while those whom adjacent maxima/minima were lower/higher (‘W’ and ‘M’ pattern) on both sides, were retained. The third step comprised of the deletion of the turning points with countable excursions on only one side. While keeping the backbone of the Baghurst’s algorithm  two modifications were applied in our study design, as follows. In some cases, taking the first point of the glucose data as reference, the program could not identify a meaningful excursion (ME), although the data set itself contained MEs. For this context the program identified a new starting point. Moreover, when the program recognized the first ME, it rechecked the glucose curve whether within the starting point and the first identified ME any MEs were missed (Figure 1). The second modification affected the turning points. Our algorithm retained the “W” and “M” patterns throughout the calculation in contrary to the original method, which deleted them during the second step. As a result of retaining certain turning points, the theoretical situation could arise, when the final “MAGE” curve contained excursions below the threshold of ME. For this latter scenario the program was designed to alert the users as follows, “Visual analysis should be performed, see User Documentation”. It should be noted, though that this scenario occurred only in test circumstances. Figure 2 shows the entire algorithm and Figure 3 presents the control panel of the GVAP.
Validation of the program
For validation of the program we used 14 CGM curves of clinical patients, and further 6 self-edited curves were evaluated for MAGE control with the aim to analyze extreme situations. CGM measurements were carried out at the PICU of the 1st Department of Pediatrics, Semmelweis University, Budapest, between 2011 February and 2013 December. Our study was approved by the local research ethical committee. The CGM data were collected by CareLink® Professional/Personal software in .xls file format. For the analysis 48-hour long periods were selected, where the Avg. AUC-H and/or the Avg. AUC-L was > 0. Missing data was not an exclusion criterion, data interpolation was permitted.
Glucose variability parameters calculated by our software were compared with the results of validated programs: 1. CareLink® Professional/Personal (Avg. AUC-H/L, PATR, PBTR), 2. GlyCulator (CONGA, MODD). For MAGE (MAGE avg.) calculation manual method was applied, as reference. Manual calculation followed the definition of MAGE by Peter Baghurst . In our study instead of standard deviation (SD) of the sample we counted excursions exceeding 45 mg/dL in both directions. However, GVAP can calculate the SD of the glucose data as well, and the user can overwrite the default value of ME (45 mg/dL) when required for certain research purposes.
The accuracy of the GVAP was evaluated by using correlation and Bland-Altman analysis, Pearson or Spearman correlation, as appropriate. Statistical analysis was carried out by SPSS® 13.0 software (SPSS® Inc., Chicago, IL, USA) and Microsoft® Excel 2010.
In addition to the source code we also provided a brief user documentation (Additional files 1 and 2), which had been tested by two independent users (DZ, CsH) without any knowledge of the GVAP or MATLAB®.
Results and discussion
An average of 3.3 calibrations per 24 hours (range: 2–6) were performed in the selected 48-hour long periods. At the implantation site of the platinum sensor no undesirable events (bleeding, irritation, decubitus and infection) occurred.
Verification of the program
Among the 14 patients 7 had missing data. The average amount of missing data per 24-hour recordings was 1.9 (range: 0–9), and glucose flow contained 286.1 (range: 279–288) points daily, on average. Correlation analysis between GVAP and validated programs was performed. Pearson analysis (MAGE avg.), Pearson analysis after logarithmic transformation (Avg. AUC-H, PATR) and Spearman analysis (Avg. AUC-L, PBTR) were applied. Correlation coefficient was above 0.99 for all measured parameters (Table 2). Compatibility of the methods was investigated by Bland-Altman analysis that found outliers (above 2 SD) for 5 variables (Table 3, Figure 4).
Taking into account the feedback from the examiners the user documentation was adequately edited. Without any previous MATLAB experience the initial executions of the program lasted approximately 30 minutes. The duration of further examinations carried out with the Windows® Standalone Application was 1 minute, on average. The most frequent practical default was identified as typing mismatch, when selecting the excel-file to run the analysis.
For clinical consideration we demonstrate two CGM curves from a patient with severe symptomatic hypoglycemia (glucose < 40 mg/dL) due to dumping syndrome. With the usage of conventional fractionated oral feeding, CGM revealed several hypoglycemic episodes. On the basis of CGM results, continuous feeding regime was introduced, resulting in significantly decreased variability metrics of the glucose curve (Figure 5). In the above case the CONGA seemed to be the most representative parameter that evaluated the glucose difference hour by hour, being sensitive for the short term variability. Its value decreased from 74 to 20 mg/dL after adjustment of treatment as rapid excursions were significantly reduced. Furthermore, in a group of 21 PICU patients we have found significant correlation of the mortality outcome index PRISM III and of MAGE avg. (r = 0,55; p < 0.05, unpublished observation by our group).
The last decade emerged an expanding interest on glucose homeostasis disorders in patients needing intensive care. Recently, glucose variability has been pointed out to play a significant role in intensive care morbidity and mortality [12,13]. However, there has been lack of evidence of which variability parameters could best characterize the severity of illness. The demand for more accurate clinical follow up (incorporating more frequent glucose sampling) has led to the introduction of several glucose variability parameters. The CONGA and MODD were usually derived from CGM measurement, while others such as Avg. AUC, MAGE, PATR/PBTR, SD and glycemic lability index (GLI) not. Initially for research purposes, then for clinical monitoring it is essential to create a complex tool of parameters that could be analyzed by a suitable program. Our aim in the present study was to unify the most commonly used parameters of glucose variability in a freely accessible application. Prior to further research practices or introduction to clinical use, we felt it necessary to describe the development process and publish the first pilot test results.
In 2001 Van den Berghe demonstrated that tight glycemic control (TGC) reduced mortality in critically ill cardiac surgical patients, however, subsequent investigations did not confirm this benefit consequently [17-19]. The major disadvantage of TGC is the more frequent occurrence of hypoglycemia, nevertheless, TGC, based on STAR-Liege or SPRINT protocol could diminish the prevalence of hypoglycemic episodes [20,21]. In the future the routine use of CGM with sophisticated glucose-insulin algorithms might contribute to safer implementation of TGC among critically ill pediatric and adult patients. However, further research is needed to identify more factors, which can potentially contribute to the elevated glucose variability. CONGA refers mainly to the within day variability, while MODD reflects on the interday variability. MAGE, Avg. AUC-H/L and PATR/PBTR provide general interpretation on the glycemic homeostasis. GVAP can give explanation to so far unresolved queries, e.g.: (1) how do the most common critical care diagnostic or therapeutic procedures [e.g. bronchoscopy, necrectomy in burned patients, epidural analgesia] affect the short term glucose variability (CONGA); (2) how do the perioperative fluid and feeding management influence the MODD, (3) what common pitfalls of the different intravenous insulin protocols can be justified (MAGE, Avg. AUC-H/L, PATR, PBTR).
On comparison of our program with two existing programs for glucose variability analysis we have found a good correlation between the results of all tested parameters. Literature data varies slightly with regards to MAGE definitions and programming of MAGE calculation. Therefore, we applied manual calculation based on Baghurst’s definition and not compared GVAP with the MAGE calculations of GlyCulator.
Agreement between the reference programs and GVAP was investigated with Pearson, Spearman correlation and Bland-Altman analysis. We have found strong correlation, but outliers were identified in 5 variables. In the MAGE avg. group we observed two considerable alterations (9,3 and 5,1 mg/dL) between GVAP and manual calculation, as reference, due to error of manual calculation (Figure 4). It seemed that the analysis of high variability recordings were more reliable and simple with GVAP, compared to the traditional manual way. As for the other variables outliers were not clinically significant despite of the statistical difference. Possible explanations for the differences were data loss at unit conversion (mmol/L to mg/dL), missing values, or linear interpolation.
It should not be ignored that both the interpolation and the calibration may have significant effect on glucose variability. In case of missing data the linear interpolation can falsely decrease the variability as a result of the filling process of the unknown points. The calibration is the other crucial point. For example, if there is a 50 mg/dL difference between the reference and the subcutaneous glucose concentration, the CGM processor evaluates the calibration value and the parallel subcutaneous glucose concentration, then corrects the actual subcutaneous concentration. In this theoretical case it may cause a sudden step in the subcutaneous glucose curve, resulting in falsely elevated glucose variability. These phenomenon unfortunately accompany CGM measurements, however, their frequency could be reduced by more frequent calibration . In view of the above, in clinical trials the researchers should calculate the general accuracy of the CGM with Pearson correlation, Clarke’s error grid and Bland-Altman analysis. Moreover, the number of interpolated data should also be added. GVAP gives the total number of glucose concentrations and the numbers of interpolated data (Figure 3). In one section up to 21 glucose values can be interpolated.
Several advantages of the program designed by us can be highlighted. The adjustable threshold can be useful in the investigation of various clinical questions; on the other hand the graphical representation of the glucose curves can help the interpretation of the variability parameters. Minor limitations can also be spotted: GLI was not taken into account during the developing process, GVAP does not give any information about the accuracy of the CGM measurement, and the installation of MATLAB software is required for running of GVAP.
Our program provides a user-friendly option for researchers who require detailed analysis of the continuous glucose monitoring glucose curve. In the future, this application may help to present more detailed information on glucose homeostasis disorders of patients in the intensive care setting.
- Avg. AUC-H:
Average area above the target range
- Avg. AUC-L:
Average area below the target range
Continuous Glucose Monitoring
Continuous Glucose Monitoring-Graphical User Interface for Diabetes Evaluation
Continuous Overall Net Glycemic Action
Glycemic Lability Index
Glycaemic Variability Analyser Program
Mean Amplitude of Glycemic Excursions
Mean of Daily Differences
Pediatric Intensive Care Unit
Percentage Spent Above the Target Range
Percentage Spent Below the Target Range
Tight Glycemic Control
Bridges BC, Preissig CM, Maher KO, Rigby MR. Continuous glucose monitors prove highly accurate in critically ill children. Crit Care. 2010;14:R176(5).
Brunner R, Kitzberger R, Miehsler W, Herkner H, Madl C, Holzinger U. Accuracy and reliability of a subcutaneous continuous glucose-monitoring system in critically ill patients. Crit Care Med. 2011;39(4):659–64.
Corstjens AM, Ligtenberg JJ, van der Horst IC, Spanjersberg R, Lind JS, Tulleken JE, et al. Accuracy and feasibility of point-of-care and continuous blood glucose analysis in critically ill ICU patients. Crit Care. 2006;10(5):R135.
Harris DL, Battin MR, Weston PJ, Harding JE. Continuous glucose monitoring in newborn babies at risk of hypoglycemia. J Pediatr. 2010;157(2):198–202. e1.
Marics G, Koncz L, Körner A, Mikos B, Toth-Heyn P. Role of continuous subcutaneous glucose monitoring in intensive care [A folyamatos szubkután glükózmonitorizálás szerepe az intenzív terápiában]. Orv Hetil. 2013;154(27):6.
Klonoff DC, Buckingham B, Christiansen JS, Montori VM, Tamborlane WV, Vigersky RA, et al. Continuous glucose monitoring: an endocrine society clinical practice guideline. J Clin Endocrinol Metab. 2011;96(10):2968–79.
Bergman RN. Lilly lecture 1989. Toward physiological understanding of glucose tolerance. Minimal-model approach. Diabetes. 1989;38(12):1512–27.
Bisker G, Iverson NM, Ahn J, Strano MS. A pharmacokinetic model of a tissue implantable insulin sensor. Adv Healthc Mater. 2015;4(1):87–97.
Sorensen J. A physiologic model of glucose metabolism in man and its use to design and assess improved insulin therapies for diabetes. Ph. D. thesis. Cambridge: Department of Chemical Engineering, Massachusetts Institute of Technology; 1985.
Czerwoniuk D, Fendler W, Walenciak L, Mlynarski W. GlyCulator: a glycemic variability calculation tool for continuous glucose monitoring data. J Diabetes Sci Technol. 2011;5(2):447–51.
Rawlings RA, Shi H, Yuan LH, Brehm W, Pop-Busui R, Nelson PW. Translating glucose variability metrics into the clinic via continuous glucose monitoring: a Graphical User Interface for Diabetes Evaluation (CGM-GUIDE (c)). Diabetes Technol Ther. 2011;13(12):1241–8.
Meynaar IA, Eslami S, Abu-Hanna A, van der Voort P, de Lange DW, de Keizer N. Blood glucose amplitude variability as predictor for mortality in surgical and medical intensive care unit patients: a multicenter cohort study. J Crit Care. 2012;27(2):119–24.
Signal M, Le Compte A, Shaw GM, Chase JG. Glycemic levels in critically ill patients: are normoglycemia and low variability associated with improved outcomes? J Diabetes Sci Technol. 2012;6(5):1030–7.
Marics G, Koncz L, Eitler K, Vatai B, Szenasi B, Zakarias D, et al. Effects of pH, lactate, hematocrit and potassium level on the accuracy of continuous glucose monitoring (CGM) in pediatric intensive care unit. Ital J Pediatr. 2015;41:17.
Baghurst PA. Calculating the mean amplitude of glycemic excursion from continuous glucose monitoring data: an automated algorithm. Diabetes Technol Ther. 2011;13(3):296–302.
Fritzsche G, Kohnert KD, Heinke P, Vogt L, Salzsieder E. The use of a computer program to calculate the mean amplitude of glycemic excursions. Diabetes Technol Ther. 2011;13(3):319–25.
Finfer S, Blair D, Bellomo R, McArthur C, Mitchell I, Myburgh J, et al. Intensive versus conventional glucose control in critically Ill patients. N Engl J Med. 2009;360(13):1283–97.
Van den Berghe G, Wilmer A, Hermans G, Meersseman W, Wouters PJ, Milants I, et al. Intensive insulin therapy in the medical ICU. N Engl J Med. 2006;354(5):449–61.
Van den Berghe G, Wouters P, Weekers F, Verwaest C, Bruyninckx F, Schetz M, et al. Intensive insulin therapy in critically ill patients. N Engl J Med. 2001;345(19):1359–67.
Benyo B, Illyes A, Nemedi NS, Le Compte AJ, Havas A, Kovacs L, et al. Pilot study of the SPRINT glycemic control protocol in a Hungarian medical intensive care unit. J Diabetes Sci Technol. 2012;6(6):1464–77.
Penning S, Le Compte AJ, Massion P, Moorhead KT, Pretty CG, Preiser JC, et al. Second pilot trials of the STAR-Liege protocol for tight glycemic control in critically ill patients. Biomed Eng Online. 2012;11:58.
Yue XY, Zheng Y, Cai YH, Yin NN, Zhou JX. Real-time continuous glucose monitoring shows high accuracy within 6 hours after sensor calibration: a prospective study. PLoS One. 2013;8(3):e60070.
Medtronic Guardian REAL-Time User Guide. http://www.medtronicdiabetes.com/sites/default/files/library/download-library/user-guides/guardian_real_time_user_guide.pdf (2015.03.26).
Service FJ, Molnar GD, Rosevear JW, Ackerman E, Gatewood LC, Taylor WF. Mean amplitude of glycemic excursions, a measure of diabetic instability. Diabetes. 1970;19(9):644–55.
Molnar GD, Taylor WF, Ho MM. Day-to-day variation of continuously monitored glycaemia: a further measure of diabetic instability. Diabetologia. 1972;8(5):342–8.
Siegelaar SE, Holleman F, Hoekstra JB, DeVries JH. Glucose variability; does it matter? Endocr Rev. 2010;31(2):171–82.
McDonnell CM, Donath SM, Vidmar SI, Werther GA, Cameron FJ. A novel approach to continuous glucose analysis utilizing glycemic variation. Diabetes Technol Ther. 2005;7(2):253–63.
We thank to Katalin Balassa MD for the valuable comments on the manuscript.
The authors declare that they have no competing interest.
GM was responsible for the programming and CGM implementation and writing the manuscript. ZsL carried out the patient screening and the statistical analysis and writing the manuscript. CsL and LK participated in the CGM implementation. DZ and CsH participated in the evaluation of the user documentation. GyS participated in the evaluation of the algorithm and in the dynamic and static testing process. BM was responsible for patient enrollment and approved the final manuscript as submitted. ASz approved the final manuscript as submitted. PTH carried out the study protocol, writing the manuscript and approved the final manuscript as submitted. All authors read and approved the final manuscript.
GM (MD, Intensive Care Fellow and electrical engineer) is a PhD student at First Department of Pediatrics, Semmelweis University. ZsL MD is a PhD student at First Department of Pediatrics, Semmelweis University. CsL and LK are pediatricians at First Department of Pediatrics Semmelweis University and Bethesda Children’s Hospital. DZ MD was a member of the Students’ Scientific Association at First Department of Pediatrics, Semmelweis University. GyS PhD is the head of the Department of Measurement and Automation, Óbuda University. BM is the head of the Department of Anesthesiology and Intensive Therapy, at MRE Bethesda Children’s Hospital. CsH, PhD is associate professor of anesthesiology at the Department of Anesthesia and Intensive Care, Semmelweis University. ASz DSC is the head of the First Department of Pediatrics, Semmelweis University. PTH, PhD is the head of the PICU and Diabetes Ward at First Department of Pediatrics, Semmelweis University.
Gábor Marics and Zsófia Lendvai contributed equally to this work.
Contains the full source code of the GVAP (GlyVar_Script.zip - http://sourceforge.net/projects/glyvariab/files/?source=navbar ).
Contains the user documentation (User documentation for GVAP.doc - http://sourceforge.net/projects/glyvariab/files/?source=navbar ).