createCohortTable: Create cohort table(s)

View source: R/CohortConstruction.R

createCohortTableR Documentation

Create cohort table(s)

Description

This function creates an empty cohort table. Optionally, additional empty tables are created to store statistics on the various inclusion criteria.

Usage

createCohortTable(
  connectionDetails = NULL,
  connection = NULL,
  cohortDatabaseSchema,
  cohortTable = "cohort",
  createInclusionStatsTables = FALSE,
  resultsDatabaseSchema = cohortDatabaseSchema,
  cohortInclusionTable = paste0(cohortTable, "_inclusion"),
  cohortInclusionResultTable = paste0(cohortTable, "_inclusion_result"),
  cohortInclusionStatsTable = paste0(cohortTable, "_inclusion_stats"),
  cohortSummaryStatsTable = paste0(cohortTable, "_summary_stats")
)

Arguments

connectionDetails

An object of type connectionDetails as created using the createConnectionDetails function in the DatabaseConnector package. Can be left NULL if connection is provided.

connection

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.

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.

createInclusionStatsTables

Create the four additional tables for storing inclusion rule statistics?

resultsDatabaseSchema

Schema name where the statistics tables reside. Note that for SQL Server, this should include both the database and schema name, for example 'scratch.dbo'.

cohortInclusionTable

Name of the inclusion table, one of the tables for storing inclusion rule statistics.

cohortInclusionResultTable

Name of the inclusion result table, one of the tables for storing inclusion rule statistics.

cohortInclusionStatsTable

Name of the inclusion stats table, one of the tables for storing inclusion rule statistics.

cohortSummaryStatsTable

Name of the summary stats table, one of the tables for storing inclusion rule statistics.


ohdsi-studies/IbdCharacterization documentation built on July 26, 2024, 11:20 p.m.