OHDSI / CohortGenerator

Cohort Generation for the OMOP Common Data Model
https://ohdsi.github.io/CohortGenerator/
11 stars 10 forks source link

Reindex operator - Create new cohorts by changing index date #94

Open gowthamrao opened 1 year ago

gowthamrao commented 1 year ago

I would like request the Generation of new cohorts with different index date (with new cohort id)

Example of a use case: Exist date diagnostics: See https://github.com/OHDSI/CohortDiagnostics/issues/298

Request:

  1. Reindex based on self: Given a cohort with subject_id, cohort_start_date, cohort_end_date, create a new cohort that is subject_id, cohort_end_date AS cohort_start_date, cohort_end_date . Other variations of this subject_id, cohort_end_date AS cohort_start_date, observation_period_end_date AS cohort_end_date (this variation requires eraFy)
  2. Reindex based on subset cohort: Given a target cohort and a subset cohort, apply cohort subset operation, but take the date of the subset cohort. e.g. where t is targetCohort, and s is subsetCohort (and of course, we need to check if output would conform to cohort definition of era and cohort_start_date >= cohort_end_date)
    • subject_id, t.cohort_start_date, s.cohort_start_date - 1 AS cohort_end_date - use case: exit when target cohort becomes part of subset cohort. persons receiving treatment for hypertension (target) subset by uncontrolled hypertension i.e. exit target when they are start uncontrolled (subset). The '1' maybe a parameter with default value of 1.
    • subject_id, t.cohort_start_date, s.cohort_end_date AS t.cohort_end_date - use case: using treatment cohort (target cohort) and indication cohort (subset cohort) - here the output would be persons stop being in the treatment cohort when they are no longer indicated. e.g. persons stop being in treated for hypertension cohort, when they are no longer hypertensive (subset end).