2021-06-09 00:19:01 +00:00
|
|
|
% Generated by roxygen2: do not edit by hand
|
2021-08-19 19:43:34 +00:00
|
|
|
% Please edit documentation in R/createDdl.R
|
2021-08-18 19:30:04 +00:00
|
|
|
\name{createDdl}
|
|
|
|
\alias{createDdl}
|
2021-08-19 15:49:36 +00:00
|
|
|
\alias{createPrimaryKeys}
|
|
|
|
\alias{createForeignKeys}
|
|
|
|
\title{Create the OHDSI-SQL Common Data Model DDL code}
|
2021-06-09 00:19:01 +00:00
|
|
|
\usage{
|
2021-08-19 15:49:36 +00:00
|
|
|
createDdl(cdmVersion)
|
2021-06-09 00:19:01 +00:00
|
|
|
|
2021-08-19 15:49:36 +00:00
|
|
|
createPrimaryKeys(cdmVersion)
|
2021-06-09 00:19:01 +00:00
|
|
|
|
2021-08-19 15:49:36 +00:00
|
|
|
createForeignKeys(cdmVersion)
|
|
|
|
}
|
|
|
|
\arguments{
|
|
|
|
\item{cdmVersion}{The version of the CDM you are creating, e.g. 5.3, 5.4}
|
|
|
|
}
|
|
|
|
\value{
|
|
|
|
A character string containing the OHDSQL DDL
|
2021-06-09 00:19:01 +00:00
|
|
|
}
|
|
|
|
\description{
|
2021-08-19 15:49:36 +00:00
|
|
|
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.
|
|
|
|
}
|
|
|
|
\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
|
2021-06-09 00:19:01 +00:00
|
|
|
Dashboard.
|
|
|
|
}
|
2021-08-19 15:49:36 +00:00
|
|
|
\section{Functions}{
|
|
|
|
\itemize{
|
2023-02-08 20:04:22 +00:00
|
|
|
\item \code{createPrimaryKeys()}: createPrimaryKeys Returns a string containing the OHDSQL for creation of primary keys in the OMOP CDM.
|
2021-08-19 15:49:36 +00:00
|
|
|
|
2023-02-08 20:04:22 +00:00
|
|
|
\item \code{createForeignKeys()}: createForeignKeys Returns a string containing the OHDSQL for creation of foreign keys in the OMOP CDM.
|
2021-08-19 15:49:36 +00:00
|
|
|
|
2023-02-08 20:04:22 +00:00
|
|
|
}}
|
2021-08-19 15:49:36 +00:00
|
|
|
\examples{
|
|
|
|
ddl <- createDdl("5.4")
|
|
|
|
pk <- createPrimaryKeys("5.4")
|
|
|
|
fk <- createForeignKeys("5.4")
|
|
|
|
}
|