Description Usage Arguments Details
View source: R/CohortConstruction.R
This function instantiates a set of cohort in the cohort table, using definitions that are fetched
from a WebApi interface. Optionally, the inclusion rule statistics are computed and stored in the
inclusionStatisticsFolder
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | instantiateCohortSet(
connectionDetails = NULL,
connection = NULL,
cdmDatabaseSchema,
tempEmulationSchema = NULL,
cohortDatabaseSchema = cdmDatabaseSchema,
cohortTable = "cohort",
cohorts = NULL,
cohortSqlFolder = "",
createCohortTable = FALSE,
incremental = FALSE,
incrementalFolder = NULL,
...
)
|
connectionDetails |
An object of type |
connection |
An object of type |
cdmDatabaseSchema |
Schema name where your patient-level data in OMOP CDM format resides. Note that for SQL Server, this should include both the database and schema name, for example 'cdm_data.dbo'. |
tempEmulationSchema |
Should be used in emulate a temporary schema. |
cohortDatabaseSchema |
Schema name where your cohort table resides. Note that for SQL Server, this should include both the database and schema name, for example 'scratch.dbo'. |
cohortTable |
Name of the cohort table. |
createCohortTable |
Create the cohort table? If |
incremental |
Create only cohorts that haven't been created before? |
incrementalFolder |
If |
packageName |
The name of the package containing the cohort definitions. Can be left
NULL if |
cohortToCreateFile |
The location of the cohortToCreate file within the package. Is ignored
if |
baseUrl |
The base URL for the WebApi instance, for example:
"http://server.org:80/WebAPI". Can be left NULL if |
cohortSetReference |
A data frame with four columns, as described in the details. Can be left
NULL if |
cohortIds |
Optionally, provide a subset of cohort IDs to restrict the construction to. |
generateInclusionStats |
Compute and store inclusion rule statistics? |
inclusionStatisticsFolder |
The folder where the inclusion rule statistics are stored. Can be
left NULL if |
Currently two ways of executing this function are supported, either (1) embedded in a study
package, assuming the cohort definitions are stored in that package using the
ROhdsiWebApi::insertCohortDefinitionSetInPackage
, or (2) by using a WebApi interface to
retrieve the cohort definitions. When using this function from within a study package, use the
packageName
and cohortToCreateFile
to specify the name of the study package, and the
name of the cohortToCreate file within that package, respectively When using this function using a
WebApi interface, use the baseUrl
and cohortSetReference
to specify how to connect to
the WebApi, and which cohorts to fetch, respectively.
The cohortSetReference
argument must be a data frame with the following columns:
The cohort ID in ATLAS.
The full name of the cohort. This will be shown in the Shiny app.
The cohort ID to use in the package. Usually the same as the cohort ID in ATLAS.
A short name for the cohort, to use to create file names. do not use special characters.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.