Skip to contents

This teal 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 = NULL,
  avalu = 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)
patient ID column to be used.

timepoints

(teal.transform::choices_selected() or teal.transform::data_extract_spec())
Time variable to be represented in the laboratory table.

aval

(teal.transform::choices_selected() or teal.transform::data_extract_spec())
AVAL column of the ADLB dataset.

avalu

(teal.transform::choices_selected() or teal.transform::data_extract_spec())
AVALU column of the ADLB dataset.

param

(teal.transform::choices_selected() or teal.transform::data_extract_spec())
PARAM column of the ADLB dataset.

paramcd

(teal.transform::choices_selected() or teal.transform::data_extract_spec())
PARAMCD column of the ADLB dataset.

anrind

(teal.transform::choices_selected() or teal.transform::data_extract_spec())
ANRIND column of the ADLB dataset with 3 possible 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.

Examples

adsl <- tmc_ex_adsl
adlb <- tmc_ex_adlb

app <- init(
  data = cdisc_data(
    cdisc_dataset("ADSL", adsl),
    cdisc_dataset("ADLB", 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 = choices_selected(
        choices = variable_choices(adlb, "AVAL"),
        selected = "AVAL"
      ),
      avalu = choices_selected(
        choices = variable_choices(adlb, "AVALU"),
        selected = "AVALU"
      )
    )
  )
)
#> [INFO] 2023-05-31 23:41:46.7490 pid:3043 token:[] teal.modules.clinical Initializing tm_t_pp_laboratory
if (interactive()) {
  shinyApp(app$ui, app$server)
}