Skip to content
Snippets Groups Projects
Commit 4a1d021f authored by Christian, Nils (ITTM)'s avatar Christian, Nils (ITTM)
Browse files

Adjust example script to OPTIMA OHDSI stack environment, comment launchDiagnosticsExplorer

Fix call of `launchDiagnosticsExplorer`, but comment it and `createMergedResultsFile`
because these are not needed to create the zip file.
parent 12644be7
No related branches found
No related tags found
No related merge requests found
library(OptimaTesting)
envkeyring <- keyring::backend_env$new()
envkeyring$set_with_value("DB_PASS", username = Sys.getenv("DB_USERNAME"), password = getPass::getPass())
# Maximum number of cores to be used:
maxCores <- parallel::detectCores()
# The folder where the study intermediate and result files will be written:
outputFolder <- "D:/studyResults/OptimaTesting"
outputFolder <- "studyResults/OptimaTesting"
# Optional: specify where the temporary files (used by the Andromeda package) will be created:
options(andromedaTempFolder = file.path(outputFolder, "andromedaTemp"))
......@@ -12,26 +15,26 @@ options(andromedaTempFolder = file.path(outputFolder, "andromedaTemp"))
# Details for connecting to the server:
connectionDetails <-
DatabaseConnector::createConnectionDetails(
dbms = "pdw",
server = Sys.getenv("PDW_SERVER"),
user = NULL,
password = NULL,
port = Sys.getenv("PDW_PORT")
dbms = "postgresql",
server = 'postgresql/ohdsi',
user = Sys.getenv("DB_USERNAME"),
password = envkeyring$get("DB_PASS", username = Sys.getenv("DB_USERNAME")),
port = 5432
)
# The name of the database schema where the CDM data can be found:
cdmDatabaseSchema <- "CDM_IBM_MDCD_V1153.dbo"
cdmDatabaseSchema <- "cdm_synthea1k"
# The name of the database schema and table where the study-specific cohorts will be instantiated:
cohortDatabaseSchema <- "scratch.dbo"
cohortDatabaseSchema <- gsub('\\.', '', Sys.getenv("DB_USERNAME"))
cohortTable <- "OptimaTesting"
# Some meta-information that will be used by the export function:
databaseId <- "Synpuf"
databaseId <- "Synthea"
databaseName <-
"Medicare Claims Synthetic Public Use Files (SynPUFs)"
"Synthea synthetic health database"
databaseDescription <-
"Medicare Claims Synthetic Public Use Files (SynPUFs) were created to allow interested parties to gain familiarity using Medicare claims data while protecting beneficiary privacy. These files are intended to promote development of software and applications that utilize files in this format, train researchers on the use and complexities of Centers for Medicare and Medicaid Services (CMS) claims, and support safe data mining innovations. The SynPUFs were created by combining randomized information from multiple unique beneficiaries and changing variable values. This randomization and combining of beneficiary information ensures privacy of health information."
"SyntheaTM is a Synthetic Patient Population Simulator. The goal is to output synthetic, realistic (but not real), patient data and associated health records in a variety of formats."
# For some database platforms (e.g. Oracle): define a schema that can be used to emulate temp tables:
options(sqlRenderTempEmulationSchema = NULL)
......@@ -48,10 +51,13 @@ OptimaTesting::execute(
databaseDescription = databaseDescription
)
CohortDiagnostics::createMergedResultsFile(
dataFolder = outputFolder,
sqliteDbPath = file.path(outputFolder,
"MergedCohortDiagnosticsData.sqlite")
)
# CohortDiagnostics::createMergedResultsFile(
# dataFolder = outputFolder,
# sqliteDbPath = file.path(outputFolder,
# "MergedCohortDiagnosticsData.sqlite")
# )
CohortDiagnostics::launchDiagnosticsExplorer(dataFolder = outputFolder)
# CohortDiagnostics::launchDiagnosticsExplorer(
# sqliteDbPath = file.path(outputFolder,
# "MergedCohortDiagnosticsData.sqlite"),
# publishDir = outputFolder)
......@@ -507,6 +507,12 @@
"Source" : "Repository",
"Repository" : "CRAN"
},
"getPass": {
"Package": "getPass",
"Version": "0.2-4",
"Source": "Repository",
"Repository": "RSPM"
},
"CohortGenerator" : {
"Package" : "CohortGenerator",
"Version" : "0.8.0",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment