Table schemas
Table schemas define the tables and columns available to query in a dataset definition. The schema a dataset definition is written against determines which backends it can be run inside.
Below are a list of all table schemas available in ehrQL, together with the backends that support them.
tpp🔗
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".
core🔗
Available on backends: TPP, EMIS
This schema defines the core tables and columns which should be available in any backend providing primary care data, allowing dataset definitions written using this schema to run across multiple backends.
emis🔗
Available on backends: EMIS
This schema defines the data (both primary care and externally linked) available in the OpenSAFELY-EMIS backend. For more information about this backend, see "EMIS Primary Care".
examples.tutorial🔗
This schema is for development or testing purposes and is not available on any backend.
This example schema is for use in the ehrQL tutorial.
raw.core🔗
Available on backends: TPP, EMIS
This schema defines the core tables and columns which should be available in any backend providing primary care data, allowing dataset definitions written using this schema to run across multiple backends.
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.
raw.emis🔗
Available on backends: EMIS
This schema defines the data (both primary care and externally linked) available in the OpenSAFELY-EMIS backend. For more information about this backend, see "EMIS 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.
raw.tpp🔗
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.
smoketest🔗
Available on backends: TPP, EMIS
This tiny schema is used to write a minimal dataset definition that can function as a basic end-to-end test (or "smoke test") of the OpenSAFELY platform across all available backends.