Background: The objectives of this study were to identify risk factors for severe COVID-19 and to lay the basis for risk stratification based on demographic data and health records. Methods: The design was a matched case-control study. Severe cases were all those with a positive nucleic acid test for SARS-CoV-2 in the national database who had entered a critical care unit or died within 28 days of the first positive test. Ten controls per case matched for sex, age and primary care practice were selected from the population register. All diagnostic codes from the past five years of hospitalisation records and all drug codes from prescriptions dispensed during the past nine months were extracted. Rate ratios for severe COVID-19 were estimated by conditional logistic regression. Findings: In a logistic regression using the age-sex distribution of the national population, the odds ratios were 2.26 for a 10-year increase in age and 1.86 for male sex. In the case-control analysis, the strongest risk factor was residence in a care home, with rate ratio (95% CI) 14.9 (12.7, 17.5). Univariate rate ratios (95% CIs) for conditions listed by public health agencies as conferring high risk were 4.88 (3.26, 7.31) for Type 1 diabetes, 2.58 (2.30, 2.88) for Type 2 diabetes, 2.40 (2.14, 2.70) for ischemic heart disease, 3.90 (3.52, 4.32) for other heart disease, 3.10 (2.81, 3.42) for chronic lower respiratory tract disease, 12.1 (8.4, 17.4) for chronic kidney disease, 5.5 (4.8, 6.2) for neurological disease, 4.70 (2.90, 7.62) for chronic liver disease and 4.11 (2.72, 6.21) for immune deficiency or suppression. 72% of cases and 35% of controls had at least one listed condition (50% of cases and 9% of controls under age 40). Severe disease was associated with encashment of at least one prescription in the past nine months and with at least one hospital admission in the past five years [rate ratios 16.6 (13.3, 20.6)] and 5.6 (5.0, 6.2) respectively] even after adjusting for the listed conditions. In those without listed conditions significant associations with severe disease were seen across many hospital diagnoses and drug categories. Age and sex provided 1.81 bits of information for discrimination. A model based on demographic variables, listed conditions, hospital diagnoses and prescriptions provided an additional 1.5 bits (C-statistic 0.839). Conclusions: Along with older age and male sex, severe COVID-19 is strongly associated with past medical history across all age groups. Many comorbidities beyond the risk conditions designated by public health agencies contribute to this. A risk classifier that uses all the information available in health records, rather than only a limited set of conditions, will more accurately discriminate between low-risk and high-risk individuals who may require shielding until the epidemic is over.