From bd8aaa9058fe402aa383dd79fb58f040e733bcd9 Mon Sep 17 00:00:00 2001 From: jreps Date: Fri, 17 Feb 2023 09:51:28 -0500 Subject: [PATCH 1/4] Update DESCRIPTION --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 513b0f2e9..0a9ab807b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,7 +2,7 @@ Package: PatientLevelPrediction Type: Package Title: Developing patient level prediction using data in the OMOP Common Data Model -Version: 6.2.0 +Version: 6.2.9000 Date: 2023-02-15 Authors@R: c( person("Jenna", "Reps", email = "jreps@its.jnj.com", role = c("aut", "cre")), From d410b1263cac9130f3cf8d5a633f59696118123a Mon Sep 17 00:00:00 2001 From: Egill Axfjord Fridgeirsson Date: Mon, 20 Feb 2023 11:36:43 +0100 Subject: [PATCH 2/4] Update DESCRIPTION --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 0a9ab807b..47170d395 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,7 +2,7 @@ Package: PatientLevelPrediction Type: Package Title: Developing patient level prediction using data in the OMOP Common Data Model -Version: 6.2.9000 +Version: 6.2.0.9000 Date: 2023-02-15 Authors@R: c( person("Jenna", "Reps", email = "jreps@its.jnj.com", role = c("aut", "cre")), From a5538f66556820f4b8694f3d27ff78914788586c Mon Sep 17 00:00:00 2001 From: jreps Date: Mon, 20 Feb 2023 14:19:20 -0500 Subject: [PATCH 3/4] issue 372 fix adding missing , in sqlite diagnostic predictor table --- inst/sql/sqlite/PlpResultTables.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inst/sql/sqlite/PlpResultTables.sql b/inst/sql/sqlite/PlpResultTables.sql index eb6b1ea88..bfcc25def 100644 --- a/inst/sql/sqlite/PlpResultTables.sql +++ b/inst/sql/sqlite/PlpResultTables.sql @@ -132,7 +132,7 @@ CREATE TABLE @my_schema.@string_to_appenddiagnostic_predictors( -- call this km diagnostic_id int NOT NULL, days_to_event int, outcome_at_time int, - observed_at_start_of_day bigint + observed_at_start_of_day bigint, probast_id varchar(50), input_type varchar(50), FOREIGN KEY (diagnostic_id) REFERENCES @string_to_appenddiagnostics(diagnostic_id) From e083074cb56067962c380f821fbc23c877da3db9 Mon Sep 17 00:00:00 2001 From: jreps Date: Tue, 28 Feb 2023 10:55:25 -0500 Subject: [PATCH 4/4] update to getDataMigrator - adding ensure installed to getDataMigrator to fix issue if ResultModelManager is not installed --- DESCRIPTION | 4 ++-- NEWS.md | 4 ++++ R/DatabaseMigration.R | 3 +++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 47170d395..62af3d855 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,8 +2,8 @@ Package: PatientLevelPrediction Type: Package Title: Developing patient level prediction using data in the OMOP Common Data Model -Version: 6.2.0.9000 -Date: 2023-02-15 +Version: 6.2.1 +Date: 2023-02-28 Authors@R: c( person("Jenna", "Reps", email = "jreps@its.jnj.com", role = c("aut", "cre")), person("Martijn", "Schuemie", role = c("aut")), diff --git a/NEWS.md b/NEWS.md index ed36696ac..bf0924a5c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +PatientLevelPrediction 6.2.1 +====================== +- added ensure_installed("ResultModelManager") to getDataMigrator() + PatientLevelPrediction 6.1.0 ====================== - shiny app is now using ShinyAppBuilder with a config saved in the /inst folder diff --git a/R/DatabaseMigration.R b/R/DatabaseMigration.R index 56887c515..92c1166bb 100644 --- a/R/DatabaseMigration.R +++ b/R/DatabaseMigration.R @@ -12,6 +12,7 @@ #' @export migrateDataModel <- function(connectionDetails, databaseSchema, tablePrefix = "") { ParallelLogger::logInfo("Migrating data set") + migrator <- getDataMigrator( connectionDetails = connectionDetails, databaseSchema = databaseSchema, @@ -37,6 +38,8 @@ migrateDataModel <- function(connectionDetails, databaseSchema, tablePrefix = "" getDataMigrator <- function(connectionDetails, databaseSchema, tablePrefix = "") { + ensure_installed("ResultModelManager") + ResultModelManager::DataMigrationManager$new( connectionDetails = connectionDetails, databaseSchema = databaseSchema,