Skip to contents

This module produces a patient profile laboratory table using ADaM datasets.

Usage

tm_t_pp_laboratory(
  label,
  dataname = "ADLB",
  parentname = "ADSL",
  patient_col = "USUBJID",
  timepoints = NULL,
  aval = lifecycle::deprecated(),
  aval_var = NULL,
  avalu = lifecycle::deprecated(),
  avalu_var = NULL,
  param = NULL,
  paramcd = NULL,
  anrind = 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.

timepoints

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

aval

[Deprecated] Please use the aval_var argument instead.

aval_var

(teal.transform::choices_selected())
object with all available choices and pre-selected option for the analysis variable.

avalu

[Deprecated] Please use the avalu_var argument instead.

avalu_var

(teal.transform::choices_selected())
object with all available choices and preselected option for the analysis unit variable.

param

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

paramcd

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

anrind

(teal.transform::choices_selected())
object with all available choices and preselected option for the ANRIND variable from dataname. Variable should have the following 3 levels: "HIGH", "LOW", and "NORMAL".

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
ADLB <- tmc_ex_adlb

app <- init(
  data = cdisc_data(
    ADSL = ADSL,
    ADLB = ADLB,
    code = "
      ADSL <- tmc_ex_adsl
      ADLB <- tmc_ex_adlb
    "
  ),
  modules = modules(
    tm_t_pp_laboratory(
      label = "Vitals",
      dataname = "ADLB",
      patient_col = "USUBJID",
      paramcd = choices_selected(
        choices = variable_choices(ADLB, "PARAMCD"),
        selected = "PARAMCD"
      ),
      param = choices_selected(
        choices = variable_choices(ADLB, "PARAM"),
        selected = "PARAM"
      ),
      timepoints = choices_selected(
        choices = variable_choices(ADLB, "ADY"),
        selected = "ADY"
      ),
      anrind = choices_selected(
        choices = variable_choices(ADLB, "ANRIND"),
        selected = "ANRIND"
      ),
      aval_var = choices_selected(
        choices = variable_choices(ADLB, "AVAL"),
        selected = "AVAL"
      ),
      avalu_var = choices_selected(
        choices = variable_choices(ADLB, "AVALU"),
        selected = "AVALU"
      )
    )
  )
)
#> [INFO] 2024-02-26 01:42:44.5644 pid:1518 token:[] teal.modules.clinical Initializing tm_t_pp_laboratory
if (interactive()) {
  shinyApp(app$ui, app$server)
}