getCohortDefinitionSql: Get a cohort definition's SQL from WebAPI

View source: R/Deprecated.R

getCohortDefinitionSqlR Documentation

Get a cohort definition's SQL from WebAPI

Description

Get a cohort definition's SQL from WebAPI

Usage

getCohortDefinitionSql(cohortId, baseUrl, generateStats = TRUE)

Arguments

cohortId

An integer id representing the id that uniquely identifies a cohort definition in a WebApi instance.

baseUrl

The base URL for the WebApi instance, for example: "http://server.org:80/WebAPI".

generateStats

Should the SQL include the code for generating inclusion rule statistics? Note that if TRUE, several additional tables are expected to exists as described in the details. By default this is TRUE.

Details

Obtains the template SQL of a cohort. When using generateStats = TRUE, the following tables are required to exist when executing the SQL: cohort_inclusion, cohort_inclusion_result, cohort_inclusion_stats, and cohort_summary_stats. Also note that the cohort_inclusion table should be populated with the names of the rules prior to executing the cohort definition SQL.

Value

The templated SQL to generate the cohort


OHDSI/ROhdsiWebApi documentation built on March 15, 2023, 1:23 p.m.