View source: R/tm_t_pp_medical_history.R
tm_t_pp_medical_history | R Documentation |
This module produces a patient profile medical history report using ADaM datasets.
tm_t_pp_medical_history(
label,
dataname = "ADMH",
parentname = "ADSL",
patient_col = "USUBJID",
mhterm = NULL,
mhbodsys = NULL,
mhdistat = NULL,
pre_output = NULL,
post_output = NULL,
transformators = list(),
decorators = list()
)
a teal_module
object.
This module generates the following objects, which can be modified in place using decorators:
table
(TableTree
- output of rtables::build_table()
)
A Decorator is applied to the specific output using a named list of teal_transform_module
objects.
The name of this list corresponds to the name of the output to which the decorator is applied.
See code snippet below:
tm_t_pp_medical_history( ..., # arguments for module decorators = list( table = teal_transform_module(...) # applied only to `table` output ) )
For additional details and examples of decorators, refer to the vignette
vignette("decorate-module-output", package = "teal.modules.clinical")
.
To learn more please refer to the vignette
vignette("transform-module-output", package = "teal")
or the teal::teal_transform_module()
documentation.
data <- teal_data()
data <- within(data, {
ADSL <- tmc_ex_adsl
ADMH <- tmc_ex_admh
})
join_keys(data) <- default_cdisc_join_keys[names(data)]
ADSL <- data[["ADSL"]]
ADMH <- data[["ADMH"]]
app <- init(
data = data,
modules = modules(
tm_t_pp_medical_history(
label = "Medical History",
dataname = "ADMH",
parentname = "ADSL",
patient_col = "USUBJID",
mhterm = choices_selected(
choices = variable_choices(ADMH, c("MHTERM")),
selected = "MHTERM"
),
mhbodsys = choices_selected(
choices = variable_choices(ADMH, "MHBODSYS"),
selected = "MHBODSYS"
),
mhdistat = choices_selected(
choices = variable_choices(ADMH, "MHDISTAT"),
selected = "MHDISTAT"
)
)
)
)
if (interactive()) {
shinyApp(app$ui, app$server)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.