The Outcome class, encapsulating the id, name, outcome cohortId, exclusion cohortId, and clean window.

Details

This class is used to specify an outcome definition. The outcome id is distinct from the outcome cohort ID in that you can define multiple outcomes that use the same outcome cohort with different clean windows or exclusion cohort.

Note, when serializing with a library such as jsonlite, first call toList() on the R6 class before calling jsonlite::toJSON().

Active bindings

id

an integer uniquely identifying this outcome definition

name

the name given to this outcome definition

cohortId

The outcome cohort ID for this outcome.

cleanWindow

The clean window for this outcome.

excludeCohortId

The cohort that will be used to exclude time at risk.

Methods


Method new()

creates a new instance, using the provided data param if provided.

Usage

Outcome$new(data = list())

Arguments

data

the data (as a json string or list) to initialize with


Method toList()

returns the R6 class elements as a list for use in jsonlite::toJSON()

Usage

Outcome$toList()


Method asJSON()

returns the JSON string for this R6 class

Usage

Outcome$asJSON()


Method clone()

The objects of this class are cloneable with this method.

Usage

Outcome$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.