The OpenSAFELY Collaborative (2020)
OpenSAFELY: factors associated with COVID-19-related hospital death in the linked electronic health records of 17 million adult NHS patients.
Diabetes (Present vs. Not present)
COVID-19 (death)
Hazard ratio: 2.360 (2.180-2.560) Adjusted model


Retrospective cohort study

Medical records


17,425,445 adults, using national primary care electronic health record data linked to in-hospital COVID-19 death data. Working on behalf of NHS England we therefore set out to deliver a secure and pseudonymised analytics platform inside the data centre of a major primary care electronic health records vendor establishing coverage across detailed primary care records for a substantial proportion of all patients in England.

17,425,445 adults were included. 1,870,069 (11%) individuals had non-white ethnicities recorded. Missing data were present for body mass index (3,782,768, 22%), smoking status (725,323, 4%), ethnicity (4,592,377, 26%), IMD (142,166, 0.8%), and blood pressure (1,728,479, 10%). 5683 of the individuals had a COVID19 hospital death recorded in COVID-19 Patient Notification System (CPNS). The overall cumulative incidence of COVID-19 hospital death at 80 days from the study start date was <0.01% in those aged 18-39 years, rising to 0.35% and 0.17% in men and women respectively aged >=80 years, with a trend by age.


85 Day

COVID-19 (death)


Death in hospital among people with confirmed COVID-19. [NOTE: For this analysis, COVID-19 Patient Notification System (CPNS) death data were available up to 25th April 2020; Office for National Statistics (ONS) death data (used for censoring individuals who died without the outcome) were available to 16th April 2020; patient censoring for deaths due to other causes was therefore not possible during the last 9 days of followup]



uncontrolled (Hba1c>=58mmols/mol). Diabetes was grouped according to the most recent Hba1c measurement, where a measurement was available within the last 15 months, into

Not present


Hazard ratio

2.360 (2.180-2.560)




Risk was adjusted for Age, sex, body mass index (BMI), Smoking status was grouped into current, former and never smokers, Ethnicity was grouped into White, Black, Asian or Asian British, Mixed, or Other, index of multiple deprivation quintile, Blood pressure and Comorbities like respiratory disease, chronic heart disease, Diabetes, Cancer, liver disease, stroke/dementia, other neurological diseases, kidney disease, Organ transplant, spleed disease, autoimmune diseases like rheumatoid arthritis, lupus or psoriasis and other immunosuppressive conditions.

The C-statistic was calculated as a measure of model discrimination. Due to computational time, this was estimated by randomly sampling 5000 patients without the outcome and calculating the C-statistic using the random sample and all patients who experienced the outcome, repeating this 10 times and taking the average C-statistic. The average C-statistic was 0.78.