-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCodeToRun.R
53 lines (47 loc) · 982 Bytes
/
CodeToRun.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
library(DBI)
library(here)
library(zip)
library(dbplyr)
library(dplyr)
library(CDMConnector)
library(tidyr)
library(readr)
library(CohortConstructor)
library(log4r)
library(tictoc)
library(PatientProfiles)
library(CohortCharacteristics)
library(CodelistGenerator)
library(CirceR)
library(SqlRender)
library(odbc)
library(RPostgres)
library(clock)
database_name <- "..."
# Connection details
server_dbi <- Sys.getenv("...")
user <- Sys.getenv("...")
password <- Sys.getenv("...")
port <- Sys.getenv("...")
host <- Sys.getenv("...")
db <- dbConnect(
"...",
dbname = server_dbi,
port = port,
host = host,
user = user,
password = password
)
cdm_database_schema <- "..."
results_database_schema <- "..."
# study prefix
table_stem <- "..."
runAtlas <- TRUE
runCohortConstructorByCohort <- TRUE
runCohortConstructorSet <- TRUE
runEvaluateCohorts <- TRUE
runGetOMOPDetails <- TRUE
runEvaluateIndex <- TRUE
useFirstDepression <- TRUE
# Run study
source(here("RunStudy.R"))