A shiny module. Used to create the sidebar in the main application.
Usage
mod_main_sidebar_server(
id,
r,
navinfo,
app_data,
app_tables,
app_vars,
db_path,
forms_to_review,
available_data
)Arguments
- id
Character string, used to connect the module UI with the module Server.
- r
Common reactivevalues. Will be passed on to
mod_query_add_server().Reactive values created with
shiny::reactiveValues(). Used to send back information about the page change to the server, when clicking on the adverse event box. Required formod_navigate_forms_server(). Furthermore, it contains the currently active form (navinfo$active_form), needed formod_review_forms_server()andmod_query_add_server(), and the currently active tab (navinfo$active_tab), needed formod_review_forms_server(). These are reactive values containing a character vector with the currently active tab or form.navinfo$active_tabis also used to only show review controls when a the tab is either common events or study data. Other active tab values are, for example,Start(start page), orQueries.- app_data
List of data frames. Contains the application data, with data of each form stored in a data frame. Required to set the review configuration in
mod_review_config_server().- app_tables
List of data frames with the app data in wide table format. Required to set the review configuration in
mod_review_config_server()- app_vars
A list with common variables found in the data and metadata. Required to set the review configuration in
mod_review_config_server().- db_path
Character vector with the path to the app database. Required in
mod_query_add_server().- forms_to_review
A reactive value containing a character vector with the forms that need review of the active participant.
- available_data
A data frame containing all available data, usually created with the function
get_available_data(). The data frame will be passed on to the modulemod_query_add_server(), which requires this data frame and is embedded inmod_main_sidebar_server().
Details
This sidebar contains the main controls for the application. In the sidebar, a panel is available which allows the user to apply a review to the active form and patient (forms can be marked as reviewed, a comment can be added, and the review can be saved. In addition, it contains buttons to navigate to the next/previous forms and to add a query to the active form.
