Skip to contents

A function to extract the targets found in self controlled case series

Usage

getSccsTargets(
  connectionHandler,
  schema,
  sccsTablePrefix = "sccs_",
  cgTablePrefix = "cg_"
)

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)

sccsTablePrefix

The prefix used for the cohort generator results tables

cgTablePrefix

The prefix used for the cohort generator results tables

Value

A data.frame with the self controlled case series target cohort ids and names.

Details

Specify the connectionHandler, the schema and the prefixes

Examples

conDet <- getExampleConnectionDetails()

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

cohorts <- getSccsTargets(
  connectionHandler = connectionHandler, 
  schema = 'main'
)