Aim

To create a public (anonymised) mapping between lower- or upper-tier local authorities and Acute NHS Trusts in England based on COVID-19 hospital admissions data.

Summary

We make mappings based on two data sources: Secondary Uses Service (SUS) healthcare data for England, and linked COVID-19 cases and admissions. The steps taken to make each mapping are summarised below; see data-raw/make_mappings.R for full details.

Secondary Uses Service (SUS) mapping

Mappings are derived from a raw mapping provided by NHS England, based on the Secondary Uses Service (SUS) healthcare data for England. This raw mapping counts the number of COVID-19 hospital spells (discharges) between 01 January 2020 and 30 September 2020 from NHS hospitals to lower-tier local authorities (LTLAs). To make the public mappings, we:

  1. Map NHS sites to NHS Trusts.
  2. Count the number of hospital spells for each LTLA-Trust (or UTLA-Trust) pair.
  3. Exclude any LTLA-Trust (or UTLA-Trust) pairs for which the number of hospital spells is fewer than 10.
  4. Calculate (i) p_geo, the proportion of all admissions from a given LTLA (or UTLA) that were admitted to a given Trust, and (ii) p_trust, the proportion of all admissions to a given Trust that were admitted from a given LTLA (or UTLA).

Linked COVID-19 cases and admissions

Mappings are derived from COVID-19 cases and hospital admissions linelist data linked via a case ID. The case data includes the following variables: case ID, age, sex, resident LTLA, residence type (residential, HMO, care home, medical facility, prison, other, unknown), test specimen date. The hospital admissions data includes the following variables: case ID, age, sex, specimen date, NHS Trust, Trust type (acute, independent, mental health, community), admission date, discharge date. To make the public mappings, we:

  1. Clean case linelist. Exclude any cases for which any of the following variables are missing: resident LTLA or residence type. Exclude any cases not from residential dwellings (including houses, flats, sheltered accommodation), as defined by the residence type.
  2. Clean hospital admissions linelist. Exclude any cases for which any of the following variables are missing: NHS trust, admission date, discharge date.
  3. Link cleaned case and admissions linelist data via case ID.
  4. Exclude any matched case-admission pairs where the discharge date was before the specimen (test) date (i.e. exclude admissions that were discharged before a positive SARS-CoV-2 diagnosis), or any admissions where the admission date was more than 28 days after the specimen date (i.e. exclude admissions that likely occurred after illness and may be unrelated).
  5. Amongst all remaining matches, keep the first admission of each case only.
  6. Count the number of linked case-admissions for each LTLA-Trust (or UTLA-Trust) combination.
  7. Exclude any LTLA-Trust (or UTLA-Trust) pairs for which the number of hospital spells is fewer than 10.
  8. Calculate (i) p_geo, the proportion of all admissions from a given LTLA (or UTLA) that were admitted to a given Trust, and (ii) p_trust, the proportion of all admissions to a given Trust that were admitted from a given LTLA (or UTLA).

Local authority and Trust mergers

The mapping includes the following local authority (LA) mergers that have taken place since January 2020:

hospitalcatchment.utils::la_changes %>%
  filter(substr(la_level, 1, 1) == "E",
         from_date > as.Date("2019-12-31")) %>%
  mutate(Change = ifelse(is.na(la_code_new), "Abolished", "Merged")) %>%
  arrange(from_date, la_code_new) %>%
  select(`Old LA code` = la_code,
         `New LA code` = la_code_new,
         Change,
         `Date effective` = from_date)

The mapping includes the following Trust mergers that have taken place since January 2020:

hospitalcatchment.utils::download_nhs_mergers() %>%
  filter(!(org_code_old == "RW6" & org_code == "R0A")) %>%
  select(`Old Trust code` = org_code_old,
         `New Trust code` = org_code,
         `Date effective` = date_effective) %>%
  kable()