HES Accident & Emergency (HESAE) Dataset#

1. Summary#

The information below is retrieved from the Health Data Gateway API developed by NHS England, with additional fields added by UK LLC (indicated by italics).

# define target dataset to document
schema = 'nhsd'
table = 'HESAE'
version = 'v0003'
# import functions from script helper
import sys
script_fp = "../../../../scripts/"
sys.path.insert(0, script_fp)
from data_doc_helper import DocHelper
# create instance
document = DocHelper(schema, table, version, script_fp)
# markdown/code hybrid cell module requirement
from IPython.display import display, Markdown
# get api data
dataset = document.get_api_data()
display(Markdown("**NHS England title of dataset:** "+dataset['datasetfields']['datautility']['title']))
display(Markdown("***Dataset name in UK LLC TRE***: *nhsd.HESAE*"))  
display(Markdown("**Short abstract:** "+dataset['datasetfields']['abstract']))
display(Markdown("***Extended abstract:*** [*https://web.www.healthdatagateway.org/dataset/101a7d68-1675-4b47-bfac-dde7b7b57877*](https://web.www.healthdatagateway.org/dataset/101a7d68-1675-4b47-bfac-dde7b7b57877)"))
display(Markdown("**Geographical coverage:** "+dataset['datasetfields']['geographicCoverage'][0]))
display(Markdown("**Temporal coverage:** "+dataset['datasetfields']['datasetStartDate']))
display(Markdown("***Data available in UK LLC TRE from***: *01/04/2007 to 31/10/2021*"))
display(Markdown("**Typical age range:** "+dataset['datasetfields']['ageBand']))
display(Markdown("**Purpose:** "+dataset['datasetv2']['provenance']['origin']['purpose'][0]))
display(Markdown("**Source:** "+dataset['datasetv2']['provenance']['origin']['source'][0]))
display(Markdown("**Pathway:** "+dataset['datasetv2']['coverage']['pathway']))
display(Markdown("***Information collected***: *Patient demographics, dates of attendance, admission and discharge, presenting complaints, outcomes of attendance, waiting times, clinical investigations, diagnosis and treatment.*"))  
display(Markdown("***Structure of dataset***: *Each attendance is represented by a distinct row of data. A patient may have multiple attendances in any given finanicial year. If a patient arrives and is sent to a different clinic (i.e. walk-in clinic), this may appear as two records. Where follow up care is required and provided by the A&E department, a second planned attendance is recorded.*"))  
display(Markdown("***Update frequency in UK LLC TRE***: *N/A - dataset retired on 31/10/2021.*"))  
display(Markdown("***Dataset versions in UK LLC TRE***: *TBC*"))
display(Markdown("***Data quality issues***: *Data quality notes that highlight specific known issues are published alongside the finalised HES datasets: [https://digital.nhs.uk/data-and-information/data-tools-and-services/data-services/hospital-episode-statistics/the-processing-cycle-and-hes-data-quality](https://digital.nhs.uk/data-and-information/data-tools-and-services/data-services/hospital-episode-statistics/the-processing-cycle-and-hes-data-quality)*"))  
display(Markdown("***Restrictions to data usage***: *Medical purposes only (medical research) as defined in the NHS Act 2006: [https://www.legislation.gov.uk/ukpga/2006/41/part/13/crossheading/patient-information](https://www.legislation.gov.uk/ukpga/2006/41/part/13/crossheading/patient-information)*"))  
display(Markdown("***Further information***: [*https://digital.nhs.uk/data-and-information/data-tools-and-services/data-services/hospital-episode-statistics*](https://digital.nhs.uk/data-and-information/data-tools-and-services/data-services/hospital-episode-statistics)"))

NHS England title of dataset: Hospital Episode Statistics Accident and Emergency

Dataset name in UK LLC TRE: nhsd.HESAE

Short abstract: Record-level patient data set of patients attending Accident and Emergency Departments (including minor injury units and walk-in centres) in England. A record represents one attendance.

Extended abstract: https://web.www.healthdatagateway.org/dataset/101a7d68-1675-4b47-bfac-dde7b7b57877

Geographical coverage: United Kingdom,England

Temporal coverage: 2007-04-01

Data available in UK LLC TRE from: 01/04/2007 to 31/10/2021

Typical age range: 0-150

Purpose: CARE

Source: EPR

Pathway: Secondary Care pathway. This dataset covers attendances at accident and emergency departments in England. It includes information on the treatment and outcome of the attendance and can be linked to the HES APC dataset to further the pathway if a hospital admission is a result of the A&E attendance.

Information collected: Patient demographics, dates of attendance, admission and discharge, presenting complaints, outcomes of attendance, waiting times, clinical investigations, diagnosis and treatment.

Structure of dataset: Each attendance is represented by a distinct row of data. A patient may have multiple attendances in any given finanicial year. If a patient arrives and is sent to a different clinic (i.e. walk-in clinic), this may appear as two records. Where follow up care is required and provided by the A&E department, a second planned attendance is recorded.

Update frequency in UK LLC TRE: N/A - dataset retired on 31/10/2021.

Dataset versions in UK LLC TRE: TBC

Data quality issues: Data quality notes that highlight specific known issues are published alongside the finalised HES datasets: https://digital.nhs.uk/data-and-information/data-tools-and-services/data-services/hospital-episode-statistics/the-processing-cycle-and-hes-data-quality

Restrictions to data usage: Medical purposes only (medical research) as defined in the NHS Act 2006: https://www.legislation.gov.uk/ukpga/2006/41/part/13/crossheading/patient-information

Further information: https://digital.nhs.uk/data-and-information/data-tools-and-services/data-services/hospital-episode-statistics

2. Metrics#

The tables below summarise the HESAE dataset in the UK LLC TRE.

Table 1 The number of participants from each LPS that are represented in the HESAE dataset in the UK LLC TRE
(Note: numbers relate to the most recent extract of NHS England data)

gb_cohort = document.get_cohort_count()
print(gb_cohort.to_markdown(index=False, tablefmt="fancy_grid"))
╒════════════════╤═════════╕
│ cohort         │   count │
╞════════════════╪═════════╡
│ ALSPAC         │    4970 │
├────────────────┼─────────┤
│ BCS70          │    4429 │
├────────────────┼─────────┤
│ BIB            │   23568 │
├────────────────┼─────────┤
│ ELSA           │    5665 │
├────────────────┼─────────┤
│ EPICN          │   11054 │
├────────────────┼─────────┤
│ EXCEED         │    7087 │
├────────────────┼─────────┤
│ FENLAND        │    7608 │
├────────────────┼─────────┤
│ GLAD           │   57505 │
├────────────────┼─────────┤
│ MCS            │   14939 │
├────────────────┼─────────┤
│ NCDS58         │    4895 │
├────────────────┼─────────┤
│ NEXTSTEP       │    4518 │
├────────────────┼─────────┤
│ NIHRBIO_COPING │   12494 │
├────────────────┼─────────┤
│ NSHD46         │    2168 │
├────────────────┼─────────┤
│ TEDS           │    6373 │
├────────────────┼─────────┤
│ TRACKC19       │    9325 │
├────────────────┼─────────┤
│ TWINSUK        │   10286 │
├────────────────┼─────────┤
│ UKHLS          │    5159 │
├────────────────┼─────────┤
│ total          │  192043 │
╘════════════════╧═════════╛

3. Helpful syntax#

Below we will include syntax that may be helpful to other researchers in the UK LLC TRE. For longer scripts, we will include a snippet of the code plus a link to Git where you can find the full script.