Mapping local authorities to NHS Acute Trusts in England

Summary

This package contains many-to-many mappings between local authority districts (UTLA and LTLA) and NHS Acute Trusts in England, based on COVID-19 hospital admissions:

  • Trust-UTLA mapping: covid19.nhs.data::trust_utla_mapping
  • Trust-LTLA mapping: covid19.nhs.data::trust_ltla_mapping

These mappings can be used to map data reported by local authority (e.g. testing) to NHS Trusts, or to map Trust-level data (e.g. admissions) to local authorities.

The mappings contain the following variables:

  • trust_code: the three-digit organisation code for NHS Trusts.
  • geo_code: the nine-digit identifier for local authorities (UTLA or LTLA) in England
  • p_trust: the proportion of admissions to a given Trust were admitted from a given local authority (UTLA or LTLA)
  • p_geo: the proportion of admissions from a given local authority (UTLA or LTLA) that were admitted to a given Trust.

Usage

The mapping is provided as a built in package dataset and can be loaded directly using covid19.nhs.data::trust_utla_mapping and covid19.nhs.data::trust_ltla_mapping or as shown below.

Quick start

Load the library with:

library(covid19.nhs.data)

Load the basic Trust-UTLA mapping with trust_utla_mapping:

trust_utla_mapping %>%
  head() %>%
  knitr::kable()
trust_code geo_code p_trust p_geo
R0A E06000049 0.0411639 0.0850440
R0A E08000002 0.0085167 0.0336134
R0A E08000003 0.4953868 0.7678768
R0A E08000004 0.0163236 0.0437262
R0A E08000005 0.0085167 0.0277136
R0A E08000006 0.0078070 0.0246085

Add Trust names and local authority names to the raw mapping with get_names():

trust_utla_mapping %>% 
  get_names() %>%
  head() %>%
  knitr::kable()
trust_code trust_name geo_code geo_name p_trust p_geo
R0A Manchester University NHS Foundation Trust E06000049 Cheshire East 0.0411639 0.0850440
R0A Manchester University NHS Foundation Trust E08000002 Bury 0.0085167 0.0336134
R0A Manchester University NHS Foundation Trust E08000003 Manchester 0.4953868 0.7678768
R0A Manchester University NHS Foundation Trust E08000004 Oldham 0.0163236 0.0437262
R0A Manchester University NHS Foundation Trust E08000005 Rochdale 0.0085167 0.0277136
R0A Manchester University NHS Foundation Trust E08000006 Salford 0.0078070 0.0246085

Summarise the mapping for a given Trust (as defined by the Trust code) with summarise_mapping(); this will return a table (under summary_table) and a visualisation of the Trust-UTLA mapping (under summary_plot):

summary <- summarise_mapping(mapping = trust_utla_mapping, trust = "R0A")

summary$summary_table %>%
  knitr::kable()
trust_code trust_name geo_code geo_name p_trust
R0A Manchester University NHS Foundation Trust E08000003 Manchester 0.4953868
R0A Manchester University NHS Foundation Trust E08000009 Trafford 0.3087296
R0A Manchester University NHS Foundation Trust E08000007 Stockport 0.0723918
R0A Manchester University NHS Foundation Trust E06000049 Cheshire East 0.0411639
R0A Manchester University NHS Foundation Trust E08000008 Tameside 0.0290987
R0A Manchester University NHS Foundation Trust E08000004 Oldham 0.0163236
R0A Manchester University NHS Foundation Trust E10000017 Lancashire 0.0120653
R0A Manchester University NHS Foundation Trust E08000002 Bury 0.0085167
R0A Manchester University NHS Foundation Trust E08000005 Rochdale 0.0085167
R0A Manchester University NHS Foundation Trust E08000006 Salford 0.0078070
summary$summary_plot

Summarise the mapping for a given local authority (as defined by the UTLA or LTLA code) with summarise_mapping(); this will return a table (under summary_table):

summary <- summarise_mapping(mapping = trust_utla_mapping, geography = "E09000012")

summary$summary_table %>%
  knitr::kable()
geo_code geo_name trust_code trust_name p_geo
E09000012 Hackney RQX Homerton University Hospital NHS Foundation Trust 0.6753472
E09000012 Hackney R1H Barts Health NHS Trust 0.2135417
E09000012 Hackney RRV University College London Hospitals NHS Foundation Trust 0.0677083
E09000012 Hackney RKE Whittington Health NHS Trust 0.0434028

Methods

The raw (unpublished) mapping was provided by NHS England, This mapping provides the number of COVID-19 spells (discharges) between 01 January 2020 and 30 September 2020 by hospital-LTLA pairs, based on the Secondary Uses Service (SUS) healthcare data for England.

We have summarised the raw mapping between Trusts and local authorities (UTLA and LTLA), and to maintain anonymity we excluded any Trust-UTLA or Trust-LTLA pairs where the number of spells is less than 10. Finally, we report only the proportion of admissions by Trust (p_trust) or local authority (p_geo).