processCohorts: Extract the cohort parents and children cohorts (cohorts...

View source: R/CohortQueries.R

processCohortsR Documentation

Extract the cohort parents and children cohorts (cohorts derieved from the parent cohort)

Description

This function lets you split the cohort data.frame into the parents and the children per parent.

Usage

processCohorts(cohort)

Arguments

cohort

The data.frame extracted using 'getCohortDefinitions()'

Details

Finds the parent cohorts and children cohorts

Value

Returns a list containing parents: a named vector of all the parent cohorts and cohortList: a list the same length as the parent vector with the first element containing all the children of the first parent cohort, the second element containing the children of the second parent, etc.

See Also

Other Cohorts: getCohortDefinitions(), getCohortSubsetDefinitions()

Examples

conDet <- getExampleConnectionDetails()

connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet)

cohortDef <- getCohortDefinitions(
  connectionHandler = connectionHandler, 
  schema = 'main'
)

parents <- processCohorts(cohortDef)


OhdsiReportGenerator documentation built on April 12, 2025, 2:09 a.m.