Article Text

High incidence of glucocorticoid-induced hyperglycaemia in inflammatory bowel disease: metabolic and clinical predictors identified by machine learning
  1. Martin McDonnell1,2,
  2. Richard J Harris1,
  3. Florina Borca3,4,
  4. Tilly Mills1,
  5. Louise Downey1,
  6. Suranga Dharmasiri1,
  7. Mayank Patel5,
  8. Benjamin Zare1,
  9. Matt Stammers1,6,
  10. Trevor R Smith1,
  11. Richard Felwick1,
  12. J R Fraser Cummings1,2,
  13. Hang T T Phan3,4,
  14. Markus Gwiggner1
  1. 1Department of Gastroenterology, University Hospital Southampton NHS Foundation Trust, Southampton, UK
  2. 2Human Health and Development, University of Southampton Faculty of Medicine, Southampton, UK
  3. 3NIHR Southampton Biomedical Research Centre, University Hospital Southampton NHS Foundation Trust, Southampton, UK
  4. 4Clinical Informatics Research Unit, University of Southampton Faculty of Medicine, Southampton, UK
  5. 5Department of Diabetes and Endocrinology, University Hospital Southampton NHS Foundation Trust, Southampton, UK
  6. 6NIHR Biomedical Research Facility, University of Southampton, Southampton, UK
  1. Correspondence to Dr Martin McDonnell; m.j.mcdonnell{at}


Background Glucocorticosteroids (GC) are long-established, widely used agents for induction of remission in inflammatory bowel disease (IBD). Hyperglycaemia is a known complication of GC treatment with implications for morbidity and mortality. Published data on prevalence and risk factors for GC-induced hyperglycaemia in the IBD population are limited. We prospectively characterise this complication in our cohort, employing machine-learning methods to identify key predictors of risk.

Methods We conducted a prospective observational study of IBD patients receiving intravenous hydrocortisone (IVH). Electronically triggered three times daily capillary blood glucose (CBG) monitoring was recorded alongside diabetes mellitus (DM) history, IBD biomarkers, nutritional and IBD clinical activity scores. Hyperglycaemia was defined as CBG ≥11.1 mmol/L and undiagnosed DM as glycated haemoglobin ≥48 mmol/mol. Random forest (RF) regression models were used to extract predictor-patterns present within the dataset.

Results 94 consecutive IBD patients treated with IVH were included. 60% (56/94) of the cohort recorded an episode of hyperglycaemia, including 57% (50/88) of those with no history of DM, of which 19% (17/88) and 5% (4/88) recorded a CBG ≥14 mmol/L and ≥20 mmol/L, respectively. The RF models identified increased C-reactive protein (CRP) followed by a longer IBD duration as leading risk predictors for significant hyperglycaemia.

Conclusion Hyperglycaemia is common in IBD patients treated with intravenous GC. Therefore, CBG monitoring should be included in routine clinical practice. Machine learning methods can identify key risk factors for clinical complications. Steroid-sparing treatment strategies may be considered for those IBD patients with higher admission CRP and greater disease duration, who appear to be at the greatest risk of hyperglycaemia.

  • inflammatory bowel disease
  • diabetes mellitus
  • adverse drug reactions
  • drug toxicity

This is an open access article distributed in accordance with the Creative Commons Attribution Non Commercial (CC BY-NC 4.0) license, which permits others to distribute, remix, adapt, build upon this work non-commercially, and license their derivative works on different terms, provided the original work is properly cited, appropriate credit is given, any changes made indicated, and the use is non-commercial. See:

Statistics from

Request Permissions

If you wish to reuse any or all of this article please use the link below which will take you to the Copyright Clearance Center’s RightsLink service. You will be able to get a quick price and instant permission to reuse the content in many different ways.

Summary box

What is already known about this subject?

  • Glucocorticosteroids (GC) are long-established induction agents in the management of inflammatory bowel disease (IBD) and prescribing remains widespread.

  • Hyperglycaemia is a known complication of GC and has been linked to morbidity and mortality. The frequency and risk factors for this complication in the inpatient IBD population is not known.

What are the new findings?

  • 57% of IBD patients treated with intravenous hydrocortisone (IVH), developed a hyperglycaemia (capillary blood glucose (CBG) ≥11.1 mmol/L) during admission.

  • C-reactive protein (CRP) and IBD duration are the strongest predictors of CBG elevation.

How might it impact on clinical practice in the foreseeable future?

  • Monitoring and management of blood glucose should be routine practice for all IVH-treated hospitalised IBD patients, particularly those with a high inflammatory burden.

  • There is an emergent case for research into steroid-free management of acute IBD.


In the 1950s Truelove and Witts performed the first randomised controlled trial of glucocorticosteroids (GC) in active ulcerative colitis (UC), demonstrating a reduction in mortality from 10.9% to 4.6% after 2 months of treatment.1 Seventy years later, GC remains a common treatment for inflammatory bowel disease (IBD); a recent UK multicentre study identified 30% of patients were exposed to GC in the preceding 12 months.2 GC are first-line induction agents for moderate to severe Crohn’s disease (CD) and UC in consensus guidelines and intravenous GC are widely used as the initial medical therapy for IBD patients admitted to hospital with severe disease flares.3 4

The mechanism of action of GC is mediated via the cytosolic glucocorticoid receptor (cGR). After GC binding, cGR-associated proteins dissociate, and the GC-cGR complex translocates to the nucleus. The nuclear GC-cGR complex binds to DNA, upregulating the transcription of anti-inflammatory cytokines (eg, interleukin (IL)-10, annexin 1) and downregulating transcription of proinflammatory mediators (eg, IL-1α, IL-1β, IL-8, TNFα). More rapid, non-genomic, effects occur via both the cGR dissociated proteins and likely via other novel transmembrane receptors.5 Steroid-induced hyperglycaemia is mediated by decreased β-cell insulin production, increased insulin resistance and increased gluconeogenesis.6

Studies in other GC-treated populations demonstrate both short-term and long-term severe adverse effects including ocular, musculoskeletal, cardiovascular, metabolic and infectious complications.7 In addition, de-novo hyperglycaemia and deterioration of glycaemic control in those with pre-existing diabetes mellitus (DM) have been recognised adverse effects of GC since the 1950s.8 The specific risk in IBD hospitalised patients with severe IBD flares, however, is not known.

Hyperglycaemia has been associated with increased length of stay, morbidity and mortality in non-critical care medical and surgical patients.9 At least 67 cases of GC induced metabolic emergencies including ketoacidosis and hyperosmolar hyperglycaemic states have been reported, 11 of which were fatal.10 Following two cases of GC-related diabetic crisis at our institution in IBD patients with no prior diabetes, electronically triggered systematic capillary blood glucose (CBG) monitoring was introduced for all prescribed intravenous hydrocortisone (IVH). This allowed the systematic study of hyperglycaemia in hospitalised IBD patients receiving IVH.

Materials and methods

We conducted a prospective observational study of consecutive admissions of IBD patients treated with IVH between October 2017 and December 2018. Included subjects had a confirmed diagnosis of IBD (either historic or during admission episode) and received at least four doses of 100 mg IVH over 24 hours (the standard dosing regimen for IBD flare at our centre).

Subjects had three times daily CBG monitoring automatically triggered by electronic prescription of IVH. CBG results were automatically digitally captured in the electronic patient record. Predictor variables included age, IBD diagnosis and subtype, IBD disease duration, admission IBD severity score (Harvey Bradshaw Index or Partial Mayo Score), serum biochemistry, glycated haemoglobin (HbA1c), faecal calprotectin, C reactive protein, potential DM risk factors (body mass index (BMI), family history, concomitant medications), self-reported weight loss and Malnutrition Universal Screening Tool score.11

Patients developing a CBG ≥14 mmol/L were referred to the diabetes team for consideration of treatment. In an attempt to identify only those with de novo hyperglycaemia, subjects with a baseline HbA1c or CBG (fasting status unknown) above the threshold previously used to diagnose DM were counted as potentially undiagnosed DM (≥48 mmol/mol and ≥11.1 mmol/L, respectively).12 13 Biochemical follow-up was performed at 1 year to assess repeat HbA1c measurements and serum and faecal biomarker assessments.

Laboratory values outside the quantification limit were substituted with the upper/lower limit value. Categorical and continuous predictors were handled and formatted appropriately. Data were analysed using Python V.3.7.4 and R V.3.6.1. Descriptive statistics were applied to cohorts, and Pearson correlations between independent and dependent variables were ascertained with matplotlib/seaborn heat-maps. Random forest (RF) machine learning models using the scikit-learn package V.0.22.1 were constructed to regress the phenotypic and admission clinical predictors.14 15 Pairwise correlations between input features (see online supplemental data) were identified to eliminate similar features. Then multivariable RF models were constructed and optimised using random grid search. Subsequently, fivefold cross-validation with a train-test split was used to test effectiveness at predicting glucose levels in the internal holdout set. Mean squared error was the reported metric.



Ninety-four IBD inpatient episodes met the inclusion criteria; 54 for CD, 36 for UC and 4 for IBD-as yet unclassified (IBDU). The median length of IVH treatment was 4 days (range 1–11). Subject characteristic at time of hospital admission are described in table 1.

Table 1


Five out of ninety-four episodes were for patients with a prior diagnosis of type 2 DM. One further subject had a pre-GC treatment CBG of 13.9 mmol/L and thus considered as potentially undiagnosed type 2 DM and included in analyses as having prior DM.

Incidence and management of hyperglycaemia

The overall global incidence of hyperglycaemia in our cohort of hospitalised IBD patients receiving IVH was 60% (56/94), with intervention for diabetes initiated in 20% (11/56) of these patients (see figure 1). For those without a prior diagnosis of DM, 57% (50/88) developed diabetic-range CBG (≥11.1 mmol/L) while 19% (17/88) and 5% (4/88) developed a CBG ≥14 mmol/L and ≥20 mmol/L, respectively. Twenty-five out of fifty of those with de-novo hyperglycaemia had CD, 22/50 UC, and 3/50 IBDU with a combined mean age of 44.8 years (SD 17.4). In patients without a prior diagnosis of DM 14% (7/50) had diabetic interventions; 6/50 started an oral hypoglycaemic and 1/50 commenced insulin therapy.

Figure 1

Maximum recorded capillary blood glucose for each admission plotted in ascending order. DM, diabetes mellitus.

All six patients with prior DM (5 CD and 1 UC) had an episode of hyperglycaemia and 4/6 recorded a CBG ≥20 mmol/L. Fifty per cent (3/6) were started on insulin, and 17% (1/6) commenced oral hypoglycaemic therapy.

Of the 50 admissions in patients without prior DM recording a CBG ≥11.1 mmol/L, 22% (11/50) were preceded directly by a course of oral steroids compared with 8% (3/38) without hyperglycaemia (p=0.09, Fisher’s exact test). In 60% (30/50) peak CBG occurred on day 2 of IVH treatment, but in 14% (7/50) of cases peak, CBG was not reached until 7 days after the first dose.

During index admission, 54% (30/56) of hyperglycaemic patients and 50% (19/38) of normoglycaemic patients were started on biological therapy. Four patients underwent emergency inpatient colectomy, all of whom had recorded a hyperglycaemic episode. Mean (±95% CI) length of stay was 12.6 (±3.0) days for hyperglycaemic patients and 9.1 (±2.0) days for normoglycaemic patients (p=0.053, t-test).

Physicians’ decision making was influenced by steroid-induced hyperglycaemia, particularly in those with a persistent CBG ≥14 mmol/L (trigger for diabetes specialist review). Conventional post-IVH 8-week tapering course of oral prednisolone prescribing differed. Only 30% of patients with CBG ≥14 mmol/L received oral prednisolone without intervention (eg, diabetic medication or rapid steroid taper) versus 58% of those with normoglycaemia.

Predictors of hyperglycaemia

Maximum CBG was positively correlated with CRP, platelet count and HbA1c and negatively correlated with haemoglobin (see correlation heat-map in online supplemental data). For non-diabetic patients, the RF model was fitted 500 times with a maximum depth of 90 trees using a random grid search method. CRP was the most critical predictor identified, followed by disease duration, platelet count, admission haemoglobin and HbA1c (see figure 2). The final mean squared error of the optimised non-diabetic patient model was 1.876.

Figure 2

Relative variable importance for Random Forest modelling of maximum capillary blood glucose. CRP, C-reactive protein; HBI, Harvey Bradshaw Index; IBDU, inflammatory bowel disease-as yet unclassified; MUST, Malnutrition Universal Screening Tool; UC, ulcerative colitis.

The variables contributing to the RF modelling and their respective importance of contribution are shown in figure 2. Age and BMI did not contribute to the model.

RF models optimised by grid search will rank the relative importance of each variable against the most critical variable (in this case, CRP). This provides a sense of how much each variable contributes to the predictive power of the overall model. In this instance, the length of IVH usage and metabolic variables are not as crucial to predicting hyperglycaemia as blood markers of inflammation.

Once the optimised RF model had been developed, blood glucose predictions were made on the holdout set using fivefold cross-validation to reduce overfitting.

Figure 3 reveals that the test-set predictions were comparable to the training set predictions. This pattern was present across all folds of the cross-validation; this graph is given only as an example of the model’s performance.

Figure 3

Predicted highest capillary blood glucose (CBG) vs measured highest CBG using model (subjects with history of Diabetes Mellitus excluded). CBG; capillary blood glucose.

When the RFR model included the six patients with DM, the leading predictor of CBG elevation became HbA1c (see online supplemental figure 3). Due to high CBG elevation (≥20 mmol/L) in subjects with known diabetes, particularly those with evidence of inadequate control by admission HbA1c, the RFR modelling shown above excluded these patients. Online supplemental data show RFR variable importance, correlation matrix and model with the patients with previous diabetes included. Their inclusion increased the mean squared error to 2.158, which is not surprising given the differing preadmission characteristics in this subpopulation.

Additional reported side effects and metabolic instability

Thirty-two per cent (30/94) of episodes included a patient-reported symptom of anxiety or mood change, 11% (10/94) of poor sleep and 10% (9/94) a report of appetite change. Electrolyte depletion, like hyperglycaemia, is a marker of metabolic and nutritional dysregulation and was common in the whole cohort with no statistically significant differences between hyperglycaemic and normoglycaemic patients. Sixty-two per cent (58/94) recorded serum potassium below the lower limit of our laboratory reference range (<3.5 mmol/L), 71% (67/94) low serum magnesium (<0.7 mmol/L) and 84% (79/94) low serum phosphate (<0.8 mmol/L) (see online supplemental data).

The percentage weight loss in the preceding 6 months was calculated alongside BMI as part of malnutrition screening and triage of all patients as per standard UK hospital practice.16 Sixty-six per cent (37/56) of hyperglycaemic patients and 57% (21/38) of normoglycaemic patients reported weight loss in the 6 months before admission, but neither BMI nor percentage weight loss category featured in the model to predict CBG. All patients were routinely assessed by a specialist dietitian who prescribed nutritional support as indicated; 53/94 had oral nutritional supplements, 5/94 nasogastric feeding and 5/94 parenteral nutrition. There was no significant difference in the proportion of hyperglycaemic versus normoglycaemic patients receiving nutritional therapy (see online supplemental data).

One-year follow-up

The follow-up clinical reviews and calprotectin post-discharge were part patient-triggered, and follow-up disease activity scoring was not universally available for our cohort. There was a significant decrease in faecal calprotectin over the 12-month follow-up. For those without hyperglycaemia during the acute episode, there was a trend to lower mean calprotectin at 12 months, 210 (±707) versus 738 (±640 p=0.18 t-test). In non-diabetic patients with raised calprotectin at admission and paired results 35% (6/17) normalised by 12 months in those who had hyperglycaemia and 75% (9/12) normalised in those without hyperglycaemia p=0.06 (Fisher’s exact test). There was no significant change in HbA1c over the 1-year follow-up for any groups.


Our data demonstrate that hyperglycaemia is common in IBD patients treated with IVH. By instituting electronically triggered regular CBG monitoring of IBD patients treated with IVH, we have uncovered the high prevalence of this relevant complication. Our monitoring regime identified patients who required diabetic intervention or modification of their treatment in response to hyperglycaemia. The void of data regarding steroid-induced diabetes in IBD suggests that in current practice it may often be under-recognised, and thus under-treated, potentially exposing patients to the risk of complications such as increased length of stay and infection. Hyperglycaemia has also been mechanistically linked to intestinal barrier dysfunction in both murine models and non-IBD human subjects.17 Through this mechanism, it is at least theoretically possible to link hyperglycaemia directly to intestinal inflammation and IBD outcomes.18

Until now there has been no accurate prospective evidence of the extent and severity of IVH-induced hyperglycaemia in IBD. A previous retrospective study of steroid side effects in elderly CD patients estimated an incidence of just 17%, but did not have systematic CBG monitoring.19 Likewise, studies of GC-treated rheumatology patients report the occurrence of hyperglycaemia at 9%–42%.20–22 A potential explanation for the higher frequency seen here is that our cohort only included hospitalised patients, who were both monitored frequently and likely to have had more significant systemic inflammation. The incidence we report is similar to that in a smaller study of a more elderly, heterogeneous group of hospitalised patients, prescribed GC.23

Machine learning techniques can be applied to clinical problems for risk prediction. We chose RF as it is a powerful ensemble machine learning method for predictive modelling, known to perform better than other methods smaller datasets.24 RFs work by constructing a large number of smaller decision trees and averaging the output of individual trees and are capable of capturing complex dependency patterns among multi-variate input features. As demonstrated by the heat maps (see online supplemental data), a large number of variables were collinear in their relationship and thus may be considered a potential cause for overfitting. RF outperforms other approaches in this respect and while it may mean causality may falsely be ascribed to a variable, it is known that collinearity does not affect the performance of RF as a predictor.25

The RF model accurately predicted the degree of hyperglycaemia for those without a history of DM in our population. Principal independent determinants were admission CRP, length of disease followed by thrombocytosis and anaemia, suggesting that systemic inflammatory burden and duration of IBD determined the risk of clinically significant hyperglycaemia in the cohort. No data of historic GC prescriptions were available so we cannot speculate further on whether the relationship with disease duration is a consequence of past GC exposure or a consequence of the disease process itself.

By using RF for early identification of those most at risk of significant GC-induced hyperglycaemia, alternative treatment strategies can be considered, including a rapid steroid taper, early use of biologicals and avoidance of oral steroids in those demonstrating adequate response to biological induction. Awareness of significant steroid-induced diabetes in this cohort appeared to influence physicians’ decisions with an observed reduction in follow-on prescriptions for conventional steroid taper.

Although hyperglycaemia appears to resolve on stopping GC, this is not always the case. A large population-based study associated previous oral GC with an increased incidence of future DM and in rheumatic diseases cumulative GC dose has been shown to be a risk factor for DM.26 27 The IBD population, regardless of GC exposure, may be at higher risk of DM. A recent Danish population-wide cohort study suggests a higher incidence of type 1 diabetes among subjects with IBD and a Korean cohort study found IBD patients under 40 years to have an increased rate of incident diabetes diagnosis over 5 years, compared with age, sex and BMI-matched controls.28 29

This study has limitations. While we note that hyperglycaemia occurred during the admission of subjects treated with IVH, we do not know whether another aspect of the disease or its treatments was the principal cause. It is known that de-novo hyperglycaemia may also occur in hospitalised patients independently of GC as a result of the neurohormonal milieu of acute illness, with observational studies of critical care admissions reporting stress-induced hyperglycaemia in 17%–49%.30–34 As current guidelines recommend the use of high dose GC in moderate to severe acute IBD, there was no comparable cohort of patients managed without IVH treatment to try to better understand whether stress or GC was the predominant factor in our cohort.3 Despite an attempt to measure baseline HbA1c in all patients starting steroids, 29% did not have this checked, and 3% had neither HbA1c nor CBG pre-IVH, so some cases of undiagnosed DM may have been missed.

Our model performed well as a predictive tool in our population, but we recognise that this was a prospective single centre study of fewer than 100 patient episodes and that its generalisability for hospitalised IBD in general remains to be established. Future research should aim to validate the model in a wider population and determine any effect of hyperglycaemia on clinical outcomes, which our study was not powered to achieve.

Intravenous GC have undoubtedly saved the lives of many IBD patients. However, there is significant associated morbidity, as acknowledged seven decades earlier by Truelove and Witts in their seminal work.1 It is questionable if GCs would be licensed in the regulatory framework currently applied to newer agents, given their side effect profile. In the ever-evolving IBD therapeutic landscape, it may be necessary to re-evaluate the position of GCs in the management of IBD. In UC, ciclosporin and infliximab are of equivalent efficacy as ‘rescue’ therapy for those demonstrating inadequate response to IVH; whether and for how long the preceding and concomitant GC course should be given for is not known.35 The JAK inhibitor tofacitinib has demonstrated onset within 3 days in moderate to severe UC and has been used effectively alongside shorter IVH courses and budesonide as induction therapy in an acute severe UC case series.36 37

In acute CD the evidence for the benefit of GC to induce remission is less secure.4 Nutritional therapies can if given as exclusive enteral nutrition, be of similar efficacy as CD induction agents to oral GC. They may offer an alternative treatment strategy for those in whom steroids are contraindicated.38 When coprescribed for a primary nutritional indication in our cohort, nutritional therapies did not increase the risk of hyperglycaemia.

Our data support the inclusion of CBG monitoring into standard clinical practice for IBD patients receiving IVH. Machine learning identified patients with a high inflammatory disease burden and a longer disease duration as being at the greatest risk of significant hyperglycaemia. Given the common complications of GCs and an enlarging landscape of biological, small molecule and nutritional therapies, there is an emergent case for researching steroid-free treatment strategies for acute IBD.


We would like to thank the diabetes multidisciplinary specialist team at UHS for helping to look after these patients.


Supplementary materials

  • Supplementary Data

    This web only file has been produced by the BMJ Publishing Group from an electronic file supplied by the author(s) and has not been edited for content.


  • MM and RJH are joint first authors.

  • Twitter @martinjmcd

  • Contributors MM, RJH, SD and MG were responsible for the original concept and planning of the study. MM, RJH, TM, SD, BZ and LD were responsible for clinical data collection and analysis. FB and HTTP were responsible for data extraction, analysis and modelling. RJH and MM contributed equally to this work and drafted the manuscript, which RF, TS, MP, JRFC, HTTP, MS and MG critically reviewed and revised.

  • Funding The authors have not declared a specific grant for this research from any funding agency in the public, commercial or not-for-profit sectors.

  • Competing interests MM: received non-financial support from Falk, MSD, Janssen and Takeda. RJH: personal fees from AbbVie and Janssen; non-financial support from Falk. LD: non-financial support from Janssen. SD: personal fees and non-financial support from Janssen; personal fees from Falk, MSD and AbbVie. JRFC: personal fees and research and/or educational support from Abbot, AbbVie, Amgen, Astra Zeneca, Biogen, Celltrion, GlaxoSmithKline, Janssen, Norgine, Pfizer, Pharmacosmos, Samsung, Shield Therapeutics, Shire, Takeda and Vifor. MG: personal fees from AbbVie, MSD and Takeda; non-financial support from AbbVie and Takeda.

  • Patient consent for publication Not required.

  • Ethics approval The protocol was reviewed and approved by the UK Health Research Authority - reference 19/HRA/0033.

  • Provenance and peer review Not commissioned; externally peer reviewed.

  • Data availability statement Anonymised data and random forrest code can be made available upon request.

  • Supplemental material This content has been supplied by the author(s). It has not been vetted by BMJ Publishing Group Limited (BMJ) and may not have been peer-reviewed. Any opinions or recommendations discussed are solely those of the author(s) and are not endorsed by BMJ. BMJ disclaims all liability and responsibility arising from any reliance placed on the content. Where the content includes any translated material, BMJ does not warrant the accuracy and reliability of the translations (including but not limited to local regulations, clinical guidelines, terminology, drug names and drug dosages), and is not responsible for any error and/or omissions arising from translation and adaptation or otherwise.