The CohortSubgroup class, encapsulating the id, name, description, and CohortRef.
This class is used to specify a cohort subgroup to be used in the analysis. A TAR will be considered part of the subgroup if the TAR starts between the subgroup's cohort start and cohort end.
Note, when serializing with a library such as jsonlite, first call toList() on the R6 class before calling jsonlite::toJSON().
id
an integer uniquely identifying this subgroup
name
The name to use for this cohort reference
description
The description for this subgroup
cohort
the cohort used to represent this subgroup. Must be class CohortReference
new()
creates a new instance, using the provided data param if provided. The JSON takes the form: "id":1,"name":"some name","description":"some description","cohort":"id":99, "name":"cohort"
CohortSubgroup$new(data = list(CohortSubgroup = list()))