Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
121 changes: 67 additions & 54 deletions docs/data-sources/apc.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,90 +3,103 @@ Admitted Patient Care Spells (APCS) is part of Hospital Episode Statistics (HES)

## Metadata

* **Data provider** NHS England.
* **Participation / Coverage** In-hospital patient admissions in NHS Trusts in England.
* **Available from** Data are available from early 2016.
* **Update frequency in OpenSAFELY** Approximately monthly.
* **Delay between event occurring and event appearing in OpenSAFELY** Approximately 1-2 months.
* **Collected information** Admission and discharge dates; routes of admission; reason for admission; diagnoses; treatments; discharge destination.
**Data provider**
: NHS England.

**Participation / Coverage**
: In-hospital patient admissions in NHS Trusts in England.

**Available from**
: Data are available from early 2016.

**Update frequency in OpenSAFELY**
: Approximately monthly.

**Delay between event occurring and event appearing in OpenSAFELY**
: Approximately 1-2 months.

**Collected information**
: Admission and discharge dates; routes of admission; reason for admission; diagnoses; treatments; discharge destination.

## Basic Background

Each row is a in-hospital spell. In-hospital episodes cannot be queried.

* An **episode** is a period of continuous care under a single responsible consultant.
* A **spell** is a period of continuous care within a single trust.
- An **episode** is a period of continuous care under a single responsible consultant.
- A **spell** is a period of continuous care within a single trust.

Essentially, a spell is a collection of episodes (often just one episode) denoting the entirety of a patient's stay in hospital from admission to discharge or death. An episode denotes time within a spell spent under the responsibility of a single consultant. So for example if within your hospital stay you are transferred from a medical to surgical ward, or transferred to another site (within the same trust), there will be at least two episodes within your spell.

The dataset does not include any patients who have not been discharged (i.e., patients who have an incomplete spell) at the data extraction date. In other words, the data will be missing admissions of the patients with the longest stay for the most recent admissions.

### \* Notes on transfers:

- Sometimes it is desirable to exclude patients admitted via transfer from another provider, e.g. if we are looking for readmissions we probably want to exclude them because it was not the original admission date of the readmission.
- The post-transfer spell may have additional diagnoses or procedures of interest so it is often useful to include them.
- Transfers may occasionally come from private hospitals where a patient's condition worsened to require e.g. intensive care; if the initial spell was not NHS funded we would probably not have the original spell in our data.

## Reference tables

### Admission method reference table
Codes | Admission method
-- | --
11, 12, 13 | Elective (planned/booked/waiting list)
21 | Emergency Admission: from A&E | usually include
2A | Emergency Admission: from A&E of another provider
22, 23, 24, 25, 2D | Emergency Admission: other sources (e.g. GP, MH crisis team)
28 | Emergency Admission: Other - NB can include transfers and births
2B | Transfer (emergency)
81 | Transfer (non-emergency)
2C, 82, 83 | Birth of baby (in hospital or e.g. at home)
31, 32 | Maternity Admission: Mother admitted ante or post partum

| Codes | Admission method | |
| ------------------ | ---------------------------------------------------------------- | --------------- |
| 11, 12, 13 | Elective (planned/booked/waiting list) | |
| 21 | Emergency Admission: from A&E | usually include |
| 2A | Emergency Admission: from A&E of another provider | |
| 22, 23, 24, 25, 2D | Emergency Admission: other sources (e.g. GP, MH crisis team) | |
| 28 | Emergency Admission: Other - NB can include transfers and births | |
| 2B | Transfer (emergency) | |
| 81 | Transfer (non-emergency) | |
| 2C, 82, 83 | Birth of baby (in hospital or e.g. at home) | |
| 31, 32 | Maternity Admission: Mother admitted ante or post partum | |

### Source of admission reference table
code | Source of admission
-- | --
19 | Usual place of residence or no fixed abode (but should exclude care homes)
29 | Temporary place of residence (e.g. hotel, school)
54, 65, 85, 88 | Care Home / hospice
51 | NHS other Hospital Provider - ordinary (physical care) ward or A&E
49, 52, 53 | NHS other Hospital Provider - psychiatric accommodation, maternity ward/neonates or MH/LD ward
39, 40, 41, 42, 66 | Other (Penal establishment, Court, or Police Station / Police Custody Suite, foster care)
79 | Babies born in or on the way to hospital
87 | Non NHS run hospital
98, 99 | Default/unknown

| code | Source of admission |
| ------------------ | ---------------------------------------------------------------------------------------------- |
| 19 | Usual place of residence or no fixed abode (but should exclude care homes) |
| 29 | Temporary place of residence (e.g. hotel, school) |
| 54, 65, 85, 88 | Care Home / hospice |
| 51 | NHS other Hospital Provider - ordinary (physical care) ward or A&E |
| 49, 52, 53 | NHS other Hospital Provider - psychiatric accommodation, maternity ward/neonates or MH/LD ward |
| 39, 40, 41, 42, 66 | Other (Penal establishment, Court, or Police Station / Police Custody Suite, foster care) |
| 79 | Babies born in or on the way to hospital |
| 87 | Non NHS run hospital |
| 98, 99 | Default/unknown |

### Patient classification reference table
code | patient classification
-- | --
1 | Ordinary admission (all emergency admissions and elective admissions expected to last at least one night)
2 | Day case admission (patient admitted electively, not expected to stay overnight and who returns home on the same day as scheduled. If discharge does not occur same day as planned, this should be counted as an ordinary admission)
3, 4 | Regular day or night admission (part of a planned series of regular admissions for an on-going regime of broadly similar treatment. If the admission lasts 24 hours or more, such an admission should be classified as an ordinary admission)
5 | Mother and baby using delivery facilities only

| code | patient classification |
| ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 1 | Ordinary admission (all emergency admissions and elective admissions expected to last at least one night) |
| 2 | Day case admission (patient admitted electively, not expected to stay overnight and who returns home on the same day as scheduled. If discharge does not occur same day as planned, this should be counted as an ordinary admission) |
| 3, 4 | Regular day or night admission (part of a planned series of regular admissions for an on-going regime of broadly similar treatment. If the admission lasts 24 hours or more, such an admission should be classified as an ordinary admission) |
| 5 | Mother and baby using delivery facilities only |

### Discharge destination reference table

Code | Description
-- | --
19 | Usual place of residence unless listed below. It includes 'no fixed abode' but excludes care homes.
29 | Temporary place of residence (includes hotel, residential Educational Establishment)
51, 52 | Transfer: NHS other Hospital Provider - general ward or maternity/ neonates
30, 49, 50, 53 | Transfer (other NHS):, mentally ill / Learning Disabilities, psychiatric units
48, 84, 87 | Transfer: Non-NHS run hospital or medium secure unit, Scotland high-secure unit
37, 38, 66 | Other: Court, Penal establishment, police station, foster care
54, 65, 85, 88 | Hospice / Care Home
79 | Not applicable - PATIENT died or stillbirth
| Code | Description |
| -------------- | --------------------------------------------------------------------------------------------------- |
| 19 | Usual place of residence unless listed below. It includes 'no fixed abode' but excludes care homes. |
| 29 | Temporary place of residence (includes hotel, residential Educational Establishment) |
| 51, 52 | Transfer: NHS other Hospital Provider - general ward or maternity/ neonates |
| 30, 49, 50, 53 | Transfer (other NHS):, mentally ill / Learning Disabilities, psychiatric units |
| 48, 84, 87 | Transfer: Non-NHS run hospital or medium secure unit, Scotland high-secure unit |
| 37, 38, 66 | Other: Court, Penal establishment, police station, foster care |
| 54, 65, 85, 88 | Hospice / Care Home |
| 79 | Not applicable - PATIENT died or stillbirth |

#### Reference
[Link to lookup table](https://datadictionary.nhs.uk/attributes/discharge_destination.html?hl=discharge%2Cdestination)

[Link to lookup table](https://datadictionary.nhs.uk/attributes/discharge_destination.html?hl=discharge%2Cdestination)

## More information

* [Notebook showing breakdown of ethnicity codes](https://github.com/opensafely/rapid-reports/blob/master/notebooks/ethnicity-codes.ipynb) - (private, pending review & publication)
* [NHS Digital SUS site](https://digital.nhs.uk/services/secondary-uses-service-sus/secondary-uses-services-sus-guidance)
* [NHS Digital HES site](https://digital.nhs.uk/data-and-information/data-tools-and-services/data-services/hospital-episode-statistics)
* [Hospital APC Activity reports](https://digital.nhs.uk/data-and-information/publications/statistical/hospital-admitted-patient-care-activity)
* [NHS Digital APC data dictionary](https://datadictionary.nhs.uk/data_sets/cds_v6-2/cds_v6-2_type_130_-_admitted_patient_care_-_finished_general_episode_cds.html)
* [Data resource profile: Hospital Episode Statistics Admitted Patient Care (HES APC)](https://doi.org/10.1093/ije/dyx015)
* [CLOSER Understanding Hospital Episode Statistics](https://www.closer.ac.uk/wp-content/uploads/CLOSER-resource-understanding-hospital-episode-statistics-2018.pdf)
- [Notebook showing breakdown of ethnicity codes](https://github.com/opensafely/rapid-reports/blob/master/notebooks/ethnicity-codes.ipynb) - (private, pending review & publication)
- [NHS Digital SUS site](https://digital.nhs.uk/services/secondary-uses-service-sus/secondary-uses-services-sus-guidance)
- [NHS Digital HES site](https://digital.nhs.uk/data-and-information/data-tools-and-services/data-services/hospital-episode-statistics)
- [Hospital APC Activity reports](https://digital.nhs.uk/data-and-information/publications/statistical/hospital-admitted-patient-care-activity)
- [NHS Digital APC data dictionary](https://datadictionary.nhs.uk/data_sets/cds_v6-2/cds_v6-2_type_130_-_admitted_patient_care_-_finished_general_episode_cds.html)
- [Data resource profile: Hospital Episode Statistics Admitted Patient Care (HES APC)](https://doi.org/10.1093/ije/dyx015)
- [CLOSER Understanding Hospital Episode Statistics](https://www.closer.ac.uk/wp-content/uploads/CLOSER-resource-understanding-hospital-episode-statistics-2018.pdf)
32 changes: 22 additions & 10 deletions docs/data-sources/cpns.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,27 @@ Initially this was lab-confirmed covid deaths only, but also includes suspected

## Metadata

* **Data provider** NHS England.
* **Participation / Coverage** In-hospital covid-related deaths in England.
* **Update frequency in OpenSAFELY** Weekly.
* **Delay between event occurring and event appearing in OpenSAFELY** Within 2 weeks.
* **Available from** 24/03/2020 onwards (all test-positive deaths); 28/04/2020 onwards (test-positive and covid documented as underlying cause).
* **Collected information** Admission, test, result, and death dates; hospital and department of death; basic demographics.
**Data provider**
: NHS England.

**Participation / Coverage**
: In-hospital covid-related deaths in England.

**Update frequency in OpenSAFELY**
: Weekly.

**Delay between event occurring and event appearing in OpenSAFELY**
: Within 2 weeks.

**Available from**
: 24/03/2020 onwards (all test-positive deaths); 28/04/2020 onwards (test-positive and covid documented as underlying cause).

**Collected information**
: Admission, test, result, and death dates; hospital and department of death; basic demographics.

## More information
* [Notebook showing breakdown of ethnicity codes](https://github.com/opensafely/rapid-reports/blob/master/notebooks/ethnicity-codes.ipynb) - (private, pending review & publication)
* [Press release from Arden&GEM](https://www.ardengemcsu.nhs.uk/showcase/news-events/news-events/supporting-providers-to-record-covid-19-patient-notifications/)
* [Letter from NHSE to Trust chief execs regarding changes to data collection](https://www.england.nhs.uk/coronavirus/wp-content/uploads/sites/52/2020/04/C0389-update-to-cpns-reporting-letter-27-april-2020.pdf)
* [Technical summary on data series on deaths in people with COVID-19](https://www.gov.uk/government/publications/phe-data-series-on-deaths-in-people-with-covid-19-technical-summary)

- [Notebook showing breakdown of ethnicity codes](https://github.com/opensafely/rapid-reports/blob/master/notebooks/ethnicity-codes.ipynb) - (private, pending review & publication)
- [Press release from Arden&GEM](https://www.ardengemcsu.nhs.uk/showcase/news-events/news-events/supporting-providers-to-record-covid-19-patient-notifications/)
- [Letter from NHSE to Trust chief execs regarding changes to data collection](https://www.england.nhs.uk/coronavirus/wp-content/uploads/sites/52/2020/04/C0389-update-to-cpns-reporting-letter-27-april-2020.pdf)
- [Technical summary on data series on deaths in people with COVID-19](https://www.gov.uk/government/publications/phe-data-series-on-deaths-in-people-with-covid-19-technical-summary)
40 changes: 26 additions & 14 deletions docs/data-sources/ecds.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,33 @@ ECDS is part of Hospital Episode Statistics (HES) and is provided to OpenSAFELY

## Metadata

* **Data provider** NHS England.
* **Participation / Coverage** Emergency Department attendances in NHS Trusts in England.
* **Available from** Data are available from late 2017; however, ECDS was in a pilot phase until 2020 and data are incomplete prior to approximately early 2019.
* **Update frequency in OpenSAFELY** Approximately monthly.
* **Delay between event occurring and event appearing in OpenSAFELY** * Approximately 1-2 months.
* **Collected information** Attendance, admission and discharge dates; locations; presenting complaints; diagnoses.
**Data provider:**
: NHS England.

**Participation / Coverage:**
: Emergency Department attendances in NHS Trusts in England.

**Available from:**
: Data are available from late 2017; however, ECDS was in a pilot phase until 2020 and data are incomplete prior to approximately early 2019.

**Update frequency in OpenSAFELY**
: Approximately monthly.

**Delay between event occurring and event appearing in OpenSAFELY**
: Approximately 1-2 months.

**Collected information**
: Attendance, admission and discharge dates; locations; presenting complaints; diagnoses.

Diagnoses and discharge destinations are coded using SNOMED CT.

## More information
* [Notebook showing breakdown of ethnicity codes](https://github.com/opensafely/rapid-reports/blob/master/notebooks/ethnicity-codes.ipynb) - (private, pending review & publication)
* [NHS Digital ECDS site](https://digital.nhs.uk/data-and-information/data-collections-and-data-sets/data-sets/emergency-care-data-set-ecds)
* [NHS Digital SUS site](https://digital.nhs.uk/services/secondary-uses-service-sus/secondary-uses-services-sus-guidance)
* [NHS Digital HES site](https://digital.nhs.uk/data-and-information/data-tools-and-services/data-services/hospital-episode-statistics)
* [NHS Digital ECDS data dictionary](https://www.datadictionary.nhs.uk/data_sets/cds_v6-2/cds_v6-2-3_type_011_-_emergency_care_cds.html)
* [NHS Digital ECDS Information Standard](https://digital.nhs.uk/data-and-information/information-standards/information-standards-and-data-collections-including-extractions/publications-and-notifications/standards-and-collections/dcb0092-2062-commissioning-data-sets-emergency-care-data-set )
* [NHS Digital ECDS Technical Output Specification](https://digital.nhs.uk/data-and-information/data-collections-and-data-sets/data-sets/emergency-care-data-set-ecds/ecds-latest-update)
* [ECDS Data Quality Dashboards](https://digital.nhs.uk/data-and-information/data-tools-and-services/data-services/emergency-care-data-set-ecds-data-quality )

- [Notebook showing breakdown of ethnicity codes](https://github.com/opensafely/rapid-reports/blob/master/notebooks/ethnicity-codes.ipynb) - (private, pending review & publication)
- [NHS Digital ECDS site](https://digital.nhs.uk/data-and-information/data-collections-and-data-sets/data-sets/emergency-care-data-set-ecds)
- [NHS Digital SUS site](https://digital.nhs.uk/services/secondary-uses-service-sus/secondary-uses-services-sus-guidance)
- [NHS Digital HES site](https://digital.nhs.uk/data-and-information/data-tools-and-services/data-services/hospital-episode-statistics)
- [NHS Digital ECDS data dictionary](https://www.datadictionary.nhs.uk/data_sets/cds_v6-2/cds_v6-2-3_type_011_-_emergency_care_cds.html)
- [NHS Digital ECDS Information Standard](https://digital.nhs.uk/data-and-information/information-standards/information-standards-and-data-collections-including-extractions/publications-and-notifications/standards-and-collections/dcb0092-2062-commissioning-data-sets-emergency-care-data-set)
- [NHS Digital ECDS Technical Output Specification](https://digital.nhs.uk/data-and-information/data-collections-and-data-sets/data-sets/emergency-care-data-set-ecds/ecds-latest-update)
- [ECDS Data Quality Dashboards](https://digital.nhs.uk/data-and-information/data-tools-and-services/data-services/emergency-care-data-set-ecds-data-quality)
Loading