The purpose of this code is to generate phenotypes in the COHORT table of the UKBB OMOP CDM Postgresql database. Each phenotype will be given a unique cohort definition id, and will be recorded in data/AllCohorts.csv such that there is no overlap. To find a specific cohort definition id, refer to data/AllCohorts.csv which can be queried by disease name (cohortName), phenotyping algorithm (source), or cohort_definition id (cohortId)
Contains code used in repository, including:
- RunBasePhenotypesID.sh: query for 2+ occurrences of code
- ROLLUP: Queries for descendants of code
- CONTROL: Generates control cohort with 0 occurrences of code
- RunOHDSIPhenotypeLibraryID.sh: query for OHDSI phenotypes
- RunOMOPADOID.sh: query for ADO phenotypes
- RunOneOccID.sh: query for one occurrence of code
- RunPhecodeID.sh: query for Phecode phenotypes
- RunPhevaluatorDefns.sh: query for phenotypes used in PheValuator (extra specific and extra sensitive)
- test_phenotypes.py: testing suite
Subdirectories:
cohort_json_files/: Contains json files or json file templates (in case where phenotyping algorithm follows the same template for all diseases)cohort_sql_files/: Contains sql files and sql file templatescohort_runs/: Example runs used to generate phenotypesPhenotypingScripts/: Helper scripts to render templates, translate codes to OMOP CDM and render sql