-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c0121e6
commit 2e907a8
Showing
35 changed files
with
11,794 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
source("renv/activate.R") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,3 +47,9 @@ po/*~ | |
|
||
# RStudio Connect folder | ||
rsconnect/ | ||
|
||
# Strategus results folder | ||
results/ | ||
|
||
# VSCode | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/extras/ | ||
/tests/ | ||
/results/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
################################################################################ | ||
# INSTRUCTIONS: The code below assumes you have access to a PostgreSQL database | ||
# and permissions to create tables in an existing schema specified by the | ||
# resultsDatabaseSchema parameter. | ||
# | ||
# See the Working with results section | ||
# of the UsingThisTemplate.md for more details. | ||
# | ||
# More information about working with results produced by running Strategus | ||
# is found at: | ||
# https://ohdsi.github.io/Strategus/articles/WorkingWithResults.html | ||
# ############################################################################## | ||
|
||
# Code for creating the result schema and tables in a PostgreSQL database | ||
resultsDatabaseSchema <- "results" | ||
analysisSpecifications <- ParallelLogger::loadSettingsFromJson( | ||
fileName = "inst/sampleStudy/sampleStudyAnalysisSpecification.json" | ||
) | ||
|
||
resultsDatabaseConnectionDetails <- DatabaseConnector::createConnectionDetails( | ||
dbms = "postgresql", | ||
server = Sys.getenv("OHDSI_RESULTS_DATABASE_SERVER"), | ||
user = Sys.getenv("OHDSI_RESULTS_DATABASE_USER"), | ||
password = Sys.getenv("OHDSI_RESULTS_DATABASE_PASSWORD") | ||
) | ||
|
||
# Create results data model ------------------------- | ||
|
||
# Use the 1st results folder to define the results data model | ||
resultsFolder <- list.dirs(path = "results", full.names = T, recursive = F)[1] | ||
resultsDataModelSettings <- Strategus::createResultsDataModelSettings( | ||
resultsDatabaseSchema = resultsDatabaseSchema, | ||
resultsFolder = file.path(resultsFolder, "strategusOutput") | ||
) | ||
|
||
Strategus::createResultDataModel( | ||
analysisSpecifications = analysisSpecifications, | ||
resultsDataModelSettings = resultsDataModelSettings, | ||
resultsConnectionDetails = resultsDatabaseConnectionDetails | ||
) |
Oops, something went wrong.