OHDSI / CohortGenerator

An R package for instantiating cohorts using data in the CDM.
https://ohdsi.github.io/CohortGenerator/
11 stars 10 forks source link

Add information on cohort subsetting to results model #172

Open schuemie opened 3 days ago

schuemie commented 3 days ago

(Wasn't sure if I should post this here or with CohortGeneratorModule)

The results model currently contains a subset_definition_id field in the cohort_definition table, but this doesn't point to anything in the results model. It would be good if we had information on the subsetting in the database.

A practical example of why this is problematic: We currently cannot link exposures to their indications. I'm currently parsing the settings JSON to get this information, but ideally the results model would be stand-alone.

A simply solution would be to dump the subset JSONs in a table, which would then have the following definition:

But this would require parsing the JSON to join exposures to indications. If possible we'd like to have a parsed representation in the database, so that table might look something like

with a second table called something like 'cg_subset_cohort_id_set` with structure