Study setting and data
We used electronic health records from individuals registered in general practices of the Clinical Practice Research Datalink (CPRD) during the period between 1 January 1998 and 15 March 2017. CPRD gathers longitudinal data collected on demographics, health behaviors, laboratory and clinical examinations, diagnoses and complete computerized records of all drugs prescribed by general practitioners.18 Many studies have provided evidence of the validity of diagnostic and prescribing CPRD records for research use.18 Patients are largely representative of the UK population in terms of sex, age, and ethnicity.18 Individual records were linked to hospital admissions and the mortality registry (online supplementary text S1). Hospital records from the Hospital Episode Statistics (www.hscic.gov.uk/hes) gather diagnoses documented during hospital admission in all National Health Service hospitals in England. The Office for National Statistics (https://www.ons.gov.uk/atoz?query=mortality&size=10) provided dates and causes of death.
Study design and follow-up
We identified a cohort of patients aged ≥18 years, continuously registered in CPRD practices for 1 year or more, who had at least one of six prespecified immune-mediated inflammatory diseases (inflammatory bowel disease, giant cell arteritis, polymyalgia rheumatica, rheumatoid arthritis, systemic lupus erythematosus, and vasculitis). To define these diseases, we used the diagnostic codes shown in online supplementary table S1. The study follow-up started when patients first met all the inclusion criteria and ended on the date of last data collection, practice deregistration, diagnosis of diabetes or death, whichever occurred first. We excluded patients with history of diabetes (online supplementary figure S1).
Oral glucocorticoid treatment
We identified all the prescriptions of oral, intramuscular and intra-articular glucocorticoids that were issued to the patients between 1 year prior to study start and the end dates. We obtained the daily dose from the recorded product name, which included information on product strength, directions given and quantity prescribed. We estimated the duration of each prescription by dividing the amount of tablets prescribed by the daily dose. We converted the daily dose into milligrams of prednisolone-equivalent dose to account for differences in anti-inflammatory potency for different glucocorticoid types (online supplementary table S2). We then defined several time-variant glucocorticoid exposure variables: ever use from 1 year prior to follow-up start (binary); current daily use (eg, whether the individual received or not glucocorticoids at a given time point; binary); current daily dose per 5 mg/day, with zero value when medication was not prescribed (analyzed as continuous and categorical variables (non-use, >0.0–4.9 mg, 5.0–14.9 mg, 15.0–24.9 mg, ≥25.0 mg/day)); cumulative dose since 1 year before follow-up start per 1000 mg (sum of the total dosages prescribed divided by 1000; continuous and categorical variables (non-use, >0–959 mg, 960–3054 mg, 3055–7299 mg, and ≥7300 mg; as previously defined17 19 20)).
Diabetes definition
The primary outcome was the incidence of type 2 diabetes, which was defined by the date of the first recorded diagnosis (Read21 and International Classification of Diseases version 10 codes listed in online supplementary table S3), a recording of glycated hemoglobin (HbA1c) ≥7.0% (53 mmol/mol), or a fasting glucose result ≥7.0 mmol/L.
Confounding factors
A priori confounders assessed at baseline were: sex, age, type of immune-mediated inflammatory disease (eg, vasculitis) and hypertension (diagnosed hypertension, ≥3 high systolic or diastolic blood pressure measurements within 1 year prior to follow-up start, or ≥2 blood pressure-lowering medication prescriptions) in online supplementary file 1 . A priori time-variant confounders during follow-up were prescribed medication: inhaled, nasal, topical and rectal glucocorticoids; and disease-modifying antirheumatic drugs (DMARD) and non-steroidal anti-inflammatory drugs (NSAID) as markers of disease activity. Covariate definitions are shown in online supplementary text S1.
Statistical analysis
We imputed missing glucocorticoid daily dose during tapering periods using multiple imputation with chained equations with generation of five data sets (online supplementary text S1). Imputation models included patient demographics (sex, age, ethnicity and index of multiple deprivation22), underlying immune-mediated inflammatory disease, time between follow-up start and prescription, type of glucocorticoid (eg, prednisolone), and prescribed inhaled, nasal, topical and rectal glucocorticoids.
We described baseline patient characteristics using summary descriptive statistics and used Kaplan-Meier methods to estimate cumulative probabilities of incident diabetes. We calculated rates of incidence with 95% CIs dividing the number of individuals with incident diabetes by the total number of person-years of follow-up.
We studied the effect of time-variant glucocorticoid exposure on diabetes using Cox proportional hazards models adjusted for the a priori confounders. We included the practice identifier as a random intercept to account for clustering effect, and no interaction terms. We assessed the proportional hazards assumption using Schoenfeld residual tests. We combined estimates and 95% CIs from each imputed data set using Rubin’s rules. We considered significance as p<0.05 and used two-sided tests. We used Stata V.15 (StataCorp, College Station, USA) for data management and R V.3.3.1 (http://cran.r-project.org/) for the analysis.
Secondary analyses included estimations by sex, BMI group (18.5–24.9, 25.0–29.9, ≥30.0 kg/m2), diabetes family history status, type of immune-mediated inflammatory disease, and according to duration of the underlying inflammatory disease at follow-up start (newly diagnosed/incident, within 2 years and over 2 years since diagnosis).
In sensitivity analyses, we further adjusted the estimates for periods of active systemic inflammation, which was defined based on prescribed glucocorticoid dose (increase in prednisolone-equivalent dose by >5 or 10 mg that sustained for over 3 weeks) and, except for patients who only had vasculitis or systemic lupus erythematosus, also on erythrocyte sedimentation rate and C-reactive protein values (≥30 mm/hour and ≥10 mg/L, respectively) (online supplementary text S1). We included this variable as a time-variant covariate to take into account changes in systemic inflammation activity over time.
The study funders had no role in the study design, data collection, analysis or interpretation, in the writing of the paper or in the decision to submit the paper for publication.