ECD LiveTFL is a web app developed based on the R teal framework (interactive Exploratory Data Analysis with Shiny Web-Applications), which can provide real-time and interactive clinical trial data analysis results (TFL) display to support data-driven decision making.
The teal framework is a tool for building TFL interactive analysis web applications, which includes the following components:
Introduction
Data Process
TFL Platform
Compared to traditional TFL, ECD LiveTFL has the following advantages:
ECD LiveTFL consists of three parts: data processing, configuration files and TFL platform.
Overview
Data Flow
Trigger
Choose Study
Data Processing
Ready to TFL
table preprocessing
listing preprocessing
module parameter
Choose All Phase
Choose Phase 1
The TFL Platform app has 8 tabs, which are:
dm table
aesum table
aept table
aesocpt table
swimlane figure
disposition listing
Download Table
html format
docx format
Download Listing
html format
docx format
User manual
The teal framework passes in data before starting a session. This creates difficulties when we want to start different data after the session using user information.
R Code
app <- init( data = teal_data( dataset("iris", iris), dataset("mtcars", mtcars) ), modules = example_module(label = "example teal module"), title = "App title", header = tags$h1("Sample App"), footer = tags$p("Copyright 2017 - 2023"))shinyApp(app$ui, app$server)
App
Fortunately, we can use the renderUI function to render the teal framework to uiOutput, so that the shiny app nested the teal app to start the session and load the data.
However, the nested teal app cannot adapt to the screen size, and the default height is 400px.
R Code
ui <- fluidPage( uiOutput("tfl", style = "height: 100%; width: 100%;"))server <- function(input, output, session) { user_name <- session$user %>% str_replace_all("\\.","_") %>% tolower() observeEvent(shinybrowser::get_height(),{ output$tfl <- renderUI({ source("teal_config.R", local = TRUE) shinyApp(ui = app$ui, server = app$server) }) })}shinyApp(ui, server)
App
Fortunately, we can make nested teal apps adaptive to screen size through the shinybrowser package.
R Code
ui <- fluidPage( shinybrowser::detect(), uiOutput("tfl", style = "height: 100%; width: 100%;"))server <- function(input, output, session) { user_name <- session$user %>% str_replace_all("\\.","_") %>% tolower() observeEvent(shinybrowser::get_height(),{ output$tfl <- renderUI({ source("teal_config.R", local = TRUE) shinyApp(ui = app$ui, server = app$server, options =list(height = paste0(shinybrowser::get_height(),"px"), width = "100%")) }) })}shinyApp(ui, server)
App
Another problem with nested teal apps is that DT packages may not render the table correctly.
R Code
ui <- fluidPage( uiOutput("tfl"))server <- function(input, output, session) { output$tfl <- renderUI({ ui <- fluidPage( DT::dataTableOutput("table") ) server <- function(input, output, session) { output$table <- DT::renderDataTable({ DT::datatable(iris) }) } shinyApp(ui, server, options = list(height = "800px", width = "100%")) })}shinyApp(ui, server)
App
One solution is to use the parameter server = FALSE to make the DT render the table on the front end.
R Code
ui <- fluidPage( uiOutput("tfl"))server <- function(input, output, session) { output$tfl <- renderUI({ ui <- fluidPage( DT::dataTableOutput("table") ) server <- function(input, output, session) { output$table <- DT::renderDataTable({ DT::datatable(iris) }, server = FALSE) } shinyApp(ui, server, options = list(height = "800px", width = "100%")) })}shinyApp(ui, server)
App
An html file in the absolute path can be loaded in a shiny app using addResourcePath().
Using renderUI() to render html files prevents loaded html scripts from interacting with the css style of the shiny app.
R Code
ui <- fluidPage( uiOutput("user_manual"))server <- function(input, output, session) { addResourcePath("files", "/teal/files") output$user_manual <- renderUI({ tags$iframe(style="height:800px; width:100%; scrolling=yes; border: none;", src="files/user_manual.html") })}shinyApp(ui, server)
App
The future development direction of ECD LiveTFL is to further optimize user experience and meet user needs through user satisfaction and suggestions.
ECD LiveTFL expands on the functionality of the teal framework in the following ways:
ECD LiveTFL expands on the functionality of the teal framework in the following ways:
ECD LiveTFL expands on the functionality of the teal framework in the following ways:
By connecting two apps, it expands the functionality of the teal framework, allowing it to produce different ADAM data for displaying TFL after data preprocessing based on simple UI operations by users, enhancing the interactivity of data preprocessing. It delivers data specific to each user through permission management.
By building a configuration file database for different studies and combining it with UI, it allows users to dynamically modify configuration files in real time and feedback to the server side to produce interactive TFLs, further enhancing the interactivity of TFLs in more detail. By using leader programmer for unified permission management, it ensures the quality of TFL while maintaining its flexibility.
ECD LiveTFL expands on the functionality of the teal framework in the following ways:
By connecting two apps, it expands the functionality of the teal framework, allowing it to produce different ADAM data for displaying TFL after data preprocessing based on simple UI operations by users, enhancing the interactivity of data preprocessing. It delivers data specific to each user through permission management.
By building a configuration file database for different studies and combining it with UI, it allows users to dynamically modify configuration files in real time and feedback to the server side to produce interactive TFLs, further enhancing the interactivity of TFLs in more detail. By using leader programmer for unified permission management, it ensures the quality of TFL while maintaining its flexibility.
Enhanced listing display, filtering, searching, downloading and other functions. And by using related tables to achieve unified filtering of all listings.
ECD LiveTFL expands on the functionality of the teal framework in the following ways:
By connecting two apps, it expands the functionality of the teal framework, allowing it to produce different ADAM data for displaying TFL after data preprocessing based on simple UI operations by users, enhancing the interactivity of data preprocessing. It delivers data specific to each user through permission management.
By building a configuration file database for different studies and combining it with UI, it allows users to dynamically modify configuration files in real time and feedback to the server side to produce interactive TFLs, further enhancing the interactivity of TFLs in more detail. By using leader programmer for unified permission management, it ensures the quality of TFL while maintaining its flexibility.
Enhanced listing display, filtering, searching, downloading and other functions. And by using related tables to achieve unified filtering of all listings.
Keyboard shortcuts
↑, ←, Pg Up, k | Go to previous slide |
↓, →, Pg Dn, Space, j | Go to next slide |
Home | Go to first slide |
End | Go to last slide |
Number + Return | Go to specific slide |
b / m / f | Toggle blackout / mirrored / fullscreen mode |
c | Clone slideshow |
p | Toggle presenter mode |
t | Restart the presentation timer |
?, h | Toggle this help |
Esc | Back to slideshow |