unionCohorts: Generate cohort from the union of different cohorts
Description
unionCohorts() combines different cohort entries, with those records
that overlap combined and kept. Cohort entries are when an individual was in
either of the cohorts.
Usage
unionCohorts(
cohort,
cohortId = NULL,
gap = 0,
cohortName = NULL,
name = tableName(cohort)
)
Value
A cohort table.
Arguments
cohort
A cohort table in a cdm reference.
cohortId
IDs of the cohorts to include. If NULL all cohorts will be
considered. Cohorts not included will be removed from the cohort set.
gap
Number of days between two subsequent cohort entries of a subject
that will be merged in a single cohort entry
cohortName
Name of the returned cohort. If NULL, the cohort name will
be created by collapsing the individual cohort names, separated by "_".