Skip to content

Commit

Permalink
leave as dev
Browse files Browse the repository at this point in the history
rm unmapped for now
  • Loading branch information
edward-burn committed Nov 21, 2024
1 parent af5951b commit 8c6c5aa
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 98 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: PhenotypeR
Type: Package
Title: Assess Study Cohorts Using a Common Data Model
Version: 0.1.0
Version: 0.0.900
Authors@R: c(
person("Edward", "Burn", , "[email protected]",
role = c("aut", "cre"), comment = c(ORCID = "0000-0002-9286-1128")),
Expand Down
10 changes: 5 additions & 5 deletions R/codelistDiagnostics.R
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,11 @@ codelistDiagnostics <- function(cohort){
cli::cli_bullets(c("*" = "Getting code counts in database based on achilles"))
results[[paste0("achilles_code_use")]] <- CodelistGenerator::summariseAchillesCodeUse(x = all_codelists, cdm = cdm)

cli::cli_bullets(c("*" = "Getting unmapped concepts"))
results[[paste0("unmapped_codes", i)]] <- CodelistGenerator::summariseUnmappedCodes(
x = all_codelists,
cdm = cdm
)
# cli::cli_bullets(c("*" = "Getting unmapped concepts"))
# results[[paste0("unmapped_codes", i)]] <- CodelistGenerator::summariseUnmappedCodes(
# x = all_codelists,
# cdm = cdm
# )

cli::cli_bullets(c("*" = "Getting orphan concepts"))
results[[paste0("orphan_codes", i)]] <- CodelistGenerator::summariseOrphanCodes(
Expand Down
16 changes: 3 additions & 13 deletions inst/shiny/global.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,9 @@ plotComparedLsc <- function(lsc, cohorts, colour = NULL, facet = NULL){
pivot_wider(names_from = cohort_name,
values_from = percentage)

# plot <- visOmopResults::scatterPlot(plot_data,
# x = cohorts[1],
# y = cohorts[2],
# colour = colour,
# facet = facet,
# line = FALSE,
# point = TRUE,
# ribbon = FALSE) +
# ggplot2::geom_abline(slope = 1, intercept = 0, color = "red", linetype = "dashed") +
# ggplot2::theme_bw()

plot <- plot_data |>
ggplot(aes(text = paste("Concept:", variable_name,
plot <- plot_data |>
ggplot(aes(text = paste("<br>Database:", cdm_name,
"<br>Concept:", variable_name,
"<br>Concept ID:", concept_id,
"<br>Time window:", time_window,
"<br>Table:", table,
Expand Down
158 changes: 79 additions & 79 deletions inst/shiny/ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -149,82 +149,82 @@ ui <- bslib::page_navbar(
),

## unmapped concepts -----
bslib::nav_panel(
title = "Unmapped concepts",
icon = shiny::icon("database"),
bslib::layout_sidebar(
sidebar = bslib::sidebar(width = 400, open = "closed",
bslib::accordion(
bslib::accordion_panel(
title = "Settings",
shinyWidgets::pickerInput(
inputId = "unmapped_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 = "unmapped_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 = "unmapped_none"
),
sortable::add_rank_list(
text = "header",
labels = c("cdm_name", "estimate_name"),
input_id = "unmapped_header"
),
sortable::add_rank_list(
text = "groupColumn",
labels = NULL,
input_id = "unmapped_groupColumn"
),
sortable::add_rank_list(
text = "hide",
labels = character(),
input_id = "unmapped_hide"
)
)
)
)
),
bslib::nav_panel(
title = "Unmapped",
bslib::card(
full_screen = TRUE,
bslib::card_header(
bslib::popover(
shiny::icon("download"),
shinyWidgets::pickerInput(
inputId = "unmapped_formatted_download_type",
label = "File type",
selected = "docx",
choices = c("docx", "png", "pdf", "html"),
multiple = FALSE
),
shiny::downloadButton(outputId = "unmapped_formatted_download", label = "Download")
),
class = "text-end"
),
gt::gt_output("unmapped_formatted") |> withSpinner()
)
)
)
),
# bslib::nav_panel(
# title = "Unmapped concepts",
# icon = shiny::icon("database"),
# bslib::layout_sidebar(
# sidebar = bslib::sidebar(width = 400, open = "closed",
# bslib::accordion(
# bslib::accordion_panel(
# title = "Settings",
# shinyWidgets::pickerInput(
# inputId = "unmapped_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 = "unmapped_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 = "unmapped_none"
# ),
# sortable::add_rank_list(
# text = "header",
# labels = c("cdm_name", "estimate_name"),
# input_id = "unmapped_header"
# ),
# sortable::add_rank_list(
# text = "groupColumn",
# labels = NULL,
# input_id = "unmapped_groupColumn"
# ),
# sortable::add_rank_list(
# text = "hide",
# labels = character(),
# input_id = "unmapped_hide"
# )
# )
# )
# )
# ),
# bslib::nav_panel(
# title = "Unmapped",
# bslib::card(
# full_screen = TRUE,
# bslib::card_header(
# bslib::popover(
# shiny::icon("download"),
# shinyWidgets::pickerInput(
# inputId = "unmapped_formatted_download_type",
# label = "File type",
# selected = "docx",
# choices = c("docx", "png", "pdf", "html"),
# multiple = FALSE
# ),
# shiny::downloadButton(outputId = "unmapped_formatted_download", label = "Download")
# ),
# class = "text-end"
# ),
# gt::gt_output("unmapped_formatted") |> withSpinner()
# )
# )
# )
# ),

## Orphan codes -----
bslib::nav_panel(
Expand Down Expand Up @@ -667,7 +667,7 @@ ui <- bslib::page_navbar(
)
),
bslib::navset_card_tab(

bslib::nav_panel(
title = "Table",
bslib::card(
Expand Down Expand Up @@ -1668,8 +1668,8 @@ ui <- bslib::page_navbar(
# )
# )
# )


),
# end ------
bslib::nav_spacer(),
Expand Down

0 comments on commit 8c6c5aa

Please sign in to comment.