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.
-
If you are interested in how we defined our code lists, look in the
codelists
folder. -
Analyses scripts are in the
analysis
directory:- If you are interested in how we defined our variables, we use the variable script variable_helper_fuctions to define functions that generate variables. We then apply these functions in variables_cohorts to create a dictionary of variables for cohort definitions, and in variables_dates to create a dictionary of variables for calculating study start dates and end dates.
- If you are interested in how we defined study dates (e.g., index and end dates), these vary by cohort and are described in the protocol. We use the script dataset_definition_dates to generate a dataset with all required dates for each cohort. This script imported all variables generated from variables_dates.
- If you are interested in how we defined our cohorts, we use the dataset definition script dataset_definition_cohorts to define a function that generates cohorts. This script imports all variables generated from variables_cohorts using the patient's index date, the cohort start date and the cohort end date. This approach is used to generate three cohorts: pre-vaccination, vaccinated, and unvaccinated—found in dataset_definition_prevax, dataset_definition_vax, and dataset_definition_unvax, respectively. For each cohort, the extracted data is initially processed in the preprocess data script preprocess data script, which generates a flag variable for pre-existing respiratory conditions and restricts the data to relevant variables.
- This directory also contains all the R scripts that process, describe, and analyse the extracted data.
-
The active_analyses contains a list of active analyses.
-
The
project.yaml
defines run-order and dependencies for all the analysis scripts. This file should not be edited directly. To make changes to the yaml, edit and run thecreate_project_actions.R
script which generates all the actions. -
Descriptive and Model outputs, including figures and tables are in the
released_outputs
directory.
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.