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

Develop #346

Merged
merged 180 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
180 commits
Select commit Hold shift + click to select a range
741c6ed
updating documentation on the html help files for all modules
nhall6 Feb 5, 2024
3b8054f
Update cohort-method.html
nhall6 Feb 12, 2024
048a9b1
protocol generator fix
jreps Feb 16, 2024
26100ba
Merge pull request #256 from OHDSI/issue_111
jreps Feb 16, 2024
c532acb
Fixed for orphan concepts not displaying in cd reports
azimov Feb 22, 2024
dda8c0b
fixing plot color palette to work for a higher number of dbs in stand…
nhall6 Feb 23, 2024
c96ca40
fixing bugs in some standard plots
nhall6 Feb 23, 2024
c4f7aab
home module
jreps Feb 23, 2024
46a296a
Dynamic module load
azimov Feb 23, 2024
48849f9
Fixes for query and module load
azimov Feb 23, 2024
7c550fd
splitting up column definition for evidence synth cohort method and sccs
jreps Feb 23, 2024
8bfac1b
Merge pull request #260 from OHDSI/es_sccs_cm_dynamic_load
jreps Feb 23, 2024
e7e2560
Update evidence-synth-main.R
jreps Feb 23, 2024
6c0938a
Merge branch 'es_split_cm_sccs' of https://github.com/OHDSI/OhdsiShin…
jreps Feb 23, 2024
c102d37
Merge pull request #259 from OHDSI/es_sccs_cm_dynamic_load
azimov Feb 23, 2024
f8a472e
Merge pull request #258 from OHDSI/incidence_plot_fixes
jreps Feb 26, 2024
1a8bbd2
Merge pull request #255 from OHDSI/issue_173
jreps Feb 26, 2024
7ee0f67
Update characterization-main.R
jreps Mar 1, 2024
7618a11
updating about module
nhall6 Mar 14, 2024
2f986c3
Update about-main.R
nhall6 Mar 14, 2024
32a76e4
Updating new about module
nhall6 Mar 15, 2024
5cfaab7
Update about.html
nhall6 Mar 15, 2024
004d2fd
further updating the about module
nhall6 Mar 15, 2024
4c01175
updating about module further, fixing link issues
nhall6 Mar 22, 2024
4e38eca
updating about-main further and oxygenising
nhall6 Mar 26, 2024
379378b
adding some of the new Rmd files for the modules
nhall6 Mar 28, 2024
7be193c
style tweaks
fdefalco Mar 28, 2024
02c9f81
Delete about-dataSources.html
nhall6 Mar 28, 2024
39ea6a5
Adding sample app.R file into extras folder
nhall6 Apr 1, 2024
216b7ec
updating some Rmds for vignettes
nhall6 Apr 1, 2024
515cfc2
Delete app.R
jreps Apr 1, 2024
b117c60
report module
jreps Apr 2, 2024
679ea0f
adding explicit pkg calls to pass test
nhall6 Apr 2, 2024
e3fbf8b
Merge pull request #269 from OHDSI/about-updates
jreps Apr 2, 2024
fc182c6
Merge pull request #270 from OHDSI/report-module
jreps Apr 2, 2024
cdc20e8
Update DESCRIPTION
jreps Apr 2, 2024
9b3157e
Merge branch 'develop' of https://github.com/OHDSI/OhdsiShinyModules …
nhall6 Apr 3, 2024
cd61b96
adding vignette Rmds for all modules
nhall6 Apr 3, 2024
399aa45
adding vignette Rmds for all modules
nhall6 Apr 3, 2024
e545877
Update _pkgdown.yml
jreps Apr 5, 2024
d415750
Merge branch 'develop' of https://github.com/OHDSI/OhdsiShinyModules …
nhall6 Apr 5, 2024
d4de00f
updating pkgdown
nhall6 Apr 5, 2024
e4dd667
updating pkgdown yml
nhall6 Apr 9, 2024
e11437c
Merge pull request #271 from OHDSI/vignette-updates
jreps Apr 10, 2024
a5468d1
fixing yml with proper formatting for website
nhall6 Apr 10, 2024
cef9322
Merge branch 'develop' of https://github.com/OHDSI/OhdsiShinyModules …
nhall6 Apr 11, 2024
d5c739b
update pkgdown_yml
nhall6 Apr 11, 2024
98681bc
changing doctype in OhdsiShinyModules.R
nhall6 Apr 11, 2024
2eb3de5
oxygenizing
nhall6 Apr 11, 2024
825f8c6
Merge pull request #273 from OHDSI/website-updates
jreps Apr 11, 2024
6987a9b
starting updates on adding hrefs to value boxes
nhall6 Apr 12, 2024
7809acd
adding links to each valueBox for each module
nhall6 Apr 12, 2024
3accad3
Merge pull request #274 from OHDSI/website-updates
jreps Apr 12, 2024
3f467fc
Fixes and optimisations for cd load up on postgres servers causing ha…
azimov Apr 19, 2024
4708ce1
Fixed missing reports error
azimov Apr 19, 2024
9d3c45e
Fix for sqlite
azimov Apr 19, 2024
c01c8c6
Actual fix for sqlite...
azimov Apr 19, 2024
c172a9e
Merge pull request #276 from OHDSI/postgres-dbi-issues
jreps Apr 23, 2024
ce1b0d3
adding covariate balance table functionality and custom colDefs for t…
nhall6 Apr 23, 2024
235430e
Merge branch 'hotfix-3.1.3' into develop
azimov Apr 23, 2024
c89ee84
Fixed missing library call
azimov Apr 25, 2024
200a443
Merge branch 'hotfix-2.1.14' into develop
azimov Apr 26, 2024
0b4a7f0
example app added
jreps May 2, 2024
b4437d3
Update report-main.R
jreps May 2, 2024
760bf1f
Update covariate balance table after primary key generation
nhall6 May 3, 2024
2fe42d4
Adding database filter to results selection to address issue #265
nhall6 May 6, 2024
30a11c0
Merge pull request #281 from OHDSI/issue-265
jreps May 6, 2024
d29d015
Merge pull request #280 from OHDSI/cm-covariate-balance-table
jreps May 6, 2024
7ab491b
remove help & information sections in most modules due to About modul…
nhall6 May 8, 2024
642bee8
estimation module
jreps May 9, 2024
8b1b3ad
estimation module updates
jreps May 9, 2024
0e6c0f5
estimation edits
jreps May 9, 2024
9ac2d1a
- updating characterization
jreps May 17, 2024
8f16b69
added targeting of value box hrefs
fdefalco May 20, 2024
910b09c
Merge pull request #283 from OHDSI/removing-help-sections
nhall6 May 20, 2024
10f92e7
adding links to valueBoxes even if modules are not included
nhall6 May 20, 2024
a46afd0
improving characterization
jreps May 21, 2024
e269342
Update characterization-incidence.R
jreps May 21, 2024
610c6c3
Merge branch 'develop' into estimation-updated
nhall6 May 21, 2024
9b62ec4
minor exclude fixes
jreps May 22, 2024
427f8ea
Update characterization-riskFactors.R
jreps May 22, 2024
a9675e0
fixes
jreps May 22, 2024
a9918ce
Update characterization-caseSeries.R
jreps May 22, 2024
faa1420
Update characterization-caseSeries.R
jreps May 22, 2024
35e837b
Update characterization-main.R
jreps May 22, 2024
e5e321c
Update characterization-riskFactors.R
jreps May 23, 2024
3977220
Update cohort-diagnostics-main.R
azimov May 28, 2024
5051ece
Update cohort-diagnostics-main.R
azimov May 28, 2024
6a3e482
updating for new char tables
jreps Jun 1, 2024
3b498b4
Update characterization-riskFactors.R
jreps Jun 3, 2024
5d2a28c
updating bug fixes and column cleanliness
nhall6 Jun 3, 2024
45ec3b3
Merge branch 'estimation-updated' of https://github.com/OHDSI/OhdsiSh…
nhall6 Jun 3, 2024
3955eed
Update characterization-timeToEvent.R
jreps Jun 4, 2024
f363522
cleaning characterization tables
jreps Jun 6, 2024
b39f5c0
minor update
jreps Jun 6, 2024
bf594b9
Update characterization-dechallengeRechallenge.R
jreps Jun 6, 2024
2ed680e
Update characterization-dechallengeRechallenge.R
jreps Jun 6, 2024
bbfa0c5
fixing column alignment and incidence error messages
nhall6 Jun 6, 2024
e1a4927
Merge branch 'estimation-updated' of https://github.com/OHDSI/OhdsiSh…
nhall6 Jun 6, 2024
1a15567
adding drop down and slide filters
jreps Jun 7, 2024
674f05d
fixing scrolls
jreps Jun 7, 2024
7160607
Update characterization-cohorts.R
jreps Jun 11, 2024
8326b09
minor bug fixes
jreps Jun 11, 2024
d01fbf5
updating table download
jreps Jun 11, 2024
c3bffd7
Update components-data-viewer.R
jreps Jun 11, 2024
114d2d0
adding details to exported results
jreps Jun 11, 2024
95bd9a1
Update components-data-viewer.R
jreps Jun 12, 2024
7aa5910
Update characterization-caseSeries.R
jreps Jun 12, 2024
b26caa3
Merge pull request #287 from OHDSI/pooled_connection_tablenames
azimov Jun 12, 2024
26a15d9
fixing issue with SCCS not showing
jreps Jun 13, 2024
651775f
fixing characterization
nhall6 Jun 13, 2024
ad60fab
Update characterization-main.R
jreps Jun 13, 2024
576006f
fixing estimation
jreps Jun 14, 2024
eb59436
adding fix for ci_lookup
jreps Jun 14, 2024
2ff98b9
Update estimation-sccs-results-full.R
jreps Jun 20, 2024
eb97b60
Update DESCRIPTION
nhall6 Jun 20, 2024
a1836db
minor updates
jreps Jun 28, 2024
926c16e
error handling for estimation plots
jreps Jun 28, 2024
3061e5c
minor updates to estimation
jreps Jun 28, 2024
32796bc
characterization test updates
jreps Jul 2, 2024
f6b95f9
Update characterization-main.R
jreps Jul 9, 2024
a0ccde7
passing R check
jreps Jul 10, 2024
1f90210
Merge pull request #286 from OHDSI/shiny-pool-issue
azimov Jul 15, 2024
a594c22
Merge branch 'develop' into hotfix-2.1.5-develop-merge
azimov Jul 15, 2024
05da629
Merge pull request #305 from OHDSI/hotfix-2.1.5-develop-merge
azimov Jul 15, 2024
5c62a73
Update characterization-incidence.R to use lookup tables.
chrisknoll Jul 23, 2024
16612ce
Switch coldef json to CSV.
chrisknoll Jul 30, 2024
5967f82
Removed dead code.
chrisknoll Jul 30, 2024
a7b6685
Fixes estimation bug when target has no comparator for CM
anthonysena Jul 30, 2024
9888845
fixing tests
jreps Jul 31, 2024
ab7f958
fixing example sqlite database_ids
jreps Jul 31, 2024
a285c60
Merge branch 'prerelease' into estimation-updated-cohortIncidence
jreps Aug 1, 2024
4f50f91
Merge pull request #310 from OHDSI/estimation-updated-cohortIncidence
jreps Aug 1, 2024
b7caa83
CohortIncidence updates
jreps Aug 1, 2024
1cd7e5a
fixing check issues due to cohort incidence
jreps Aug 1, 2024
4632bc7
adding hot fixes from main
jreps Aug 1, 2024
fb79560
updating example app for CI
jreps Aug 1, 2024
822431f
updating docs
jreps Aug 1, 2024
4483c72
Update characterization-riskFactors.R
jreps Aug 6, 2024
9d782f5
Fixing issue #315 , diagonal line along x = y
nhall6 Aug 9, 2024
68fd659
Fixing issue #314 - adding T, C, and O IDs to the table to allow bett…
nhall6 Aug 9, 2024
a0057cc
addressing issue #307
nhall6 Aug 15, 2024
025ce0d
Characterization updates
jreps Aug 16, 2024
e3a70ff
Merge pull request #316 from OHDSI/prerelease-issue#315
jreps Aug 16, 2024
1142f6a
Merge pull request #317 from OHDSI/prerelease-issue#314
jreps Aug 16, 2024
e40373c
Update components-data-viewer.R
jreps Aug 19, 2024
a0eccd5
document updates
jreps Aug 19, 2024
2a555a7
Merge pull request #321 from OHDSI/prerelease-issue#307
jreps Aug 19, 2024
873ee03
Merge branch 'prerelease' into nhall6-author-updates
jreps Aug 20, 2024
2ce9e38
Merge branch 'develop' into prerelease
jreps Aug 20, 2024
80048c7
merging in develop
jreps Aug 20, 2024
2f06819
fixing formatting of authors
jreps Aug 20, 2024
231be69
Merge pull request #297 from OHDSI/nhall6-author-updates
jreps Aug 20, 2024
c8b1d25
Merge pull request #312 from OHDSI/prerelease
jreps Aug 20, 2024
6e7afdc
Update characterization-main.R
jreps Aug 21, 2024
0a22d6c
Update characterization-riskFactors.R
jreps Aug 21, 2024
49d9486
updating website
jreps Aug 22, 2024
d35c6fc
Fixing #301 (#326)
nhall6 Sep 12, 2024
842b3aa
Fixing #296 (#327)
nhall6 Sep 12, 2024
b5bb043
Fixing #302 and Filtered Data Downloads (#332)
nhall6 Sep 12, 2024
5e1a650
Update R_CMD_check_Hades.yaml
jreps Sep 12, 2024
02cbd91
Update R_CMD_check_Hades.yaml
jreps Sep 12, 2024
cbb41e0
Update R_CMD_check_Hades.yaml
jreps Sep 12, 2024
8e94769
fixing R checks
jreps Sep 12, 2024
2b72c6d
Update cohort-diagnostics-databaseInformation.R (#333)
jreps Sep 13, 2024
8e1f6c7
fixing issue issue_330 (#334)
jreps Sep 13, 2024
eea1f31
fixing issue 167 (#335)
jreps Sep 13, 2024
04d011a
Update cohort-diagnostics-timeDistributions.R (#336)
jreps Sep 13, 2024
677d6b7
Update patient-level-prediction-modelSummary.R (#337)
jreps Sep 13, 2024
258a786
Fixing #300 (#329)
nhall6 Sep 19, 2024
0d8f845
Issue114 (#339)
nhall6 Sep 20, 2024
b3b9936
fixing #342 (#343)
nhall6 Sep 20, 2024
838d945
removing prints
jreps Sep 20, 2024
1c2d516
Update R_CMD_check_Hades.yaml (#344)
jreps Sep 20, 2024
58118c4
fixing issue 211 (#345)
jreps Sep 20, 2024
22e0ebf
Update characterization-cohorts.R
jreps Sep 23, 2024
59389c1
Update DESCRIPTION
jreps Sep 23, 2024
e3cae9b
Merge branch 'main' into develop
jreps Sep 25, 2024
1efdbc5
fixing dup download
jreps Sep 25, 2024
e8d4ea5
preparing for 3.0.1 release
jreps Sep 25, 2024
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
10 changes: 6 additions & 4 deletions .github/workflows/R_CMD_check_Hades.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
config:
- {os: windows-latest, r: 'release'}
- {os: macOS-latest, r: 'release'}
- {os: ubuntu-22.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest"}

env:
GITHUB_PAT: ${{ secrets.GH_TOKEN }}
Expand Down Expand Up @@ -50,9 +51,10 @@ jobs:
CDM5_SPARK_USER: ${{ secrets.CDM5_SPARK_USER }}
CDM5_SPARK_PASSWORD: ${{ secrets.CDM5_SPARK_PASSWORD }}
CDM5_SPARK_CONNECTION_STRING: ${{ secrets.CDM5_SPARK_CONNECTION_STRING }}
_JAVA_OPTIONS: -Xss3m

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

- uses: r-lib/actions/setup-r@v2
with:
Expand Down Expand Up @@ -85,7 +87,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 +115,7 @@ jobs:

steps:

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

Expand Down Expand Up @@ -155,7 +157,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
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: OhdsiShinyModules
Type: Package
Title: Repository of Shiny Modules for OHDSI Result Viewers
Version: 3.0.0
Version: 3.0.1
Authors@R: c(
person("Jenna", "Reps", email = "[email protected]", role = c("aut", "cre")),
person("Nathan", "Hall", role = c("aut")),
Expand Down Expand Up @@ -62,4 +62,4 @@ Suggests:
Remotes:
ohdsi/ReportGenerator,
ohdsi/ResultModelManager
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
9 changes: 9 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
OhdsiShinyModules v3.0.1
========================
- Bug fixes

OhdsiShinyModules v3.0.0
========================
- Removed CohortMethod/SCCS/EvidenceSyntheis modules as these
are replaced with Estimation

OhdsiShinyModules v2.2.1
========================
- Fixed issue in DatabaseConnector check for pooled connections of sqlite databases on cohort diagnotiscs load (from main hotfix)
Expand Down
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
3 changes: 3 additions & 0 deletions R/characterization-cohorts.R
Original file line number Diff line number Diff line change
Expand Up @@ -969,6 +969,9 @@ characterizatonGetCohortComparisonDataContinuous <- function(
-"settingId", -"targetCohortId", -"outcomeCohortId",
-"cohortType") %>%
dplyr::relocate("databaseName", .after = "covariateName")

# fill missing values with 0
res[is.na(res)] <- 0
}

shiny::incProgress(4/4, detail = paste("Done"))
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
21 changes: 12 additions & 9 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 Expand Up @@ -1691,9 +1697,6 @@ getIncidenceData <- function(
){
if(!is.null(targetIds) & !is.null(outcomeIds)){

print(targetIds)
print(outcomeIds)

shiny::withProgress(message = 'Getting incidence data', value = 0, {

sql <- 'select d.cdm_source_abbreviation, i.*, ct1.cohort_name as target_name, ct2.cohort_name as outcome_name
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 @@ characteriationCountsColDefs <- function(
filterable = T
),

minPriorObservation = reactable::colDef(
header = withTooltip("Min Prior Observation",
"Minimum prior observation time (days)"),
filterable = T,
filterInput = function(values, name) {
shiny::tags$select(
# Set to undefined to clear the filter
onchange = sprintf("Reactable.setFilter('%s', '%s', event.target.value || undefined)", elementId, name),
# "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;"
)
}
),
outcomeWashoutDays = reactable::colDef(
header = withTooltip("Outcome Washout Days",
"Number of days for the outcome washout"),
filterable = T,
filterInput = function(values, name) {
shiny::tags$select(
# Set to undefined to clear the filter
onchange = sprintf("Reactable.setFilter('%s', '%s', event.target.value || undefined)", elementId, name),
# "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;"
)
}
),

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 @@ characteriationCountsColDefs <- function(
}
),
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
20 changes: 15 additions & 5 deletions R/cohort-diagnostics-characterization.R
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,8 @@ cohortDiagCharacterizationModule <- function(
params$time_id <- ""
params$use_database_id <- TRUE
params$database_table <- dataSource$databaseTable
params$database_table_prefix <- dataSource$databaseTablePrefix
params$database_name <- ifelse(tolower(dataSource$databaseTable) == 'database_meta_data', 'cdm_source_name', 'database_name')
return(params)
})

Expand Down Expand Up @@ -1054,11 +1056,11 @@ cohortDiagCharacterizationModule <- function(
FROM @results_database_schema.@table_prefixtemporal_covariate_ref tcr
INNER JOIN @results_database_schema.@table_prefixtemporal_analysis_ref tar ON tar.analysis_id = tcr.analysis_id
INNER JOIN @results_database_schema.@table_prefixtemporal_covariate_value tcv ON tcr.covariate_id = tcv.covariate_id
INNER JOIN @results_database_schema.@database_table db ON db.database_id = tcv.database_id
INNER JOIN @results_database_schema.@database_table_prefix@database_table db ON db.database_id = tcv.database_id
WHERE tcr.covariate_id IS NOT NULL
"

selectSt <- "db.database_name,
selectSt <- "db.@database_name as database_name,
tcr.covariate_name,
tar.analysis_name,
is_binary,
Expand All @@ -1076,13 +1078,21 @@ cohortDiagCharacterizationModule <- function(
# Select casees for each db
for (i in 1:length(timeIds)) {
timeId <- timeIds[i]
tplSql <- c(tplSql, SqlRender::render(selectTemplate, i = i, time_id = timeId))
havingSql <- c(havingSql, SqlRender::render(havingTemplate, time_id = timeId))
tplSql <- c(tplSql, SqlRender::render(
sql = selectTemplate,
i = i,
time_id = timeId)
)
havingSql <- c(havingSql, SqlRender::render(
sql = havingTemplate,
time_id = timeId
)
)
}

tplSql <- paste(tplSql, collapse = ", \n")
groupClause <- SqlRender::render("
GROUP BY db.database_name, tcr.covariate_name, tar.analysis_name, tcr.concept_id, is_binary
GROUP BY db.@database_name, tcr.covariate_name, tar.analysis_name, tcr.concept_id, is_binary
HAVING @having_clasuse
", having_clasuse = paste(havingSql, collapse = " OR\n"))

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 @@ plotCohortOverlap <- function(data,
title = "",
gridcolor = 'ffff'),
yaxis = list(zerolinecolor = '#ffff',
title = database,
title = addTextBreaks(
text = database,
length = 25
),
zerolinewidth = 1,
gridcolor = 'ffff'))

Expand Down
4 changes: 2 additions & 2 deletions 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 Expand Up @@ -212,7 +212,7 @@ getExecutionMetadata <- function(dataSource, databaseId) {


getDatabaseMetadata <- function(dataSource, databaseTable) {
data <- loadResultsTable(dataSource, "metadata", required = TRUE, cdTablePrefix = dataSource$cdTablePrefix)
data <- loadResultsTable(dataSource, "metadata", required = TRUE, cdTablePrefix = dataSource$cdTablePrefix, databaseTablePrefix = dataSource$databaseTablePrefix)
data <- data %>%
tidyr::pivot_wider(
id_cols = c("startTime", "databaseId"),
Expand Down
Loading