createDdl {CommonDataModel} | R Documentation |
Create the OHDSI-SQL Common Data Model DDL code
Description
The createDdl, createForeignKeys, and createPrimaryKeys functions each return a character string containing their respective DDL SQL code in OHDSQL dialect for a specific CDM version. The SQL they generate needs to be rendered and translated before it can be executed.
Usage
createDdl(cdmVersion)
createPrimaryKeys(cdmVersion)
createForeignKeys(cdmVersion)
Arguments
cdmVersion |
The version of the CDM you are creating, e.g. 5.3, 5.4 |
Details
The DDL SQL code is created from a two csv files that detail the OMOP CDM Specifications. These files also form the basis of the CDM documentation and the Data Quality Dashboard.
Value
A character string containing the OHDSQL DDL
A string containing the OHDSQL for creation of primary keys in the OMOP CDM.
A string containing the OHDSQL for creation of foreign keys in the OMOP CDM.
Functions
-
createPrimaryKeys()
: createPrimaryKeys Returns a string containing the OHDSQL for creation of primary keys in the OMOP CDM. -
createForeignKeys()
: createForeignKeys Returns a string containing the OHDSQL for creation of foreign keys in the OMOP CDM.
Examples
## Not run:
ddl <- createDdl("5.4")
pk <- createPrimaryKeys("5.4")
fk <- createForeignKeys("5.4")
## End(Not run)