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 @@ CohortDiagnostics - 3.1.2 + 3.2.1 @@ -115,7 +115,7 @@

Page not found (404)

-

Site built with pkgdown 2.0.5.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/articles/CreatingAStudyPackage.html b/docs/articles/CreatingAStudyPackage.html index 2950d8852..a8f84602e 100644 --- a/docs/articles/CreatingAStudyPackage.html +++ b/docs/articles/CreatingAStudyPackage.html @@ -33,7 +33,7 @@ CohortDiagnostics - 3.1.2 + 3.2.1 @@ -97,7 +97,7 @@

Creating a study package

Gowtham A. Rao

-

2022-12-19

+

2023-04-10

Source: vignettes/CreatingAStudyPackage.Rmd @@ -229,7 +229,7 @@

option A: Using Hydra and ROhdsiW ################# end of user input ############## -webApiCohorts <- ROhdsiWebApi::getCohortDefinitionsMetaData(baseUrl = baseUrl) +webApiCohorts <- ROhdsiWebApi::getCohortDefinitionsMetaData(baseUrl = baseUrl) studyCohorts <- webApiCohorts %>% dplyr::filter(.data$id %in% cohortIds) @@ -237,7 +237,7 @@

option A: Using Hydra and ROhdsiW cohortDefinitionsArray <- list() for (i in (1:nrow(studyCohorts))) { cohortDefinition <- - ROhdsiWebApi::getCohortDefinition( + ROhdsiWebApi::getCohortDefinition( cohortId = studyCohorts$id[[i]], baseUrl = baseUrl ) @@ -341,7 +341,7 @@

option A: Using Hydra and ROhdsiW

-

Site built with pkgdown 2.0.5.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/articles/DatabaseModeInDiagnosticsExplorer.html b/docs/articles/DatabaseModeInDiagnosticsExplorer.html index 409421e5e..8137b46fc 100644 --- a/docs/articles/DatabaseModeInDiagnosticsExplorer.html +++ b/docs/articles/DatabaseModeInDiagnosticsExplorer.html @@ -33,7 +33,7 @@ CohortDiagnostics - 3.1.2 + 3.2.1 @@ -97,7 +97,7 @@

Database mode in Diagnostics Explorer

Gowtham Rao

-

2022-12-19

+

2023-04-10

Source: vignettes/DatabaseModeInDiagnosticsExplorer.Rmd @@ -163,6 +163,21 @@

Database mode# If you wish to enable annotation - not currently reccomended in multi-user environments enableAnnotation: FALSE enableAuthorization: FALSE + +
+

Publishing +

+

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.

@@ -183,7 +198,7 @@

Database mode

-

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 @@ CohortDiagnostics - 3.1.2 + 3.2.1 @@ -97,7 +97,7 @@

Running Cohort Diagnostics

Gowtham Rao and James P. Gilbert

-

2022-12-19

+

2023-04-10

Source: vignettes/RunningCohortDiagnostics.Rmd @@ -210,7 +210,7 @@

Loading cohort references from We # list of cohort ids cohortIds <- c(18345, 18346) -cohortDefinitionSet <- ROhdsiWebApi::exportCohortDefinitionSet( +cohortDefinitionSet <- ROhdsiWebApi::exportCohortDefinitionSet( baseUrl = baseUrl, cohortIds = cohortIds, generateStats = TRUE @@ -336,7 +336,7 @@

Creating an sqlite db file

-

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 @@ CohortDiagnostics - 3.1.2 + 3.2.1 @@ -97,7 +97,7 @@

Viewing results using Diagnostics Explorer

Gowtham Rao

-

2022-12-19

+

2023-04-10

Source: vignettes/ViewingResultsUsingDiagnosticsExplorer.Rmd @@ -155,11 +155,50 @@

Running the app using 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 to Posit Connect or shinyapps.io +

+

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.

+
+

Publish button

+
+

After this you can follow the RStudio prompts to upload to your +rsconnect/posit connect or shinyapps.io server.

+
+
+

Sharing a zipped copy of your shiny app +

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.

@@ -200,7 +239,7 @@

Running over the network

-

Site built with pkgdown 2.0.5.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/articles/WhatIsCohortDiagnostics.html b/docs/articles/WhatIsCohortDiagnostics.html index 28dcf0f6b..990108454 100644 --- a/docs/articles/WhatIsCohortDiagnostics.html +++ b/docs/articles/WhatIsCohortDiagnostics.html @@ -33,7 +33,7 @@ CohortDiagnostics - 3.1.2 + 3.2.1 @@ -97,7 +97,7 @@

What is Cohort Diagnostics?

Gowtham Rao

-

2022-12-19

+

2023-04-10

Source: vignettes/WhatIsCohortDiagnostics.Rmd @@ -163,7 +163,7 @@

Features

-

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 @@ CohortDiagnostics - 3.1.2 + 3.2.1 @@ -95,7 +95,7 @@

All vignettes

-

Site built with pkgdown 2.0.5.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/authors.html b/docs/authors.html index 23ae44098..47e0c90c2 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -17,7 +17,7 @@ CohortDiagnostics - 3.1.2 + 3.2.1 @@ -106,14 +106,14 @@

Citation

-

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 @@

Citation

-

Site built with pkgdown 2.0.5.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/index.html b/docs/index.html index f996a2927..901cdbcfe 100644 --- a/docs/index.html +++ b/docs/index.html @@ -39,7 +39,7 @@ CohortDiagnostics - 3.1.2 + 3.2.1 @@ -102,7 +102,7 @@
- +

Build Status codecov.io

CohortDiagnostics is part of HADES.

@@ -236,13 +236,7 @@

Developers

-
-

Dev status

- -
+ @@ -255,7 +249,7 @@

Dev status

-

Site built with pkgdown 2.0.5.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/news/index.html b/docs/news/index.html index d57c4df65..21d45580b 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -17,7 +17,7 @@ CohortDiagnostics - 3.1.2 + 3.2.1 @@ -72,6 +72,19 @@

Changelog

Source: NEWS.md +
+ +
  1. Added requirement for Andromeda 0.6.0 (which is implicitly required by DatabaseConnector)

  2. +
  3. Fixed issue saving cohort subsets to csv file for viewing and analysis in shiny app

  4. +
+
+ +
  1. Do not run orphan concepts checks for any subset cohorts

  2. +
  3. Remove use of lookback period for IR calculations - this is now a setting of the call to the package

  4. +
  5. Added data migration to support subsets in database schema (allow future functionality to take care of them)

  6. +
  7. Added functionality to launchDiagnosticsExplorer to make publishing to poist connect/shinyapps.io more straightforward (still requires removal of ggiraph)

  8. +
  9. Moved most shiny code to OHDSI/OhdsiShinyModules

  10. +

Bug Fixes:

@@ -386,7 +399,7 @@
-

Site built with pkgdown 2.0.5.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 0b8c7f096..e0bb9bf62 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -1,5 +1,5 @@ -pandoc: '2.18' -pkgdown: 2.0.5 +pandoc: 2.19.2 +pkgdown: 2.0.7 pkgdown_sha: ~ articles: CreatingAStudyPackage: CreatingAStudyPackage.html @@ -7,5 +7,5 @@ articles: RunningCohortDiagnostics: RunningCohortDiagnostics.html ViewingResultsUsingDiagnosticsExplorer: ViewingResultsUsingDiagnosticsExplorer.html WhatIsCohortDiagnostics: WhatIsCohortDiagnostics.html -last_built: 2022-12-20T00:46Z +last_built: 2023-04-10T21:57Z diff --git a/docs/reference/CohortDiagnostics-package.html b/docs/reference/CohortDiagnostics-package.html index 49e7e7bff..7fbc2b80a 100644 --- a/docs/reference/CohortDiagnostics-package.html +++ b/docs/reference/CohortDiagnostics-package.html @@ -17,7 +17,7 @@ CohortDiagnostics - 3.1.2 + 3.2.1 @@ -107,7 +107,7 @@

Author

-

Site built with pkgdown 2.0.5.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/reference/checkInputFileEncoding.html b/docs/reference/checkInputFileEncoding.html index 65764abf8..89d24d0c5 100644 --- a/docs/reference/checkInputFileEncoding.html +++ b/docs/reference/checkInputFileEncoding.html @@ -18,7 +18,7 @@ CohortDiagnostics - 3.1.2 + 3.2.1 @@ -108,7 +108,7 @@

Value

-

Site built with pkgdown 2.0.5.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/reference/createDiagnosticsExplorerZip.html b/docs/reference/createDiagnosticsExplorerZip.html index e80a6695b..d44eeebe6 100644 --- a/docs/reference/createDiagnosticsExplorerZip.html +++ b/docs/reference/createDiagnosticsExplorerZip.html @@ -20,7 +20,7 @@ CohortDiagnostics - 3.1.2 + 3.2.1 @@ -125,7 +125,7 @@

Arguments

-

Site built with pkgdown 2.0.5.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/reference/createMergedResultsFile.html b/docs/reference/createMergedResultsFile.html index a9f04e857..1b3a384a8 100644 --- a/docs/reference/createMergedResultsFile.html +++ b/docs/reference/createMergedResultsFile.html @@ -19,7 +19,7 @@ CohortDiagnostics - 3.1.2 + 3.2.1 @@ -124,7 +124,7 @@

Arguments

-

Site built with pkgdown 2.0.5.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/reference/createResultsDataModel.html b/docs/reference/createResultsDataModel.html index 1ef9b5d09..ea7320c7f 100644 --- a/docs/reference/createResultsDataModel.html +++ b/docs/reference/createResultsDataModel.html @@ -17,7 +17,7 @@ CohortDiagnostics - 3.1.2 + 3.2.1 @@ -116,7 +116,7 @@

Details

-

Site built with pkgdown 2.0.5.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/reference/executeDiagnostics.html b/docs/reference/executeDiagnostics.html index c902b770b..e626d6ed5 100644 --- a/docs/reference/executeDiagnostics.html +++ b/docs/reference/executeDiagnostics.html @@ -22,7 +22,7 @@ CohortDiagnostics - 3.1.2 + 3.2.1 @@ -116,6 +116,7 @@

Execute cohort diagnostics

temporalCovariateSettings = getDefaultCovariateSettings(), minCellCount = 5, minCharacterizationMean = 0.01, + irWashoutPeriod = 0, incremental = FALSE, incrementalFolder = file.path(exportFolder, "incremental") ) @@ -254,6 +255,10 @@

Arguments

on covariates that have very low values. The default is 0.001 (i.e. 0.1 percent)

+
irWashoutPeriod
+

Number of days washout to include in calculation of incidence rates - default is 0

+ +
incremental

Create only cohort diagnostics that haven't been created before?

@@ -337,7 +342,7 @@

Examples

-

Site built with pkgdown 2.0.5.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/reference/getCdmDataSourceInformation.html b/docs/reference/getCdmDataSourceInformation.html index cda6a62fb..a7f89c29f 100644 --- a/docs/reference/getCdmDataSourceInformation.html +++ b/docs/reference/getCdmDataSourceInformation.html @@ -18,7 +18,7 @@ CohortDiagnostics - 3.1.2 + 3.2.1 @@ -129,7 +129,7 @@

Value

-

Site built with pkgdown 2.0.5.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/reference/getCohortCounts.html b/docs/reference/getCohortCounts.html index 124bebee4..027d08305 100644 --- a/docs/reference/getCohortCounts.html +++ b/docs/reference/getCohortCounts.html @@ -17,7 +17,7 @@ CohortDiagnostics - 3.1.2 + 3.2.1 @@ -138,7 +138,7 @@

Value

-

Site built with pkgdown 2.0.5.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/reference/getDataMigrator.html b/docs/reference/getDataMigrator.html index a5dc48237..e30763b5b 100644 --- a/docs/reference/getDataMigrator.html +++ b/docs/reference/getDataMigrator.html @@ -17,7 +17,7 @@ CohortDiagnostics - 3.1.2 + 3.2.1 @@ -114,7 +114,7 @@

Value

-

Site built with pkgdown 2.0.5.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/reference/getDefaultCovariateSettings.html b/docs/reference/getDefaultCovariateSettings.html index cfa9ea96f..38205eb82 100644 --- a/docs/reference/getDefaultCovariateSettings.html +++ b/docs/reference/getDefaultCovariateSettings.html @@ -17,7 +17,7 @@ CohortDiagnostics - 3.1.2 + 3.2.1 @@ -94,7 +94,7 @@

Get default covariate settings

-

Site built with pkgdown 2.0.5.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/reference/getDefaultVocabularyTableNames.html b/docs/reference/getDefaultVocabularyTableNames.html index e99b3359d..f65b78d0d 100644 --- a/docs/reference/getDefaultVocabularyTableNames.html +++ b/docs/reference/getDefaultVocabularyTableNames.html @@ -17,7 +17,7 @@ CohortDiagnostics - 3.1.2 + 3.2.1 @@ -100,7 +100,7 @@

Value

-

Site built with pkgdown 2.0.5.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/reference/getResultsDataModelSpecifications.html b/docs/reference/getResultsDataModelSpecifications.html index a60460a6c..ba7e5ffea 100644 --- a/docs/reference/getResultsDataModelSpecifications.html +++ b/docs/reference/getResultsDataModelSpecifications.html @@ -17,7 +17,7 @@ CohortDiagnostics - 3.1.2 + 3.2.1 @@ -100,7 +100,7 @@

Value

-

Site built with pkgdown 2.0.5.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/reference/index.html b/docs/reference/index.html index efaccf446..ba1771880 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -17,7 +17,7 @@ CohortDiagnostics - 3.1.2 + 3.2.1 @@ -156,7 +156,7 @@

All functions
-

Site built with pkgdown 2.0.5.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/reference/launchDiagnosticsExplorer.html b/docs/reference/launchDiagnosticsExplorer.html index 594919ca6..6a7de7986 100644 --- a/docs/reference/launchDiagnosticsExplorer.html +++ b/docs/reference/launchDiagnosticsExplorer.html @@ -17,7 +17,7 @@ CohortDiagnostics - 3.1.2 + 3.2.1 @@ -91,6 +91,9 @@

Launch the Diagnostics Explorer Shiny app

aboutText = NULL, runOverNetwork = FALSE, port = 80, + makePublishable = FALSE, + publishDir = file.path(getwd(), "DiagnosticsExplorer"), + overwritePublishDir = FALSE, launch.browser = FALSE, enableAnnotation = TRUE ) @@ -155,6 +158,18 @@

Arguments

(optional) Only used if runOverNetwork = TRUE.

+
makePublishable
+

(Optional) copy data files to make app publishable to posit connect/shinyapp.io

+ + +
publishDir
+

If make publishable is true - the directory that the shiny app is copied to

+ + +
overwritePublishDir
+

(Optional) If make publishable is true - overwrite the directory for publishing

+ +
launch.browser

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.

@@ -181,7 +196,7 @@

Details

-

Site built with pkgdown 2.0.5.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/reference/migrateDataModel.html b/docs/reference/migrateDataModel.html index 49ed48fce..7ea568f91 100644 --- a/docs/reference/migrateDataModel.html +++ b/docs/reference/migrateDataModel.html @@ -19,7 +19,7 @@ CohortDiagnostics - 3.1.2 + 3.2.1 @@ -112,7 +112,7 @@

Arguments

-

Site built with pkgdown 2.0.5.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/reference/runCohortRelationshipDiagnostics.html b/docs/reference/runCohortRelationshipDiagnostics.html index 865811640..0b83907e9 100644 --- a/docs/reference/runCohortRelationshipDiagnostics.html +++ b/docs/reference/runCohortRelationshipDiagnostics.html @@ -18,7 +18,7 @@ CohortDiagnostics - 3.1.2 + 3.2.1 @@ -149,7 +149,7 @@

Arguments

-

Site built with pkgdown 2.0.5.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/reference/runCohortTimeSeriesDiagnostics.html b/docs/reference/runCohortTimeSeriesDiagnostics.html index a2ee8d540..b17149a7f 100644 --- a/docs/reference/runCohortTimeSeriesDiagnostics.html +++ b/docs/reference/runCohortTimeSeriesDiagnostics.html @@ -25,7 +25,7 @@ CohortDiagnostics - 3.1.2 + 3.2.1 @@ -191,7 +191,7 @@

Arguments

-

Site built with pkgdown 2.0.5.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/reference/timeExecution.html b/docs/reference/timeExecution.html index 4660120fb..073797bae 100644 --- a/docs/reference/timeExecution.html +++ b/docs/reference/timeExecution.html @@ -17,7 +17,7 @@ CohortDiagnostics - 3.1.2 + 3.2.1 @@ -102,7 +102,7 @@

Internal utility function for logging execution of variables

-

Site built with pkgdown 2.0.5.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/reference/uploadResults.html b/docs/reference/uploadResults.html index c1e45f2a5..0b7c078f6 100644 --- a/docs/reference/uploadResults.html +++ b/docs/reference/uploadResults.html @@ -19,7 +19,7 @@ CohortDiagnostics - 3.1.2 + 3.2.1 @@ -89,7 +89,8 @@

Upload results to the database server.

forceOverWriteOfSpecifications = FALSE, purgeSiteDataBeforeUploading = TRUE, tempFolder = tempdir(), - tablePrefix = "" + tablePrefix = "", + ... ) @@ -130,6 +131,10 @@

Arguments

tablePrefix

(Optional) string to insert before table names (e.g. "cd_") for database table names

+ +
...
+

See ResultModelManager::uploadResults

+ @@ -144,7 +149,7 @@

Arguments

-

Site built with pkgdown 2.0.5.

+

Site built with pkgdown 2.0.7.

diff --git a/extras/CohortDiagnostics.pdf b/extras/CohortDiagnostics.pdf deleted file mode 100644 index a1a9c38cd..000000000 Binary files a/extras/CohortDiagnostics.pdf and /dev/null differ diff --git a/extras/PackageMaintenance.R b/extras/PackageMaintenance.R index b2f16696e..f8229d68e 100644 --- a/extras/PackageMaintenance.R +++ b/extras/PackageMaintenance.R @@ -75,9 +75,3 @@ writeLines(text, con = file(filePath)) file.copy(from = "inst/settings/resultsDataModelSpecification.csv", to = "inst/shiny/DiagnosticsExplorer/data/resultsDataModelSpecification.csv", overwrite = TRUE) - - -# Copy shared script -file.copy(from = "R/Shared.R", - to = "inst/shiny/DiagnosticsExplorer/R/Shared.R", - overwrite = TRUE) diff --git a/inst/doc/RunningCohortDiagnostics.pdf b/inst/doc/RunningCohortDiagnostics.pdf index d846571b6..b2ed25f22 100644 Binary files a/inst/doc/RunningCohortDiagnostics.pdf and b/inst/doc/RunningCohortDiagnostics.pdf differ diff --git a/inst/doc/ViewingResultsUsingDiagnosticsExplorer.pdf b/inst/doc/ViewingResultsUsingDiagnosticsExplorer.pdf index 615f4831b..ba1e2995f 100644 Binary files a/inst/doc/ViewingResultsUsingDiagnosticsExplorer.pdf and b/inst/doc/ViewingResultsUsingDiagnosticsExplorer.pdf differ diff --git a/inst/doc/WhatIsCohortDiagnostics.pdf b/inst/doc/WhatIsCohortDiagnostics.pdf index a8d6576ea..ac6d23733 100644 Binary files a/inst/doc/WhatIsCohortDiagnostics.pdf and b/inst/doc/WhatIsCohortDiagnostics.pdf differ diff --git a/inst/settings/resultsDataModelSpecification.csv b/inst/settings/resultsDataModelSpecification.csv index 1d9bb6a69..3fba50c3c 100644 --- a/inst/settings/resultsDataModelSpecification.csv +++ b/inst/settings/resultsDataModelSpecification.csv @@ -92,7 +92,7 @@ concept,domain_id,varchar(20),Yes,No,No,Yes,No,Yes,No concept,vocabulary_id,varchar(50),Yes,No,No,Yes,No,Yes,No concept,concept_class_id,varchar(20),Yes,No,No,Yes,No,Yes,No concept,standard_concept,varchar(1),No,No,No,Yes,No,Yes,No -concept,concept_code,varchar(50),Yes,No,No,Yes,No,Yes,No +concept,concept_code,varchar(255),Yes,No,No,Yes,No,Yes,No concept,valid_start_date,Date,Yes,No,No,Yes,No,Yes,No concept,valid_end_date,Date,Yes,No,No,Yes,No,Yes,No concept,invalid_reason,varchar,No,No,No,Yes,No,Yes,No diff --git a/inst/shiny/DiagnosticsExplorer/global.R b/inst/shiny/DiagnosticsExplorer/global.R index 35322e5c4..7e1c4ec45 100644 --- a/inst/shiny/DiagnosticsExplorer/global.R +++ b/inst/shiny/DiagnosticsExplorer/global.R @@ -87,3 +87,5 @@ dataSource <- cohortTableName = shinySettings$cohortTableName, databaseTableName = shinySettings$databaseTableName ) + + diff --git a/inst/sql/postgresql/migrations/Migration_4-v3_2_1_cohort_name_field.sql b/inst/sql/postgresql/migrations/Migration_4-v3_2_1_cohort_name_field.sql new file mode 100644 index 000000000..a5d438349 --- /dev/null +++ b/inst/sql/postgresql/migrations/Migration_4-v3_2_1_cohort_name_field.sql @@ -0,0 +1,6 @@ +-- Set cohort name to larger field value +{DEFAULT @migration = migration} +{DEFAULT @cohort = cohort} +{DEFAULT @table_prefix = ''} + +ALTER TABLE @database_schema.@table_prefix@cohort ALTER COLUMN cohort_name TYPE VARCHAR; \ No newline at end of file diff --git a/inst/sql/sql_server/UpdateVersionNumber.sql b/inst/sql/sql_server/UpdateVersionNumber.sql index a7ed8c9fa..efda79c0f 100644 --- a/inst/sql/sql_server/UpdateVersionNumber.sql +++ b/inst/sql/sql_server/UpdateVersionNumber.sql @@ -1,7 +1,9 @@ {DEFAULT @package_version = package_version} -{DEFAULT @version_number = '3.1.2'} +{DEFAULT @version_number = '3.2.1'} DELETE FROM @database_schema.@table_prefix@package_version; INSERT INTO @database_schema.@table_prefix@package_version (version_number) VALUES ('@version_number'); + + diff --git a/inst/sql/sql_server/migrations/Migration_4-v3_2_1_cohort_name_field.sql b/inst/sql/sql_server/migrations/Migration_4-v3_2_1_cohort_name_field.sql new file mode 100644 index 000000000..d50c818db --- /dev/null +++ b/inst/sql/sql_server/migrations/Migration_4-v3_2_1_cohort_name_field.sql @@ -0,0 +1,6 @@ +-- Set cohort name to larger field value +{DEFAULT @migration = migration} +{DEFAULT @cohort = cohort} +{DEFAULT @table_prefix = ''} + +ALTER TABLE @database_schema.@table_prefix@cohort ALTER COLUMN cohort_name VARCHAR; \ No newline at end of file diff --git a/inst/sql/sqlite/migrations/Migration_4-v3_2_1_cohort_name_field.sql b/inst/sql/sqlite/migrations/Migration_4-v3_2_1_cohort_name_field.sql new file mode 100644 index 000000000..430deba06 --- /dev/null +++ b/inst/sql/sqlite/migrations/Migration_4-v3_2_1_cohort_name_field.sql @@ -0,0 +1,25 @@ +-- changes cohort name to be a varchar max due to subset cohorts +{DEFAULT @migration = migration} +{DEFAULT @cohort = cohort} +{DEFAULT @table_prefix = ''} + +ALTER TABLE @database_schema.@table_prefix@cohort RENAME TO _cohort_old; + +CREATE TABLE @database_schema.@table_prefix@cohort ( + cohort_id BIGINT NOT NULL, + cohort_name VARCHAR NOT NULL, + metadata VARCHAR, + sql VARCHAR NOT NULL, + json VARCHAR NOT NULL, + subset_definition_id BIGINT, + subset_parent BIGINT, + is_subset INT, + PRIMARY KEY(cohort_id) +); + +INSERT INTO @database_schema.@table_prefix@cohort + (cohort_id, cohort_name, metadata, sql, json, subset_definition_id, subset_parent, is_subset) +SELECT cohort_id, cohort_name, metadata, sql, json, subset_definition_id, subset_parent, is_subset +FROM _cohort_old; + +DROP TABLE _cohort_old; diff --git a/tests/testthat/test-7-DatabaseMigrations.R b/tests/testthat/test-7-DatabaseMigrations.R index 1df57f481..1e7fbed16 100644 --- a/tests/testthat/test-7-DatabaseMigrations.R +++ b/tests/testthat/test-7-DatabaseMigrations.R @@ -24,6 +24,7 @@ if (dbms == "postgresql") { test_that("Database Migrations execute without error", { skip_if_not(dbms %in% c("sqlite", "postgresql")) + connection <- DatabaseConnector::connect(connectionDetails) on.exit(DatabaseConnector::disconnect(connection)) @@ -53,6 +54,7 @@ test_that("Database Migrations execute without error", { expect_false(all(migrator$getStatus()$executed)) + migrateDataModel( connectionDetails = connectionDetails, databaseSchema = resultsDatabaseSchema,