Skip to contents

A function to extarct the targets settings found in characterization

Usage

getCharacterizationTargetSettings(
  connectionHandler,
  schema,
  cTablePrefix = "c_",
  cgTablePrefix = "cg_",
  characterizationTargetIds = NULL,
  targetIds = NULL,
  addDatabaseDetails = FALSE,
  databaseTable = "database_meta_data"
)

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)

cTablePrefix

The prefix used for the characterization results tables

cgTablePrefix

The prefix used for the cohort generator results tables

characterizationTargetIds

optional vector of characterizationTargetIds to restrict to

targetIds

optional vector of targetIds to restrict to

addDatabaseDetails

whether to add a databaseName and databaseId string

databaseTable

The name of the table with the database details (default 'database_meta_data')

Value

A data.frame with the characterization target cohort ids, names and inclusion criteria.

Details

Specify the connectionHandler, the schema and the prefixes

Examples

conDet <- getExampleConnectionDetails()

connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet)
#> Connecting using SQLite driver

targetCohorts <- getCharacterizationTargetSettings(
  connectionHandler = connectionHandler, 
  schema = 'main'
)