OHDSI / Characterization

Various types of characterizations of a target and outcome cohort.
https://ohdsi.github.io/Characterization/
3 stars 5 forks source link

Ability to characterize an event cohort based on first, last or random event, atmost n events #7

Closed gowthamrao closed 4 months ago

gowthamrao commented 1 year ago

We have event cohorts (E.g. pneumonia, allergy, headache) that genuinely happen multiple times per person. We observed that while the vast majority have 1 or 2 events per person, a minority have a distorted number of events e.g. 100+ events. In those cases, the characterization output if heavily weighted by the one person who has multiple potentially temporally close events.

We solve these by creating another cohort with the same definition but limiting to first occurrence - then looking at the characteristics and comparing to the characteristics of the same cohort definition but taking all events. This is taxing both to the investigator and computation.

If we can handle it (maybe using a combination of cohort subset package logic and characterization package) - it would be very useful

jreps commented 1 year ago

The package has been updated such that when a user inputs a target cohort with multiple entries per subject, the analysis for aggregate covariates will only use the first cohort entry per subject and will exclude any subjects with a cohort entry that occurs less than minPriorObservation days to the subjects observation start.

The package has also be updated to calculate the aggregate covariates for TnO/TnOc when O is all entries and first entry.

jreps commented 4 months ago

For first/last/random events I recommend using CohortGenerator to create the cohorts and then feeding those cohorts into Characterization. I'm going to close this issue since I think CohortGenerator should be responsible for modifying cohorts.