This function will take a cohortDefinitionSet that inclusions the Circe JSON representation of each cohort, parse the InclusionRule property to obtain the inclusion rule name and sequence number and insert the values into the cohortInclusionTable. This function is only required when generating cohorts that include cohort statistics.
insertInclusionRuleNames(
connectionDetails = NULL,
connection = NULL,
cohortDefinitionSet,
cohortDatabaseSchema,
cohortInclusionTable = getCohortTableNames()$cohortInclusionTable
)A data frame containing the inclusion rules by cohort and sequence ID
An object of type connectionDetails as created using the
createConnectionDetails function in the
DatabaseConnector package. Can be left NULL if connection is
provided.
An object of type connection as created using the
connect function in the
DatabaseConnector package. Can be left NULL if connectionDetails
is provided, in which case a new connection will be opened at the start
of the function, and closed when the function finishes.
The cohortDefinitionSet argument must be a data frame with
the following columns:
The unique integer identifier of the cohort
The cohort's name
The OHDSI-SQL used to generate the cohort
Optionally, this data frame may contain:
The Circe JSON representation of the cohort
Schema name where your cohort tables reside. Note that for SQL Server, this should include both the database and schema name, for example 'scratch.dbo'.
Name of the inclusion table, one of the tables for storing inclusion rule statistics.