search:
boost: 0.5
Available on backends: TPP
This schema defines the data (both primary care and externally linked) available in the
OpenSAFELY-TPP backend. For more information about this backend, see
"SystmOne Primary Care".
The data provided by this schema are minimally transformed. They are very close to the
data provided by the underlying database tables. They are provided for data development
and data curation purposes.
from ehrql.tables.raw.tpp import (
apcs_cost_historical,
apcs_historical,
covid_therapeutics_raw,
isaric,
medications,
ons_deaths,
wl_clockstops,
wl_openpathways,
)
many rows per patient
This table contains some historical APCS cost data.
It has been exposed to users for data exploration, and may be removed in future.
many rows per patient
This table contains some historical APCS data.
It has been exposed to users for data exploration, and may be removed in future.
many rows per patient
The COVID Therapeutics dataset contains information on COVID treatments used in inpatient
and outpatient settings.
Metadata
Overview
Antivirals and neutralising monoclonal antibodies (nMABs) for COVID-19 can be
administered in inpatient setting or, for outpatients, in COVID Medicine Delivery
Units (CMDUs) specifically set up for this purpose. For patients considered for
these treatments, clinicians submit completed forms to NHS England. Each row
represents one completed form for one course of treatment. Data received by
OpenSAFELY currently covers patients who were approved for treatment. The patient
may or may not have actually received the treatment or completed the course (but we
assume that they usually do). They may have another form completed for another
treatment, either because it was decided to give them a different treatment, or for
some other reason. They may in theory also have another form completed some months
later for another instance of infection.
Treatment dates may be in the past or future at the point when the form is
submitted.
Note that this dataset contains some duplicate rows – some full duplicates and
some partial duplicates.
More Information
string
Status of form/application.
Approved
, Treatment Complete
, Treatment Not Started
, Treatment Stopped
string
Treatment setting/indication.
non_hospitalised
, hospitalised_with
, hospital_onset
string
Always has the value 'Covid-19'.
string
Intervention or therapeutic name. Expected to be one of:
date
Entered by the clinician and can represent either a future planned start
date or a past date at the time of form submission.
string
High-risk group to which the patient was considered to belong. Derived from
tick-boxes. Multiple groups can be selected and will be joined with the word
and
e.g. liver disease and rare neurological conditions
.
The available groups as at the time of writing are listed below. However
note that the precise wording used has changed over time and so filtering by
a specific disease name may not be reliable.
Downs syndrome
HIV or AIDS
IMID
haematologic malignancy
Patients with a haematological diseases
(sic)immune deficiencies
liver disease
primary immune deficiencies
rare neurological conditions
rare neurological diseases
renal disease
sickle cell disease
solid cancer
solid organ recipients
stem cell transplant recipients
string
High-risk group to which the patient was considered to belong. Derived from
tick-boxes. Multiple groups can be selected and will be joined with the word
and
e.g. liver disease and rare neurological conditions
.
The available groups as at the time of writing are listed below. However
note that the precise wording used has changed over time and so filtering by
a specific disease name may not be reliable.
Downs syndrome
HIV or AIDS
IMID
haematologic malignancy
Patients with a haematological diseases
(sic)immune deficiencies
liver disease
primary immune deficiencies
rare neurological conditions
rare neurological diseases
renal disease
sickle cell disease
solid cancer
solid organ recipients
stem cell transplant recipients
string
High-risk group to which the patient was considered to belong. Derived from
tick-boxes. Multiple groups can be selected and will be joined with the word
and
e.g. liver disease and rare neurological conditions
.
The available groups as at the time of writing are listed below. However
note that the precise wording used has changed over time and so filtering by
a specific disease name may not be reliable.
Downs syndrome
HIV or AIDS
IMID
haematologic malignancy
Patients with a haematological diseases
(sic)immune deficiencies
liver disease
primary immune deficiencies
rare neurological conditions
rare neurological diseases
renal disease
sickle cell disease
solid cancer
solid organ recipients
stem cell transplant recipients
string
Name and version of the patient registration form used to register the
treatment.
date
Date form submitted.
integer
Number of forms.
integer
Can occasionally be zero, presumably indicating an unknown or missing value
as minimum eligibility age is 12.
string
NHS England region in which the CMDU submitting the form is located.
date
Date on which the current dataset was imported.
many rows per patient
ISARIC is a dataset of COVID-19-related hospital admissions,
with coverage across the majority of hospitals across the UK,
including much richer clinical information
than collected in national Hospital Episode Statistics datasets.
The data in this table covers a subset of the ISARIC data columns available in TPP,
sourced from the ISARIC COVID-19 Clinical Database.
All columns included have deliberately been taken as strings while in a preliminary phase.
Descriptions taken from CCP_REDCap_ISARIC_data_dictionary_codebook.pdf
which also has information on the data expected for each column.
!!! warning
ISARIC data can only be used in collaboration with ISARIC researchers
who must be involved in working on the study and writing it up.
Refer to the OpenSAFELY database build report
to see when this data was last updated.
string
Age
string
TODO
string
Calculated age (comparing date of birth with date of enrolment). May be inaccurate if a date of February 29 is used.
string
Sex at birth.
string
Ethnic group: Arab.
string
Ethnic group: Black.
string
Ethnic group: East Asian.
string
Ethnic group: South Asian.
string
Ethnic group: West Asian.
string
Ethnic group: Latin American.
string
Ethnic group: White.
string
Ethnic group: Aboriginal/First Nations.
string
Ethnic group: Other.
string
Ethnic group: N/A.
string
Has the patient received a Covid-19 vaccine (open label licenced product)?
date
Date first vaccine given (Covid-19) if known.
date
Date second vaccine given (Covid-19) if known.
string
First vaccine given (Covid-19) but date not known.
string
Suspected or proven infection with pathogen of public health interest.
string
Proven or high likelihood of infection with pathogen of public health interest.
string
Proven infection with pathogen of public health interest.
string
Adult or child who meets case definition for inflammatory multi-system syndrome (MIS-C/MIS-A).
date
Onset date of first/earliest symptom.
string
Chronic cardiac disease, including congenital heart disease (not hypertension).
YES
, NO
, Unknown
string
Hypertension (physician diagnosed).
YES
, NO
, Unknown
string
Chronic pulmonary disease (not asthma).
YES
, NO
, Unknown
string
Asthma (physician diagnosed).
YES
, NO
, Unknown
string
Chronic kidney disease.
YES
, NO
, Unknown
string
Mild liver disease.
YES
, NO
, Unknown
string
Moderate or severe liver disease
YES
, NO
, Unknown
string
Chronic neurological disorder.
YES
, NO
, Unknown
string
Malignant neoplasm.
YES
, NO
, Unknown
string
Chronic haematologic disease.
YES
, NO
, Unknown
string
AIDS/HIV.
YES
, NO
, Unknown
string
Obesity (as defined by clinical staff).
YES
, NO
, Unknown
string
Diabetes and type.
NO
, 1
, 2
, N/K
string
Diabetes with complications.
YES
, NO
, Unknown
string
Diabetes without complications.
YES
, NO
, Unknown
string
Rheumatologic disorder.
YES
, NO
, Unknown
string
Dementia.
YES
, NO
, Unknown
string
Malnutrition.
YES
, NO
, Unknown
string
Smoking.
Yes
, Never Smoked
, Former Smoker
, N/K
date
Admission date at this facility.
string
Transfer from other facility?
date
Admission date at previous facility.
string
Admission date at previous facility not known.
string
Is the patient being readmitted with Covid-19?
date
Date of enrolment.
date
Outcome date.
many rows per patient
This table is an extension of the tpp.medications
table.
It contains additional fields whose contents are not yet well understood, with the
aim of facilitating exploratory analysis for data development and data curation
purposes.
date
dm+d code
integer
ID of the consultation associated with this event
integer
Medication status. The values might map to the descriptions below from the
data dictionary. Note that this still needs to be confirmed.
28 - Reducing dose blue script
Always >= 0 and <= 28
many rows per patient
Registered deaths
Date and cause of death based on information recorded when deaths are
certified and registered in England and Wales from February 2019 onwards.
The data provider is the Office for National Statistics (ONS).
This table is updated approximately weekly in OpenSAFELY.
This table includes the underlying cause of death, place of death, and up to
15 medical conditions mentioned on the death certificate.
These codes (cause_of_death_01
to cause_of_death_15
) are not ordered meaningfully.
More information about this table can be found in following documents provided by the ONS:
In the associated database table ONS_Deaths,
a small number of patients have multiple registered deaths.
This table contains all registered deaths.
The ehrql.tables.ons_deaths
table contains the earliest registered death.
!!! tip
To return one row per patient from ehrql.tables.raw.tpp.ons_deaths
,
for example the latest registered death, you can use:
```py
ons_deaths.sort_by(ons_deaths.date).last_for_patient()
```
date
Patient's date of death.
string
Patient's place of death.
Care Home
, Elsewhere
, Home
, Hospice
, Hospital
, Other communal establishment
ICD-10 code
ICD-10 code
Medical condition mentioned on the death certificate.
ICD-10 code
Medical condition mentioned on the death certificate.
ICD-10 code
Medical condition mentioned on the death certificate.
ICD-10 code
Medical condition mentioned on the death certificate.
ICD-10 code
Medical condition mentioned on the death certificate.
ICD-10 code
Medical condition mentioned on the death certificate.
ICD-10 code
Medical condition mentioned on the death certificate.
ICD-10 code
Medical condition mentioned on the death certificate.
ICD-10 code
Medical condition mentioned on the death certificate.
ICD-10 code
Medical condition mentioned on the death certificate.
ICD-10 code
Medical condition mentioned on the death certificate.
ICD-10 code
Medical condition mentioned on the death certificate.
ICD-10 code
Medical condition mentioned on the death certificate.
ICD-10 code
Medical condition mentioned on the death certificate.
ICD-10 code
Medical condition mentioned on the death certificate.
many rows per patient
National Waiting List Clock Stops
The columns in this table have the same data types as the columns in the associated
database table. The three "pseudo" columns are small
exceptions, as they are converted from binary columns to string columns.
string
string
string
string
string
string
string
string
string
string
string
many rows per patient
National Waiting List Open Pathways
The columns in this table have the same data types as the columns in the associated
database table. The three "pseudo" columns are small
exceptions, as they are converted from binary columns to string columns.
string
string
string
string
string
string
string
string
string
string
string
string