Skip to content

Commit

Permalink
Release v1.0 (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonysena authored Oct 17, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent c0121e6 commit 2e907a8
Showing 35 changed files with 11,794 additions and 73 deletions.
1 change: 1 addition & 0 deletions .Rprofile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
source("renv/activate.R")
6 changes: 6 additions & 0 deletions .gitignore
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/
3 changes: 3 additions & 0 deletions .renvignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/extras/
/tests/
/results/
40 changes: 40 additions & 0 deletions CreateResultsDataModel.R
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
)
Loading

0 comments on commit 2e907a8

Please sign in to comment.