Details of the purpose and any published outputs from this project can be found at the link above.
The contents of this repository MUST NOT be considered an accurate or valid representation of the study or its purpose. This repository may reflect an incomplete or incorrect analysis with no further ongoing work. The content has ONLY been made public to support the OpenSAFELY open science and transparency principles and to support the sharing of re-usable code for other subsequent users. No clinical, policy or safety conclusions must be drawn from the contents of this repository.
The OpenSAFELY framework is a Trusted Research Environment (TRE) for electronic health records research in the NHS, with a focus on public accountability and research quality.
Read more at OpenSAFELY.org.
As standard, research projects have a MIT license.
This repository contains the following scripts:
- codelists/
- *.csv: Codelists for each variable defined in this study, downloaded by
opensafely codelists update. - codelists.json: JSON list of codelists automatically generated by
opensafely codelists update. - codelists.txt: User defined list of codelists for this study.
- *.csv: Codelists for each variable defined in this study, downloaded by
- project.yaml: The project pipeline used for executing the code and detailing dependencies. This file should not be edited directly. To make changes, edit and run create_project_actions.R.
- analysis/
- create_project_actions.R: R script to automatically generate
project.yamlfile. - dataset_definition/
- dataset_definition.py: Generates the dataset using start and ene dates specified in project.yaml.
- dataset_definition_cohorts.py: Defines the common elements of all cohorts using user specified index dates, cohort start date and cohort end date.
- dataset_definition_dates.py: Generates a dataset of key dates that is used by all other
dataset_definition_*.pyscripts. - variable_helper_functions.py: Defines ehrQL functions for variable creation.
- codelists.py: Creates codelist variables that can be accessed by
variables_cohorts.R.
- create_project_actions.R: R script to automatically generate