diff --git a/inst/doc/GettingStarted.html b/inst/doc/GettingStarted.html new file mode 100644 index 00000000..63716721 --- /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
+currentfolder= here::here()
+outputfolder = paste0(currentfolder,"out")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
+devtools::install_github("OHDSI/CommonDataModel")##
+##
+ 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
+CommonDataModel::listSupportedDialects()## [1] "oracle" "postgresql" "pdw" "redshift" "impala"
+## [6] "netezza" "bigquery" "sql server"
+List the currently supported Common Data Model (CDM)
+CommonDataModel::listSupportedVersions()## [1] "5.3" "5.4"
+There are multiple way to generate DDLs
+CommonDataModel::buildRelease(cdmVersions = "5.4",
+ targetDialects = "postgresql",
+ outputfolder = outputfolder)2a. To start you need to download DatabaseConnector in order to connect to your database
+to install DatabaseConnector
+devtools::install_github("OHDSI/DatabaseConnector")library(DatabaseConnector)Please replace with your own username/password and path to the file DatabaseConnector_Jars
+cd<- DatabaseConnector::createConnectionDetails(dbms = "postgresql",
+ server="localhost/ohdsi",
+ user="postgres",
+ password = "postgres",
+ pathToDriver = "~/Documents/DatabaseConnector_Jars")
+
+CommonDataModel::executeDdl(connectionDetails = cdm,
+ cdmVersion = "5.4",
+ cdmDatabaseSchema = "ohdsi_demo")