Skip to contents

Create subset definition from subset objects

Usage

createCohortSubsetDefinition(
  name,
  definitionId,
  subsetOperators,
  identifierExpression = NULL,
  operatorNameConcatString = "",
  subsetCohortNameTemplate = ""
)

Arguments

name

Name of definition

definitionId

Definition identifier

subsetOperators

list of subsetOperator instances to apply

identifierExpression

Expression (or string that converts to expression) that returns an id for an output cohort the default is dplyr::expr(targetId * 1000 + definitionId)

operatorNameConcatString

(optional) String to concatenate operator names together when outputting resulting cohort name

subsetCohortNameTemplate

(optional) SqlRender string template for formatting names of resulting subset cohorts Can use the variables @baseCohortName, @subsetDefinitionName and @operatorNames. This is applied when adding the subset definition to a cohort definition set.