OHDSI / CohortDiagnostics

An R package for performing various cohort diagnostics.
https://ohdsi.github.io/CohortDiagnostics
40 stars 45 forks source link

Index Event Breakdown is not reported for subset cohorts #1071

Open gowthamrao opened 10 months ago

gowthamrao commented 10 months ago

To reproduce: build a cohort definition object by using CohortGenerator subset operator, run Cohort Diagnostics with index event breakdown diagnostics turned on. See output - no index event breakdown is reported for subset cohorts.

Expected: I would expect that index event breakdown is reported for subset cohort.

Justification: We expect to see changes in index event breakdown by calendar period, e.g. if a new code was introduced in ICD10 that did not exist in ICD9 - it may change the index event entry breakdown. Also changes may be observed because of some ecological reasons such as introduction of new class of drugs. By subsetting - we can empirically evaluate this.

Technical reason: in current implementation cohort definitions that do not have concept set expressions in them skip concept set diagnostics and index event breakdown. This makes sense because subset cohorts dont have concept set expression in it. But, subset are based on a primary parent cohort definition that has a concept set. I think we should allow for these diagnostics for subset cohorts (atleast for index event breakdown) by using the parent cohorts concept set.

Temporary workaround: use cohort characterization with period = day 0. This can approximate index event breakdown.

azimov commented 10 months ago

Are you running with both the base cohort and the subset in the cohort definition set? The concept sets from parents should be copied to children but this obviously isn't possible if the parent cohort isn't passed to cohort diagnostics.

gowthamrao commented 10 months ago

Yes - running them together in one cohortDefinitionSet

gowthamrao commented 7 months ago

@azimov have you confirmed this ?