Extract the cohort parents and children cohorts (cohorts derieved from the parent cohort)
Source:R/CohortQueries.R
processCohorts.Rd
This function lets you split the cohort data.frame into the parents and the children per parent.
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)
#> Connecting using SQLite driver
cohortDef <- getCohortDefinitions(
connectionHandler = connectionHandler,
schema = 'main'
)
parents <- processCohorts(cohortDef)