Title: | A Light-Weight, Portable Tool for Reviewing Individual Patient Records |
Version: | 2.3.10 |
Description: | A portable Shiny tool to explore patient-level electronic health record data and perform chart review in a single integrated framework. This tool supports browsing clinical data in many different formats including multiple versions of the 'OMOP' common data model as well as the 'MIMIC-III' data model. In addition, chart review information is captured and stored securely via the Shiny interface in a 'REDCap' (Research Electronic Data Capture) project using the 'REDCap' API. See the 'ReviewR' website for additional information, documentation, and examples. |
License: | BSD_3_clause + file LICENSE |
URL: | https://reviewr.thewileylab.org/, https://github.com/thewileylab/ReviewR/ |
BugReports: | https://github.com/thewileylab/ReviewR/issues |
Depends: | R (≥ 3.5.0) |
Imports: | bigrquery (≥ 1.2.0), config, DBI, dbplyr, dplyr (≥ 1.0.0), DT, gargle, glue, golem, httr, jsonlite, magrittr, purrr, redcapAPI, REDCapR, rlang (≥ 0.4.7), RPostgres, RSQLite, shiny (≥ 1.5.0), shinycssloaders (≥ 1.0.0), shinydashboard, shinydashboardPlus (≥ 2.0.0), shinyjs, shinyWidgets (≥ 0.6.0), snakecase, stringr, tibble, tidyr (≥ 1.1.0) |
Suggests: | fs, gt, here, htmltools, knitr, pkgload, processx, readr, rmarkdown, rstudioapi, spelling, testthat (≥ 2.1.0), usethis |
VignetteBuilder: | knitr |
Encoding: | UTF-8 |
Language: | en-US |
LazyData: | true |
RoxygenNote: | 7.2.3 |
NeedsCompilation: | no |
Packaged: | 2023-09-01 14:12:26 UTC; MayerDav |
Author: | Laura Wiley |
Maintainer: | David Mayer <david.mayer@cuanschutz.edu> |
Repository: | CRAN |
Date/Publication: | 2023-09-01 15:50:11 UTC |
ReviewR: A Light-Weight, Portable Tool for Reviewing Individual Patient Records
Description
A portable Shiny tool to explore patient-level electronic health record data and perform chart review in a single integrated framework. This tool supports browsing clinical data in many different formats including multiple versions of the 'OMOP' common data model as well as the 'MIMIC-III' data model. In addition, chart review information is captured and stored securely via the Shiny interface in a 'REDCap' (Research Electronic Data Capture) project using the 'REDCap' API. See the 'ReviewR' website for additional information, documentation, and examples.
Author(s)
Maintainer: David Mayer david.mayer@cuanschutz.edu (ORCID)
Authors:
Laura Wiley laura.wiley@cuanschutz.edu (ORCID)
Luke Rasmussen luke.rasmussen@northwestern.edu (ORCID)
Other contributors:
The Wiley Lab [copyright holder, funder]
See Also
Useful links:
Report bugs at https://github.com/thewileylab/ReviewR/issues
ReviewR Chart Review Tab
Description
This function contains all of the elements that control the layout of the Chart Review Tab.
Usage
chart_review()
Value
shiny::renderUI Output containing the Chart Review Tab
See Also
Other layout:
homepage()
,
patient_search()
,
setup()
Database Table Function: All Patients Table Template
Description
A character vector containing a function template for creating the 'All Patients' table as displayed on the "Patient Search" Tab
Usage
db_function_all_patients_table_template
Format
A character vector with 22 elements
See Also
Other Development Templates:
db_function_subject_table_template
,
db_module_template
Database Table Function: Subject Table Template
Description
A character vector containing a function template for creating the 'Subject Filtered' tables as displayed on the "Chart Review" Tab
Usage
db_function_subject_table_template
Format
A character vector with 15 elements
See Also
Other Development Templates:
db_function_all_patients_table_template
,
db_module_template
Database Module Template
Description
A character vector containing a database module template
Usage
db_module_template
Format
A character vector with 52 elements
See Also
Other Development Templates:
db_function_all_patients_table_template
,
db_function_subject_table_template
Develop Data Model Table Functions
Description
This function will assist in adding support for a new data model to ReviewR. A schema file, supplied as a CSV, will be added to the package namespace such that upon connection to a database containing the new data model, ReviewR can identify and display it through the database detection module.
Users will be prompted to identify which table in the new data model contains a list of all patients. Additionally, users will be asked to select which field uniquely identifies each patient. This field must be present across all tables in the new data model for best results.
Once selections are captured, a database_tables.R file will be populated and opened for editing in RStudio. Basic table skeletons are created based on the provided schema and user selections.
Note: If the identifier field is not present across all tables, care must be taken to adjust the database_tables.R file to appropriately represent the new data model structure.
Usage
dev_add_data_model(csv)
Arguments
csv |
Required. The file path of a CSV file containing a data model schema |
Value
A .R file populated with basic database table functions
See Also
Other Development Functions:
dev_add_database_module()
Develop A Database Module
Description
This function will create a database module skeleton with required elements already populated, based on user inputs. Common database module packages are imported automatically, but developers should add imports to the roxygen skeleton as necessary to both the UI and server functions to collect user info and create a DBI connection object, respectively.
Usage
dev_add_database_module(mod_name = NULL, display_name = NULL)
Arguments
mod_name |
Required. A string, denoting the module suffix eg: 'mariadb' |
display_name |
Required. A string, denoting the module display name eg: 'MariaDB Server'. This is the 'user viewable' name that will appear in the database module selector dropdown. |
Value
A .R file populated with a database module skeleton
See Also
Other Development Functions:
dev_add_data_model()
DT to Viewer
Description
Save a temporary DT::datatable as a self contained HTML file to display in the RStudio Viewer Pane. Used to provided users with choices when prompted for action by a dev function.
Usage
dt_2_viewer(.data, file = NULL)
Arguments
.data |
A dplyr::tibble containing the desired data to save |
file |
Optional. Manually define file path (with .html extension) for HTML representation of DT |
Value
This function returns a temporary HTML file displayed in the RStudio Viewer Pane
OMOP Get Concept
Description
This function assists with transforming OMOP concept_ids to interpretable strings by retrieving the requested concepts from the appropriate OMOP concept table.
Usage
get_concept(
table_map,
db_connection,
concept_table,
concept_id,
concept_name,
table,
joinable_id,
table_concept_id,
col_name,
subject_id_field = NULL,
selected_subject = NULL
)
Arguments
table_map |
A dplyr::tibble containing a mapping between the CDM standard tables and fields to the user connected tables and fields. |
db_connection |
A DBI::dbConnect object. |
concept_table |
A string, containing the standard CDM concept table name. |
concept_id |
A string, containing the standard CDM concept id field. |
concept_name |
A string, containing the standard CDM concept name field. |
table |
A string, containing the table name that requires OMOP concepts. |
joinable_id |
A string, indicating what variable is "joinable" between the concept table and the desired table. |
table_concept_id |
A string, containing the the table concept id |
col_name |
A string, containing the desired name for the retrieved concept. |
subject_id_field |
A string, identifying which table field contains the subject id. |
selected_subject |
A numeric, or coercible to numeric containing the desired subject id. |
Value
The desired OMOP concept based on the user data model for all subjects
ReviewR Homepage Tab
Description
This function contains all of the elements that control the layout of the Homepage Tab.
Usage
homepage()
Value
shiny::renderUI Output containing the Homepage Tab
See Also
Other layout:
chart_review()
,
patient_search()
,
setup()
Installed App
Description
Invisibly returns an OAuth app.
Usage
installed_app()
Value
An Invisible OAuth consumer application, produced by httr::oauth_app()
MIMIC-III Tables
Description
A collection of functions to create prearranged views of MIMIC-III patient data when supplied with database connection information and a mapping of the connected database.
Usage
mimic3_table_all_patients(table_map, db_connection)
mimic3_table_admissions(table_map, db_connection, subject_id)
mimic3_table_callout(table_map, db_connection, subject_id)
mimic3_table_chart_events(table_map, db_connection, subject_id)
mimic3_table_cpt_events(table_map, db_connection, subject_id)
mimic3_table_diagnoses_icd(table_map, db_connection, subject_id)
mimic3_table_drg_codes(table_map, db_connection, subject_id)
mimic3_table_icu_stays(table_map, db_connection, subject_id)
mimic3_table_lab_events(table_map, db_connection, subject_id)
mimic3_table_microbiology_events(table_map, db_connection, subject_id)
mimic3_table_note_events(table_map, db_connection, subject_id)
mimic3_table_prescriptions(table_map, db_connection, subject_id)
mimic3_table_procedure_events(table_map, db_connection, subject_id)
mimic3_table_procedures_icd(table_map, db_connection, subject_id)
mimic3_table_services(table_map, db_connection, subject_id)
mimic3_table_transfers(table_map, db_connection, subject_id)
Arguments
table_map |
A dplyr::tibble containing a mapping between the CDM standard tables and fields to the user connected tables and fields. |
db_connection |
A DBI::dbConnect object. |
subject_id |
A numeric, or coercible to numeric. |
Value
A dplyr::tibble containing pre-coordinated patient information from the connected database.
Abstraction Module Selector
Description
This module allows the user to select an available ReviewR abstraction module from a dropdown list. It dynamically returns the abstraction setup and instrument user interfaces as well as collected chart abstraction information from the selected module.
This module consists of the following components:
Module UI functions
abstraction_setup_ui
: A tagList with a dropdown selector containing available abstraction modules.abstraction_instrument_ui
: A uiOutput containing the data collection instrument UI from the selected chart abstraction module.
Module Server function
abstraction_setup_server
: Processes user selection and dynamically returns uiOutputs for the selected abstraction module's setup and data collection instrument user interfaces. Any returns from the configured abstraction module are captured and returned.
Usage
abstraction_setup_ui(id)
abstraction_instrument_ui(id)
abstraction_setup_server(id, subject_id)
Arguments
id |
The Module namespace |
subject_id |
A reactive expression containing a subject identifier |
Value
abstraction_setup_ui:
tagList |
A tagList containing a selectInput that allows for selection of available abstraction setup modules and the setup UI for the selected abstraction module. |
abstraction_instrument_ui:
tagList |
A tagList containing the selected abstraction module's data collection instrument UI. |
abstraction_setup_server:
reactiveValues |
This module has no returns of its own, but will pass on
the |
Google BigQuery Database Module
Description
This module is designed to guide a user through the process of authenticating with Google BigQuery. It is responsible for retrieving:
An OAuth 2.0 authorization token
A list of GCP projects that are available to the authenticated user
A list of BigQuery datasets contained within available projects
The user is visually guided through the authentication process. Once authenticated,
the user is presented with project/dataset selections and once configured a
DBI::dbConnect()
object is returned.
This module consists of the following components:
Module UI function
bigquery_setup_ui
: A uiOutput responsible for guiding a user through the Google OAuth 2.0 authorization flow and graphically selecting a Google Big Query project/dataset.
Module Server function
bigquery_setup_server
: The logic that controls the graphical user interface, including redirecting to Google, receiving an authorization code, requesting an authorization token, and authenticating the application. Ultimately responsible for returning public Google user information and a DBI::dbconnect() object used to connect to the configured BigQuery database.
Usage
bigquery_setup_ui(id)
bigquery_setup_server(id, secrets_json = NULL)
Arguments
id |
The module namespace |
secrets_json |
A string, containing a file path to a Google OAuth 2.0 Client secrets JSON. |
Value
bigquery_setup_ui:
tagList |
The Google BigQuery Setup UI |
bigquery_setup_server:
reactiveValues |
|
Data Model Detection Module
Description
This module will interrogate a user connected database, comparing it with known common data models to determine the both the data model and version (when applicable) of the user's database.
It informs the rest of the application how to interpret and display the data stored in the connected database, when possible. If an unsupported data model is detected, the user is informed and given the opportunity to connect to a different database.
This module consists of the following components:
Module UI functions
These functions return a Shiny tagList
containing various UI elements of the
ReviewR application. UI components are calculated by the
data_model_detection_server
function of this module.
data_model_detection_ui
: A server defined uiOutput describing the detected data model and version.patient_chart_ui
: The "Patient Chart," with the appropriate display elements based on the detected data model. Appears on the "Chart Review" tab of ReviewR.
Module Server function
The server function of this module is responsible for calculating the display elements included in the UI functions of this module as well as returning a reactiveValues object containing various other objects used by other modules.
data_model_detection_server
: Contains the data model detection logic and calculates UI elements. Returns a reactiveValues object containing variables used in other modules.
Usage
data_model_detection_ui(id)
patient_chart_ui(id)
data_model_detection_server(id, database_vars, navigation_vars, parent_session)
Arguments
id |
The Module namespace |
database_vars |
A reactiveValues object as returned by mod_database_setup. |
navigation_vars |
A reactiveValues object as returned by mod_navigation. |
parent_session |
The session information from the parent environment of this module. |
Value
data_model_detection_ui:
tagList |
A uiOutput describing the detected data model and version. |
patient_chart_ui:
tagList |
The "Patient Chart" on the "Chart Review" tab of ReviewR. |
data_model_detection_server:
reactiveValues |
|
Database Module Selector
Description
This module allows the user to select an available ReviewR database module from a dropdown list. It dynamically returns the database setup UI and user configured database connection information from the selected module.
See vignette("customize_support_new_rdbms", package = "ReviewR")
for more
information on database modules and how to add support for additional databases.
This module consists of the following components:
Module UI function
database_setup_ui
: A tagList with a dropdown selector containing available database modules.
Module Server function
database_setup_server
: Processes user selection and dynamically returns a uiOutput for the selected database module's setup UI. Any returns from the configured database connection module are captured and returned.
Usage
database_setup_ui(id)
database_setup_server(id)
Arguments
id |
The Module namespace |
Value
database_setup_ui:
tagList |
A tagList containing a selectInput that allows for selection of available database setup modules and the setup UI for the selected database module. |
database_setup_server:
reactiveValues |
This module has no returns of its own, but will pass on
the |
Demo SQLite Database Module
Description
This module will create an in memory SQLite database with demo data from the CMS 2008-2010 Data Entrepreneurs’ Synthetic Public Use File (DE-SynPUF) from OHDSI. It will allow you to preview the functionality of ReviewR if you do not have access to a database of patient information.
This module consists of the following components:
Module UI function
demo_sqlite_setup_ui
: A uiOutput that allows users to connect to the demonstration database.
Module Server function
demo_sqlite_setup_server
: The logic that creates the demonstration SQLite database and returns aDBI::dbConnect()
object used to connect to the demo database.
Usage
demo_sqlite_setup_ui(id)
demo_sqlite_setup_server(id)
Arguments
id |
The module namespace |
Value
demo_sqlite_setup_ui:
tagList |
The Demo SQLite Setup UI |
demo_sqlite_setup_server:
reactiveValues |
|
Chart Review Interface Module
Description
This module determines if "View" or "Review" interface is needed based on presence or absence of a configured abstraction module. When an abstraction module is configured on the "Setup" tab of ReviewR, a column will be created to the right of the patient chart for the abstraction data collection instrument. Otherwise, the patient chart will take up the full view.
This module consists of the following components:
Module UI function
chartreview_ui
: A uiOutput containing the View or Review interface
Module Server function
chartreview_server
: The logic that controls the layout of the "Chart Review" tab in ReviewR. "View" if no abstraction module is configured. "Review" if abstraction module configured.
Usage
chartreview_ui(id)
chartreview_server(id, database_vars, abstract_vars)
Arguments
id |
The module namespace |
database_vars |
A reactiveValues object as returned by mod_database_setup. |
abstract_vars |
A reactiveValues object as returned by mod_abstraction_setup. |
Value
chartreview_ui:
tagList |
The Chart Review UI |
chartreview_server:
NULL |
This function has no return, other than creating a UI output for the UI function of this module. |
Patient Navigation Module
Description
This module will render the "all patients" dataTable (DT) located on the 'Patient Search' tab of ReviewR and will display demographic information about subjects in the connected database. The subject id of the selections made on this tab are extracted and passed to other ReviewR modules. As selections are made using the DT or the navigation buttons on the 'Chart Review' tab, the selected patient in the DT is kept in sync by this module.
Additionally, demographic and (optionally) abstraction status information about the selected patient are extracted and placed into a header on the 'Chart Review' tab.
This module consists of the following components:
Module UI functions
navigation_message
: A uiOutput to display a placeholder message when no database is connected.all_patient_search_dt
: A uiOutput containing the "all patients" dataTable with patient demographic information from the connected database.chart_review_subject_info
: A uiOutput containing the selected subject's demographic information to display on the 'Chart Review' tab.chart_review_navigation
: A uiOutput containing the "Jump to Subject ID' dropdown and previous and next buttons used to navigate through patient data on the 'Chart Review' tab.
Module Server function
navigation_server: Provides all of the logic associated with displaying patient demographic information, selecting a patient to review, and navigating through the connected patient database. Returns user selected patient information for use by other modules.
Keyboard Shortcuts
This module also provides keyboard shortcuts to assist with navigating through patient data. The "meta" key refers to "ctrl" on Windows and "Cmd" on Mac.
Next Patient: “alt + meta + >”
Prev Patient: “alt + meta + <”
Usage
navigation_message(id)
all_patient_search_dt(id)
chart_review_subject_info(id)
chart_review_navigation(id)
navigation_server(
id,
database_vars,
data_model_vars,
abstract_vars,
parent_session
)
Arguments
id |
The Module namespace |
database_vars |
A reactiveValues object as returned by mod_database_setup. |
data_model_vars |
A reactiveValues object as returned by mod_data_model_detection. |
abstract_vars |
A reactiveValues object as returned by mod_abstraction_setup. |
parent_session |
The session information from the parent environment of this module. |
Value
navigation_message:
tagList |
A uiOutput to display a placeholder message when no database is connected. |
all_patient_search_dt:
tagList |
A uiOutput containing the "all patients" dataTable with patient demographic information from the connected database. |
chart_review_subject_info:
tagList |
A uiOutput containing the selected subject's demographic information to display on the 'Chart Review' tab. |
chart_review_navigation:
tagList |
A uiOutput containing the "Jump to Subject ID' dropdown and previous and next buttons used to navigate through patient data on the 'Chart Review' tab. |
navigation_server:
reactiveValues |
|
PostgreSQL Database Module
Description
This module is designed to guide a user through the process of authenticating with
a PostgreSQL database. The user is visually prompted for typical PostgreSQL connection
parameters. User entered information is verified and once authenticated, a
DBI::dbConnect()
object is returned.
This module consists of the following components:
Module UI function
postgresql_setup_ui
: A uiOutput that allows users to connect to provide connection parameters required to connect to a PostgreSQL database.
Module Server function
postgresql_setup_server
: The logic that controls the graphical user interface, validates user inputs, and returns a DBI::dbconnect() object used to connect to the desired PostgreSQL database.
Usage
postgresql_setup_ui(id)
postgresql_setup_server(id)
Arguments
id |
The module namespace |
Value
postgresql_setup_ui:
tagList |
The shinyPostgreSQL Setup UI |
postgresql_setup_server:
reactiveValues |
|
REDCap Abstraction Module
Description
This module allows users to interact with REDCap Projects from within a Shiny application. REDCap instruments are translated into native Shiny controls/widgets and allow for the capture of abstracted information from within the R Shiny environment. Additionally, error prone fields such as MRN and reviewer information are populated automatically, based on user configured information, thus reducing the potential for error in abstracted information.
This module consists of the following components:
Module UI functions
redcap_setup_ui
: The REDCap setup/configuration UIredcap_instrument_ui
: A shiny representation of a REDCap Instrument
Module Server function
redcap_server
: The logic
Keyboard Shortcuts
This module also provides a keyboard shortcut to assist with saving abstracted patient data. The "meta" key refers to "ctrl" on Windows and "Cmd" on Mac.
Save current instrument data: “alt + meta + s”
Usage
redcap_setup_ui(id)
redcap_instrument_ui(id)
redcap_server(id, subject_id)
Arguments
id |
The module namespace |
subject_id |
A shiny::reactive expression containing a subject identifier. |
Value
redcap_setup_ui:
tagList |
The REDCap setup/configuration UI |
redcap_instrument_ui:
tagList |
A shiny representation of a REDCap Instrument |
redcap_server:
reactiveValues |
|
OMOP Tables
Description
Collection of functions to create prearranged views of OMOP patient data when supplied with database connection information and a mapping of the connected database.
Usage
omop_table_all_patients(table_map, db_connection)
omop_table_condition_era(table_map, db_connection, subject_id)
omop_table_condition_occurrence(table_map, db_connection, subject_id)
omop_table_death(table_map, db_connection, subject_id)
omop_table_device_exposure(table_map, db_connection, subject_id)
omop_table_dose_era(table_map, db_connection, subject_id)
omop_table_drug_era(table_map, db_connection, subject_id)
omop_table_drug_exposure(table_map, db_connection, subject_id)
omop_table_measurement(table_map, db_connection, subject_id)
omop_table_note(table_map, db_connection, subject_id)
omop_table_observation(table_map, db_connection, subject_id)
omop_table_observation_period(table_map, db_connection, subject_id)
omop_table_payer_plan_period(table_map, db_connection, subject_id)
omop_table_procedure_occurrence(table_map, db_connection, subject_id)
omop_table_specimen(table_map, db_connection, subject_id)
omop_table_visit_occurrence(table_map, db_connection, subject_id)
Arguments
table_map |
A dplyr::tibble containing a mapping between the CDM standard tables and fields to the user connected tables and fields. |
db_connection |
A DBI::dbConnect object |
subject_id |
A numeric, or coercible to numeric. |
Value
A dplyr::tibble containing pre-coordinated patient information from the connected database.
ReviewR Patient Search Tab
Description
This function contains all of the elements that control the layout of the Patient Search Tab.
Usage
patient_search()
Value
shiny::renderUI Output containing the Patient Search Tab
See Also
Other layout:
chart_review()
,
homepage()
,
setup()
REDCap Connection
Description
Overview
A 'safe' wrapper for redcapAPI::redcapConnection()
. Will return diagnostic
error codes in case incorrect URL or token are provided instead of failing
outright.
REDCap API Security
It is good practice to ensure that SSL certs are validated when utilizing the REDCap API. To ensure this happens, set the CURLOPT_SSL_VERIFYPEER' option to TRUE to avoid potential man in the middle attacks.
The redcapAPI package utilizes the httr package to perform operations using the REDCap API. Configuration options can be passed directly to httr via the config option in the redcapAPI::redcapConnection function. Here, we set 'ssl_verifypeer = 1L' to ensure cert checking is enabled.
Usage
redcap_connection(url, token)
Arguments
url |
A string containing the https URL for your institution's REDCap API. |
token |
A string containing the API token for your REDCap project. |
Value
A redcapAPI connection object if the URL and API token are correct ( See: redcapAPI::redcapConnection ). Else, return diagnostic error.
REDCap Survey Complete
Description
A dataset containing valid REDCap "Survey Complete" Values.
Usage
redcap_survey_complete
Format
A data frame with 2 rows and 2 variables:
- redcap_survey_complete_names
The human readable "Survey Complete" Responses
- redcap_survey_complete_values
REDCap API values for "Survey Complete" Responses
...
REDCap Widget Map
Description
A dataset that maps REDCap question types and common validations to native shiny widgets through custom functions.
Usage
redcap_widget_map
Format
A data frame with 9 rows and 3 variables:
- redcap_field_type
A REDCap Question Type
- redcap_field_validation
Custom REDCap Question Type Validation
- shinyREDCap_widget_function
shinyREDCap function to use when mapping to native Shiny widget
...
Render REDCap Instrument
Description
This function will select the appropriate shiny widget translation function based on the provided parameters. Used to loop over REDCap project information to create an entire data collection instrument which may consist of multiple questions/question types.
Usage
render_redcap_instrument(
shinyREDCap_type,
id,
field_label,
required,
choices,
current_subject_data = NULL,
...
)
Arguments
shinyREDCap_type |
A string indicating a supported shinyREDCap question type. Valid options include: "shinyREDCap_text", "shinyREDCap_date", "shinyREDCap_dropdown", "shinyREDCap_truefalse", "shinyREDCap_yesno", "shinyREDCap_radio", "shinyREDCap_checkbox", "shinyREDCap_notes", "shinyREDCap_integer" |
id |
A string, containing a globally unique REDCap question identifier. Used to create a valid Shiny inputID. |
field_label |
A string containing the question being asked. May contain html formatting. |
required |
A string, "yes" or "no". Is this a required REDCap question type? |
choices |
REDCap choices for the question. |
current_subject_data |
Previously saved REDCap data on the current subject. |
... |
Any additional parameters to pass to shiny widget inputs. |
Value
A shiny input widget for the UI
ReviewR DataTable
Description
This is a wrapper function around DT::datatable which applies common extensions, options and default values used throughout the ReviewR application.
Usage
reviewr_datatable(.data, dom = "ftip", column_filter = "top", search_term = "")
Arguments
.data |
A local tibble or data frame to be rendered in the ReviewR UI |
dom |
Define the table control elements to appear on the page and in what order. See: https://datatables.net/reference/option/dom |
column_filter |
Where to display individual column filters. Valid entries are: 'top','bottom','none' |
search_term |
A string or regular expression used as a filter for patient data |
Value
Run Application
Description
Start the ReviewR Application in a browser on port 1410.
__________ .__ __________ \______ \ _______ _|__| ______ _ _\______ \ | _// __ \ \/ / |/ __ \ \/ \/ /| _/ | | \ ___/\ /| \ ___/\ / | | \ |____|_ /\___ >\_/ |__|\___ >\/\_/ |____|_ / \/ \/ \/ \/ by WileyLab Making manual record review fun since 2019! authors: Laura Wiley, Luke Rasmussen, David Mayer
Usage
run_app(...)
Arguments
... |
A list of options to pass to the app including:
|
Value
No return value, called to start the ReviewR Shiny Application!
REDCap Safe Export Records
Description
A safe wrapper around redcapAPI::exportRecords that does not fail when records are requested from an empty REDCap project. In the event of an empty project, field names are used to create an empty data structure.
Usage
safe_exportRecords(rc_con, rc_field_names)
Arguments
rc_con |
A REDCap API Connection Object |
rc_field_names |
The field names for a REDCap instrument |
Value
A data frame containing existing REDCap records, or an empty data frame with the structure of what the records would look like.
Safe File Exists
Description
A "safe" wrapper around base::file.exists that returns a FALSE if no file path is supplied as an argument, instead of an error.
Usage
safe_file.exists(...)
Arguments
... |
character vectors, containing file names or paths |
Value
Logical, true/false if file path is provided or NULL if not supplied with any input.
ReviewR Setup Tab
Description
This function contains all of the elements that control the layout of the Setup Tab.
Usage
setup()
Value
shiny::renderUI Output containing the Setup Tab
See Also
Other layout:
chart_review()
,
homepage()
,
patient_search()
Shiny Widget Translation
Description
A collection of functions to map REDCap question types as exported by the REDCap API to native Shiny widgets.
Usage
shinyREDCap_textInput(id, field_label, value = NULL, placeholder = NULL, ...)
shinyREDCap_dateInput(id, field_label, value = NULL, ...)
shinyREDCap_dropdown(id, field_label, required, choices, value = NULL, ...)
shinyREDCap_truefalse(id, field_label, required, value = NULL, ...)
shinyREDCap_yesno(id, field_label, required, value = NULL, ...)
shinyREDCap_radio(id, field_label, required, choices, value = NULL, ...)
shinyREDCap_checkbox(id, field_label, choices, value = NULL, ...)
shinyREDCap_notes(id, field_label, value = NULL, ...)
shinyREDCap_integer(id, field_label, value = NULL, ...)
Arguments
id |
A string, containing a globally unique REDCap question identifier. Used to create a valid Shiny inputID. |
field_label |
A string containing the question being asked. May contain html formatting. |
value |
Default value or previous data if question has previously been answered |
placeholder |
Placeholder text to help a reviewer decide how to answer the question |
... |
Any additional parameters to pass to shiny widget inputs. |
required |
A string, "yes" or "no". Is this a required REDCap question type? |
choices |
REDCap choices for the question. |
Value
A shiny input widget for the UI
Supported Data Model Schemas
Description
A dataset containing data model information along with the corresponding version and nested schema information.
Usage
supported_data_models
Format
A data frame with 12 rows and 4 variables:
- data_model
Data model name
- model_version
Version of the data model
- data
Nested database schemas, including included table and field mappings
- file_path
Where schema was imported from
...
Source
https://github.com/OHDSI/CommonDataModel/
https://github.com/MIT-LCP/mimic-code
synPUF
Description
Overview
This dataset contains a 10 person subset of the CMS 2008-2010 Data Entrepreneurs’ Synthetic Public Use File (DE-SynPUF) from OHDSI.
Details
Usage
synPUF
Format
A data frame with 23 rows and 2 variables:
- table_name
character: The table name in OMOP v5.2.2
- table_data
list: The table data, in OMOP v5.2.2
...
Source
user_field
Description
user_field
Usage
user_field(table_map, desired_cdm_table, desired_cdm_field)
Arguments
table_map |
A dplyr::tibble, generated by mod_data_model_detection containing user database tables and fields mapped to the determined CDM. |
desired_cdm_table |
A string containing the table name in the desired CDM. |
desired_cdm_field |
A string containing the field name in the desired CDM. |
Value
A string containing the user database field pertaining to the standard data model field
user_table
Description
user_table
Usage
user_table(table_map, db_con, desired_cdm_table)
Arguments
table_map |
A dplyr::tibble, generated by mod_data_model_detection containing user database tables and fields mapped to the determined CDM. |
db_con |
A DBI::dbConnect object that is created through user interaction with the Setup Tab |
desired_cdm_table |
A string containing the table name in the desired CDM. |
Value
A SQL data source dplyr::tbl, ie. tbl(db_con, user_table), that connects to the user table that corresponds to the standard data model table.