Skip to content

Commit

Permalink
Merge pull request #114 from OHDSI/achilles_fix
Browse files Browse the repository at this point in the history
achilles code use
  • Loading branch information
martaalcalde authored Nov 14, 2024
2 parents 37bddf4 + 840b5c5 commit 9404ad0
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 3 deletions.
15 changes: 15 additions & 0 deletions inst/shiny/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,21 @@ server <- function(input, output, session) {
)


# achilles_code_use -----

createOutputAchillesCodeUse <- shiny::reactive({
achillesFiltered <- dataFiltered$achilles_code_use |>
filterData("achilles_code_use", input)
CodelistGenerator::tableAchillesCodeUse(achillesFiltered,
header = input$achilles_code_use_header,
groupColumn = input$achilles_code_use_groupColumn,
hide = input$achilles_code_use_hide)

})

output$achilles_code_use_gt <- gt::render_gt({
createOutputAchillesCodeUse()
})
# summarise_observation_period -----
## tidy summarise_observation_period -----
getTidyDataSummariseObservationPeriod <- shiny::reactive({
Expand Down
78 changes: 75 additions & 3 deletions inst/shiny/ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,82 @@ ui <- bslib::page_navbar(
icon = shiny::icon("list"),
## achilles code use -----
bslib::nav_panel(
title = "Achilles Code Use",
icon = shiny::icon("database")
title = "Achilles code use",
icon = shiny::icon("database"),
bslib::layout_sidebar(
sidebar = bslib::sidebar(width = 400, open = "closed",
bslib::accordion(
bslib::accordion_panel(
title = "Settings",
shinyWidgets::pickerInput(
inputId = "achilles_code_use_grouping_cdm_name",
label = "Database",
choices = NULL,
selected = NULL,
multiple = TRUE,
options = list(`actions-box` = TRUE, size = 10, `selected-text-format` = "count > 3")
),
shinyWidgets::pickerInput(
inputId = "achilles_code_use_grouping_codelist_name",
label = "Codelist name",
choices = NULL,
selected = NULL,
multiple = TRUE,
options = list(`actions-box` = TRUE, size = 10, `selected-text-format` = "count > 3")
)
),
bslib::accordion_panel(
title = "Table formatting",
sortable::bucket_list(
header = NULL,
sortable::add_rank_list(
text = "none",
labels = c( "codelist_name"),
input_id = "achilles_code_use_none"
),
sortable::add_rank_list(
text = "header",
labels = c("cdm_name", "estimate_name"),
input_id = "achilles_code_use_header"
),
sortable::add_rank_list(
text = "groupColumn",
labels = NULL,
input_id = "achilles_code_use_groupColumn"
),
sortable::add_rank_list(
text = "hide",
labels = character(),
input_id = "achilles_code_use_hide"
)
)
)
)
),
bslib::nav_panel(
title = "achilles_code_use",
bslib::card(
full_screen = TRUE,
bslib::card_header(
bslib::popover(
shiny::icon("download"),
shinyWidgets::pickerInput(
inputId = "achilles_code_use_formatted_download_type",
label = "File type",
selected = "docx",
choices = c("docx", "png", "pdf", "html"),
multiple = FALSE
),
shiny::downloadButton(outputId = "achilles_code_use_formatted_download", label = "Download")
),
class = "text-end"
),
gt::gt_output("achilles_code_use_gt") |> withSpinner()
)
)
)
),

## unmapped concepts -----
bslib::nav_panel(
title = "Unmapped concepts",
Expand Down

0 comments on commit 9404ad0

Please sign in to comment.