Run this
Run this.Rmd
This file depicts example code on how to set up a “Code to run” file for the database connection to use PETDiagnostics. The mothertable and babytable are not yet part of the official cdm therefore they need to added to the cdm.
Database connection details
server_dbi<-Sys.getenv(“SERVER_DBI”)
port<-Sys.getenv(“DB_PORT”)
host<-Sys.getenv(“DB_HOST”)
user<-Sys.getenv(“DB_USER”)
password<-Sys.getenv(“DB_PASSWORD”)
to add bigint = “integer” or alternatively bigint = “numeric” is very important
con <- DBI::dbConnect(RPostgres::Postgres(),
dbname = server_dbi,
port = port,
host = host,
user = user,
password = password,
bigint = “integer”)
The name of the schema that contains the OMOP CDM with patient-level data
cdm_database_schema<-Sys.getenv(“DB_CDM_SCHEMA”)
The name of the schema that contains the vocabularies
vocabulary_database_schema<-cdm_database_schema
The name of the schema where results tables will be created
results_database_schema<-Sys.getenv(“DB_WRITE_SCHEMA”)