Import dates and date coverage for OpenSAFELY-TPP data sources¶
This OpenSAFELY notebook provides data import dates and counts of raw event data for externally linked data sources in the OpenSAFELY-TPP database. It is part of the technical documentation for users of the OpenSAFELY platform to guide analyses and it should not be used for inference about any aspect of the pandemic, public health, or health service activity. For the avoidance of doubt: any clinical or epidemiological interpretation of this raw information is likely to be a misinterpretation.
If you want to see the Python code used to create this notebook, you can view it on GitHub.
The core SystmOne primary care datasets are held in the
S1 tables in the OpenSAFELY-TPP database.
The delay from events being recorded in SystmOne to being available in OpenSAFELY-TPP is around 2 - 9 days.
Reducing this to one day is possible for urgent queries where necessary.
All externally-linked data sources are listed below, with the table name given in brackets.
Frequently updated datasets:
- All positive or negative SARS-CoV2 tests, from SGSS (
- First-ever positive or negative SARS-CoV2 test, from SGSS (
- A&E attendances, from SUS Emergency Care data (
- In-patient hospital admissions, from SUS Admitted Patient Care Spells data (
- Out-patient hospital appointments, from SUS (
- Covid-related in-hospital deaths, from CPNS (
- All-cause registered deaths, from ONS (
- COVID-19 therapeutics (
- Health and Social Care Worker identification, collected at the point of vaccination (
One-off or infrequently updated datasets:
- COVID-19 Infection Survey, from ONS (
- High cost drugs (
- Unique Property Reference Number, used for deriving household variables (
- Master Patient Index (
- UK Renal Registry (
- ICNARC (
- Covid-related ICU admissions, from ICNARC (
- A&E attendances (old format), from SUS Emergency Care data (
Some of these tables are accompanied by additional tables with further data. For instance,
OPA contains the core out-patient appointment event data, and is supplemented by the
OPA_Proc tables. See the data schema notebook for more information.
This notebook was run on 2 December 2022. The information below reflects the state of the OpenSAFELY-TPP as at this date.
Latest dataset import dates¶
TPP create a snapshot of the primary care information captured in the SystmOne database which is processed (for example unstructured free-text is removed and other OpensAFELY-specific tables are created) before being imported into the OpenSAFELY-TPP database. TPP also receive (or "ingest") external datasets from NHS Digital, ONS, etc., which are processed and imported into OpenSAFELY-TPP. Each imported dataset over-writes previously-imported data.
Once a dataset has been imported, it can be queried immediately in the secure environment. SystmOne data is imported approximately weekly. External datasets are usually imported within a few days after they have been received by TPP. Each external dataset is received at different times, sometimes irregularly or with unexpected delays.
The dates in the table below reflect when the datasets were last imported into the OpenSAFELY-TPP database. They do not reflect when the data were received by TPP nor when the latest clinical or administrative events captured in each dataset occurred.
All dataset import dates¶
The figure below shows all dataset import dates for SystmOne and external datasets, up until the date this notebook was run (the vertical black line).
Text(0.5, 1.0, 'Latest dataset import dates as at 2 December 2022')
Event activity in external datasets¶
In the figures below, event activity (counts of events such as hospital admissions and deaths) is reported for external data sources from 1 February 2020 up to the notebook run date (left plot), and for the latest 30 days of activity up to the most recent event date (right plot).
The left plots can be used to gain a rough idea of event activity over time and helps to sense-check event frequencies and/or population counts in extracted datasets; it should not be used for direct clinical or epidemiological inference. The right plots can be used to gauge the latest reliable date for events recorded in each data source, i.e., a cut-off beyond which the data may be incomplete.
Note that the OpenSAFELY-TPP database only includes people who were ever registered at a GP practice using TPP's SystmOne clinical information system (roughly 40% of GP practices) on or after 1 January 2009, including those who have since deregistered or died. The data therefore captures activity for these patients only.
Counts of five or less are redacted.