Skip to content

Commit

Permalink
minor updates
Browse files Browse the repository at this point in the history
minor updates
  • Loading branch information
jreps committed Feb 25, 2025
1 parent 8577a13 commit 8f7555b
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 8 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: Characterization
Type: Package
Title: Implement Descriptive Studies Using the Common Data Model
Version: 2.1.2
Date: 2024-2-20
Date: 2025-2-20
Authors@R: c(
person("Jenna", "Reps", , "[email protected]", role = c("aut", "cre")),
person("Patrick", "Ryan", , "[email protected]", role = c("aut")),
Expand Down
2 changes: 1 addition & 1 deletion R/AggregateCovariates.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#' @param casePreTargetDuration The number of days prior to case index we use for FeatureExtraction
#' @param casePostOutcomeDuration The number of days prior to case index we use for FeatureExtraction
#' @param extractNonCaseCovariates Whether to extract aggregate covariates and counts for patients in the targets and outcomes in addition to the cases
#' @family {Aggregate}
#' @family Aggregate
#' @return
#' A list with the settings
#'
Expand Down
14 changes: 11 additions & 3 deletions R/Database.R
Original file line number Diff line number Diff line change
Expand Up @@ -294,14 +294,20 @@ createCharacterizationTables <- function(
# add database migration here in the future
migrateDataModel(
connectionDetails = connectionDetails,
connection = conn,
databaseSchema = resultSchema,
tablePrefix = tablePrefix
)
}
}


migrateDataModel <- function(connectionDetails, databaseSchema, tablePrefix = "") {
migrateDataModel <- function(
connectionDetails,
connection,
databaseSchema,
tablePrefix = ""
) {
ParallelLogger::logInfo("Migrating data set")
migrator <- getDataMigrator(
connectionDetails = connectionDetails,
Expand All @@ -319,8 +325,10 @@ migrateDataModel <- function(connectionDetails, databaseSchema, tablePrefix = ""
dbms = connectionDetails$dbms
)

connection <- DatabaseConnector::connect(connectionDetails = connectionDetails)
on.exit(DatabaseConnector::disconnect(connection))
if(missing(connection)){
connection <- DatabaseConnector::connect(connectionDetails = connectionDetails)
on.exit(DatabaseConnector::disconnect(connection))
}
DatabaseConnector::executeSql(connection, updateVersionSql)
}

Expand Down
2 changes: 1 addition & 1 deletion R/ViewShiny.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#' Input is the output of ...
#' @param resultFolder The location of the csv results
#' @param cohortDefinitionSet The cohortDefinitionSet extracted using webAPI
#' @family {Shiny}
#' @family Shiny
#'
#' @return
#' Opens a shiny app for interactively viewing the results
Expand Down
4 changes: 4 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,7 @@ reference:
desc: >
Code to run incremetal model
contents: has_concept("Incremental")
- title: "Helpers"
desc: >
Helper functions such as example data for users
contents: has_concept("helper")
2 changes: 1 addition & 1 deletion man/createAggregateCovariateSettings.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/viewCharacterization.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8f7555b

Please sign in to comment.