To improve interpretability of results and reporting, grouping cohorts has been identified as a potential improvement. This will not directly impact any diagnostics but will improve the views of cohorts and enhance overall reporting.
-
Default functionality will not change, and a cohort definition set will be considered the only required input for the package.
-
Cohort groups will be arbitrarily definable by the user
-
This will add tables in the results data model - cohort_group (cohort_group_id, cohort_group_name, cohort_group_description) and cohort_group_membership
-
Any subsetted cohorts will automatically be included in this grouping, implicitly but explicit membership of only subsetted cohorts can be defined.
-
Cohorts can belong to 0 or Many groups
-
This will primarily be used in the shiny UI to improve selection and usability, and within reports to allow ease of use in functions
-
Proposal 1 - this could be an attribute of the CohortDefinitionSet (if this approach works the functionality can be moved to CohortGenerator as a more general proposal for the HADES api). I find this appealing as encapsulating the state and metadata within a single R object will be easier to manage.
-
Alternative Proposal - Cohort Groups are arbitrary R objects that are parameters for CohortDiagnostics. The pro of this approach is that there are no implications for packages downstream. The negative of this is that it is yet another internal reference within a HADES package that will likely clash with APIs for other packages (i.e. CohortMethod, SCCS, CohortIncidence all have internal representations and no dependency on CohortGenerator)
cds <- CohortGenerator::loadCohortDefinitionSet(...) |>
addCohortGroup(
# cohortDefinitionSet = cds,
cohortIds = c(1,2,3,4),
groupName = "Outcomes",
groupDescription = "Outcome cohorts used in this study"
) |>
addCohortGroup(
# cohortDefinitionSet = cds,
cohortIds = c(4, 5), # outcomes can be indications too
groupName = "Indications",
groupDescription = "Indications cohorts used in this study"
)
executeDiagnostics(cds, ...) # cohort groups will be loaded from the cohort definition set
To improve interpretability of results and reporting, grouping cohorts has been identified as a potential improvement. This will not directly impact any diagnostics but will improve the views of cohorts and enhance overall reporting.
Default functionality will not change, and a cohort definition set will be considered the only required input for the package.
Cohort groups will be arbitrarily definable by the user
This will add tables in the results data model - cohort_group (cohort_group_id, cohort_group_name, cohort_group_description) and cohort_group_membership
Any subsetted cohorts will automatically be included in this grouping, implicitly but explicit membership of only subsetted cohorts can be defined.
Cohorts can belong to 0 or Many groups
This will primarily be used in the shiny UI to improve selection and usability, and within reports to allow ease of use in functions
Proposal 1 - this could be an attribute of the CohortDefinitionSet (if this approach works the functionality can be moved to CohortGenerator as a more general proposal for the HADES api). I find this appealing as encapsulating the state and metadata within a single R object will be easier to manage.
Alternative Proposal - Cohort Groups are arbitrary R objects that are parameters for CohortDiagnostics. The pro of this approach is that there are no implications for packages downstream. The negative of this is that it is yet another internal reference within a HADES package that will likely clash with APIs for other packages (i.e. CohortMethod, SCCS, CohortIncidence all have internal representations and no dependency on CohortGenerator)
Example API