# Build and Manipulate Study Cohorts Using a Common Data Model

## Documentation for package ‘CohortConstructor’ version 0.5.0

- DESCRIPTION file.
- User guides, package vignettes and other documentation.
- Package NEWS.

## Help Pages

addCohortTableIndex | Add an index to a cohort table
benchmarkCohortConstructor | Run benchmark of CohortConstructor package
benchmarkData | Benchmarking results
collapseCohorts | Collapse cohort entries using a certain gap to concatenate records.
conceptCohort | Create cohorts based on a concept set
copyCohorts | Copy a cohort table
deathCohort | Create cohort based on the death table
demographicsCohort | Create cohorts based on patient demographics
entryAtFirstDate | Update cohort start date to be the first date from of a set of column dates
entryAtLastDate | Set cohort start date to the last of a set of column dates
exitAtDeath | Set cohort end date to death date
exitAtFirstDate | Set cohort end date to the first of a set of column dates
exitAtLastDate | Set cohort end date to the last of a set of column dates
exitAtObservationEnd | Set cohort end date to end of observation
intersectCohorts | Generate a combination cohort set between the intersection of different cohorts.
matchCohorts | Generate a new cohort matched cohort
measurementCohort | Create measurement-based cohorts
mockCohortConstructor | Function to create a mock cdm reference for CohortConstructor
padCohortDate | Set cohort start or cohort end
padCohortEnd | Add days to cohort end
padCohortStart | Add days to cohort start
renameCohort | Utility function to change the name of a cohort.
requireAge | Restrict cohort on age
requireCohortIntersect | Require cohort subjects are present (or absence) in another cohort
requireConceptIntersect | Require cohort subjects to have (or not have) events of a concept list
requireDemographics | Restrict cohort on patient demographics
requireFutureObservation | Restrict cohort on future observation
requireInDateRange | Require that an index date is within a date range
requireIsEntry | Restrict cohort to specific entry
requireIsFirstEntry | Restrict cohort to first entry
requireIsLastEntry | Restrict cohort to last entry per person
requireMinCohortCount | Filter cohorts to keep only records for those with a minimum amount of subjects
requirePriorObservation | Restrict cohort on prior observation
requireSex | Restrict cohort on sex
requireTableIntersect | Require cohort subjects are present in another clinical table
sampleCohorts | Sample a cohort table for a given number of individuals.
stratifyCohorts | Create a new cohort table from stratifying an existing one
subsetCohorts | Generate a cohort table keeping a subset of cohorts.
trimDemographics | Trim cohort on patient demographics
trimToDateRange | Trim cohort dates to be within a date range
unionCohorts | Generate cohort from the union of different cohorts
yearCohorts | Generate a new cohort table restricting cohort entries to certain years