This was a retrospective cohort study using data from the Clinical Practice Research Datalink (CPRD) which was linked to mortality data from the Office of National Statistics (ONS). The CPRD is a large database of primary care electronic medical records that covers around 7% of the UK population and has been shown to be broadly representative of the UK population. Consenting practices in England have linkage to the ONS mortality data, which represents around 58% of all CPRD practices . CPRD provide indicators of when a practice’s data was up to research standard, and whether a patient’s data meets their acceptability standards. For this study, only data from practices that consented to ONS linkage were used if the data met acceptability standards and was up to research standard.
The study period began at the start of ONS coverage (1st January 1998) and ended 1st October 2011. Patients with incident RA during the study period were identified from CPRD using a validated algorithm where patients have to have either at least 2 Read codes for RA and no alternative diagnosis after their last RA code or a Read code for RA and at least 2 product (medication) codes for Disease-Modifying Anti-Rheumatic Drugs (DMARDs) and no alternative diagnosis for the DMARDs in the previous 5 years . Patients entered into the study upon RA diagnosis and participation ended at death, the date the patient left the practice or at the end of the study period. All patients were registered with the practice for a year prior to RA diagnosis, to ensure patients were truly incident cases.
Patients were identified as having type 2 DM if they had either (1) a Read code for type 2 DM; (2) at least two prescriptions for oral anti-diabetic medication, either on 2 different dates or the same date with 2 types of medication; or (3) fasting blood sugar ≥7.0 mmol/litre, random glucose test ≥11.1 mmol/litre, glucose tolerance test ≥11.1 mmol/litre or a glycosylated haemoglobin (HbA1C) ≥7% . Patients with polycystic ovary syndrome (PCOS) treated with metformin were excluded as it was possible they were incorrectly identified as diabetic because of taking anti-diabetic medication. Diagnosis of DM was time-varying and could be prior to diagnosis of RA whereby a person would be flagged as diabetic throughout follow-up, or during follow-up whereby a person would be flagged as diabetic from the point of DM diagnosis. Where the diagnosis was made on the basis of two sequential prescriptions, the date of onset was allocated as the date of the second prescription to avoid immortal time bias.
Oral GC therapy was identified using product codes from prescription data. Patients were classified by current/recent use of GCs, whereby a person was classified as exposed for the duration of each GC prescription and for 6 months after the end of the prescription.
All-cause and CV mortality were identified through linkage to ONS data with date of death and cause of death provided. Cause of death was recorded on ONS using International Statistical Classification of Diseases and Related Health Problems (ICD) version 10 codes. Deaths prior to 2001 were recorded using ICD-9 codes and these were mapped to ICD-10 codes. There also were 31 deaths recorded on CPRD but not on ONS and these were included in the all-cause mortality analyses. CV mortality was identified using ICD-10 codes under the circulatory chapter heading as the underlying cause of death.
Age at RA diagnosis was calculated using year of birth and year of RA diagnosis. Gender was given on the CPRD database. Baseline Charlson comorbidity index was determined using an adaption of the index for CPRD data where diseases were identified through Read codes for diagnosis at any point prior to RA diagnosis . DMARD types and non-steroidal anti-inflammatory drugs (NSAIDs) were identified using product codes and were time-varying. GC use in the year preceding baseline was determined from GC prescriptions prior to baseline. Baseline smoking category (ever or never) was determined using Read codes and product codes at any point up to RA diagnosis, or in the 3 months after RA diagnosis. Prior macrovascular disease was defined as diseases of large blood vessels including myocardial infarction, stroke, peripheral artery disease or amputation  and were identified through Read codes prior to RA diagnosis. Body mass index (BMI) at baseline was calculated using median height and weight measurements from the 5 years prior to baseline. All code lists can be found in Additional file 1.
For both outcomes, mortality rates were estimated (with 95% confidence intervals (CI)), stratified by time-varying DM status and time-varying current/recent use of GCs. As mentioned earlier, the baseline risk of CV and all-cause mortality for patients with RA and DM will be higher than those with RA only. Therefore, to investigate the impact of GCs both rate ratios (RR) and rate differences (RD) between GC users and non-GC users were calculated for those with and without DM separately.
When estimating the effect of both GC exposure and DM status, the presence of interaction was measured on both the multiplicative scale, corresponding to the RR, and on the additive scale, corresponding to the RD. Interaction on the additive scale can give more meaningful comparisons as it is not dependent on baseline risks . Crude and adjusted Cox proportional hazards (PH) regression models were fitted with an interaction term for time-varying DM and time-varying current/recent use of GCs. Multiplicative interaction was assessed via the inclusion of an interaction term in the Cox model.
Additive interaction cannot be estimated directly from the Cox model as it depends on the baseline hazard function . However, we can estimate the Relative Excess Risk due to Interaction (RERI) and Ratio of Absolute Effects (RAE): 1) RERI [17, 18] assesses if there is a difference in the hazard differences. The RERI is equal to 0 if the additive interaction effect is equal to 0. Therefore, if it is statistically significantly different from zero then this is interpreted as a statistically significant difference in the hazard differences between those with and without DM, and indicates the direction of the effect. 2) RAE is defined as the ratio of hazard differences in patients with DM compared to those without DM (See Additional file 2 for further information). Departure from 1 indicates a difference in the two groups and it was calculated here in addition to the RERI as it gives an indication of the magnitude of the difference in subgroup absolute effects, unlike the RERI. Both measures are calculated after the Cox model as a function of the model parameters.
Ever smoking at baseline and baseline BMI had 753 (8%) and 3849 (42%) missing data, respectively. Multiple imputation with 57 imputations was used to replace these missing values. The number of imputations was based on the fraction of missing information. Forty-nine patients did not have a Townsend score, however this was not imputed as it was not used in the final models.