Skip to main content

Project #97:
Primary Care Covid Codes Study

  • Type: Audit
  • Topic areas: Other/indirect impacts of COVID on health/healthcare


Primary care records offer an opportunity to ascertain cases of COVID-19 which do not necessarily result in hospital admission or death. This could be useful for studying the burden of COVID-19 in the community, risk factors for SARS-CoV-2 infection separately to risk of severe COVID-19, risk factors for mortality and case fatality ratios among those infected, and post-viral effects in people who had COVID-19 that did not require hospitalisation.

There are over 100 primary care (CTV3) codes with terms related to COVID-19 used by TPP and available for selection in studies performed in the OpenSAFELY platform ( The majority of these codes have been newly created for use in the current pandemic. The aim of this work was to assign these codes into categories related to the identification of COVID-19 in primary care, and to provide advice for studies using the OpenSAFELY platform that require people to be classified by their COVID-19 case status as defined in primary care records (either as an exposure or as an outcome).


An initial list of TPP primary care codes related to COVID-19 was obtained by searching the TPP database for terms containing “COV-2”, “Coronavirus”, or “COVID”. The returned terms were cross-checked against the NHS Digital COVID-19 SNOMED CT codes and CTV3 codes for any missing terms which were added to the list when found. The resulting list of terms was then reviewed by a team of clinicians, epidemiologists and statisticians in order to identify distinct categories of terms and assign terms into one of these distinct categories.

An initial analysis of (probable case and suspected case) sub-categories was then performed by plotting the following using OpenSAFELY data from between February 2020 - November 2021 (1) the frequency of codes entered into TPP software by GPs over time and (2) the proportion of people dying due to (a) COVID-19 and (b) causes other than COVID-19 (using ONS cause of death data) in the 80 days after a record of a positive test in either primary care TPP data or in SGSS data.

  • Study leads: Colm Andrews
  • Organisation: University of Oxford and London School of Hygiene and Tropical Medicine