Emergency Care Data Set (ECDS)#

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 = 'ECDS'
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']['metadataquality']['title']))
display(Markdown("***Dataset name in UK LLC TRE***: *nhsd.ECDS*"))  
display(Markdown("**Short abstract:** "+dataset['datasetfields']['abstract']))
display(Markdown("***Extended abstract:*** [*https://web.www.healthdatagateway.org/dataset/8883f996-7943-4ac3-a625-7793c19949cc*](https://web.www.healthdatagateway.org/dataset/8883f996-7943-4ac3-a625-7793c19949cc)"))
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/10/2017 onwards*"))
display(Markdown("**Typical age range:** "+dataset['datasetfields']['ageBand']))
display(Markdown("**Collection situation:** "+dataset['datasetv2']['provenance']['origin']['collectionSituation'][0]))
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 time, 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***: *Quarterly*"))  
display(Markdown("***Dataset versions in UK LLC TRE***: *TBC*"))
display(Markdown("***Data quality issues***: *Data quality reports that highlight specific known issues are published alongside the finalised ECDS datasets: [https://digital.nhs.uk/data-and-information/data-collections-and-data-sets/data-sets/emergency-care-data-set-ecds/data-quality#further-a-e-and-ecds-data-quality-reports](https://digital.nhs.uk/data-and-information/data-collections-and-data-sets/data-sets/emergency-care-data-set-ecds/data-quality#further-a-e-and-ecds-data-quality-reports)*"))  
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-collections-and-data-sets/data-sets/emergency-care-data-set-ecds*](https://digital.nhs.uk/data-and-information/data-collections-and-data-sets/data-sets/emergency-care-data-set-ecds)"))

NHS England title of dataset: Emergency Care Data Set (ECDS)

Dataset name in UK LLC TRE: nhsd.ECDS

Short abstract: The Emergency Care Data Set (ECDS) is a national data set providing information to support the care provided in emergency departments by including the data items needed to understand capacity and demand and help improve patient care.

Extended abstract: https://web.www.healthdatagateway.org/dataset/8883f996-7943-4ac3-a625-7793c19949cc

Geographical coverage: United Kingdom,England

Temporal coverage: 01/10/2017

Data available in UK LLC TRE from: 01/10/2017 onwards

Typical age range: 0-150

Collection situation: ACCIDENT AND EMERGENCY

Purpose: CARE

Source: EPR

Pathway: Urgent and Emergency Care

Information collected: Patient demographics, dates of attendance, admission and discharge, presenting complaints, outcomes of attendance, waiting time, 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: Quarterly

Dataset versions in UK LLC TRE: TBC

Data quality issues: Data quality reports that highlight specific known issues are published alongside the finalised ECDS datasets: https://digital.nhs.uk/data-and-information/data-collections-and-data-sets/data-sets/emergency-care-data-set-ecds/data-quality#further-a-e-and-ecds-data-quality-reports

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-collections-and-data-sets/data-sets/emergency-care-data-set-ecds

2. Metrics#

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

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

# group extract by date
gb_cohort = document.get_cohort_count()
print(gb_cohort.to_markdown(index=False, tablefmt="fancy_grid"))
#display(gb_cohort)
╒════════════════╤═════════╕
│ cohort         │   count │
╞════════════════╪═════════╡
│ ALSPAC         │    2314 │
├────────────────┼─────────┤
│ BCS70          │    2633 │
├────────────────┼─────────┤
│ BIB            │   13855 │
├────────────────┼─────────┤
│ ELSA           │    3761 │
├────────────────┼─────────┤
│ EPICN          │    7801 │
├────────────────┼─────────┤
│ EXCEED         │    4195 │
├────────────────┼─────────┤
│ FENLAND        │    4930 │
├────────────────┼─────────┤
│ GLAD           │   40782 │
├────────────────┼─────────┤
│ MCS            │    9498 │
├────────────────┼─────────┤
│ NCDS58         │    2885 │
├────────────────┼─────────┤
│ NEXTSTEP       │    2627 │
├────────────────┼─────────┤
│ NIHRBIO_COPING │    7358 │
├────────────────┼─────────┤
│ NSHD46         │    1275 │
├────────────────┼─────────┤
│ TEDS           │    3683 │
├────────────────┼─────────┤
│ TRACKC19       │    5312 │
├────────────────┼─────────┤
│ TWINSUK        │    6074 │
├────────────────┼─────────┤
│ UKHLS          │    3090 │
├────────────────┼─────────┤
│ total          │  122073 │
╘════════════════╧═════════╛

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.