getCohortDefinitions: Extract the cohort definition details

View source: R/CohortQueries.R

getCohortDefinitionsR Documentation

Extract the cohort definition details

Description

This function extracts all cohort definitions for the targets of interest.

Usage

getCohortDefinitions(
  connectionHandler,
  schema,
  cgTablePrefix = "cg_",
  targetIds = NULL
)

Arguments

connectionHandler

A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'.

schema

The result database schema (e.g., 'main' for sqlite)

cgTablePrefix

The prefix used for the cohort generator results tables

targetIds

A vector of integers corresponding to the target cohort IDs

Details

Specify the connectionHandler, the schema and the target cohort IDs

Value

Returns a data.frame with the cohort details

See Also

Other Cohorts: getCohortSubsetDefinitions(), processCohorts()

Examples

conDet <- getExampleConnectionDetails()

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

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


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