View source: R/CohortDefinition.R
getCohortSql | R Documentation |
Get SQL query for Cohort definition.
getCohortSql(cohortDefinition, baseUrl, generateStats = TRUE)
cohortDefinition |
An R list object (not JSON) representing the Cohort definition. It is the
output R expression object of list object from |
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. |
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.
An R object containing the SQL for Cohort definition.
## Not run: getCohortSql(CohortDefinition = (getCohortDefinition(cohortId = 13242, baseUrl = baseUrl)), baseUrl = "http://server.org:80/WebAPI") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.