diff --git a/inst/doc/GettingStarted.html b/inst/doc/GettingStarted.html new file mode 100644 index 0000000..6371672 --- /dev/null +++ b/inst/doc/GettingStarted.html @@ -0,0 +1,241 @@ + + + + +
+ + + + + + + + + + +This vignette used the R code presented by Claire, at the OHDSI tutorial session on 9th November 2021 and hopefully presented a useful starter on this package
+Before we start we’ll make a local folder for output
+= here::here()
+ currentfolder= paste0(currentfolder,"out") outputfolder
To install this package from Github, we’ll check if you already have devtools (you likely do if not this code will install it)
+if (!"devtools" %in% installed.packages())
+install.packages("devtools") else
+ print("Found devtools")
## [1] "Found devtools"
+Now install the R package CommonDataModel from the OHDSI repository on github
+::install_github("OHDSI/CommonDataModel") devtools
##
+##
+ checking for file ‘/private/var/folders/c0/dz9xv0qd32n4y0dsc85jskph0000gq/T/RtmpV5iCGl/remotes1700120c0b28e/OHDSI-CommonDataModel-c768fa7/DESCRIPTION’ ...
+
+✓ checking for file ‘/private/var/folders/c0/dz9xv0qd32n4y0dsc85jskph0000gq/T/RtmpV5iCGl/remotes1700120c0b28e/OHDSI-CommonDataModel-c768fa7/DESCRIPTION’
+##
+
+─ preparing ‘CommonDataModel’: (359ms)
+##
+
+ checking DESCRIPTION meta-information ...
+
+✓ checking DESCRIPTION meta-information
+##
+
+─ checking for LF line-endings in source and make files and shell scripts
+##
+
+─ checking for empty or unneeded directories
+##
+
+ Omitted ‘LazyData’ from DESCRIPTION
+##
+
+─ building ‘CommonDataModel_0.1.0.tar.gz’
+##
+
+
+##
+List the currently supported SQL dialets
+::listSupportedDialects() CommonDataModel
## [1] "oracle" "postgresql" "pdw" "redshift" "impala"
+## [6] "netezza" "bigquery" "sql server"
+List the currently supported Common Data Model (CDM)
+::listSupportedVersions() CommonDataModel
## [1] "5.3" "5.4"
+There are multiple way to generate DDLs
+::buildRelease(cdmVersions = "5.4",
+ CommonDataModeltargetDialects = "postgresql",
+ outputfolder = outputfolder)
2a. To start you need to download DatabaseConnector in order to connect to your database
+to install DatabaseConnector
+::install_github("OHDSI/DatabaseConnector") devtools
library(DatabaseConnector)
Please replace with your own username/password and path to the file DatabaseConnector_Jars
+<- DatabaseConnector::createConnectionDetails(dbms = "postgresql",
+ cdserver="localhost/ohdsi",
+ user="postgres",
+ password = "postgres",
+ pathToDriver = "~/Documents/DatabaseConnector_Jars")
+
+::executeDdl(connectionDetails = cdm,
+ CommonDataModelcdmVersion = "5.4",
+ cdmDatabaseSchema = "ohdsi_demo")