copyAndCensorCohorts: Copy the cohorts from the cohortStagingTable to the...

Description Usage Arguments

View source: R/CohortConstruction.R

Description

This function will copy the cohorts from the cohortStagingTable to the cohortTable that have a count of subjects greater than the minCellCount.

Usage

1
2
3
4
5
6
7
8
9
copyAndCensorCohorts(
  connection,
  cohortDatabaseSchema,
  cohortStagingTable,
  cohortTable,
  targetIds,
  minCellCount,
  oracleTempSchema
)

Arguments

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'.

cohortStagingTable

Name of the staging cohort table containing the cohorts before performing any sub-grouping

cohortTable

Name of the cohort table.

targetIds

A vector containing the target cohort IDs consider when copying to the main table This will copy over any subgroups associated with these target cohort IDs

minCellCount

The minimum count of patients required when copying a cohor to the main table. Cohorts at or below this threshold are excluded

oracleTempSchema

Should be used in Oracle to specify a schema where the user has write privileges for storing temporary tables.

connectionDetails

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


ohdsi-studies/ScyllaCharacterization documentation built on April 23, 2021, 4:07 p.m.