opensafely / emis-qa

MIT License
0 stars 0 forks source link

EMIS QA

The aim of this project is to verify the EMIS database. By comparing two snapshots that we generate before and after the EMIS database is rebuilt, we can better understand any unexpected changes in, for example, numbers of patients and numbers of practices.

Running

On first run, execute:

opensafely run run_all

This will generate the current and last snapshots, which will be identical, and a summary notebook that compares the current snapshot to the last snapshot.

On second and subsequent runs, execute:

opensafely run generate_study_population
opensafely run generate_summary_notebook

This will generate the current snapshot and a summary notebook.

Then, execute:

opensafely run rotate_study_population

This will generate the new last snapshot, which will be identical to the current snapshot. However, because it was executed after the summary notebook was generated, the summary notebook will compare the current snapshot to the old last snapshot.

Contributing

For local (non-Docker) development, first install pyenv and execute:

pyenv install $(pyenv local)

Then, execute:

python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt -r requirements.dev.txt

QA

bin/codestyle.sh .

Tests

python -m pytest

About the OpenSAFELY framework

The OpenSAFELY framework is a secure analytics platform for electronic health records research in the NHS.

Instead of requesting access for slices of patient data and transporting them elsewhere for analysis, the framework supports developing analytics against dummy data and then running against the real data within the same infrastructure that the real data is stored. Read more at OpenSAFELY.org.