Limit a cdm database to a cohort
limitCdmToCohort.Rd
Creates a self-contained cdm database based only in the patients included in a cohort.
Usage
limitCdmToCohort(
connectionDetails,
cdmDatabaseSchema,
exposureDatabaseSchema,
exposureTable,
outcomeDatabaseSchema,
outcomeTable,
resultDatabaseSchema,
cohortObservationPeriodTable,
includeOutcomePatients = FALSE,
limitTableNames = "all",
transferTableNames = "all",
saveDir
)
Arguments
- connectionDetails
The connection details to the database. Should be an object of type
createConnectionDetails
.- cdmDatabaseSchema
The database schema where the cdm database is stored.
- exposureDatabaseSchema
The database schema where table with the exposure cohorts are stored.
- exposureTable
The table where the exposure cohorts are stored.
- outcomeDatabaseSchema
The database schema where the table with the outcome cohorts is stored.
- outcomeTable
The table with the outcome cohorts.
- resultDatabaseSchema
The database schema where the table with the combined cohorts will be stored. Needs write permission.
- cohortObservationPeriodTable
The table with the new observation periods.
- includeOutcomePatients
Whether to include patients in the outcome cohorts to the limiting step.
- limitTableNames
The database tables which will be limited to the cohorts.
- transferTableNames
The database tables which will be transferred unchanged to the new database.
- saveDir
The directory where the limited cdm database will be stored.