diff --git a/DESCRIPTION b/DESCRIPTION index 98800272f..078da4d6e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: CohortDiagnostics Type: Package Title: Diagnostics for OHDSI Cohorts -Version: 3.2.0 +Version: 3.2.1 Date: 2022-12-19 Authors@R: c( person("Gowtham", "Rao", email = "rao@ohdsi.org", role = c("aut", "cre")), @@ -24,7 +24,7 @@ Depends: FeatureExtraction (>= 3.2.0), R (>= 4.1.0) Imports: - Andromeda, + Andromeda (>= 0.6.0), ResultModelManager, checkmate, clock, diff --git a/NEWS.md b/NEWS.md index b4e814573..638540557 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,10 @@ +CohortDiagnostics 3.2.1 +======================= + +1. Added requirement for Andromeda 0.6.0 (which is implicitly required by DatabaseConnector) + +2. Fixed issue saving cohort subsets to csv file for viewing and analysis in shiny app + CohortDiagnostics 3.2.0 ======================= diff --git a/R/ConceptSets.R b/R/ConceptSets.R index ee6308b28..5fccc4d65 100644 --- a/R/ConceptSets.R +++ b/R/ConceptSets.R @@ -1011,7 +1011,8 @@ runConceptSetDiagnostics <- function(connection, "cohortId", "conceptSetId", "conceptId" - ) %>% dplyr::distinct() + ) %>% + dplyr::distinct() resolvedConceptIds <- makeDataExportable( x = resolvedConceptIds, diff --git a/R/RunDiagnostics.R b/R/RunDiagnostics.R index 0a1ec2d78..8ebc11f53 100644 --- a/R/RunDiagnostics.R +++ b/R/RunDiagnostics.R @@ -509,7 +509,7 @@ executeDiagnostics <- function(cohortDefinitionSet, }) subsetDefinitions <- data.frame() for (subsetDef in dfs) { - subsetDefinitions <- rbind(subsetDefinitions, dfs) + subsetDefinitions <- rbind(subsetDefinitions, subsetDef) } writeToCsv( diff --git a/R/TimeSeries.R b/R/TimeSeries.R index d4f84c5d0..ab4d3a48e 100644 --- a/R/TimeSeries.R +++ b/R/TimeSeries.R @@ -586,7 +586,7 @@ executeTimeSeriesDiagnostics <- function(connection, ) } ) - + data <- makeDataExportable( x = data, tableName = "time_series", diff --git a/docs/404.html b/docs/404.html index 3dd8ed2c3..912b06afa 100644 --- a/docs/404.html +++ b/docs/404.html @@ -32,7 +32,7 @@
@@ -115,7 +115,7 @@vignettes/CreatingAStudyPackage.Rmd
CreatingAStudyPackage.Rmd
vignettes/DatabaseModeInDiagnosticsExplorer.Rmd
DatabaseModeInDiagnosticsExplorer.Rmd
To publish with a config you can use:
+
+launchDiagnosticsExplorer(
+ shinyConfigPath = "path/to/config.yml",
+ makePublishable = TRUE,
+ publishDir = file.path(getwd(), "MyStudyDiagnosticsExplorer"),
+ overwritePublishDir = TRUE
+)
And press the publish button in the shiny app that loads. Note - that +in this situation the use of secure keys with keyring is not +possible.
Site built with pkgdown 2.0.5.
+Site built with pkgdown 2.0.7.
diff --git a/docs/articles/RunningCohortDiagnostics.html b/docs/articles/RunningCohortDiagnostics.html index 645569673..67e23cb8f 100644 --- a/docs/articles/RunningCohortDiagnostics.html +++ b/docs/articles/RunningCohortDiagnostics.html @@ -33,7 +33,7 @@ @@ -97,7 +97,7 @@vignettes/RunningCohortDiagnostics.Rmd
RunningCohortDiagnostics.Rmd
Site built with pkgdown 2.0.5.
+Site built with pkgdown 2.0.7.
diff --git a/docs/articles/ViewingResultsUsingDiagnosticsExplorer.html b/docs/articles/ViewingResultsUsingDiagnosticsExplorer.html index 04af855d1..a98e2b51e 100644 --- a/docs/articles/ViewingResultsUsingDiagnosticsExplorer.html +++ b/docs/articles/ViewingResultsUsingDiagnosticsExplorer.html @@ -33,7 +33,7 @@ @@ -97,7 +97,7 @@vignettes/ViewingResultsUsingDiagnosticsExplorer.Rmd
ViewingResultsUsingDiagnosticsExplorer.Rmd
launchDiagnosticsExplorer(sqliteDbPath = "MyCohortDiagnosticsResulst.sqlite")
If running the application from a R-studio environment, please make sure the sqlite file is in a folder called ‘data’.
+ +Publishing the shiny app to a shared posit connect source can be +achieved by first setting up credentials for your server. +You will need to contact your internal administrator for publishing and +access rights.
+Alternatively, you can use the shinyapps.io service, +which provides some limited free usage for hosting your +applications.
+Firstly, it is advised that you update to the latest version of OHDSI +shiny modules with:
+remotes::install_packages('OHDSI/OhdsiShinyModules')
+This will update the dependencies for your shiny app.
+Following this you will need a copyable resource for your shiny app.
+This can be achieved by launching the DiagnosticsExplorer
+with publishable options
+launchDiagnosticsExplorer(
+ sqliteDbPath = "MyCohortDiagnosticsResulst.sqlite",
+ makePublishable = TRUE,
+ publishDir = file.path(getwd(), "MyStudyDiagnosticsExplorer"),
+ overwritePublishDir = TRUE
+)
This will create a shiny app folder
+"MyStudyDiagnosticsExplorer"
in your R working directory.
+The above will also overwrite the existing application folder and copy
+your sqlite file in to it. Following this, the shiny window should load
+and show a “publsh” button.
After this you can follow the RStudio prompts to upload to your +rsconnect/posit connect or shinyapps.io server.
+To automatically create a zip archive containing the
DiagnosticsExplorer
shiny application for deployment on
shared environments, such as data.ohdsi.org, run the function
createDiagnosticsExplorerZip
:
+createDiagnosticsExplorerZip(outputZipfile = "MyCdProject.zip", sqliteDbPath = "MyCohortDiagnosticsResulst.sqlite")
This archive will contain a fully executable shiny application.
Site built with pkgdown 2.0.5.
+Site built with pkgdown 2.0.7.
vignettes/WhatIsCohortDiagnostics.Rmd
WhatIsCohortDiagnostics.Rmd
Site built with pkgdown 2.0.5.
+Site built with pkgdown 2.0.7.
diff --git a/docs/articles/index.html b/docs/articles/index.html index 1b44b4839..c8a3e9fea 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -17,7 +17,7 @@ @@ -95,7 +95,7 @@Rao G, Schuemie M, Ryan P, Weaver J, Gilbert J (2022). +
Rao G, Schuemie M, Ryan P, Weaver J, Gilbert J (2023). CohortDiagnostics: Diagnostics for OHDSI Cohorts. https://ohdsi.github.io/CohortDiagnostics, https://github.com/OHDSI/CohortDiagnostics.
@Manual{, title = {CohortDiagnostics: Diagnostics for OHDSI Cohorts}, author = {Gowtham Rao and Martijn Schuemie and Patrick Ryan and James Weaver and Jamie Gilbert}, - year = {2022}, + year = {2023}, note = {https://ohdsi.github.io/CohortDiagnostics, https://github.com/OHDSI/CohortDiagnostics}, }@@ -128,7 +128,7 @@
NEWS.md
+ Added requirement for Andromeda 0.6.0 (which is implicitly required by DatabaseConnector)
Fixed issue saving cohort subsets to csv file for viewing and analysis in shiny app
Do not run orphan concepts checks for any subset cohorts
Remove use of lookback period for IR calculations - this is now a setting of the call to the package
Added data migration to support subsets in database schema (allow future functionality to take care of them)
Added functionality to launchDiagnosticsExplorer
to make publishing to poist connect/shinyapps.io more straightforward (still requires removal of ggiraph)
Moved most shiny code to OHDSI/OhdsiShinyModules
Number of days washout to include in calculation of incidence rates - default is 0
Create only cohort diagnostics that haven't been created before?
(optional) Only used if runOverNetwork
= TRUE.
(Optional) copy data files to make app publishable to posit connect/shinyapp.io
If make publishable is true - the directory that the shiny app is copied to
(Optional) If make publishable is true - overwrite the directory for publishing
Should the app be launched in your default browser, or in a Shiny window. Note: copying to clipboard will not work in a Shiny window.
(Optional) string to insert before table names (e.g. "cd_") for database table names
See ResultModelManager::uploadResults