#' querywidget UI Function
#'
#' @description A shiny Module.
#'
#' @param id,input,output,session Internal parameters for {shiny}.
#'
#' @noRd
#'
#' @importFrom shiny NS tagList
mod_querywidget_ui <- function(id){
ns <- NS(id)
tagList(
queryBuilder::queryBuilderOutput(ns('querybuilder'),height = 'auto')
)
}
#' querywidget Server Functions
#'
#' @noRd
mod_querywidget_server <- function(id){
moduleServer( id, function(input, output, session){
ns <- session$ns
#
# filters = list(list(name = 'AGE', type = 'integer'),
# list(name = 'RACE', type = 'character'),
# list(name = "TYPE OF NEEDLE", type = 'character'),
# list(name = 'GAUGE', type = 'character'),
# list(name = 'ATTEMPT', type = 'integer'),
# list(name = 'PROVIDER', type = 'character'),
# list(name = "HEADACHE ONSET", type = 'character'),
# list(name = "FRONTO-OCCIPITAL", type = 'character'),
# list(name = "POSITIONAL", type = 'character'),
# list(name = "NECK PAIN", type = 'character'),
# list(name = "FLUIDS", type = 'character'),
# list(name = "NSAID", type = 'character'),
# list(name = "CAFFIENE", type = 'character'),
# list(name = "OPIOID", type = 'character'),
# list(name = "RESOLUTION", type = 'character'),
# list(name = "BLOOD PATCH", type = 'character'),
# list(name = "DISCHARGE SUMMARY", type = 'integer')
# )
output$querybuilder <- queryBuilder::renderQueryBuilder({
queryBuilder::queryBuilder(#filters = filters,
data = dataset,
autoassign = TRUE
)
})
})
}
## To be copied in the UI
#
## To be copied in the server
#
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.