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

Standardization of embedding cohort definitions in a study package #244

Open
schuemie opened this issue Feb 8, 2022 · 0 comments
Open
Assignees

Comments

@schuemie
Copy link
Member

schuemie commented Feb 8, 2022

There are currently different ways to embed cohort definitions in study packages used throughout HADES. I propose the following standard:

A CSV file called 'Cohorts.csv' in the 'inst/' folder, with at least these fields:

  • cohortId: the cohort ID used throughout in the study package. This is also used to generate the JSON and SQL file names.
  • cohortName: the cohort name used throughout the study package. This name is for example displayed in Shiny apps
  • webApiCohortId: only used by ROhdsiWebApi::insertCohortDefinitionSetInPackage when grabbing the cohort definitions from the WebAPI.

In the 'inst/cohorts' folder one JSON file per cohort definition named '[cohortId].json', so for example '1.json', '2.json', etc.

In the 'inst/sql/sql_server' folder one SQL file per cohort definition named '[cohortId].sql', so for example '1.sql', '2.sql', etc.

(Note: I'm proposing we not store all this information (all JSON, SQL, meta-data) in a single RDS because that could become a very big file that might not fit in memory, and because we couldn't use GitHub's version control to see what has changed.)

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

No branches or pull requests

2 participants