Get SQL query for Cohort definition.
getCohortSql(cohortDefinition, baseUrl, generateStats = TRUE)
An R list object (not JSON) representing the Cohort definition. It is the
output R expression object of list object from CohortDefinition
The base URL for the WebApi instance, for example: "http://server.org:80/WebAPI".
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.
An R object containing the SQL for Cohort definition.
Given a valid Cohort definition R-object (not JSON) this function will return the parameterized SQL in OHDSI SQL dialect. This SQL may be used along with OHDSI R-package 'SQLRender' to render/translate to target SQL dialect and parameters rendered.
if (FALSE) {
getCohortSql(CohortDefinition = (getCohortDefinition(cohortId = 13242, baseUrl = baseUrl)),
baseUrl = "http://server.org:80/WebAPI")
}