Learn R Programming

teal.modules.clinical (version 0.9.0)

tm_t_pp_medical_history: teal Module: Patient Profile Medical History

Description

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
)

Value

a teal_module object.

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.

Examples

Run this code
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"
      )
    )
  )
)
if (interactive()) {
  shinyApp(app$ui, app$server)
}

Run the code above in your browser using DataLab