Skip to contents

This module produces a patient profile medical history report using ADaM datasets.

Usage

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
)

Arguments

label

(character)
menu item label of the module in the teal app.

dataname

(character)
analysis data used in teal module.

parentname

(character)
parent analysis data used in teal module, usually this refers to ADSL.

patient_col

(character)
name of patient ID variable.

mhterm

(teal.transform::choices_selected())
object with all available choices and preselected option for the MHTERM variable from dataname.

mhbodsys

(teal.transform::choices_selected())
object with all available choices and preselected option for the MHBODSYS variable from dataname.

mhdistat

(teal.transform::choices_selected())
object with all available choices and preselected option for the MHDISTAT variable from dataname.

pre_output

optional, (shiny.tag)
with text placed before the output to put the output into context. For example a title.

post_output

optional, (shiny.tag)
with text placed after the output to put the output into context. For example the shiny::helpText() elements are useful.

Value

a teal_module object.

Examples

ADSL <- tmc_ex_adsl
ADMH <- tmc_ex_admh

app <- init(
  data = cdisc_data(
    ADSL = ADSL,
    ADMH = ADMH,
    code = "
      ADSL <- tmc_ex_adsl
      ADMH <- tmc_ex_admh
    "
  ),
  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"
      )
    )
  )
)
#> [INFO] 2024-02-26 01:42:44.9144 pid:1518 token:[] teal.modules.clinical Initializing tm_t_pp_medical_history
if (interactive()) {
  shinyApp(app$ui, app$server)
}