Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue114 #339

Merged
merged 8 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/R_CMD_check_Hades.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
CDM5_SPARK_CONNECTION_STRING: ${{ secrets.CDM5_SPARK_CONNECTION_STRING }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:

- name: Upload source package
if: success() && runner.os == 'macOS' && github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: package_tarball
path: check/*.tar.gz
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:

steps:

- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down Expand Up @@ -155,7 +155,7 @@ jobs:

- name: Download package tarball
if: ${{ env.new_version != '' }}
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: package_tarball

Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ Suggests:
Remotes:
ohdsi/ReportGenerator,
ohdsi/ResultModelManager
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
26 changes: 22 additions & 4 deletions R/characterization-caseSeries.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,20 +74,38 @@ characterizationCaseSeriesServer <- function(
output$inputs <- shiny::renderUI({ # need to make reactive?

shiny::div(
shiny::selectInput(
shinyWidgets::pickerInput(
inputId = session$ns('databaseId'),
label = 'Database: ',
choices = options()$databaseIds,
selected = options()$databaseIds[1],
multiple = F
multiple = F,
options = shinyWidgets::pickerOptions(
actionsBox = TRUE,
liveSearch = TRUE,
size = 10,
dropupAuto = TRUE,
liveSearchStyle = "contains",
liveSearchPlaceholder = "Type here to search",
virtualScroll = 50
)
),

shiny::selectInput(
shinyWidgets::pickerInput(
inputId = session$ns('tarInd'),
label = 'Time-at-risk: ',
choices = options()$tarInds,
selected = options()$tarInds[1],
multiple = F
multiple = F,
options = shinyWidgets::pickerOptions(
actionsBox = TRUE,
liveSearch = TRUE,
size = 10,
dropupAuto = TRUE,
liveSearchStyle = "contains",
liveSearchPlaceholder = "Type here to search",
virtualScroll = 50
)
),

shiny::actionButton(
Expand Down
13 changes: 11 additions & 2 deletions R/characterization-database.R
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,21 @@ characterizationDatabaseComparisonServer <- function(
output$inputs <- shiny::renderUI({

shiny::div(
shiny::selectInput(
shinyWidgets::pickerInput(
inputId = session$ns('databaseIds'),
label = 'Databases: ',
choices = inputVals()$databaseIds,
selected = inputVals()$databaseIds[1],
multiple = T
multiple = T,
options = shinyWidgets::pickerOptions(
actionsBox = TRUE,
liveSearch = TRUE,
size = 10,
dropupAuto = TRUE,
liveSearchStyle = "contains",
liveSearchPlaceholder = "Type here to search",
virtualScroll = 50
)
),

shiny::sliderInput(
Expand Down
18 changes: 12 additions & 6 deletions R/characterization-incidence.R
Original file line number Diff line number Diff line change
Expand Up @@ -268,21 +268,27 @@ characterizationIncidenceServer <- function(
style = "font-weight: bold; font-size: 20px; text-align: center; margin-bottom: 20px;"
),

shiny::selectInput(
shinyWidgets::pickerInput(
inputId = session$ns('outcomeIds'),
label = 'Outcome: ',
choices = outcomes(),
selected = 1,
selected = outcomes()[1],
multiple = T,
selectize = TRUE,
width = NULL,
size = NULL
options = shinyWidgets::pickerOptions(
actionsBox = TRUE,
liveSearch = TRUE,
size = 10,
dropupAuto = TRUE,
liveSearchStyle = "contains",
liveSearchPlaceholder = "Type here to search",
virtualScroll = 50
)
),

shinyWidgets::pickerInput(
inputId = session$ns('databaseSelector'),
label = 'Filter By Database: ',
choices = ciOptions$databases,
choices = sort(ciOptions$databases),
selected = ciOptions$databases,
multiple = T,
options = shinyWidgets::pickerOptions(
Expand Down
37 changes: 35 additions & 2 deletions R/characterization-riskFactors.R
Original file line number Diff line number Diff line change
Expand Up @@ -684,8 +684,41 @@
filterable = T
),

minPriorObservation = reactable::colDef(
header = withTooltip("Min Prior Observation",
"Minimum prior observation time (days)"),
filterable = T,
filterInput = function(values, name) {
shiny::tags$select(

Check warning on line 692 in R/characterization-riskFactors.R

View check run for this annotation

Codecov / codecov/patch

R/characterization-riskFactors.R#L692

Added line #L692 was not covered by tests
# Set to undefined to clear the filter
onchange = sprintf("Reactable.setFilter('%s', '%s', event.target.value || undefined)", elementId, name),

Check warning on line 694 in R/characterization-riskFactors.R

View check run for this annotation

Codecov / codecov/patch

R/characterization-riskFactors.R#L694

Added line #L694 was not covered by tests
# "All" has an empty value to clear the filter, and is the default option
shiny::tags$option(value = "", "All"),
lapply(unique(values), shiny::tags$option),
"aria-label" = sprintf("Filter %s", name),
style = "width: 100%; height: 28px;"

Check warning on line 699 in R/characterization-riskFactors.R

View check run for this annotation

Codecov / codecov/patch

R/characterization-riskFactors.R#L696-L699

Added lines #L696 - L699 were not covered by tests
)
}
),
outcomeWashoutDays = reactable::colDef(
header = withTooltip("Outcome Washout Days",
"Number of days for the outcome washout"),
filterable = T,
filterInput = function(values, name) {
shiny::tags$select(

Check warning on line 708 in R/characterization-riskFactors.R

View check run for this annotation

Codecov / codecov/patch

R/characterization-riskFactors.R#L708

Added line #L708 was not covered by tests
# Set to undefined to clear the filter
onchange = sprintf("Reactable.setFilter('%s', '%s', event.target.value || undefined)", elementId, name),

Check warning on line 710 in R/characterization-riskFactors.R

View check run for this annotation

Codecov / codecov/patch

R/characterization-riskFactors.R#L710

Added line #L710 was not covered by tests
# "All" has an empty value to clear the filter, and is the default option
shiny::tags$option(value = "", "All"),
lapply(unique(values), shiny::tags$option),
"aria-label" = sprintf("Filter %s", name),
style = "width: 100%; height: 28px;"

Check warning on line 715 in R/characterization-riskFactors.R

View check run for this annotation

Codecov / codecov/patch

R/characterization-riskFactors.R#L712-L715

Added lines #L712 - L715 were not covered by tests
)
}
),

rowCount = reactable::colDef(
header = withTooltip("# rows",
header = withTooltip("# Rows",
"Number of exposures in the cohort (people can be in more than once)"),
cell = function(value) {
if(is.null(value)){return('< min threshold')}
Expand All @@ -694,7 +727,7 @@
}
),
personCount = reactable::colDef(
header = withTooltip("# persons",
header = withTooltip("# Persons",
"Number of distinct people in the cohort"),
cell = function(value) {
if(is.null(value)){return('< min threshold')}
Expand Down
13 changes: 11 additions & 2 deletions R/characterization-timeToEvent.R
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,21 @@ characterizationTimeToEventServer <- function(
shiny::fluidPage(
shiny::fluidRow(

shiny::selectInput(
shinyWidgets::pickerInput(
inputId = session$ns("databases"),
label = "Databases:",
multiple = T,
choices = unique(allData()$databaseName),
selected = unique(allData()$databaseName)
selected = unique(allData()$databaseName),
options = shinyWidgets::pickerOptions(
actionsBox = TRUE,
liveSearch = TRUE,
size = 10,
dropupAuto = TRUE,
liveSearchStyle = "contains",
liveSearchPlaceholder = "Type here to search",
virtualScroll = 50
)
),

shiny::fluidRow(
Expand Down
5 changes: 4 additions & 1 deletion R/cohort-diagnostics-cohort-overlap.R
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,10 @@
title = "",
gridcolor = 'ffff'),
yaxis = list(zerolinecolor = '#ffff',
title = database,
title = addTextBreaks(
text = database,
length = 25

Check warning on line 133 in R/cohort-diagnostics-cohort-overlap.R

View check run for this annotation

Codecov / codecov/patch

R/cohort-diagnostics-cohort-overlap.R#L131-L133

Added lines #L131 - L133 were not covered by tests
),
zerolinewidth = 1,
gridcolor = 'ffff'))

Expand Down
2 changes: 1 addition & 1 deletion R/cohort-diagnostics-databaseInformation.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ databaseInformationView <- function(id) {
shinydashboard::box(
width = NULL,
title = "Execution meta-data",
shiny::tags$p("Each entry relates to execution on a given cdm. Results are merged between executions incrementally"),
shiny::tags$p("Each entry relates to execution on a given CDM. Results are merged between executions incrementally"),
shinycssloaders::withSpinner(reactable::reactableOutput(outputId = ns("databaseInformationTable"))),
shiny::conditionalPanel(
"output.databaseInformationTableIsSelected == true",
Expand Down
5 changes: 4 additions & 1 deletion R/cohort-diagnostics-timeDistributions.R
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,10 @@ plotTimeDistribution <- function(data, shortNameRef = NULL, showMax = FALSE) {
zerolinewidth = 2,
gridcolor = 'ffff'),
yaxis = list(
title = db,
title = addTextBreaks(
text = db,
length = 25 # change this based on plot height?
),
showTitle = FALSE,
zerolinecolor = '#ffff',
zerolinewidth = 2,
Expand Down
Loading