tm_t_pp_prior_medication {teal.modules.clinical} | R Documentation |
teal Module: Patient Profile Prior Medication
Description
This module produces a patient profile prior medication report using ADaM datasets.
Usage
tm_t_pp_prior_medication(
label,
dataname = "ADCM",
parentname = "ADSL",
patient_col = "USUBJID",
atirel = NULL,
cmdecod = NULL,
cmindc = NULL,
cmstdy = NULL,
pre_output = NULL,
post_output = NULL
)
Arguments
label |
( |
dataname |
( |
parentname |
( |
patient_col |
( |
atirel |
( |
cmdecod |
( |
cmindc |
( |
cmstdy |
( |
pre_output |
( |
post_output |
( |
Value
a teal_module
object.
Examples
library(dplyr)
ADCM <- tmc_ex_adcm
ADSL <- tmc_ex_adsl %>% filter(USUBJID %in% ADCM$USUBJID)
ADCM$CMASTDTM <- ADCM$ASTDTM
ADCM$CMAENDTM <- ADCM$AENDTM
adcm_keys <- c("STUDYID", "USUBJID", "ASTDTM", "CMSEQ", "ATC1", "ATC2", "ATC3", "ATC4")
join_keys <- default_cdisc_join_keys[c("ADSL", "ADCM")]
join_keys["ADCM", "ADCM"] <- adcm_keys
app <- init(
data = cdisc_data(
ADSL = ADSL,
ADCM = ADCM,
code = "
ADCM <- tmc_ex_adcm
ADSL <- tmc_ex_adsl %>% filter(USUBJID %in% ADCM$USUBJID)
ADCM$CMASTDTM <- ADCM$ASTDTM
ADCM$CMAENDTM <- ADCM$AENDTM
",
join_keys = join_keys
),
modules = modules(
tm_t_pp_prior_medication(
label = "Prior Medication",
dataname = "ADCM",
parentname = "ADSL",
patient_col = "USUBJID",
atirel = choices_selected(
choices = variable_choices(ADCM, "ATIREL"),
selected = "ATIREL"
),
cmdecod = choices_selected(
choices = variable_choices(ADCM, "CMDECOD"),
selected = "CMDECOD"
),
cmindc = choices_selected(
choices = variable_choices(ADCM, "CMINDC"),
selected = "CMINDC"
),
cmstdy = choices_selected(
choices = variable_choices(ADCM, "ASTDY"),
selected = "ASTDY"
)
)
)
)
if (interactive()) {
shinyApp(app$ui, app$server)
}