Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an EMIS schema and backend #797

Closed
evansd opened this issue Oct 20, 2022 · 2 comments · Fixed by #1812
Closed

Add an EMIS schema and backend #797

evansd opened this issue Oct 20, 2022 · 2 comments · Fixed by #1812

Comments

@evansd
Copy link
Contributor

evansd commented Oct 20, 2022

We want to expose the following EMIS tables:

  • patients
  • clinical_events
  • medications
  • ons_deaths
  • vaccinations

This will involve:

  • checking that the placeholder table definitions in ehrql.backends.emis are correct (we know that the ons_deaths definition is wrong but the others might be ok)
  • adding a new ehrql.tables.beta.emis module containing a schema for a vaccinations table, and adding a definition for this table to ehrql.backends.emis

It will be useful to refer to the implementation of EMISBackend in cohort-extractor to understand the contents of the tables.

We should test this by running a simple study that involves each table against the EMIS backend.

[Updated 2023-11-21]

@sebbacon
Copy link
Contributor

Does this in turn depend on something like "define core contracts to allow querying of both EMIS and TPP"?

@evansd
Copy link
Contributor Author

evansd commented Oct 20, 2022

No, I don't think it does — and by design. The plan is that (a) the use of the tables.beta namespace and (b) the layers of indirection that Data Builder gives us mean that we can get something out there for people to use and then, at our leisure, work towards a set of core contracts that both can implement.

That is, it's possible for tables.beta.tpp and tables.tpp to co-exist and look different but both end up mapped to the same underlying database tables. So I'm hoping that gives us enough flexibility to decouple "Have some way of querying the data" from "Decide on the one true way that all EHR data should be represented" — which feels like a good thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants