Navigate review tables - Shiny module Server
Source:R/mod_navigate_review.R
mod_navigate_review_server.Rd
A Shiny module. Used to display all data that needs review and all queries that are still open. It enables the user to directly navigate to a specific form or patient.
Arguments
- id
Character string, used to connect the module UI with the module Server.
- r
Common reactiveValues. Used to access
subjectid
(the active Subject), to select the correct review data and to change the active subject id if requested by the user.- rev_data
Common reactiveValues. Used to access
rev_data$summary
(a data frame with summarized review data),rev_data$show_all
(logical, whether to show data of everyone in the tables or only data of the selected subject id.)Common reactive values. Used to send back the request for the change in form/subject id back to the server. Contains the character strings
active_form
,active_tab
, andtrigger_page_change
. The module will create these variables if they are not yet available innavinfo
.- all_forms
A data frame containing two columns: a column named "form" with all the form to navigate through in the correct order, and a column named "main_tab", showing the name of the main_tab in which the form can be found. Used for navigation purposes, will be passed onto the internal Shiny module
mod_go_to_form_server()
.- table_names
An optional character vector. If provided, will be used within
datatable_custom()
, to improve the column names in the final interactive tables.
Details
The module will be called from the main server and will open a modal with
two tables: a table with forms that need to be reviewed and a table with
queries that are raised. There is a switch in the modal, which can toggle
the tables to only show data of the currently active and selected participant,
or to show data of all the participants that need to be reviewed.
There is a button to navigate to the form of a selected data frame. Once
clicked, this will activate the module mod_go_to_form_server()
, which is a
low-level helper module to change the active participant and active review
form to the one in the selected table row.