getAnalysisCohorts: Extracts the different analyses ran for each target and event...

View source: R/TreatmentPatternsQueries.R

getAnalysisCohortsR Documentation

Extracts the different analyses ran for each target and event cohorts

Description

This function extracts analysis ids, events cohorts, and databases per target from treatment patterns

Usage

getAnalysisCohorts(connectionHandler, schema, tpTablePrefix = "tp_")

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)

tpTablePrefix

The prefix used for the cohort generator results tables

Details

Specify the connectionHandler and the schema

Value

Returns a data.frame with the columns:

  • databaseName a concatinated string of all the database names ran for that analysis

  • databaseId a concatinated string of all the database ids ran for that analysis

  • analysisId the analysis ids for the treament patterns run

  • targetCohortName the target cohort name

  • targetCohortId the target cohort unique identifier

  • eventCohortList a concatinated string of all the event cohort names ran for that target

  • exitCohortList a concatinated string of all the exit cohort names ran for that target

See Also

Other TreatmentPatterns: getEventDuration(), getTreatmentPathways()

Examples

conDet <- getExampleConnectionDetails()

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

cohortAnalysis <- getAnalysisCohorts(
  connectionHandler = connectionHandler,
  schema = "main"
)

OhdsiReportGenerator documentation built on Nov. 14, 2026, 1:09 a.m.