Skip to content

Commit

Permalink
small cd bugs (#191)
Browse files Browse the repository at this point in the history
* Index event breakdown report added to select input navigation

* database selection in cd time distribution tab

* database name in cohort diagnostics cohort counts simple tab
  • Loading branch information
azimov authored Jul 28, 2023
1 parent dce6532 commit b27dde9
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
2 changes: 0 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,6 @@ export(predictionSettingsViewer)
export(predictionValidationServer)
export(predictionValidationViewer)
export(predictionViewer)
export(resultTableServer)
export(resultTableViewer)
export(sccsDiagnosticsSummaryServer)
export(sccsDiagnosticsSummaryViewer)
export(sccsHelperFile)
Expand Down
6 changes: 4 additions & 2 deletions R/cohort-diagnostics-definition.R
Original file line number Diff line number Diff line change
Expand Up @@ -613,18 +613,20 @@ cohortDefinitionsModule <- function(id,
if (!hasData(data)) {
return(NULL)
}

data <- data %>%
dplyr::inner_join(databaseTable, by = "databaseId") %>%
dplyr::filter(.data$cohortId == selectedCohortDefinitionRow()$cohortId) %>%
dplyr::filter(.data$databaseId %in% databaseTable$databaseId) %>%
dplyr::select("databaseId",
dplyr::select("databaseName",
"cohortSubjects",
"cohortEntries") %>%
dplyr::rename("persons" = "cohortSubjects",
"events" = "cohortEntries")

shiny::validate(shiny::need(hasData(data), "There is no data for this cohort."))

keyColumns <- c("databaseId")
keyColumns <- c("databaseName")
dataColumns <- c("persons", "events")

displayTable <- getDisplayTableSimple(data = data,
Expand Down
5 changes: 4 additions & 1 deletion R/cohort-diagnostics-main.R
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ cohortDiagnosticsSever <- function(id,
if ("temporalCovariateValue" %in% dataSource$enabledReports) {
selection["Cohort Characterization"] <- "characterization"
selection["Compare Cohort Characterization"] <- "compareCohortCharacterization"
selection["Time Distributions"] <- "timeDistributions"
selection["Time Distributions"] <- "timeDistribution"
}

if ("relationship" %in% dataSource$enabledReports)
Expand All @@ -439,6 +439,9 @@ cohortDiagnosticsSever <- function(id,
if ("orphanConcepts" %in% dataSource$enabledReports)
selection["Orphan Concepts"] <- "orphanConcepts"

if ("indexEventBreakdown" %in% dataSource$enabledReports)
selection["Index Event Breakdown"] <- "indexEventBreakdown"

shiny::updateSelectInput(
inputId = "tabs",
label = "Select Report",
Expand Down
2 changes: 0 additions & 2 deletions R/components-data-viewer.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#' @param downloadedFileName string, desired name of downloaded data file. can use the name from the module that is being used
#'
#' @return shiny module UI
#' @export
#'
resultTableViewer <- function(id = "result-table",
downloadedFileName = NULL) {
Expand Down Expand Up @@ -142,7 +141,6 @@ ohdsiReactableTheme <- reactable::reactableTheme(
#' @param downloadedFileName string, desired name of downloaded data file. can use the name from the module that is being used
#'
#' @return shiny module server
#' @export
#'
resultTableServer <- function(id, #string
df, #data.frame
Expand Down
2 changes: 1 addition & 1 deletion inst/cohort-diagnostics-ref/migrations.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ migrationFile,migrationOrder
Migration_1-v3_1_0_time_id.sql,1
Migration_2-v3_1_0_ir_person_years.sql,2
Migration_3-v3_2_0_suport_cohort_subsets.sql,3
Migration_4-v3_2_1_cohort_name_field.sql,4
Migration_4-v3_2_1_cohort_name_field.sql,4

0 comments on commit b27dde9

Please sign in to comment.