Template cohort definition for all ATC level 4 class exposures. The cohortId = conceptId * 1000 + 4. The "identifierExpression" can be customized for uniqueness.
createAtcCohortTemplateDefinition(
connection,
identifierExpression = "CAST(concept_id as bigint) * 1000",
cdmDatabaseSchema,
tempEmulationSchema = getOption("sqlRenderTempEmulationSchema"),
cohortDatabaseSchema,
nameSuffix = "",
mergeIngredientEras = TRUE,
priorObservationPeriod = 365,
vocabularyDatabaseSchema = cdmDatabaseSchema
)A CohortTemplateDefinition instance
Database connection object
An expression for setting the cohort id for the resulting cohort. Must produce unique ids
CDM database schema
Temporary emulation schema
Cohort database schema
A name suffix to use to add to the cohort names - this is useful if you're using multiple parameterized versions of this definition
(optional) Boolean indicating if different ingredients under the same ATC code should be merged
(optional) Required prior observation period for individuals
Vocabulary database schema