Teal Module: Patient Profile Laboratory Teal Module
Source:R/tm_t_pp_laboratory.R
tm_t_pp_laboratory.Rd
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 toADSL
.- patient_col
(
character
)
patient ID column to be used.- timepoints
(
teal.transform::choices_selected()
orteal.transform::data_extract_spec()
)
Time variable to be represented in the laboratory table.- aval
(
teal.transform::choices_selected()
orteal.transform::data_extract_spec()
)AVAL
column of the ADLB dataset.- avalu
(
teal.transform::choices_selected()
orteal.transform::data_extract_spec()
)AVALU
column of the ADLB dataset.- param
(
teal.transform::choices_selected()
orteal.transform::data_extract_spec()
)PARAM
column of the ADLB dataset.- paramcd
(
teal.transform::choices_selected()
orteal.transform::data_extract_spec()
)PARAMCD
column of the ADLB dataset.- anrind
(
teal.transform::choices_selected()
orteal.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 theshiny::helpText()
elements are useful.
Examples
library(scda)
synthetic_cdisc_data_latest <- synthetic_cdisc_data("latest")
ADSL <- synthetic_cdisc_data_latest$adsl
ADLB <- synthetic_cdisc_data_latest$adlb
app <- init(
data = cdisc_data(
cdisc_dataset("ADSL", ADSL,
code = "synthetic_cdisc_data_latest <- synthetic_cdisc_data('latest')
ADSL <- synthetic_cdisc_data_latest$adsl"
),
cdisc_dataset("ADLB", ADLB,
code = "synthetic_cdisc_data_latest <- synthetic_cdisc_data('latest')
ADLB <- synthetic_cdisc_data_latest$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] 2022-10-14 09:11:02.6805 pid:3139 token:[] teal.modules.clinical Initializing tm_t_pp_laboratory
if (FALSE) {
shinyApp(app$ui, app$server)
}