Title: | Graphical User Interface for Data Quality Assessment |
---|---|
Description: | A graphical user interface (GUI) to the functions implemented in the R package 'DQAstats'. Publication: Mang et al. (2021) <doi:10.1186/s12911-022-01961-z>. |
Authors: | Lorenz A. Kapsner [cre, aut] , Jonathan M. Mang [aut] , MIRACUM - Medical Informatics in Research and Care in University Medicine [fnd], Universitätsklinikum Erlangen [cph] |
Maintainer: | Lorenz A. Kapsner <[email protected]> |
License: | GPL-3 |
Version: | 0.2.4 |
Built: | 2024-11-11 05:47:21 UTC |
Source: | https://github.com/miracum/dqa-dqagui |
This function is an exported wrapper around the actual function to send the datamap. This actual function can be customized by the user.
button_send_datamap(rv)
button_send_datamap(rv)
rv |
The global rv object. rv$datamap needs to be valid. |
This functions is used to trigger logic when clicking the "Send
Datamap" button on the dashboard (default: triggers the composing of an
email by making use of the java-script command
window.open('mailto: ...')
). When customizing DQAgui
, the function
button_send_datamap
can be overwritten in the namespace to trigger any
other logic, wanted by the user.
if (interactive()) { button_send_datamap(rv=rv) }
if (interactive()) { button_send_datamap(rv=rv) }
If there is a valid source system and a valid target system (this is also the case if the user set target == source), the result of this function will be TRUE and the button will be displayed via shinyjs. Otherwise the result is FALSE and the button will be hidden. This function also displays (or hides) the variables which can be assessed.
check_load_data_button(rv, session)
check_load_data_button(rv, session)
rv |
The global 'reactiveValues()' object, defined in server.R |
session |
Shiny session object |
This function is used in the config-tab and displays the selected system to the user.
feedback_txt(system, type)
feedback_txt(system, type)
system |
(String) e.g. "i2b2", "OMOP" or "CSV" |
type |
(String) "source" or "target" |
String containing the input params in a propper manner
get_db_settings
get_db_settings(input, target = TRUE, db_type, displayname_gui, rv)
get_db_settings(input, target = TRUE, db_type, displayname_gui, rv)
input |
Shiny server input object. |
target |
A boolean (default: TRUE). |
db_type |
(String) "postgres" or "oracle". |
displayname_gui |
(String) "i2b2 (Prod)" |
rv |
The global 'reactiveValues()' object, defined in server.R |
This functions returns a data table of key-value pairs for the database settings, which are parsed from the respective config tab from the shiny application.
if (interactive()) { get_db_settings( input = input, target = TRUE, db_type = "postgres" ) }
if (interactive()) { get_db_settings( input = input, target = TRUE, db_type = "postgres" ) }
Launch the DQA graphical user interface (GUI)
launch_app( port = 3838, utils_path = system.file("demo_data/utilities", package = "DQAstats"), mdr_filename = "mdr_example_data.csv", logfile_dir = tempdir(), parallel = FALSE, ncores = 2, demo_usage = FALSE )
launch_app( port = 3838, utils_path = system.file("demo_data/utilities", package = "DQAstats"), mdr_filename = "mdr_example_data.csv", logfile_dir = tempdir(), parallel = FALSE, ncores = 2, demo_usage = FALSE )
port |
The port, the MIRACUM DQA Tool is running on (default: 3838) |
utils_path |
The path to the utilities-folder, containing the metadata
repository files ( |
mdr_filename |
The filename of the mdr (e.g. "mdr_example_data.csv"). |
logfile_dir |
Is the absolute path to the directory where the logfile will be stored. If not path is provided the tempdir() will be used. |
parallel |
A boolean. If |
ncores |
A integer. The number of cores to use. Caution: you would probably like to choose a low number when operating on large datasets. Default: 2. |
demo_usage |
A boolean. If |
Executing this function returns a DQAgui shiny application.
if (interactive()) { launch_app() }
if (interactive()) { launch_app() }
module_atemp_pl_server
module_atemp_pl_server(input, output, session, rv, input_re)
module_atemp_pl_server(input, output, session, rv, input_re)
input |
Shiny server input object |
output |
Shiny server output object |
session |
Shiny session object |
rv |
The global 'reactiveValues()' object, defined in server.R |
input_re |
The Shiny server input object, wrapped into a reactive
expression: |
The function returns a shiny server module.
https://shiny.rstudio.com/articles/modules.html
if (interactive()) { rv <- list() shiny::callModule( module_atemp_pl_server, "moduleAtemporalPlausibilities", rv = rv, input_re = reactive(input) ) }
if (interactive()) { rv <- list() shiny::callModule( module_atemp_pl_server, "moduleAtemporalPlausibilities", rv = rv, input_re = reactive(input) ) }
module_atemp_pl_ui
module_atemp_pl_ui(id)
module_atemp_pl_ui(id)
id |
A character. The identifier of the shiny object |
The function returns a shiny ui module.
https://shiny.rstudio.com/articles/modules.html
if (interactive()) { shinydashboard::tabItems( shinydashboard::tabItem( tabName = "atemp_plausi", module_atemp_pl_ui( "moduleAtemporalPlausibilities" ) ) ) }
if (interactive()) { shinydashboard::tabItems( shinydashboard::tabItem( tabName = "atemp_plausi", module_atemp_pl_ui( "moduleAtemporalPlausibilities" ) ) ) }
module_completeness_server
module_completeness_server(input, output, session, rv, input_re)
module_completeness_server(input, output, session, rv, input_re)
input |
Shiny server input object |
output |
Shiny server output object |
session |
Shiny session object |
rv |
The global 'reactiveValues()' object, defined in server.R |
input_re |
The Shiny server input object, wrapped into a reactive
expression: |
The function returns a shiny server module.
https://shiny.rstudio.com/articles/modules.html
if (interactive()) { rv <- list() shiny::callModule( module_completeness_server, "moduleCompleteness", rv = rv, input_re = reactive(input) ) }
if (interactive()) { rv <- list() shiny::callModule( module_completeness_server, "moduleCompleteness", rv = rv, input_re = reactive(input) ) }
module_completeness_ui
module_completeness_ui(id)
module_completeness_ui(id)
id |
A character. The identifier of the shiny object |
The function returns a shiny ui module.
https://shiny.rstudio.com/articles/modules.html
if (interactive()) { shinydashboard::tabItems( shinydashboard::tabItem( tabName = "completeness", module_completeness_ui( "moduleCompleteness" ) ) ) }
if (interactive()) { shinydashboard::tabItems( shinydashboard::tabItem( tabName = "completeness", module_completeness_ui( "moduleCompleteness" ) ) ) }
module_config_server
module_config_server(input, output, session, rv, input_re)
module_config_server(input, output, session, rv, input_re)
input |
Shiny server input object |
output |
Shiny server output object |
session |
Shiny session object |
rv |
The global 'reactiveValues()' object, defined in server.R |
input_re |
The Shiny server input object, wrapped into a reactive
expression: |
The function returns a shiny server module.
https://shiny.rstudio.com/articles/modules.html
if (interactive()) { rv <- list() shiny::callModule( module_config_server, "moduleConfig", rv = rv, input_re = reactive(input) ) }
if (interactive()) { rv <- list() shiny::callModule( module_config_server, "moduleConfig", rv = rv, input_re = reactive(input) ) }
module_config_ui
module_config_ui(id)
module_config_ui(id)
id |
A character. The identifier of the shiny object |
The function returns a shiny ui module.
https://shiny.rstudio.com/articles/modules.html
if (interactive()) { shinydashboard::tabItems( shinydashboard::tabItem( tabName = "config", module_config_ui( "moduleConfig" ) ) ) }
if (interactive()) { shinydashboard::tabItems( shinydashboard::tabItem( tabName = "config", module_config_ui( "moduleConfig" ) ) ) }
module_dashboard_server
module_dashboard_server(input, output, session, rv, input_re)
module_dashboard_server(input, output, session, rv, input_re)
input |
Shiny server input object |
output |
Shiny server output object |
session |
Shiny session object |
rv |
The global 'reactiveValues()' object, defined in server.R |
input_re |
The Shiny server input object, wrapped into a reactive
expression: |
The function returns a shiny server module.
https://shiny.rstudio.com/articles/modules.html
if (interactive()) { rv <- list() shiny::callModule( module_dashboard_server, "moduleDashboard", rv = rv, input_re = reactive(input) ) }
if (interactive()) { rv <- list() shiny::callModule( module_dashboard_server, "moduleDashboard", rv = rv, input_re = reactive(input) ) }
module_dashboard_ui
module_dashboard_ui(id)
module_dashboard_ui(id)
id |
A character. The identifier of the shiny object |
The function returns a shiny ui module.
https://shiny.rstudio.com/articles/modules.html
if (interactive()) { shinydashboard::tabItems( shinydashboard::tabItem( tabName = "dashboard", module_dashboard_ui( "moduleDashboard" ) ) ) }
if (interactive()) { shinydashboard::tabItems( shinydashboard::tabItem( tabName = "dashboard", module_dashboard_ui( "moduleDashboard" ) ) ) }
module_descriptive_server
module_descriptive_server(input, output, session, rv, input_re)
module_descriptive_server(input, output, session, rv, input_re)
input |
Shiny server input object |
output |
Shiny server output object |
session |
Shiny session object |
rv |
The global 'reactiveValues()' object, defined in server.R |
input_re |
The Shiny server input object, wrapped into a reactive
expression: |
The function returns a shiny server module.
https://shiny.rstudio.com/articles/modules.html
if (interactive()) { rv <- list() shiny::callModule( module_descriptive_server, "moduleDescriptive", rv = rv, input_re = reactive(input) ) }
if (interactive()) { rv <- list() shiny::callModule( module_descriptive_server, "moduleDescriptive", rv = rv, input_re = reactive(input) ) }
module_descriptive_ui
module_descriptive_ui(id)
module_descriptive_ui(id)
id |
A character. The identifier of the shiny object |
The function returns a shiny ui module.
https://shiny.rstudio.com/articles/modules.html
if (interactive()) { shinydashboard::tabItems( shinydashboard::tabItem( tabName = "descriptive", module_descriptive_ui( "moduleDescriptive" ) ) ) }
if (interactive()) { shinydashboard::tabItems( shinydashboard::tabItem( tabName = "descriptive", module_descriptive_ui( "moduleDescriptive" ) ) ) }
module_differences_server
module_differences_server(input, output, session, rv, input_re)
module_differences_server(input, output, session, rv, input_re)
input |
Shiny server input object |
output |
Shiny server output object |
session |
Shiny session object |
rv |
The global 'reactiveValues()' object, defined in server.R |
input_re |
The Shiny server input object, wrapped into a reactive
expression: |
The function returns a shiny server module.
https://shiny.rstudio.com/articles/modules.html
if (interactive()) { rv <- list() shiny::callModule( module_differences_server, "moduleDifferences", rv = rv, input_re = reactive(input) ) }
if (interactive()) { rv <- list() shiny::callModule( module_differences_server, "moduleDifferences", rv = rv, input_re = reactive(input) ) }
module_differences_ui
module_differences_ui(id)
module_differences_ui(id)
id |
A character. The identifier of the shiny object |
The function returns a shiny ui module.
https://shiny.rstudio.com/articles/modules.html
if (interactive()) { shinydashboard::tabItems( shinydashboard::tabItem( tabName = "differences", module_differences_ui( "moduleDifferences" ) ) ) }
if (interactive()) { shinydashboard::tabItems( shinydashboard::tabItem( tabName = "differences", module_differences_ui( "moduleDifferences" ) ) ) }
module_log_server
module_log_server(input, output, session, rv, input_re)
module_log_server(input, output, session, rv, input_re)
input |
Shiny server input object |
output |
Shiny server output object |
session |
Shiny session object |
rv |
The global 'reactiveValues()' object, defined in server.R |
input_re |
The Shiny server input object, wrapped into a reactive
expression: |
The function returns a shiny server module.
https://shiny.rstudio.com/articles/modules.html
if (interactive()) { rv <- list() shiny::callModule( module_log_server, "moduleLogging", rv = rv, input_re = reactive(input) ) }
if (interactive()) { rv <- list() shiny::callModule( module_log_server, "moduleLogging", rv = rv, input_re = reactive(input) ) }
module_log_ui
module_log_ui(id)
module_log_ui(id)
id |
A character. The identifier of the shiny object |
The function returns a shiny ui module.
https://shiny.rstudio.com/articles/modules.html
if (interactive()) { shinydashboard::tabItems( shinydashboard::tabItem( tabName = "logging", module_log_ui( "moduleLogging" ) ) ) }
if (interactive()) { shinydashboard::tabItems( shinydashboard::tabItem( tabName = "logging", module_log_ui( "moduleLogging" ) ) ) }
module_mdr_server
module_mdr_server(input, output, session, rv, input_re)
module_mdr_server(input, output, session, rv, input_re)
input |
Shiny server input object |
output |
Shiny server output object |
session |
Shiny session object |
rv |
The global 'reactiveValues()' object, defined in server.R |
input_re |
The Shiny server input object, wrapped into a reactive
expression: |
The function returns a shiny server module.
https://shiny.rstudio.com/articles/modules.html
if (interactive()) { rv <- list() shiny::callModule( module_mdr_server, "moduleMDR", rv = rv, input_re = reactive(input) ) }
if (interactive()) { rv <- list() shiny::callModule( module_mdr_server, "moduleMDR", rv = rv, input_re = reactive(input) ) }
module_mdr_ui
module_mdr_ui(id)
module_mdr_ui(id)
id |
A character. The identifier of the shiny object |
The function returns a shiny ui module.
https://shiny.rstudio.com/articles/modules.html
if (interactive()) { shinydashboard::tabItems( shinydashboard::tabItem( tabName = "mdr", module_mdr_ui( "moduleMDR" ) ) ) }
if (interactive()) { shinydashboard::tabItems( shinydashboard::tabItem( tabName = "mdr", module_mdr_ui( "moduleMDR" ) ) ) }
module_report_server
module_report_server(input, output, session, rv, input_re)
module_report_server(input, output, session, rv, input_re)
input |
Shiny server input object |
output |
Shiny server output object |
session |
Shiny session object |
rv |
The global 'reactiveValues()' object, defined in server.R |
input_re |
The Shiny server input object, wrapped into a reactive
expression: |
The function returns a shiny server module.
https://shiny.rstudio.com/articles/modules.html
if (interactive()) { rv <- list() shiny::callModule( module_report_server, "moduleReport", rv = rv, input_re = reactive(input) ) }
if (interactive()) { rv <- list() shiny::callModule( module_report_server, "moduleReport", rv = rv, input_re = reactive(input) ) }
module_report_ui
module_report_ui(id)
module_report_ui(id)
id |
A character. The identifier of the shiny object |
The function returns a shiny ui module.
https://shiny.rstudio.com/articles/modules.html
if (interactive()) { shinydashboard::tabItems( shinydashboard::tabItem( tabName = "report", module_report_ui( "moduleReport" ) ) ) }
if (interactive()) { shinydashboard::tabItems( shinydashboard::tabItem( tabName = "report", module_report_ui( "moduleReport" ) ) ) }
module_uniq_plaus_server
module_uniq_plaus_server(input, output, session, rv, input_re)
module_uniq_plaus_server(input, output, session, rv, input_re)
input |
Shiny server input object |
output |
Shiny server output object |
session |
Shiny session object |
rv |
The global 'reactiveValues()' object, defined in server.R |
input_re |
The Shiny server input object, wrapped into a reactive
expression: |
The function returns a shiny server module.
https://shiny.rstudio.com/articles/modules.html
if (interactive()) { rv <- list() shiny::callModule( module_uniq_plaus_server, "moduleUniquenessPlausibilities", rv = rv, input_re = reactive(input) ) }
if (interactive()) { rv <- list() shiny::callModule( module_uniq_plaus_server, "moduleUniquenessPlausibilities", rv = rv, input_re = reactive(input) ) }
module_uniq_plaus_ui
module_uniq_plaus_ui(id)
module_uniq_plaus_ui(id)
id |
A character. The identifier of the shiny object |
The function returns a shiny ui module.
https://shiny.rstudio.com/articles/modules.html
if (interactive()) { shinydashboard::tabItems( shinydashboard::tabItem( tabName = "uniq_plausis", module_uniq_plaus_ui( "moduleUniquenessPlausibilities" ) ) ) }
if (interactive()) { shinydashboard::tabItems( shinydashboard::tabItem( tabName = "uniq_plausis", module_uniq_plaus_ui( "moduleUniquenessPlausibilities" ) ) ) }
"Set target == source". It sets target settings = source settings.
set_target_equal_to_source(rv)
set_target_equal_to_source(rv)
rv |
The global 'reactiveValues()' object, defined in server.R |
See title.
show_failure_alert(what_failed)
show_failure_alert(what_failed)
what_failed |
Short description of what failed.Like: "Getting the data failed." ' |
Nothing - Just shows the alert modal.
After the button "Check connection" is pressed in the GUI, this function will be called and tries to connect to this system and feedbacks the result to the user. If the connection is successfully established, the button will be disabled and this connection will be stored as valid for the given source/target system.
test_connection_button_clicked( rv, source_target, db_type, input, output, session )
test_connection_button_clicked( rv, source_target, db_type, input, output, session )
rv |
The global 'reactiveValues()' object, defined in server.R |
source_target |
(String) "source" or "target" |
db_type |
(String) "postgres" or "oracle" |
input |
Shiny server input object |
output |
Shiny server output object |
session |
Shiny session object |
true if the connection could be established and false otherwise (also if an error occurred)
This function checks if all necessary input parameters for source and target exist and are valid.
validate_inputs(rv, input, output, session)
validate_inputs(rv, input, output, session)
rv |
The global 'reactiveValues()' object, defined in server.R |
input |
Shiny server input object |
output |
Shiny server output object |
session |
Shiny session object |