mirror of
https://github.com/agdamsbo/REDCapCAST.git
synced 2026-06-19 13:17:30 +02:00
exporting redcap instrument from shiny app
This commit is contained in:
parent
7f74ea5144
commit
3e4b1b1549
5 changed files with 182 additions and 54 deletions
|
|
@ -41,6 +41,14 @@ server <- function(input, output, session) {
|
|||
}
|
||||
)
|
||||
|
||||
# Downloadable .zip of instrument ----
|
||||
output$downloadInstrument <- shiny::downloadHandler(
|
||||
filename = paste0("REDCapCAST_instrument",Sys.Date(),".zip"),
|
||||
content = function(file) {
|
||||
create_instrument_meta_single(purrr::pluck(dd(), "meta"), file)
|
||||
}
|
||||
)
|
||||
|
||||
output_staging <- shiny::reactiveValues()
|
||||
output_staging$meta <- output_staging$data <- NA
|
||||
|
||||
|
|
|
|||
11
app/ui.R
11
app/ui.R
|
|
@ -19,11 +19,11 @@ ui <- shiny::shinyUI(
|
|||
windowTitle = "REDCap database creator"
|
||||
),
|
||||
shiny::h4(
|
||||
"This tool includes to convenient functions:",
|
||||
"THese are the functionalities to create and migrate data from a spreadsheet to a REDCap database:",
|
||||
shiny::br(),
|
||||
"1) creating a REDCap data dictionary based on a spreadsheet (.csv/.xls(x)/.dta/.ods) and",
|
||||
"1) create a REDCap data dictionary or instrument based on a spreadsheet (.csv/.xls(x)/.dta/.ods) and",
|
||||
shiny::br(),
|
||||
"2) creating said database on a given REDCap server and uploading the dataset via API access."
|
||||
"2) upload said database file on a given REDCap server and upload the dataset via API access or download for all manual upload."
|
||||
),
|
||||
|
||||
|
||||
|
|
@ -49,7 +49,10 @@ ui <- shiny::shinyUI(
|
|||
shiny::downloadButton("downloadData", "Download data"),
|
||||
|
||||
# Button
|
||||
shiny::downloadButton("downloadMeta", "Download datadictionary"),
|
||||
shiny::downloadButton("downloadMeta", "Download data dictionary"),
|
||||
|
||||
# Button
|
||||
shiny::downloadButton("downloadInstrument", "Download as instrument"),
|
||||
|
||||
|
||||
# Horizontal line ----
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue