Treatment Module Class
Treatment.RdRestart module that shows a that supports results from the
summariseTreatment() function from the DrugUtilisation package.
Super class
ShinyModule -> Treatment
Active bindings
result(
sumamrised_result)table(
Flextable)plot(
PlotStatic)cdmNames(
character(n))cohortNames(
character(n))strata(
character(n))
Methods
Treatment$new()
Initializer method.
Usage
Treatment$new(result, ...)Arguments
result(
summarised_result) Object created byDrugUtilisation::summariseDrugUtilisation()....Additional parameters to set fields from the
ShinyModuleparent.
Examples
if (interactive()) {
cdm <- DrugUtilisation::mockDrugUtilisation()
result <- cdm$cohort1 |>
PatientProfiles::addAge(
ageGroup = list(
`0-17` = c(0, 17),
`>=18` = c(18, Inf)
)
) |>
PatientProfiles::addSex() |>
DrugUtilisation::summariseTreatment(
treatmentCohortName = "cohort2",
window = list(c(0, 30), c(31, 365)), strata = list("age_group", "sex")
)
mod <- Treatment$new(result = result)
DarwinShinyModules::preview(mod)
}