Bug fixes and updates from Nov 2021 - Jan 2022

This commit is contained in:
Clair Blacketer 2022-01-13 13:59:03 -05:00
parent 09fe23fd44
commit f006431a5e
69 changed files with 13858 additions and 1939 deletions

View File

@ -12,6 +12,6 @@ listSupportedVersions <- function() {
#' @export
listSupportedDialects <- function() {
supportedDialects <- c("oracle", "postgresql", "pdw", "redshift", "impala", "netezza", "bigquery", "sql server")
supportedDialects <- c("oracle", "postgresql", "pdw", "redshift", "impala", "netezza", "bigquery", "sql server", "spark")
return(supportedDialects)
}

View File

@ -30,7 +30,7 @@
writeDdl <- function(targetDialect, cdmVersion, outputfolder, cdmDatabaseSchema = "@cdmDatabaseSchema") {
# argument checks
stopifnot(targetDialect %in% c("oracle", "postgresql", "pdw", "redshift", "impala", "netezza", "bigquery", "sql server"))
stopifnot(targetDialect %in% c("oracle", "postgresql", "pdw", "redshift", "impala", "netezza", "bigquery", "sql server", "spark"))
stopifnot(cdmVersion %in% listSupportedVersions())
stopifnot(is.character(cdmDatabaseSchema))
@ -54,7 +54,7 @@ writeDdl <- function(targetDialect, cdmVersion, outputfolder, cdmDatabaseSchema
writePrimaryKeys <- function(targetDialect, cdmVersion, outputfolder, cdmDatabaseSchema = "@cdmDatabaseSchema") {
# argument checks
stopifnot(targetDialect %in% c("oracle", "postgresql", "pdw", "redshift", "impala", "netezza", "bigquery", "sql server"))
stopifnot(targetDialect %in% c("oracle", "postgresql", "pdw", "redshift", "impala", "netezza", "bigquery", "sql server", "spark"))
stopifnot(cdmVersion %in% listSupportedVersions())
stopifnot(is.character(cdmDatabaseSchema))
@ -78,7 +78,7 @@ writePrimaryKeys <- function(targetDialect, cdmVersion, outputfolder, cdmDatabas
writeForeignKeys <- function(targetDialect, cdmVersion, outputfolder, cdmDatabaseSchema = "@cdmDatabaseSchema") {
# argument checks
stopifnot(targetDialect %in% c("oracle", "postgresql", "pdw", "redshift", "impala", "netezza", "bigquery", "sql server"))
stopifnot(targetDialect %in% c("oracle", "postgresql", "pdw", "redshift", "impala", "netezza", "bigquery", "sql server", "spark"))
stopifnot(cdmVersion %in% listSupportedVersions())
stopifnot(is.character(cdmDatabaseSchema))
@ -102,7 +102,7 @@ writeForeignKeys <- function(targetDialect, cdmVersion, outputfolder, cdmDatabas
writeIndex <- function(targetDialect, cdmVersion, outputfolder, cdmDatabaseSchema = "@cdmDatabaseSchema") {
# argument checks
stopifnot(targetDialect %in% c("oracle", "postgresql", "pdw", "redshift", "impala", "netezza", "bigquery", "sql server"))
stopifnot(targetDialect %in% c("oracle", "postgresql", "pdw", "redshift", "impala", "netezza", "bigquery", "sql server", "spark"))
stopifnot(cdmVersion %in% listSupportedVersions())
stopifnot(is.character(cdmDatabaseSchema))

View File

@ -11,15 +11,24 @@
<title>background.utf8</title>
<title>background.knit</title>
<script src="site_libs/header-attrs-2.6/header-attrs.js"></script>
<script src="site_libs/jquery-1.11.3/jquery.min.js"></script>
<script src="site_libs/header-attrs-2.11/header-attrs.js"></script>
<script src="site_libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="site_libs/bootstrap-3.3.5/css/cosmo.min.css" rel="stylesheet" />
<script src="site_libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/respond.min.js"></script>
<style>h1 {font-size: 34px;}
h1.title {font-size: 38px;}
h2 {font-size: 30px;}
h3 {font-size: 24px;}
h4 {font-size: 18px;}
h5 {font-size: 16px;}
h6 {font-size: 12px;}
code {color: inherit; background-color: rgba(0, 0, 0, 0.04);}
pre:not([class]) { background-color: white }</style>
<script src="site_libs/jqueryui-1.11.4/jquery-ui.min.js"></script>
<link href="site_libs/tocify-1.9.1/jquery.tocify.css" rel="stylesheet" />
<script src="site_libs/tocify-1.9.1/jquery.tocify.js"></script>
@ -40,11 +49,6 @@
</style>
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
pre:not([class]) {
background-color: white;
}
</style>
<script type="text/javascript">
if (window.hljs) {
hljs.configure({languages: []});
@ -57,32 +61,6 @@ if (window.hljs) {
<style type="text/css">
h1 {
font-size: 34px;
}
h1.title {
font-size: 38px;
}
h2 {
font-size: 30px;
}
h3 {
font-size: 24px;
}
h4 {
font-size: 18px;
}
h5 {
font-size: 16px;
}
h6 {
font-size: 12px;
}
.table th:not([align]) {
text-align: left;
}
</style>
<link rel="stylesheet" href="style.css" type="text/css" />
@ -95,10 +73,6 @@ h6 {
margin-left: auto;
margin-right: auto;
}
code {
color: inherit;
background-color: rgba(0, 0, 0, 0.04);
}
img {
max-width:100%;
}
@ -114,40 +88,13 @@ button.code-folding-btn:focus {
summary {
display: list-item;
}
pre code {
padding: 0;
}
</style>
<style type="text/css">
/* padding for bootstrap navbar */
body {
padding-top: 51px;
padding-bottom: 40px;
}
/* offset scroll position for anchor links (for fixed navbar) */
.section h1 {
padding-top: 56px;
margin-top: -56px;
}
.section h2 {
padding-top: 56px;
margin-top: -56px;
}
.section h3 {
padding-top: 56px;
margin-top: -56px;
}
.section h4 {
padding-top: 56px;
margin-top: -56px;
}
.section h5 {
padding-top: 56px;
margin-top: -56px;
}
.section h6 {
padding-top: 56px;
margin-top: -56px;
}
.dropdown-submenu {
position: relative;
}
@ -175,7 +122,7 @@ body {
margin-right: -10px;
}
.dropdown-submenu:hover>a:after {
border-left-color: #ffffff;
border-left-color: #adb5bd;
}
.dropdown-submenu.pull-left {
float: none;
@ -187,7 +134,7 @@ body {
}
</style>
<script>
<script type="text/javascript">
// manage active state of menu based on current page
$(document).ready(function () {
// active menu anchor
@ -198,10 +145,23 @@ $(document).ready(function () {
var menuAnchor = $('a[href="' + href + '"]');
// mark it active
menuAnchor.parent().addClass('active');
menuAnchor.tab('show');
// if it's got a parent navbar menu mark it active as well
menuAnchor.closest('li.dropdown').addClass('active');
// Navbar adjustments
var navHeight = $(".navbar").first().height() + 15;
var style = document.createElement('style');
var pt = "padding-top: " + navHeight + "px; ";
var mt = "margin-top: -" + navHeight + "px; ";
var css = "";
// offset scroll position for anchor links (for fixed navbar)
for (var i = 1; i <= 6; i++) {
css += ".section h" + i + "{ " + pt + mt + "}\n";
}
style.innerHTML = "body {" + pt + "padding-bottom: 40px; }\n" + css;
document.head.appendChild(style);
});
</script>
@ -213,7 +173,6 @@ $(document).ready(function () {
max-height: 500px;
min-height: 44px;
overflow-y: auto;
background: white;
border: 1px solid #ddd;
border-radius: 4px;
}
@ -339,7 +298,7 @@ div.tocify {
<!-- setup 3col/9col grid for toc_float and main content -->
<div class="row-fluid">
<div class="row">
<div class="col-xs-12 col-sm-4 col-md-3">
<div id="TOC" class="tocify">
</div>
@ -364,13 +323,13 @@ div.tocify {
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fas fa-home"></span>
<span class="fa fa-home"></span>
</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-landmark"></span>
<span class="fa fa-landmark"></span>
Background
@ -390,7 +349,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-list-alt"></span>
<span class="fa fa-list-alt"></span>
Conventions
@ -410,7 +369,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-history"></span>
<span class="fa fa-history"></span>
CDM Versions
@ -441,7 +400,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-plus-square"></span>
<span class="fa fa-plus-square"></span>
Proposals
@ -463,7 +422,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-question"></span>
<span class="fa fa-question"></span>
How to
@ -483,7 +442,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-life-ring"></span>
<span class="fa fa-life-ring"></span>
Support
@ -505,7 +464,7 @@ div.tocify {
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/OHDSI/CommonDataModel">
<span class="fas fa-github"></span>
<span class="fa fa-github"></span>
</a>
</li>
@ -514,7 +473,7 @@ div.tocify {
</div><!--/.container -->
</div><!--/.navbar -->
<div class="fluid-row" id="header">
<div id="header">
@ -590,7 +549,7 @@ $(document).ready(function () {
$(document).ready(function () {
$('.tabset-dropdown > .nav-tabs > li').click(function () {
$(this).parent().toggleClass('nav-tabs-open')
$(this).parent().toggleClass('nav-tabs-open');
});
});
</script>
@ -600,6 +559,9 @@ $(document).ready(function () {
<script>
$(document).ready(function () {
// temporarily add toc-ignore selector to headers for the consistency with Pandoc
$('.unlisted.unnumbered').addClass('toc-ignore')
// move toc-ignore selectors from section div to header
$('div.section.toc-ignore')
.removeClass('toc-ignore')

View File

@ -13,13 +13,22 @@
<title>CDM v3</title>
<script src="site_libs/header-attrs-2.6/header-attrs.js"></script>
<script src="site_libs/jquery-1.11.3/jquery.min.js"></script>
<script src="site_libs/header-attrs-2.11/header-attrs.js"></script>
<script src="site_libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="site_libs/bootstrap-3.3.5/css/cosmo.min.css" rel="stylesheet" />
<script src="site_libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/respond.min.js"></script>
<style>h1 {font-size: 34px;}
h1.title {font-size: 38px;}
h2 {font-size: 30px;}
h3 {font-size: 24px;}
h4 {font-size: 18px;}
h5 {font-size: 16px;}
h6 {font-size: 12px;}
code {color: inherit; background-color: rgba(0, 0, 0, 0.04);}
pre:not([class]) { background-color: white }</style>
<script src="site_libs/jqueryui-1.11.4/jquery-ui.min.js"></script>
<link href="site_libs/tocify-1.9.1/jquery.tocify.css" rel="stylesheet" />
<script src="site_libs/tocify-1.9.1/jquery.tocify.js"></script>
@ -40,11 +49,6 @@
</style>
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
pre:not([class]) {
background-color: white;
}
</style>
<script type="text/javascript">
if (window.hljs) {
hljs.configure({languages: []});
@ -57,32 +61,6 @@ if (window.hljs) {
<style type="text/css">
h1 {
font-size: 34px;
}
h1.title {
font-size: 38px;
}
h2 {
font-size: 30px;
}
h3 {
font-size: 24px;
}
h4 {
font-size: 18px;
}
h5 {
font-size: 16px;
}
h6 {
font-size: 12px;
}
.table th:not([align]) {
text-align: left;
}
</style>
<link rel="stylesheet" href="style.css" type="text/css" />
@ -95,10 +73,6 @@ h6 {
margin-left: auto;
margin-right: auto;
}
code {
color: inherit;
background-color: rgba(0, 0, 0, 0.04);
}
img {
max-width:100%;
}
@ -114,40 +88,13 @@ button.code-folding-btn:focus {
summary {
display: list-item;
}
pre code {
padding: 0;
}
</style>
<style type="text/css">
/* padding for bootstrap navbar */
body {
padding-top: 51px;
padding-bottom: 40px;
}
/* offset scroll position for anchor links (for fixed navbar) */
.section h1 {
padding-top: 56px;
margin-top: -56px;
}
.section h2 {
padding-top: 56px;
margin-top: -56px;
}
.section h3 {
padding-top: 56px;
margin-top: -56px;
}
.section h4 {
padding-top: 56px;
margin-top: -56px;
}
.section h5 {
padding-top: 56px;
margin-top: -56px;
}
.section h6 {
padding-top: 56px;
margin-top: -56px;
}
.dropdown-submenu {
position: relative;
}
@ -175,7 +122,7 @@ body {
margin-right: -10px;
}
.dropdown-submenu:hover>a:after {
border-left-color: #ffffff;
border-left-color: #adb5bd;
}
.dropdown-submenu.pull-left {
float: none;
@ -187,7 +134,7 @@ body {
}
</style>
<script>
<script type="text/javascript">
// manage active state of menu based on current page
$(document).ready(function () {
// active menu anchor
@ -198,10 +145,23 @@ $(document).ready(function () {
var menuAnchor = $('a[href="' + href + '"]');
// mark it active
menuAnchor.parent().addClass('active');
menuAnchor.tab('show');
// if it's got a parent navbar menu mark it active as well
menuAnchor.closest('li.dropdown').addClass('active');
// Navbar adjustments
var navHeight = $(".navbar").first().height() + 15;
var style = document.createElement('style');
var pt = "padding-top: " + navHeight + "px; ";
var mt = "margin-top: -" + navHeight + "px; ";
var css = "";
// offset scroll position for anchor links (for fixed navbar)
for (var i = 1; i <= 6; i++) {
css += ".section h" + i + "{ " + pt + mt + "}\n";
}
style.innerHTML = "body {" + pt + "padding-bottom: 40px; }\n" + css;
document.head.appendChild(style);
});
</script>
@ -213,7 +173,6 @@ $(document).ready(function () {
max-height: 500px;
min-height: 44px;
overflow-y: auto;
background: white;
border: 1px solid #ddd;
border-radius: 4px;
}
@ -339,7 +298,7 @@ div.tocify {
<!-- setup 3col/9col grid for toc_float and main content -->
<div class="row-fluid">
<div class="row">
<div class="col-xs-12 col-sm-4 col-md-3">
<div id="TOC" class="tocify">
</div>
@ -364,13 +323,13 @@ div.tocify {
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fas fa-home"></span>
<span class="fa fa-home"></span>
</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-landmark"></span>
<span class="fa fa-landmark"></span>
Background
@ -390,7 +349,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-list-alt"></span>
<span class="fa fa-list-alt"></span>
Conventions
@ -410,7 +369,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-history"></span>
<span class="fa fa-history"></span>
CDM Versions
@ -441,7 +400,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-plus-square"></span>
<span class="fa fa-plus-square"></span>
Proposals
@ -463,7 +422,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-question"></span>
<span class="fa fa-question"></span>
How to
@ -483,7 +442,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-life-ring"></span>
<span class="fa fa-life-ring"></span>
Support
@ -505,7 +464,7 @@ div.tocify {
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/OHDSI/CommonDataModel">
<span class="fas fa-github"></span>
<span class="fa fa-github"></span>
</a>
</li>
@ -514,7 +473,7 @@ div.tocify {
</div><!--/.container -->
</div><!--/.navbar -->
<div class="fluid-row" id="header">
<div id="header">
@ -554,7 +513,7 @@ $(document).ready(function () {
$(document).ready(function () {
$('.tabset-dropdown > .nav-tabs > li').click(function () {
$(this).parent().toggleClass('nav-tabs-open')
$(this).parent().toggleClass('nav-tabs-open');
});
});
</script>
@ -564,6 +523,9 @@ $(document).ready(function () {
<script>
$(document).ready(function () {
// temporarily add toc-ignore selector to headers for the consistency with Pandoc
$('.unlisted.unnumbered').addClass('toc-ignore')
// move toc-ignore selectors from section div to header
$('div.section.toc-ignore')
.removeClass('toc-ignore')

View File

@ -13,13 +13,22 @@
<title>OMOP CDM v5.3</title>
<script src="site_libs/header-attrs-2.6/header-attrs.js"></script>
<script src="site_libs/jquery-1.11.3/jquery.min.js"></script>
<script src="site_libs/header-attrs-2.11/header-attrs.js"></script>
<script src="site_libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="site_libs/bootstrap-3.3.5/css/cosmo.min.css" rel="stylesheet" />
<script src="site_libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/respond.min.js"></script>
<style>h1 {font-size: 34px;}
h1.title {font-size: 38px;}
h2 {font-size: 30px;}
h3 {font-size: 24px;}
h4 {font-size: 18px;}
h5 {font-size: 16px;}
h6 {font-size: 12px;}
code {color: inherit; background-color: rgba(0, 0, 0, 0.04);}
pre:not([class]) { background-color: white }</style>
<script src="site_libs/jqueryui-1.11.4/jquery-ui.min.js"></script>
<link href="site_libs/tocify-1.9.1/jquery.tocify.css" rel="stylesheet" />
<script src="site_libs/tocify-1.9.1/jquery.tocify.js"></script>
@ -40,11 +49,6 @@
</style>
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
pre:not([class]) {
background-color: white;
}
</style>
<script type="text/javascript">
if (window.hljs) {
hljs.configure({languages: []});
@ -57,32 +61,6 @@ if (window.hljs) {
<style type="text/css">
h1 {
font-size: 34px;
}
h1.title {
font-size: 38px;
}
h2 {
font-size: 30px;
}
h3 {
font-size: 24px;
}
h4 {
font-size: 18px;
}
h5 {
font-size: 16px;
}
h6 {
font-size: 12px;
}
.table th:not([align]) {
text-align: left;
}
</style>
<link rel="stylesheet" href="style.css" type="text/css" />
@ -95,10 +73,6 @@ h6 {
margin-left: auto;
margin-right: auto;
}
code {
color: inherit;
background-color: rgba(0, 0, 0, 0.04);
}
img {
max-width:100%;
}
@ -114,40 +88,13 @@ button.code-folding-btn:focus {
summary {
display: list-item;
}
pre code {
padding: 0;
}
</style>
<style type="text/css">
/* padding for bootstrap navbar */
body {
padding-top: 51px;
padding-bottom: 40px;
}
/* offset scroll position for anchor links (for fixed navbar) */
.section h1 {
padding-top: 56px;
margin-top: -56px;
}
.section h2 {
padding-top: 56px;
margin-top: -56px;
}
.section h3 {
padding-top: 56px;
margin-top: -56px;
}
.section h4 {
padding-top: 56px;
margin-top: -56px;
}
.section h5 {
padding-top: 56px;
margin-top: -56px;
}
.section h6 {
padding-top: 56px;
margin-top: -56px;
}
.dropdown-submenu {
position: relative;
}
@ -175,7 +122,7 @@ body {
margin-right: -10px;
}
.dropdown-submenu:hover>a:after {
border-left-color: #ffffff;
border-left-color: #adb5bd;
}
.dropdown-submenu.pull-left {
float: none;
@ -187,7 +134,7 @@ body {
}
</style>
<script>
<script type="text/javascript">
// manage active state of menu based on current page
$(document).ready(function () {
// active menu anchor
@ -198,10 +145,23 @@ $(document).ready(function () {
var menuAnchor = $('a[href="' + href + '"]');
// mark it active
menuAnchor.parent().addClass('active');
menuAnchor.tab('show');
// if it's got a parent navbar menu mark it active as well
menuAnchor.closest('li.dropdown').addClass('active');
// Navbar adjustments
var navHeight = $(".navbar").first().height() + 15;
var style = document.createElement('style');
var pt = "padding-top: " + navHeight + "px; ";
var mt = "margin-top: -" + navHeight + "px; ";
var css = "";
// offset scroll position for anchor links (for fixed navbar)
for (var i = 1; i <= 6; i++) {
css += ".section h" + i + "{ " + pt + mt + "}\n";
}
style.innerHTML = "body {" + pt + "padding-bottom: 40px; }\n" + css;
document.head.appendChild(style);
});
</script>
@ -213,7 +173,6 @@ $(document).ready(function () {
max-height: 500px;
min-height: 44px;
overflow-y: auto;
background: white;
border: 1px solid #ddd;
border-radius: 4px;
}
@ -339,7 +298,7 @@ div.tocify {
<!-- setup 3col/9col grid for toc_float and main content -->
<div class="row-fluid">
<div class="row">
<div class="col-xs-12 col-sm-4 col-md-3">
<div id="TOC" class="tocify">
</div>
@ -364,13 +323,13 @@ div.tocify {
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fas fa-home"></span>
<span class="fa fa-home"></span>
</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-landmark"></span>
<span class="fa fa-landmark"></span>
Background
@ -390,7 +349,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-list-alt"></span>
<span class="fa fa-list-alt"></span>
Conventions
@ -410,7 +369,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-history"></span>
<span class="fa fa-history"></span>
CDM Versions
@ -441,7 +400,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-plus-square"></span>
<span class="fa fa-plus-square"></span>
Proposals
@ -463,7 +422,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-question"></span>
<span class="fa fa-question"></span>
How to
@ -483,7 +442,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-life-ring"></span>
<span class="fa fa-life-ring"></span>
Support
@ -505,7 +464,7 @@ div.tocify {
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/OHDSI/CommonDataModel">
<span class="fas fa-github"></span>
<span class="fa fa-github"></span>
</a>
</li>
@ -514,7 +473,7 @@ div.tocify {
</div><!--/.container -->
</div><!--/.navbar -->
<div class="fluid-row" id="header">
<div id="header">
@ -9249,7 +9208,7 @@ drug_era_start_date
The Drug Era Start Date is the start date of the first Drug Exposure for a given ingredient, with at least 31 days since the previous exposure.
</td>
<td style="text-align:left;width: 1in; ">
datetime
date
</td>
<td style="text-align:left;width: 1in; ">
Yes
@ -9275,7 +9234,7 @@ drug_era_end_date
The Drug Era End Date is the end date of the last Drug Exposure. The End Date of each Drug Exposure is either taken from the field drug_exposure_end_date or, as it is typically not available, inferred using the following rules: For pharmacy prescription data, the date when the drug was dispensed plus the number of days of supply are used to extrapolate the End Date for the Drug Exposure. Depending on the country-specific healthcare system, this supply information is either explicitly provided in the day_supply field or inferred from package size or similar information. For Procedure Drugs, usually the drug is administered on a single date (i.e., the administration date). A standard Persistence Window of 30 days (gap, slack) is permitted between two subsequent such extrapolated DRUG_EXPOSURE records to be considered to be merged into a single Drug Era.
</td>
<td style="text-align:left;width: 1in; ">
datetime
date
</td>
<td style="text-align:left;width: 1in; ">
Yes
@ -9527,7 +9486,7 @@ The date the Person started on the specific dosage, with at least 31 days since
<td style="text-align:left;width: 4in; ">
</td>
<td style="text-align:left;width: 1in; ">
datetime
date
</td>
<td style="text-align:left;width: 1in; ">
Yes
@ -9553,7 +9512,7 @@ dose_era_end_date
The date the Person was no longer exposed to the dosage of the specific drug ingredient. An era is ended if there are 31 days or more between dosage records.
</td>
<td style="text-align:left;width: 1in; ">
datetime
date
</td>
<td style="text-align:left;width: 1in; ">
Yes
@ -9704,7 +9663,7 @@ The start date for the Condition Era constructed from the individual instances o
<td style="text-align:left;width: 4in; ">
</td>
<td style="text-align:left;width: 1in; ">
datetime
date
</td>
<td style="text-align:left;width: 1in; ">
Yes
@ -9730,7 +9689,7 @@ The end date for the Condition Era constructed from the individual instances of
<td style="text-align:left;width: 4in; ">
</td>
<td style="text-align:left;width: 1in; ">
datetime
date
</td>
<td style="text-align:left;width: 1in; ">
Yes
@ -12724,7 +12683,7 @@ $(document).ready(function () {
$(document).ready(function () {
$('.tabset-dropdown > .nav-tabs > li').click(function () {
$(this).parent().toggleClass('nav-tabs-open')
$(this).parent().toggleClass('nav-tabs-open');
});
});
</script>
@ -12734,6 +12693,9 @@ $(document).ready(function () {
<script>
$(document).ready(function () {
// temporarily add toc-ignore selector to headers for the consistency with Pandoc
$('.unlisted.unnumbered').addClass('toc-ignore')
// move toc-ignore selectors from section div to header
$('div.section.toc-ignore')
.removeClass('toc-ignore')

View File

@ -13,13 +13,22 @@
<title>OMOP CDM v5.3.1</title>
<script src="site_libs/header-attrs-2.6/header-attrs.js"></script>
<script src="site_libs/jquery-1.11.3/jquery.min.js"></script>
<script src="site_libs/header-attrs-2.11/header-attrs.js"></script>
<script src="site_libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="site_libs/bootstrap-3.3.5/css/cosmo.min.css" rel="stylesheet" />
<script src="site_libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/respond.min.js"></script>
<style>h1 {font-size: 34px;}
h1.title {font-size: 38px;}
h2 {font-size: 30px;}
h3 {font-size: 24px;}
h4 {font-size: 18px;}
h5 {font-size: 16px;}
h6 {font-size: 12px;}
code {color: inherit; background-color: rgba(0, 0, 0, 0.04);}
pre:not([class]) { background-color: white }</style>
<script src="site_libs/jqueryui-1.11.4/jquery-ui.min.js"></script>
<link href="site_libs/tocify-1.9.1/jquery.tocify.css" rel="stylesheet" />
<script src="site_libs/tocify-1.9.1/jquery.tocify.js"></script>
@ -40,11 +49,6 @@
</style>
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
pre:not([class]) {
background-color: white;
}
</style>
<script type="text/javascript">
if (window.hljs) {
hljs.configure({languages: []});
@ -57,32 +61,6 @@ if (window.hljs) {
<style type="text/css">
h1 {
font-size: 34px;
}
h1.title {
font-size: 38px;
}
h2 {
font-size: 30px;
}
h3 {
font-size: 24px;
}
h4 {
font-size: 18px;
}
h5 {
font-size: 16px;
}
h6 {
font-size: 12px;
}
.table th:not([align]) {
text-align: left;
}
</style>
<link rel="stylesheet" href="style.css" type="text/css" />
@ -95,10 +73,6 @@ h6 {
margin-left: auto;
margin-right: auto;
}
code {
color: inherit;
background-color: rgba(0, 0, 0, 0.04);
}
img {
max-width:100%;
}
@ -114,40 +88,13 @@ button.code-folding-btn:focus {
summary {
display: list-item;
}
pre code {
padding: 0;
}
</style>
<style type="text/css">
/* padding for bootstrap navbar */
body {
padding-top: 51px;
padding-bottom: 40px;
}
/* offset scroll position for anchor links (for fixed navbar) */
.section h1 {
padding-top: 56px;
margin-top: -56px;
}
.section h2 {
padding-top: 56px;
margin-top: -56px;
}
.section h3 {
padding-top: 56px;
margin-top: -56px;
}
.section h4 {
padding-top: 56px;
margin-top: -56px;
}
.section h5 {
padding-top: 56px;
margin-top: -56px;
}
.section h6 {
padding-top: 56px;
margin-top: -56px;
}
.dropdown-submenu {
position: relative;
}
@ -175,7 +122,7 @@ body {
margin-right: -10px;
}
.dropdown-submenu:hover>a:after {
border-left-color: #ffffff;
border-left-color: #adb5bd;
}
.dropdown-submenu.pull-left {
float: none;
@ -187,7 +134,7 @@ body {
}
</style>
<script>
<script type="text/javascript">
// manage active state of menu based on current page
$(document).ready(function () {
// active menu anchor
@ -198,10 +145,23 @@ $(document).ready(function () {
var menuAnchor = $('a[href="' + href + '"]');
// mark it active
menuAnchor.parent().addClass('active');
menuAnchor.tab('show');
// if it's got a parent navbar menu mark it active as well
menuAnchor.closest('li.dropdown').addClass('active');
// Navbar adjustments
var navHeight = $(".navbar").first().height() + 15;
var style = document.createElement('style');
var pt = "padding-top: " + navHeight + "px; ";
var mt = "margin-top: -" + navHeight + "px; ";
var css = "";
// offset scroll position for anchor links (for fixed navbar)
for (var i = 1; i <= 6; i++) {
css += ".section h" + i + "{ " + pt + mt + "}\n";
}
style.innerHTML = "body {" + pt + "padding-bottom: 40px; }\n" + css;
document.head.appendChild(style);
});
</script>
@ -213,7 +173,6 @@ $(document).ready(function () {
max-height: 500px;
min-height: 44px;
overflow-y: auto;
background: white;
border: 1px solid #ddd;
border-radius: 4px;
}
@ -339,7 +298,7 @@ div.tocify {
<!-- setup 3col/9col grid for toc_float and main content -->
<div class="row-fluid">
<div class="row">
<div class="col-xs-12 col-sm-4 col-md-3">
<div id="TOC" class="tocify">
</div>
@ -364,13 +323,13 @@ div.tocify {
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fas fa-home"></span>
<span class="fa fa-home"></span>
</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-landmark"></span>
<span class="fa fa-landmark"></span>
Background
@ -390,7 +349,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-list-alt"></span>
<span class="fa fa-list-alt"></span>
Conventions
@ -410,7 +369,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-history"></span>
<span class="fa fa-history"></span>
CDM Versions
@ -441,7 +400,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-plus-square"></span>
<span class="fa fa-plus-square"></span>
Proposals
@ -463,7 +422,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-question"></span>
<span class="fa fa-question"></span>
How to
@ -483,7 +442,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-life-ring"></span>
<span class="fa fa-life-ring"></span>
Support
@ -505,7 +464,7 @@ div.tocify {
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/OHDSI/CommonDataModel">
<span class="fas fa-github"></span>
<span class="fa fa-github"></span>
</a>
</li>
@ -514,7 +473,7 @@ div.tocify {
</div><!--/.container -->
</div><!--/.navbar -->
<div class="fluid-row" id="header">
<div id="header">
@ -554,7 +513,7 @@ $(document).ready(function () {
$(document).ready(function () {
$('.tabset-dropdown > .nav-tabs > li').click(function () {
$(this).parent().toggleClass('nav-tabs-open')
$(this).parent().toggleClass('nav-tabs-open');
});
});
</script>
@ -564,6 +523,9 @@ $(document).ready(function () {
<script>
$(document).ready(function () {
// temporarily add toc-ignore selector to headers for the consistency with Pandoc
$('.unlisted.unnumbered').addClass('toc-ignore')
// move toc-ignore selectors from section div to header
$('div.section.toc-ignore')
.removeClass('toc-ignore')

View File

@ -13,13 +13,22 @@
<title>OMOP CDM v5.4</title>
<script src="site_libs/header-attrs-2.6/header-attrs.js"></script>
<script src="site_libs/jquery-1.11.3/jquery.min.js"></script>
<script src="site_libs/header-attrs-2.11/header-attrs.js"></script>
<script src="site_libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="site_libs/bootstrap-3.3.5/css/cosmo.min.css" rel="stylesheet" />
<script src="site_libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/respond.min.js"></script>
<style>h1 {font-size: 34px;}
h1.title {font-size: 38px;}
h2 {font-size: 30px;}
h3 {font-size: 24px;}
h4 {font-size: 18px;}
h5 {font-size: 16px;}
h6 {font-size: 12px;}
code {color: inherit; background-color: rgba(0, 0, 0, 0.04);}
pre:not([class]) { background-color: white }</style>
<script src="site_libs/jqueryui-1.11.4/jquery-ui.min.js"></script>
<link href="site_libs/tocify-1.9.1/jquery.tocify.css" rel="stylesheet" />
<script src="site_libs/tocify-1.9.1/jquery.tocify.js"></script>
@ -40,11 +49,6 @@
</style>
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
pre:not([class]) {
background-color: white;
}
</style>
<script type="text/javascript">
if (window.hljs) {
hljs.configure({languages: []});
@ -57,32 +61,6 @@ if (window.hljs) {
<style type="text/css">
h1 {
font-size: 34px;
}
h1.title {
font-size: 38px;
}
h2 {
font-size: 30px;
}
h3 {
font-size: 24px;
}
h4 {
font-size: 18px;
}
h5 {
font-size: 16px;
}
h6 {
font-size: 12px;
}
.table th:not([align]) {
text-align: left;
}
</style>
<link rel="stylesheet" href="style.css" type="text/css" />
@ -95,10 +73,6 @@ h6 {
margin-left: auto;
margin-right: auto;
}
code {
color: inherit;
background-color: rgba(0, 0, 0, 0.04);
}
img {
max-width:100%;
}
@ -114,40 +88,13 @@ button.code-folding-btn:focus {
summary {
display: list-item;
}
pre code {
padding: 0;
}
</style>
<style type="text/css">
/* padding for bootstrap navbar */
body {
padding-top: 51px;
padding-bottom: 40px;
}
/* offset scroll position for anchor links (for fixed navbar) */
.section h1 {
padding-top: 56px;
margin-top: -56px;
}
.section h2 {
padding-top: 56px;
margin-top: -56px;
}
.section h3 {
padding-top: 56px;
margin-top: -56px;
}
.section h4 {
padding-top: 56px;
margin-top: -56px;
}
.section h5 {
padding-top: 56px;
margin-top: -56px;
}
.section h6 {
padding-top: 56px;
margin-top: -56px;
}
.dropdown-submenu {
position: relative;
}
@ -175,7 +122,7 @@ body {
margin-right: -10px;
}
.dropdown-submenu:hover>a:after {
border-left-color: #ffffff;
border-left-color: #adb5bd;
}
.dropdown-submenu.pull-left {
float: none;
@ -187,7 +134,7 @@ body {
}
</style>
<script>
<script type="text/javascript">
// manage active state of menu based on current page
$(document).ready(function () {
// active menu anchor
@ -198,10 +145,23 @@ $(document).ready(function () {
var menuAnchor = $('a[href="' + href + '"]');
// mark it active
menuAnchor.parent().addClass('active');
menuAnchor.tab('show');
// if it's got a parent navbar menu mark it active as well
menuAnchor.closest('li.dropdown').addClass('active');
// Navbar adjustments
var navHeight = $(".navbar").first().height() + 15;
var style = document.createElement('style');
var pt = "padding-top: " + navHeight + "px; ";
var mt = "margin-top: -" + navHeight + "px; ";
var css = "";
// offset scroll position for anchor links (for fixed navbar)
for (var i = 1; i <= 6; i++) {
css += ".section h" + i + "{ " + pt + mt + "}\n";
}
style.innerHTML = "body {" + pt + "padding-bottom: 40px; }\n" + css;
document.head.appendChild(style);
});
</script>
@ -213,7 +173,6 @@ $(document).ready(function () {
max-height: 500px;
min-height: 44px;
overflow-y: auto;
background: white;
border: 1px solid #ddd;
border-radius: 4px;
}
@ -339,7 +298,7 @@ div.tocify {
<!-- setup 3col/9col grid for toc_float and main content -->
<div class="row-fluid">
<div class="row">
<div class="col-xs-12 col-sm-4 col-md-3">
<div id="TOC" class="tocify">
</div>
@ -364,13 +323,13 @@ div.tocify {
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fas fa-home"></span>
<span class="fa fa-home"></span>
</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-landmark"></span>
<span class="fa fa-landmark"></span>
Background
@ -390,7 +349,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-list-alt"></span>
<span class="fa fa-list-alt"></span>
Conventions
@ -410,7 +369,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-history"></span>
<span class="fa fa-history"></span>
CDM Versions
@ -441,7 +400,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-plus-square"></span>
<span class="fa fa-plus-square"></span>
Proposals
@ -463,7 +422,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-question"></span>
<span class="fa fa-question"></span>
How to
@ -483,7 +442,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-life-ring"></span>
<span class="fa fa-life-ring"></span>
Support
@ -505,7 +464,7 @@ div.tocify {
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/OHDSI/CommonDataModel">
<span class="fas fa-github"></span>
<span class="fa fa-github"></span>
</a>
</li>
@ -514,7 +473,7 @@ div.tocify {
</div><!--/.container -->
</div><!--/.navbar -->
<div class="fluid-row" id="header">
<div id="header">
@ -523,8 +482,80 @@ div.tocify {
</div>
<p>Below is the specification document for the OMOP Common Data Model, v5.4. <strong>This is the latest version of the OMOP CDM.</strong> Each table is represented with a high-level description and ETL conventions that should be followed. This is continued with a discussion of each field in each table, any conventions related to the field, and constraints that should be followed (like primary key, foreign key, etc). Should you have questions please feel free to visit the <a href="https://forums.ohdsi.org/">forums</a> or the <a href="https://github.com/ohdsi/CommonDataModel/issues">github issue</a> page.</p>
<p>This is the specification document for the OMOP Common Data Model, v5.4. <strong>This is the latest version of the OMOP CDM.</strong> Each table is represented with a high-level description and ETL conventions that should be followed. This is continued with a discussion of each field in each table, any conventions related to the field, and constraints that should be followed (like primary key, foreign key, etc). Should you have questions please feel free to visit the <a href="https://forums.ohdsi.org/">forums</a> or the <a href="https://github.com/ohdsi/CommonDataModel/issues">github issue</a> page.</p>
<div id="current-support-for-cdm-v5.4" class="section level3">
<h3>Current Support for CDM v5.4</h3>
<p>The table below details which OHDSI tools support CDM v5.4. There are two levels of support: legacy support means that the tool supports all tables and fields that were present in CDM v5.3 and feature support indicates that the tool supports any new tables and fields in CDM v5.4 that were not present in CDM v5.3. A green heart 💚 indicates that the support level for the listed tool is in place, has been tested, and released. A yellow heart 💛 indicates that the support level for the listed tool has been initiated but has not yet been tested and released. <br></p>
<table>
<colgroup>
<col width="25%" />
<col width="25%" />
<col width="25%" />
<col width="25%" />
</colgroup>
<thead>
<tr class="header">
<th><strong>Tool</strong></th>
<th><strong>Description</strong></th>
<th><strong>Legacy Support</strong></th>
<th><strong>Feature Support</strong></th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><strong>CDM R package</strong></td>
<td>This package can be downloaded from <a href="https://github.com/OHDSI/CommonDataModel/">https://github.com/OHDSI/CommonDataModel/</a>. It functions to dynamically create the OMOP CDM documentation and DDL scripts to instantiate the CDM tables.</td>
<td>💚</td>
<td>💚</td>
</tr>
<tr class="even">
<td><strong>Data Quality Dashboard</strong></td>
<td>This package can be downloaded from <a href="https://github.com/OHDSI/DataQualityDashboard">https://github.com/OHDSI/DataQualityDashboard</a>. It runs a set of &gt; 3500 data quality checks against an OMOP CDM instance and is required to be run on all databases prior to participating in an OHDSI network research study.</td>
<td>💚</td>
<td>💛</td>
</tr>
<tr class="odd">
<td><strong>Achilles</strong></td>
<td>This package can be downloaded from <a href="https://github.com/OHDSI/Achilles">https://github.com/OHDSI/Achilles</a>, performing a set of broad database characterizations agains an OMOP CDM instance.</td>
<td>💚</td>
<td>💛</td>
</tr>
<tr class="even">
<td><strong>ARES</strong></td>
<td>This package can be downloaded from <a href="https://github.com/OHDSI/Ares">https://github.com/OHDSI/Ares</a> and is designed to display the results from both the ACHILLES and DataQualityDashboard packages to support data quality and characterization research.</td>
<td>💚</td>
<td>💛</td>
</tr>
<tr class="odd">
<td><strong>ATLAS</strong></td>
<td>ATLAS is an open source software tool for researchers to conduct scientific analyses on standardized observational data. <a href="http://atlas-demo.ohdsi.org/">Demo</a></td>
<td>💚</td>
<td>💛</td>
</tr>
<tr class="even">
<td><strong>Rabbit-In-A-Hat</strong></td>
<td>This package can be downloaded from <a href="https://github.com/OHDSI/WhiteRabbit">https://github.com/OHDSI/WhiteRabbit</a> and is an application for interactive design of an ETL to the OMOP Common Data Model with the help of the the scan report generated by White Rabbit.</td>
<td>💚</td>
<td>💚</td>
</tr>
<tr class="odd">
<td><strong>Feature Extraction</strong></td>
<td>This package can be downloaded from <a href="https://github.com/OHDSI/FeatureExtraction">https://github.com/OHDSI/FeatureExtraction</a>. It is designed to generate features (covariates) for a cohort generated using the OMOP CDM.</td>
<td>💚</td>
<td>💚*</td>
</tr>
<tr class="even">
<td><strong>Cohort Diagnostics</strong></td>
<td>This package can be downloaded from <a href="https://github.com/OHDSI/CohortDiagnostics">https://github.com/OHDSI/CohortDiagnostics</a> and is used to critically evaluate cohort phenotypes.</td>
<td>💚</td>
<td>💛</td>
</tr>
</tbody>
</table>
<p><br> * The <strong>Feature Extraction</strong> package supports all relevant new features in CDM v5.4. For example, it was decided that, from a methodological perspective, the EPISODE and EPISODE_EVENT tables should not be included to define cohort covariates because the events that make up episodes are already pulled in as potential covariates.</p>
<p><br></p>
<p>Looking to send us a pull request for a bug fix? Please see the <a href="https://github.com/OHDSI/CommonDataModel#readme">readme</a> on the main github page.</p>
</div>
<div id="clinical-data-tables" class="section level2">
<h2><strong>Clinical Data Tables</strong></h2>
<div id="person" class="section level3 tabset tabset-pills">
@ -1222,7 +1253,7 @@ period_type_concept_id
This field can be used to determine the provenance of the Observation Period as in whether the period was determined from an insurance enrollment file, EHR healthcare encounters, or other sources.
</td>
<td style="text-align:left;width: 4in; ">
Choose the observation_period_type_concept_id that best represents how the period was determined. <a href="https://athena.ohdsi.org/search-terms/terms?domain=Type+Concept&amp;standardConcept=Standard&amp;page=1&amp;pageSize=15&amp;query=">Accepted Concepts</a>.
Choose the observation_period_type_concept_id that best represents how the period was determined. <a href="https://athena.ohdsi.org/search-terms/terms?domain=Type+Concept&amp;standardConcept=Standard&amp;page=1&amp;pageSize=15&amp;query=">Accepted Concepts</a>. A more detailed explanation of each Type Concept can be found on the <a href="https://github.com/OHDSI/Vocabulary-v5.0/wiki/Vocab.-TYPE_CONCEPT">vocabulary wiki</a>.
</td>
<td style="text-align:left;width: 1in; ">
integer
@ -1498,7 +1529,7 @@ visit_type_concept_id
Use this field to understand the provenance of the visit record, or where the record comes from.
</td>
<td style="text-align:left;width: 4in; ">
Populate this field based on the provenance of the visit record, as in whether it came from an EHR record or billing claim. <a href="https://athena.ohdsi.org/search-terms/terms?domain=Type+Concept&amp;standardConcept=Standard&amp;page=1&amp;pageSize=15&amp;query=">Accepted Concepts</a>.
Populate this field based on the provenance of the visit record, as in whether it came from an EHR record or billing claim. <a href="https://athena.ohdsi.org/search-terms/terms?domain=Type+Concept&amp;standardConcept=Standard&amp;page=1&amp;pageSize=15&amp;query=">Accepted Concepts</a>. A more detailed explanation of each Type Concept can be found on the <a href="https://github.com/OHDSI/Vocabulary-v5.0/wiki/Vocab.-TYPE_CONCEPT">vocabulary wiki</a>.
</td>
<td style="text-align:left;width: 1in; ">
Integer
@ -2008,7 +2039,7 @@ visit_detail_type_concept_id
Use this field to understand the provenance of the visit detail record, or where the record comes from.
</td>
<td style="text-align:left;width: 4in; ">
Populate this field based on the provenance of the visit detail record, as in whether it came from an EHR record or billing claim. <a href="https://athena.ohdsi.org/search-terms/terms?domain=Type+Concept&amp;standardConcept=Standard&amp;page=1&amp;pageSize=15&amp;query=">Accepted Concepts</a>.
Populate this field based on the provenance of the visit detail record, as in whether it came from an EHR record or billing claim. <a href="https://athena.ohdsi.org/search-terms/terms?domain=Type+Concept&amp;standardConcept=Standard&amp;page=1&amp;pageSize=15&amp;query=">Accepted Concepts</a>. A more detailed explanation of each Type Concept can be found on the <a href="https://github.com/OHDSI/Vocabulary-v5.0/wiki/Vocab.-TYPE_CONCEPT">vocabulary wiki</a>.
</td>
<td style="text-align:left;width: 1in; ">
integer
@ -2574,7 +2605,7 @@ condition_type_concept_id
This field can be used to determine the provenance of the Condition record, as in whether the condition was from an EHR system, insurance claim, registry, or other sources.
</td>
<td style="text-align:left;width: 4in; ">
Choose the CONDITION_TYPE_CONCEPT_ID that best represents the provenance of the record. <a href="https://athena.ohdsi.org/search-terms/terms?domain=Type+Concept&amp;standardConcept=Standard&amp;page=1&amp;pageSize=15&amp;query=">Accepted Concepts</a>.
Choose the CONDITION_TYPE_CONCEPT_ID that best represents the provenance of the record. <a href="https://athena.ohdsi.org/search-terms/terms?domain=Type+Concept&amp;standardConcept=Standard&amp;page=1&amp;pageSize=15&amp;query=">Accepted Concepts</a>. A more detailed explanation of each Type Concept can be found on the <a href="https://github.com/OHDSI/Vocabulary-v5.0/wiki/Vocab.-TYPE_CONCEPT">vocabulary wiki</a>.
</td>
<td style="text-align:left;width: 1in; ">
integer
@ -3085,7 +3116,7 @@ drug_type_concept_id
You can use the TYPE_CONCEPT_ID to delineate between prescriptions written vs. prescriptions dispensed vs. medication history vs. patient-reported exposure, etc.
</td>
<td style="text-align:left;width: 4in; ">
Choose the drug_type_concept_id that best represents the provenance of the record, for example whether it came from a record of a prescription written or physician administered drug. <a href="https://athena.ohdsi.org/search-terms/terms?domain=Type+Concept&amp;standardConcept=Standard&amp;page=1&amp;pageSize=15&amp;query=">Accepted Concepts</a>.
Choose the drug_type_concept_id that best represents the provenance of the record, for example whether it came from a record of a prescription written or physician administered drug. <a href="https://athena.ohdsi.org/search-terms/terms?domain=Type+Concept&amp;standardConcept=Standard&amp;page=1&amp;pageSize=15&amp;query=">Accepted Concepts</a>. A more detailed explanation of each Type Concept can be found on the <a href="https://github.com/OHDSI/Vocabulary-v5.0/wiki/Vocab.-TYPE_CONCEPT">vocabulary wiki</a>.
</td>
<td style="text-align:left;width: 1in; ">
integer
@ -3726,7 +3757,7 @@ procedure_type_concept_id
This field can be used to determine the provenance of the Procedure record, as in whether the procedure was from an EHR system, insurance claim, registry, or other sources.
</td>
<td style="text-align:left;width: 4in; ">
Choose the PROCEDURE_TYPE_CONCEPT_ID that best represents the provenance of the record, for example whether it came from an EHR record or billing claim. If a procedure is recorded as an EHR encounter, the PROCEDURE_TYPE_CONCEPT would be EHR encounter record. <a href="https://athena.ohdsi.org/search-terms/terms?domain=Type+Concept&amp;standardConcept=Standard&amp;page=1&amp;pageSize=15&amp;query=">Accepted Concepts</a>.
Choose the PROCEDURE_TYPE_CONCEPT_ID that best represents the provenance of the record, for example whether it came from an EHR record or billing claim. If a procedure is recorded as an EHR encounter, the PROCEDURE_TYPE_CONCEPT would be EHR encounter record. <a href="https://athena.ohdsi.org/search-terms/terms?domain=Type+Concept&amp;standardConcept=Standard&amp;page=1&amp;pageSize=15&amp;query=">Accepted Concepts</a>. A more detailed explanation of each Type Concept can be found on the <a href="https://github.com/OHDSI/Vocabulary-v5.0/wiki/Vocab.-TYPE_CONCEPT">vocabulary wiki</a>.
</td>
<td style="text-align:left;width: 1in; ">
integer
@ -4207,7 +4238,7 @@ device_type_concept_id
You can use the TYPE_CONCEPT_ID to denote the provenance of the record, as in whether the record is from administrative claims or EHR.
</td>
<td style="text-align:left;width: 4in; ">
Choose the drug_type_concept_id that best represents the provenance of the record, for example whether it came from a record of a prescription written or physician administered drug. <a href="https://athena.ohdsi.org/search-terms/terms?domain=Type+Concept&amp;standardConcept=Standard&amp;page=1&amp;pageSize=15&amp;query=">Accepted Concepts</a>.
Choose the drug_type_concept_id that best represents the provenance of the record, for example whether it came from a record of a prescription written or physician administered drug. <a href="https://athena.ohdsi.org/search-terms/terms?domain=Type+Concept&amp;standardConcept=Standard&amp;page=1&amp;pageSize=15&amp;query=">Accepted Concepts</a>. A more detailed explanation of each Type Concept can be found on the <a href="https://github.com/OHDSI/Vocabulary-v5.0/wiki/Vocab.-TYPE_CONCEPT">vocabulary wiki</a>.
</td>
<td style="text-align:left;width: 1in; ">
integer
@ -4743,7 +4774,7 @@ measurement_type_concept_id
This field can be used to determine the provenance of the Measurement record, as in whether the measurement was from an EHR system, insurance claim, registry, or other sources.
</td>
<td style="text-align:left;width: 4in; ">
Choose the MEASUREMENT_TYPE_CONCEPT_ID that best represents the provenance of the record, for example whether it came from an EHR record or billing claim. <a href="https://athena.ohdsi.org/search-terms/terms?domain=Type+Concept&amp;standardConcept=Standard&amp;page=1&amp;pageSize=15&amp;query=">Accepted Concepts</a>.
Choose the MEASUREMENT_TYPE_CONCEPT_ID that best represents the provenance of the record, for example whether it came from an EHR record or billing claim. <a href="https://athena.ohdsi.org/search-terms/terms?domain=Type+Concept&amp;standardConcept=Standard&amp;page=1&amp;pageSize=15&amp;query=">Accepted Concepts</a>. A more detailed explanation of each Type Concept can be found on the <a href="https://github.com/OHDSI/Vocabulary-v5.0/wiki/Vocab.-TYPE_CONCEPT">vocabulary wiki</a>.
</td>
<td style="text-align:left;width: 1in; ">
integer
@ -5162,7 +5193,7 @@ If the Measurement record is related to another record in the database, this fie
Put the primary key of the linked record, if applicable, here.
</td>
<td style="text-align:left;width: 1in; ">
bigint
integer
</td>
<td style="text-align:left;width: 1in; ">
No
@ -5393,7 +5424,7 @@ observation_type_concept_id
This field can be used to determine the provenance of the Observation record, as in whether the measurement was from an EHR system, insurance claim, registry, or other sources.
</td>
<td style="text-align:left;width: 4in; ">
Choose the OBSERVATION_TYPE_CONCEPT_ID that best represents the provenance of the record, for example whether it came from an EHR record or billing claim. <a href="https://athena.ohdsi.org/search-terms/terms?domain=Type+Concept&amp;standardConcept=Standard&amp;page=1&amp;pageSize=15&amp;query=">Accepted Concepts</a>.
Choose the OBSERVATION_TYPE_CONCEPT_ID that best represents the provenance of the record, for example whether it came from an EHR record or billing claim. <a href="https://athena.ohdsi.org/search-terms/terms?domain=Type+Concept&amp;standardConcept=Standard&amp;page=1&amp;pageSize=15&amp;query=">Accepted Concepts</a>. A more detailed explanation of each Type Concept can be found on the <a href="https://github.com/OHDSI/Vocabulary-v5.0/wiki/Vocab.-TYPE_CONCEPT">vocabulary wiki</a>.
</td>
<td style="text-align:left;width: 1in; ">
integer
@ -5782,7 +5813,7 @@ If the Observation record is related to another record in the database, this fie
Put the primary key of the linked record, if applicable, here. See the <a href="https://ohdsi.github.io/CommonDataModel/cdm60.html#observation">ETL Conventions for the OBSERVATION</a> table for more details.
</td>
<td style="text-align:left;width: 1in; ">
bigint
integer
</td>
<td style="text-align:left;width: 1in; ">
No
@ -5953,7 +5984,7 @@ death_type_concept_id
This is the provenance of the death record, i.e., where it came from. It is possible that an administrative claims database would source death information from a government file so do not assume the Death Type is the same as the Visit Type, etc.
</td>
<td style="text-align:left;width: 4in; ">
Use the type concept that be reflects the source of the death record. <a href="https://athena.ohdsi.org/search-terms/terms?domain=Type+Concept&amp;standardConcept=Standard&amp;page=1&amp;pageSize=15&amp;query=">Accepted Concepts</a>.
Use the type concept that be reflects the source of the death record. <a href="https://athena.ohdsi.org/search-terms/terms?domain=Type+Concept&amp;standardConcept=Standard&amp;page=1&amp;pageSize=15&amp;query=">Accepted Concepts</a>. A more detailed explanation of each Type Concept can be found on the <a href="https://github.com/OHDSI/Vocabulary-v5.0/wiki/Vocab.-TYPE_CONCEPT">vocabulary wiki</a>.
</td>
<td style="text-align:left;width: 1in; ">
integer
@ -6217,7 +6248,7 @@ note_type_concept_id
The provenance of the note. Most likely this will be EHR.
</td>
<td style="text-align:left;width: 4in; ">
Put the source system of the note, as in EHR record. <a href="https://athena.ohdsi.org/search-terms/terms?standardConcept=Standard&amp;domain=Type+Concept&amp;page=1&amp;pageSize=15&amp;query=">Accepted Concepts</a>.
Put the source system of the note, as in EHR record. <a href="https://athena.ohdsi.org/search-terms/terms?standardConcept=Standard&amp;domain=Type+Concept&amp;page=1&amp;pageSize=15&amp;query=">Accepted Concepts</a>. A more detailed explanation of each Type Concept can be found on the <a href="https://github.com/OHDSI/Vocabulary-v5.0/wiki/Vocab.-TYPE_CONCEPT">vocabulary wiki</a>.
</td>
<td style="text-align:left;width: 1in; ">
integer
@ -6493,7 +6524,7 @@ If the Note record is related to another record in the database, this field is t
Put the primary key of the linked record, if applicable, here.
</td>
<td style="text-align:left;width: 1in; ">
bigint
integer
</td>
<td style="text-align:left;width: 1in; ">
No
@ -7071,7 +7102,7 @@ specimen_type_concept_id
<td style="text-align:left;width: 3in; ">
</td>
<td style="text-align:left;width: 4in; ">
Put the source of the specimen record, as in an EHR system. <a href="https://athena.ohdsi.org/search-terms/terms?standardConcept=Standard&amp;domain=Type+Concept&amp;page=1&amp;pageSize=15&amp;query=">Accepted Concepts</a>.
Put the source of the specimen record, as in an EHR system. <a href="https://athena.ohdsi.org/search-terms/terms?standardConcept=Standard&amp;domain=Type+Concept&amp;page=1&amp;pageSize=15&amp;query=">Accepted Concepts</a>. A more detailed explanation of each Type Concept can be found on the <a href="https://github.com/OHDSI/Vocabulary-v5.0/wiki/Vocab.-TYPE_CONCEPT">vocabulary wiki</a>.
</td>
<td style="text-align:left;width: 1in; ">
integer
@ -7956,7 +7987,7 @@ care_site_id
<td style="text-align:left;width: 3in; ">
</td>
<td style="text-align:left;width: 4in; ">
Assign an id to each unique combination of location_id and place_of_service_source_value
Assign an ID to each combination of a location and nature of the site - the latter could be the Place of Service, name or another characteristic in your source data.
</td>
<td style="text-align:left;width: 1in; ">
integer
@ -9741,7 +9772,7 @@ drug_era_start_date
The Drug Era Start Date is the start date of the first Drug Exposure for a given ingredient, with at least 31 days since the previous exposure.
</td>
<td style="text-align:left;width: 1in; ">
datetime
date
</td>
<td style="text-align:left;width: 1in; ">
Yes
@ -9767,7 +9798,7 @@ drug_era_end_date
The Drug Era End Date is the end date of the last Drug Exposure. The End Date of each Drug Exposure is either taken from the field drug_exposure_end_date or, as it is typically not available, inferred using the following rules: For pharmacy prescription data, the date when the drug was dispensed plus the number of days of supply are used to extrapolate the End Date for the Drug Exposure. Depending on the country-specific healthcare system, this supply information is either explicitly provided in the day_supply field or inferred from package size or similar information. For Procedure Drugs, usually the drug is administered on a single date (i.e., the administration date). A standard Persistence Window of 30 days (gap, slack) is permitted between two subsequent such extrapolated DRUG_EXPOSURE records to be considered to be merged into a single Drug Era.
</td>
<td style="text-align:left;width: 1in; ">
datetime
date
</td>
<td style="text-align:left;width: 1in; ">
Yes
@ -10019,7 +10050,7 @@ The date the Person started on the specific dosage, with at least 31 days since
<td style="text-align:left;width: 4in; ">
</td>
<td style="text-align:left;width: 1in; ">
datetime
date
</td>
<td style="text-align:left;width: 1in; ">
Yes
@ -10045,7 +10076,7 @@ dose_era_end_date
The date the Person was no longer exposed to the dosage of the specific drug ingredient. An era is ended if there are 31 days or more between dosage records.
</td>
<td style="text-align:left;width: 1in; ">
datetime
date
</td>
<td style="text-align:left;width: 1in; ">
Yes
@ -10196,7 +10227,7 @@ The start date for the Condition Era constructed from the individual instances o
<td style="text-align:left;width: 4in; ">
</td>
<td style="text-align:left;width: 1in; ">
datetime
date
</td>
<td style="text-align:left;width: 1in; ">
Yes
@ -10222,7 +10253,7 @@ The end date for the Condition Era constructed from the individual instances of
<td style="text-align:left;width: 4in; ">
</td>
<td style="text-align:left;width: 1in; ">
datetime
date
</td>
<td style="text-align:left;width: 1in; ">
Yes
@ -10316,7 +10347,7 @@ A unique identifier for each Episode.
<td style="text-align:left;width: 4in; ">
</td>
<td style="text-align:left;width: 1in; ">
bigint
integer
</td>
<td style="text-align:left;width: 1in; ">
Yes
@ -10342,7 +10373,7 @@ The PERSON_ID of the PERSON for whom the episode is recorded.
<td style="text-align:left;width: 4in; ">
</td>
<td style="text-align:left;width: 1in; ">
bigint
integer
</td>
<td style="text-align:left;width: 1in; ">
Yes
@ -10505,7 +10536,7 @@ Use this field to find the Episode that subsumes the given Episode record. This
If there are multiple nested levels to how Episodes are represented, the EPISODE_PARENT_ID can be used to record this relationship.
</td>
<td style="text-align:left;width: 1in; ">
bigint
integer
</td>
<td style="text-align:left;width: 1in; ">
No
@ -10585,7 +10616,7 @@ episode_type_concept_id
This field can be used to determine the provenance of the Episode record, as in whether the episode was from an EHR system, insurance claim, registry, or other sources.
</td>
<td style="text-align:left;width: 4in; ">
Choose the EPISODE_TYPE_CONCEPT_ID that best represents the provenance of the record. <a href="https://athena.ohdsi.org/search-terms/terms?domain=Type+Concept&amp;standardConcept=Standard&amp;page=1&amp;pageSize=15&amp;query=">Accepted Concepts</a>.
Choose the EPISODE_TYPE_CONCEPT_ID that best represents the provenance of the record. <a href="https://athena.ohdsi.org/search-terms/terms?domain=Type+Concept&amp;standardConcept=Standard&amp;page=1&amp;pageSize=15&amp;query=">Accepted Concepts</a>. A more detailed explanation of each Type Concept can be found on the <a href="https://github.com/OHDSI/Vocabulary-v5.0/wiki/Vocab.-TYPE_CONCEPT">vocabulary wiki</a>.
</td>
<td style="text-align:left;width: 1in; ">
integer
@ -10715,7 +10746,7 @@ Use this field to link the EPISODE_EVENT record to its EPISODE.
Put the EPISODE_ID that subsumes the EPISODE_EVENT record here.
</td>
<td style="text-align:left;width: 1in; ">
bigint
integer
</td>
<td style="text-align:left;width: 1in; ">
Yes
@ -10743,7 +10774,7 @@ This field is the primary key of the linked record in the database. For example,
Put the primary key of the linked record here.
</td>
<td style="text-align:left;width: 1in; ">
bigint
integer
</td>
<td style="text-align:left;width: 1in; ">
Yes
@ -11342,6 +11373,7 @@ cdm_version_concept_id
The Concept Id representing the version of the CDM.
</td>
<td style="text-align:left;width: 4in; ">
You can find all concepts that represent the CDM versions using the query: SELECT * FROM CONCEPT WHERE VOCABULARY_ID = CDM AND CONCEPT_CLASS = CDM
</td>
<td style="text-align:left;width: 1in; ">
integer
@ -11368,6 +11400,7 @@ vocabulary_version
<td style="text-align:left;width: 3in; ">
</td>
<td style="text-align:left;width: 4in; ">
You can find the version of your Vocabulary using the query: SELECT vocabulary_version from vocabulary where vocabulary_id = None
</td>
<td style="text-align:left;width: 1in; ">
varchar(20)
@ -13597,10 +13630,9 @@ Yes
No
</td>
<td style="text-align:left;width: 1in; ">
Yes
No
</td>
<td style="text-align:left;width: 1in; ">
COHORT
</td>
<td style="text-align:left;width: 1in; ">
</td>
@ -13797,7 +13829,7 @@ $(document).ready(function () {
$(document).ready(function () {
$('.tabset-dropdown > .nav-tabs > li').click(function () {
$(this).parent().toggleClass('nav-tabs-open')
$(this).parent().toggleClass('nav-tabs-open');
});
});
</script>
@ -13807,6 +13839,9 @@ $(document).ready(function () {
<script>
$(document).ready(function () {
// temporarily add toc-ignore selector to headers for the consistency with Pandoc
$('.unlisted.unnumbered').addClass('toc-ignore')
// move toc-ignore selectors from section div to header
$('div.section.toc-ignore')
.removeClass('toc-ignore')

View File

@ -13,13 +13,22 @@
<title>Changes by Table</title>
<script src="site_libs/header-attrs-2.6/header-attrs.js"></script>
<script src="site_libs/jquery-1.11.3/jquery.min.js"></script>
<script src="site_libs/header-attrs-2.11/header-attrs.js"></script>
<script src="site_libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="site_libs/bootstrap-3.3.5/css/cosmo.min.css" rel="stylesheet" />
<script src="site_libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/respond.min.js"></script>
<style>h1 {font-size: 34px;}
h1.title {font-size: 38px;}
h2 {font-size: 30px;}
h3 {font-size: 24px;}
h4 {font-size: 18px;}
h5 {font-size: 16px;}
h6 {font-size: 12px;}
code {color: inherit; background-color: rgba(0, 0, 0, 0.04);}
pre:not([class]) { background-color: white }</style>
<script src="site_libs/jqueryui-1.11.4/jquery-ui.min.js"></script>
<link href="site_libs/tocify-1.9.1/jquery.tocify.css" rel="stylesheet" />
<script src="site_libs/tocify-1.9.1/jquery.tocify.js"></script>
@ -40,11 +49,6 @@
</style>
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
pre:not([class]) {
background-color: white;
}
</style>
<script type="text/javascript">
if (window.hljs) {
hljs.configure({languages: []});
@ -57,32 +61,6 @@ if (window.hljs) {
<style type="text/css">
h1 {
font-size: 34px;
}
h1.title {
font-size: 38px;
}
h2 {
font-size: 30px;
}
h3 {
font-size: 24px;
}
h4 {
font-size: 18px;
}
h5 {
font-size: 16px;
}
h6 {
font-size: 12px;
}
.table th:not([align]) {
text-align: left;
}
</style>
<link rel="stylesheet" href="style.css" type="text/css" />
@ -95,10 +73,6 @@ h6 {
margin-left: auto;
margin-right: auto;
}
code {
color: inherit;
background-color: rgba(0, 0, 0, 0.04);
}
img {
max-width:100%;
}
@ -114,40 +88,13 @@ button.code-folding-btn:focus {
summary {
display: list-item;
}
pre code {
padding: 0;
}
</style>
<style type="text/css">
/* padding for bootstrap navbar */
body {
padding-top: 51px;
padding-bottom: 40px;
}
/* offset scroll position for anchor links (for fixed navbar) */
.section h1 {
padding-top: 56px;
margin-top: -56px;
}
.section h2 {
padding-top: 56px;
margin-top: -56px;
}
.section h3 {
padding-top: 56px;
margin-top: -56px;
}
.section h4 {
padding-top: 56px;
margin-top: -56px;
}
.section h5 {
padding-top: 56px;
margin-top: -56px;
}
.section h6 {
padding-top: 56px;
margin-top: -56px;
}
.dropdown-submenu {
position: relative;
}
@ -175,7 +122,7 @@ body {
margin-right: -10px;
}
.dropdown-submenu:hover>a:after {
border-left-color: #ffffff;
border-left-color: #adb5bd;
}
.dropdown-submenu.pull-left {
float: none;
@ -187,7 +134,7 @@ body {
}
</style>
<script>
<script type="text/javascript">
// manage active state of menu based on current page
$(document).ready(function () {
// active menu anchor
@ -198,10 +145,23 @@ $(document).ready(function () {
var menuAnchor = $('a[href="' + href + '"]');
// mark it active
menuAnchor.parent().addClass('active');
menuAnchor.tab('show');
// if it's got a parent navbar menu mark it active as well
menuAnchor.closest('li.dropdown').addClass('active');
// Navbar adjustments
var navHeight = $(".navbar").first().height() + 15;
var style = document.createElement('style');
var pt = "padding-top: " + navHeight + "px; ";
var mt = "margin-top: -" + navHeight + "px; ";
var css = "";
// offset scroll position for anchor links (for fixed navbar)
for (var i = 1; i <= 6; i++) {
css += ".section h" + i + "{ " + pt + mt + "}\n";
}
style.innerHTML = "body {" + pt + "padding-bottom: 40px; }\n" + css;
document.head.appendChild(style);
});
</script>
@ -213,7 +173,6 @@ $(document).ready(function () {
max-height: 500px;
min-height: 44px;
overflow-y: auto;
background: white;
border: 1px solid #ddd;
border-radius: 4px;
}
@ -339,7 +298,7 @@ div.tocify {
<!-- setup 3col/9col grid for toc_float and main content -->
<div class="row-fluid">
<div class="row">
<div class="col-xs-12 col-sm-4 col-md-3">
<div id="TOC" class="tocify">
</div>
@ -364,13 +323,13 @@ div.tocify {
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fas fa-home"></span>
<span class="fa fa-home"></span>
</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-landmark"></span>
<span class="fa fa-landmark"></span>
Background
@ -390,7 +349,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-list-alt"></span>
<span class="fa fa-list-alt"></span>
Conventions
@ -410,7 +369,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-history"></span>
<span class="fa fa-history"></span>
CDM Versions
@ -441,7 +400,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-plus-square"></span>
<span class="fa fa-plus-square"></span>
Proposals
@ -463,7 +422,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-question"></span>
<span class="fa fa-question"></span>
How to
@ -483,7 +442,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-life-ring"></span>
<span class="fa fa-life-ring"></span>
Support
@ -505,7 +464,7 @@ div.tocify {
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/OHDSI/CommonDataModel">
<span class="fas fa-github"></span>
<span class="fa fa-github"></span>
</a>
</li>
@ -514,7 +473,7 @@ div.tocify {
</div><!--/.container -->
</div><!--/.navbar -->
<div class="fluid-row" id="header">
<div id="header">
@ -891,7 +850,7 @@ $(document).ready(function () {
$(document).ready(function () {
$('.tabset-dropdown > .nav-tabs > li').click(function () {
$(this).parent().toggleClass('nav-tabs-open')
$(this).parent().toggleClass('nav-tabs-open');
});
});
</script>
@ -901,6 +860,9 @@ $(document).ready(function () {
<script>
$(document).ready(function () {
// temporarily add toc-ignore selector to headers for the consistency with Pandoc
$('.unlisted.unnumbered').addClass('toc-ignore')
// move toc-ignore selectors from section div to header
$('div.section.toc-ignore')
.removeClass('toc-ignore')

View File

@ -13,13 +13,22 @@
<title>OMOP CDM v6.0</title>
<script src="site_libs/header-attrs-2.6/header-attrs.js"></script>
<script src="site_libs/jquery-1.11.3/jquery.min.js"></script>
<script src="site_libs/header-attrs-2.11/header-attrs.js"></script>
<script src="site_libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="site_libs/bootstrap-3.3.5/css/cosmo.min.css" rel="stylesheet" />
<script src="site_libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/respond.min.js"></script>
<style>h1 {font-size: 34px;}
h1.title {font-size: 38px;}
h2 {font-size: 30px;}
h3 {font-size: 24px;}
h4 {font-size: 18px;}
h5 {font-size: 16px;}
h6 {font-size: 12px;}
code {color: inherit; background-color: rgba(0, 0, 0, 0.04);}
pre:not([class]) { background-color: white }</style>
<script src="site_libs/jqueryui-1.11.4/jquery-ui.min.js"></script>
<link href="site_libs/tocify-1.9.1/jquery.tocify.css" rel="stylesheet" />
<script src="site_libs/tocify-1.9.1/jquery.tocify.js"></script>
@ -40,11 +49,6 @@
</style>
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
pre:not([class]) {
background-color: white;
}
</style>
<script type="text/javascript">
if (window.hljs) {
hljs.configure({languages: []});
@ -57,32 +61,6 @@ if (window.hljs) {
<style type="text/css">
h1 {
font-size: 34px;
}
h1.title {
font-size: 38px;
}
h2 {
font-size: 30px;
}
h3 {
font-size: 24px;
}
h4 {
font-size: 18px;
}
h5 {
font-size: 16px;
}
h6 {
font-size: 12px;
}
.table th:not([align]) {
text-align: left;
}
</style>
<link rel="stylesheet" href="style.css" type="text/css" />
@ -95,10 +73,6 @@ h6 {
margin-left: auto;
margin-right: auto;
}
code {
color: inherit;
background-color: rgba(0, 0, 0, 0.04);
}
img {
max-width:100%;
}
@ -114,40 +88,13 @@ button.code-folding-btn:focus {
summary {
display: list-item;
}
pre code {
padding: 0;
}
</style>
<style type="text/css">
/* padding for bootstrap navbar */
body {
padding-top: 51px;
padding-bottom: 40px;
}
/* offset scroll position for anchor links (for fixed navbar) */
.section h1 {
padding-top: 56px;
margin-top: -56px;
}
.section h2 {
padding-top: 56px;
margin-top: -56px;
}
.section h3 {
padding-top: 56px;
margin-top: -56px;
}
.section h4 {
padding-top: 56px;
margin-top: -56px;
}
.section h5 {
padding-top: 56px;
margin-top: -56px;
}
.section h6 {
padding-top: 56px;
margin-top: -56px;
}
.dropdown-submenu {
position: relative;
}
@ -175,7 +122,7 @@ body {
margin-right: -10px;
}
.dropdown-submenu:hover>a:after {
border-left-color: #ffffff;
border-left-color: #adb5bd;
}
.dropdown-submenu.pull-left {
float: none;
@ -187,7 +134,7 @@ body {
}
</style>
<script>
<script type="text/javascript">
// manage active state of menu based on current page
$(document).ready(function () {
// active menu anchor
@ -198,10 +145,23 @@ $(document).ready(function () {
var menuAnchor = $('a[href="' + href + '"]');
// mark it active
menuAnchor.parent().addClass('active');
menuAnchor.tab('show');
// if it's got a parent navbar menu mark it active as well
menuAnchor.closest('li.dropdown').addClass('active');
// Navbar adjustments
var navHeight = $(".navbar").first().height() + 15;
var style = document.createElement('style');
var pt = "padding-top: " + navHeight + "px; ";
var mt = "margin-top: -" + navHeight + "px; ";
var css = "";
// offset scroll position for anchor links (for fixed navbar)
for (var i = 1; i <= 6; i++) {
css += ".section h" + i + "{ " + pt + mt + "}\n";
}
style.innerHTML = "body {" + pt + "padding-bottom: 40px; }\n" + css;
document.head.appendChild(style);
});
</script>
@ -213,7 +173,6 @@ $(document).ready(function () {
max-height: 500px;
min-height: 44px;
overflow-y: auto;
background: white;
border: 1px solid #ddd;
border-radius: 4px;
}
@ -339,7 +298,7 @@ div.tocify {
<!-- setup 3col/9col grid for toc_float and main content -->
<div class="row-fluid">
<div class="row">
<div class="col-xs-12 col-sm-4 col-md-3">
<div id="TOC" class="tocify">
</div>
@ -364,13 +323,13 @@ div.tocify {
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fas fa-home"></span>
<span class="fa fa-home"></span>
</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-landmark"></span>
<span class="fa fa-landmark"></span>
Background
@ -390,7 +349,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-list-alt"></span>
<span class="fa fa-list-alt"></span>
Conventions
@ -410,7 +369,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-history"></span>
<span class="fa fa-history"></span>
CDM Versions
@ -441,7 +400,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-plus-square"></span>
<span class="fa fa-plus-square"></span>
Proposals
@ -463,7 +422,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-question"></span>
<span class="fa fa-question"></span>
How to
@ -483,7 +442,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-life-ring"></span>
<span class="fa fa-life-ring"></span>
Support
@ -505,7 +464,7 @@ div.tocify {
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/OHDSI/CommonDataModel">
<span class="fas fa-github"></span>
<span class="fa fa-github"></span>
</a>
</li>
@ -514,7 +473,7 @@ div.tocify {
</div><!--/.container -->
</div><!--/.navbar -->
<div class="fluid-row" id="header">
<div id="header">
@ -13601,7 +13560,7 @@ $(document).ready(function () {
$(document).ready(function () {
$('.tabset-dropdown > .nav-tabs > li').click(function () {
$(this).parent().toggleClass('nav-tabs-open')
$(this).parent().toggleClass('nav-tabs-open');
});
});
</script>
@ -13611,6 +13570,9 @@ $(document).ready(function () {
<script>
$(document).ready(function () {
// temporarily add toc-ignore selector to headers for the consistency with Pandoc
$('.unlisted.unnumbered').addClass('toc-ignore')
// move toc-ignore selectors from section div to header
$('div.section.toc-ignore')
.removeClass('toc-ignore')

View File

@ -13,13 +13,22 @@
<title>Preserving Privacy in an OMOP CDM Implementation</title>
<script src="site_libs/header-attrs-2.6/header-attrs.js"></script>
<script src="site_libs/jquery-1.11.3/jquery.min.js"></script>
<script src="site_libs/header-attrs-2.11/header-attrs.js"></script>
<script src="site_libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="site_libs/bootstrap-3.3.5/css/cosmo.min.css" rel="stylesheet" />
<script src="site_libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/respond.min.js"></script>
<style>h1 {font-size: 34px;}
h1.title {font-size: 38px;}
h2 {font-size: 30px;}
h3 {font-size: 24px;}
h4 {font-size: 18px;}
h5 {font-size: 16px;}
h6 {font-size: 12px;}
code {color: inherit; background-color: rgba(0, 0, 0, 0.04);}
pre:not([class]) { background-color: white }</style>
<script src="site_libs/jqueryui-1.11.4/jquery-ui.min.js"></script>
<link href="site_libs/tocify-1.9.1/jquery.tocify.css" rel="stylesheet" />
<script src="site_libs/tocify-1.9.1/jquery.tocify.js"></script>
@ -40,11 +49,6 @@
</style>
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
pre:not([class]) {
background-color: white;
}
</style>
<script type="text/javascript">
if (window.hljs) {
hljs.configure({languages: []});
@ -57,32 +61,6 @@ if (window.hljs) {
<style type="text/css">
h1 {
font-size: 34px;
}
h1.title {
font-size: 38px;
}
h2 {
font-size: 30px;
}
h3 {
font-size: 24px;
}
h4 {
font-size: 18px;
}
h5 {
font-size: 16px;
}
h6 {
font-size: 12px;
}
.table th:not([align]) {
text-align: left;
}
</style>
<link rel="stylesheet" href="style.css" type="text/css" />
@ -95,10 +73,6 @@ h6 {
margin-left: auto;
margin-right: auto;
}
code {
color: inherit;
background-color: rgba(0, 0, 0, 0.04);
}
img {
max-width:100%;
}
@ -114,40 +88,13 @@ button.code-folding-btn:focus {
summary {
display: list-item;
}
pre code {
padding: 0;
}
</style>
<style type="text/css">
/* padding for bootstrap navbar */
body {
padding-top: 51px;
padding-bottom: 40px;
}
/* offset scroll position for anchor links (for fixed navbar) */
.section h1 {
padding-top: 56px;
margin-top: -56px;
}
.section h2 {
padding-top: 56px;
margin-top: -56px;
}
.section h3 {
padding-top: 56px;
margin-top: -56px;
}
.section h4 {
padding-top: 56px;
margin-top: -56px;
}
.section h5 {
padding-top: 56px;
margin-top: -56px;
}
.section h6 {
padding-top: 56px;
margin-top: -56px;
}
.dropdown-submenu {
position: relative;
}
@ -175,7 +122,7 @@ body {
margin-right: -10px;
}
.dropdown-submenu:hover>a:after {
border-left-color: #ffffff;
border-left-color: #adb5bd;
}
.dropdown-submenu.pull-left {
float: none;
@ -187,7 +134,7 @@ body {
}
</style>
<script>
<script type="text/javascript">
// manage active state of menu based on current page
$(document).ready(function () {
// active menu anchor
@ -198,10 +145,23 @@ $(document).ready(function () {
var menuAnchor = $('a[href="' + href + '"]');
// mark it active
menuAnchor.parent().addClass('active');
menuAnchor.tab('show');
// if it's got a parent navbar menu mark it active as well
menuAnchor.closest('li.dropdown').addClass('active');
// Navbar adjustments
var navHeight = $(".navbar").first().height() + 15;
var style = document.createElement('style');
var pt = "padding-top: " + navHeight + "px; ";
var mt = "margin-top: -" + navHeight + "px; ";
var css = "";
// offset scroll position for anchor links (for fixed navbar)
for (var i = 1; i <= 6; i++) {
css += ".section h" + i + "{ " + pt + mt + "}\n";
}
style.innerHTML = "body {" + pt + "padding-bottom: 40px; }\n" + css;
document.head.appendChild(style);
});
</script>
@ -213,7 +173,6 @@ $(document).ready(function () {
max-height: 500px;
min-height: 44px;
overflow-y: auto;
background: white;
border: 1px solid #ddd;
border-radius: 4px;
}
@ -339,7 +298,7 @@ div.tocify {
<!-- setup 3col/9col grid for toc_float and main content -->
<div class="row-fluid">
<div class="row">
<div class="col-xs-12 col-sm-4 col-md-3">
<div id="TOC" class="tocify">
</div>
@ -364,13 +323,13 @@ div.tocify {
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fas fa-home"></span>
<span class="fa fa-home"></span>
</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-landmark"></span>
<span class="fa fa-landmark"></span>
Background
@ -390,7 +349,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-list-alt"></span>
<span class="fa fa-list-alt"></span>
Conventions
@ -410,7 +369,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-history"></span>
<span class="fa fa-history"></span>
CDM Versions
@ -441,7 +400,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-plus-square"></span>
<span class="fa fa-plus-square"></span>
Proposals
@ -463,7 +422,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-question"></span>
<span class="fa fa-question"></span>
How to
@ -483,7 +442,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-life-ring"></span>
<span class="fa fa-life-ring"></span>
Support
@ -505,7 +464,7 @@ div.tocify {
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/OHDSI/CommonDataModel">
<span class="fas fa-github"></span>
<span class="fa fa-github"></span>
</a>
</li>
@ -514,11 +473,11 @@ div.tocify {
</div><!--/.container -->
</div><!--/.navbar -->
<div class="fluid-row" id="header">
<div id="header">
<h1 class="title toc-ignore">Preserving Privacy in an OMOP CDM Implementation</h1>
<h1 class="title toc-ignore"><strong>Preserving Privacy in an OMOP CDM Implementation</strong></h1>
</div>
@ -667,7 +626,7 @@ $(document).ready(function () {
$(document).ready(function () {
$('.tabset-dropdown > .nav-tabs > li').click(function () {
$(this).parent().toggleClass('nav-tabs-open')
$(this).parent().toggleClass('nav-tabs-open');
});
});
</script>
@ -677,6 +636,9 @@ $(document).ready(function () {
<script>
$(document).ready(function () {
// temporarily add toc-ignore selector to headers for the consistency with Pandoc
$('.unlisted.unnumbered').addClass('toc-ignore')
// move toc-ignore selectors from section div to header
$('div.section.toc-ignore')
.removeClass('toc-ignore')

View File

@ -11,15 +11,24 @@
<title>cdmRefreshProcess.utf8</title>
<title>cdmRefreshProcess.knit</title>
<script src="site_libs/header-attrs-2.6/header-attrs.js"></script>
<script src="site_libs/jquery-1.11.3/jquery.min.js"></script>
<script src="site_libs/header-attrs-2.11/header-attrs.js"></script>
<script src="site_libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="site_libs/bootstrap-3.3.5/css/cosmo.min.css" rel="stylesheet" />
<script src="site_libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/respond.min.js"></script>
<style>h1 {font-size: 34px;}
h1.title {font-size: 38px;}
h2 {font-size: 30px;}
h3 {font-size: 24px;}
h4 {font-size: 18px;}
h5 {font-size: 16px;}
h6 {font-size: 12px;}
code {color: inherit; background-color: rgba(0, 0, 0, 0.04);}
pre:not([class]) { background-color: white }</style>
<script src="site_libs/jqueryui-1.11.4/jquery-ui.min.js"></script>
<link href="site_libs/tocify-1.9.1/jquery.tocify.css" rel="stylesheet" />
<script src="site_libs/tocify-1.9.1/jquery.tocify.js"></script>
@ -40,11 +49,6 @@
</style>
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
pre:not([class]) {
background-color: white;
}
</style>
<script type="text/javascript">
if (window.hljs) {
hljs.configure({languages: []});
@ -57,32 +61,6 @@ if (window.hljs) {
<style type="text/css">
h1 {
font-size: 34px;
}
h1.title {
font-size: 38px;
}
h2 {
font-size: 30px;
}
h3 {
font-size: 24px;
}
h4 {
font-size: 18px;
}
h5 {
font-size: 16px;
}
h6 {
font-size: 12px;
}
.table th:not([align]) {
text-align: left;
}
</style>
<link rel="stylesheet" href="style.css" type="text/css" />
@ -95,10 +73,6 @@ h6 {
margin-left: auto;
margin-right: auto;
}
code {
color: inherit;
background-color: rgba(0, 0, 0, 0.04);
}
img {
max-width:100%;
}
@ -114,40 +88,13 @@ button.code-folding-btn:focus {
summary {
display: list-item;
}
pre code {
padding: 0;
}
</style>
<style type="text/css">
/* padding for bootstrap navbar */
body {
padding-top: 51px;
padding-bottom: 40px;
}
/* offset scroll position for anchor links (for fixed navbar) */
.section h1 {
padding-top: 56px;
margin-top: -56px;
}
.section h2 {
padding-top: 56px;
margin-top: -56px;
}
.section h3 {
padding-top: 56px;
margin-top: -56px;
}
.section h4 {
padding-top: 56px;
margin-top: -56px;
}
.section h5 {
padding-top: 56px;
margin-top: -56px;
}
.section h6 {
padding-top: 56px;
margin-top: -56px;
}
.dropdown-submenu {
position: relative;
}
@ -175,7 +122,7 @@ body {
margin-right: -10px;
}
.dropdown-submenu:hover>a:after {
border-left-color: #ffffff;
border-left-color: #adb5bd;
}
.dropdown-submenu.pull-left {
float: none;
@ -187,7 +134,7 @@ body {
}
</style>
<script>
<script type="text/javascript">
// manage active state of menu based on current page
$(document).ready(function () {
// active menu anchor
@ -198,10 +145,23 @@ $(document).ready(function () {
var menuAnchor = $('a[href="' + href + '"]');
// mark it active
menuAnchor.parent().addClass('active');
menuAnchor.tab('show');
// if it's got a parent navbar menu mark it active as well
menuAnchor.closest('li.dropdown').addClass('active');
// Navbar adjustments
var navHeight = $(".navbar").first().height() + 15;
var style = document.createElement('style');
var pt = "padding-top: " + navHeight + "px; ";
var mt = "margin-top: -" + navHeight + "px; ";
var css = "";
// offset scroll position for anchor links (for fixed navbar)
for (var i = 1; i <= 6; i++) {
css += ".section h" + i + "{ " + pt + mt + "}\n";
}
style.innerHTML = "body {" + pt + "padding-bottom: 40px; }\n" + css;
document.head.appendChild(style);
});
</script>
@ -213,7 +173,6 @@ $(document).ready(function () {
max-height: 500px;
min-height: 44px;
overflow-y: auto;
background: white;
border: 1px solid #ddd;
border-radius: 4px;
}
@ -339,7 +298,7 @@ div.tocify {
<!-- setup 3col/9col grid for toc_float and main content -->
<div class="row-fluid">
<div class="row">
<div class="col-xs-12 col-sm-4 col-md-3">
<div id="TOC" class="tocify">
</div>
@ -364,13 +323,13 @@ div.tocify {
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fas fa-home"></span>
<span class="fa fa-home"></span>
</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-landmark"></span>
<span class="fa fa-landmark"></span>
Background
@ -390,7 +349,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-list-alt"></span>
<span class="fa fa-list-alt"></span>
Conventions
@ -410,7 +369,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-history"></span>
<span class="fa fa-history"></span>
CDM Versions
@ -441,7 +400,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-plus-square"></span>
<span class="fa fa-plus-square"></span>
Proposals
@ -463,7 +422,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-question"></span>
<span class="fa fa-question"></span>
How to
@ -483,7 +442,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-life-ring"></span>
<span class="fa fa-life-ring"></span>
Support
@ -505,7 +464,7 @@ div.tocify {
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/OHDSI/CommonDataModel">
<span class="fas fa-github"></span>
<span class="fa fa-github"></span>
</a>
</li>
@ -514,7 +473,7 @@ div.tocify {
</div><!--/.container -->
</div><!--/.navbar -->
<div class="fluid-row" id="header">
<div id="header">
@ -596,7 +555,7 @@ $(document).ready(function () {
$(document).ready(function () {
$('.tabset-dropdown > .nav-tabs > li').click(function () {
$(this).parent().toggleClass('nav-tabs-open')
$(this).parent().toggleClass('nav-tabs-open');
});
});
</script>
@ -606,6 +565,9 @@ $(document).ready(function () {
<script>
$(document).ready(function () {
// temporarily add toc-ignore selector to headers for the consistency with Pandoc
$('.unlisted.unnumbered').addClass('toc-ignore')
// move toc-ignore selectors from section div to header
$('div.section.toc-ignore')
.removeClass('toc-ignore')

View File

@ -13,13 +13,22 @@
<title>Ask A Question</title>
<script src="site_libs/header-attrs-2.6/header-attrs.js"></script>
<script src="site_libs/jquery-1.11.3/jquery.min.js"></script>
<script src="site_libs/header-attrs-2.11/header-attrs.js"></script>
<script src="site_libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="site_libs/bootstrap-3.3.5/css/cosmo.min.css" rel="stylesheet" />
<script src="site_libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/respond.min.js"></script>
<style>h1 {font-size: 34px;}
h1.title {font-size: 38px;}
h2 {font-size: 30px;}
h3 {font-size: 24px;}
h4 {font-size: 18px;}
h5 {font-size: 16px;}
h6 {font-size: 12px;}
code {color: inherit; background-color: rgba(0, 0, 0, 0.04);}
pre:not([class]) { background-color: white }</style>
<script src="site_libs/jqueryui-1.11.4/jquery-ui.min.js"></script>
<link href="site_libs/tocify-1.9.1/jquery.tocify.css" rel="stylesheet" />
<script src="site_libs/tocify-1.9.1/jquery.tocify.js"></script>
@ -40,11 +49,6 @@
</style>
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
pre:not([class]) {
background-color: white;
}
</style>
<script type="text/javascript">
if (window.hljs) {
hljs.configure({languages: []});
@ -57,32 +61,6 @@ if (window.hljs) {
<style type="text/css">
h1 {
font-size: 34px;
}
h1.title {
font-size: 38px;
}
h2 {
font-size: 30px;
}
h3 {
font-size: 24px;
}
h4 {
font-size: 18px;
}
h5 {
font-size: 16px;
}
h6 {
font-size: 12px;
}
.table th:not([align]) {
text-align: left;
}
</style>
<link rel="stylesheet" href="style.css" type="text/css" />
@ -95,10 +73,6 @@ h6 {
margin-left: auto;
margin-right: auto;
}
code {
color: inherit;
background-color: rgba(0, 0, 0, 0.04);
}
img {
max-width:100%;
}
@ -114,40 +88,13 @@ button.code-folding-btn:focus {
summary {
display: list-item;
}
pre code {
padding: 0;
}
</style>
<style type="text/css">
/* padding for bootstrap navbar */
body {
padding-top: 51px;
padding-bottom: 40px;
}
/* offset scroll position for anchor links (for fixed navbar) */
.section h1 {
padding-top: 56px;
margin-top: -56px;
}
.section h2 {
padding-top: 56px;
margin-top: -56px;
}
.section h3 {
padding-top: 56px;
margin-top: -56px;
}
.section h4 {
padding-top: 56px;
margin-top: -56px;
}
.section h5 {
padding-top: 56px;
margin-top: -56px;
}
.section h6 {
padding-top: 56px;
margin-top: -56px;
}
.dropdown-submenu {
position: relative;
}
@ -175,7 +122,7 @@ body {
margin-right: -10px;
}
.dropdown-submenu:hover>a:after {
border-left-color: #ffffff;
border-left-color: #adb5bd;
}
.dropdown-submenu.pull-left {
float: none;
@ -187,7 +134,7 @@ body {
}
</style>
<script>
<script type="text/javascript">
// manage active state of menu based on current page
$(document).ready(function () {
// active menu anchor
@ -198,10 +145,23 @@ $(document).ready(function () {
var menuAnchor = $('a[href="' + href + '"]');
// mark it active
menuAnchor.parent().addClass('active');
menuAnchor.tab('show');
// if it's got a parent navbar menu mark it active as well
menuAnchor.closest('li.dropdown').addClass('active');
// Navbar adjustments
var navHeight = $(".navbar").first().height() + 15;
var style = document.createElement('style');
var pt = "padding-top: " + navHeight + "px; ";
var mt = "margin-top: -" + navHeight + "px; ";
var css = "";
// offset scroll position for anchor links (for fixed navbar)
for (var i = 1; i <= 6; i++) {
css += ".section h" + i + "{ " + pt + mt + "}\n";
}
style.innerHTML = "body {" + pt + "padding-bottom: 40px; }\n" + css;
document.head.appendChild(style);
});
</script>
@ -213,7 +173,6 @@ $(document).ready(function () {
max-height: 500px;
min-height: 44px;
overflow-y: auto;
background: white;
border: 1px solid #ddd;
border-radius: 4px;
}
@ -339,7 +298,7 @@ div.tocify {
<!-- setup 3col/9col grid for toc_float and main content -->
<div class="row-fluid">
<div class="row">
<div class="col-xs-12 col-sm-4 col-md-3">
<div id="TOC" class="tocify">
</div>
@ -364,13 +323,13 @@ div.tocify {
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fas fa-home"></span>
<span class="fa fa-home"></span>
</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-landmark"></span>
<span class="fa fa-landmark"></span>
Background
@ -390,7 +349,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-list-alt"></span>
<span class="fa fa-list-alt"></span>
Conventions
@ -410,7 +369,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-history"></span>
<span class="fa fa-history"></span>
CDM Versions
@ -441,7 +400,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-plus-square"></span>
<span class="fa fa-plus-square"></span>
Proposals
@ -463,7 +422,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-question"></span>
<span class="fa fa-question"></span>
How to
@ -483,7 +442,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-life-ring"></span>
<span class="fa fa-life-ring"></span>
Support
@ -505,7 +464,7 @@ div.tocify {
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/OHDSI/CommonDataModel">
<span class="fas fa-github"></span>
<span class="fa fa-github"></span>
</a>
</li>
@ -514,7 +473,7 @@ div.tocify {
</div><!--/.container -->
</div><!--/.navbar -->
<div class="fluid-row" id="header">
<div id="header">
@ -565,7 +524,7 @@ $(document).ready(function () {
$(document).ready(function () {
$('.tabset-dropdown > .nav-tabs > li').click(function () {
$(this).parent().toggleClass('nav-tabs-open')
$(this).parent().toggleClass('nav-tabs-open');
});
});
</script>
@ -575,6 +534,9 @@ $(document).ready(function () {
<script>
$(document).ready(function () {
// temporarily add toc-ignore selector to headers for the consistency with Pandoc
$('.unlisted.unnumbered').addClass('toc-ignore')
// move toc-ignore selectors from section div to header
$('div.section.toc-ignore')
.removeClass('toc-ignore')

View File

@ -11,15 +11,24 @@
<title>dataModelConventions.utf8</title>
<title>dataModelConventions.knit</title>
<script src="site_libs/header-attrs-2.6/header-attrs.js"></script>
<script src="site_libs/jquery-1.11.3/jquery.min.js"></script>
<script src="site_libs/header-attrs-2.11/header-attrs.js"></script>
<script src="site_libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="site_libs/bootstrap-3.3.5/css/cosmo.min.css" rel="stylesheet" />
<script src="site_libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/respond.min.js"></script>
<style>h1 {font-size: 34px;}
h1.title {font-size: 38px;}
h2 {font-size: 30px;}
h3 {font-size: 24px;}
h4 {font-size: 18px;}
h5 {font-size: 16px;}
h6 {font-size: 12px;}
code {color: inherit; background-color: rgba(0, 0, 0, 0.04);}
pre:not([class]) { background-color: white }</style>
<script src="site_libs/jqueryui-1.11.4/jquery-ui.min.js"></script>
<link href="site_libs/tocify-1.9.1/jquery.tocify.css" rel="stylesheet" />
<script src="site_libs/tocify-1.9.1/jquery.tocify.js"></script>
@ -40,11 +49,6 @@
</style>
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
pre:not([class]) {
background-color: white;
}
</style>
<script type="text/javascript">
if (window.hljs) {
hljs.configure({languages: []});
@ -57,32 +61,6 @@ if (window.hljs) {
<style type="text/css">
h1 {
font-size: 34px;
}
h1.title {
font-size: 38px;
}
h2 {
font-size: 30px;
}
h3 {
font-size: 24px;
}
h4 {
font-size: 18px;
}
h5 {
font-size: 16px;
}
h6 {
font-size: 12px;
}
.table th:not([align]) {
text-align: left;
}
</style>
<link rel="stylesheet" href="style.css" type="text/css" />
@ -95,10 +73,6 @@ h6 {
margin-left: auto;
margin-right: auto;
}
code {
color: inherit;
background-color: rgba(0, 0, 0, 0.04);
}
img {
max-width:100%;
}
@ -114,40 +88,13 @@ button.code-folding-btn:focus {
summary {
display: list-item;
}
pre code {
padding: 0;
}
</style>
<style type="text/css">
/* padding for bootstrap navbar */
body {
padding-top: 51px;
padding-bottom: 40px;
}
/* offset scroll position for anchor links (for fixed navbar) */
.section h1 {
padding-top: 56px;
margin-top: -56px;
}
.section h2 {
padding-top: 56px;
margin-top: -56px;
}
.section h3 {
padding-top: 56px;
margin-top: -56px;
}
.section h4 {
padding-top: 56px;
margin-top: -56px;
}
.section h5 {
padding-top: 56px;
margin-top: -56px;
}
.section h6 {
padding-top: 56px;
margin-top: -56px;
}
.dropdown-submenu {
position: relative;
}
@ -175,7 +122,7 @@ body {
margin-right: -10px;
}
.dropdown-submenu:hover>a:after {
border-left-color: #ffffff;
border-left-color: #adb5bd;
}
.dropdown-submenu.pull-left {
float: none;
@ -187,7 +134,7 @@ body {
}
</style>
<script>
<script type="text/javascript">
// manage active state of menu based on current page
$(document).ready(function () {
// active menu anchor
@ -198,10 +145,23 @@ $(document).ready(function () {
var menuAnchor = $('a[href="' + href + '"]');
// mark it active
menuAnchor.parent().addClass('active');
menuAnchor.tab('show');
// if it's got a parent navbar menu mark it active as well
menuAnchor.closest('li.dropdown').addClass('active');
// Navbar adjustments
var navHeight = $(".navbar").first().height() + 15;
var style = document.createElement('style');
var pt = "padding-top: " + navHeight + "px; ";
var mt = "margin-top: -" + navHeight + "px; ";
var css = "";
// offset scroll position for anchor links (for fixed navbar)
for (var i = 1; i <= 6; i++) {
css += ".section h" + i + "{ " + pt + mt + "}\n";
}
style.innerHTML = "body {" + pt + "padding-bottom: 40px; }\n" + css;
document.head.appendChild(style);
});
</script>
@ -213,7 +173,6 @@ $(document).ready(function () {
max-height: 500px;
min-height: 44px;
overflow-y: auto;
background: white;
border: 1px solid #ddd;
border-radius: 4px;
}
@ -339,7 +298,7 @@ div.tocify {
<!-- setup 3col/9col grid for toc_float and main content -->
<div class="row-fluid">
<div class="row">
<div class="col-xs-12 col-sm-4 col-md-3">
<div id="TOC" class="tocify">
</div>
@ -364,13 +323,13 @@ div.tocify {
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fas fa-home"></span>
<span class="fa fa-home"></span>
</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-landmark"></span>
<span class="fa fa-landmark"></span>
Background
@ -390,7 +349,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-list-alt"></span>
<span class="fa fa-list-alt"></span>
Conventions
@ -410,7 +369,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-history"></span>
<span class="fa fa-history"></span>
CDM Versions
@ -441,7 +400,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-plus-square"></span>
<span class="fa fa-plus-square"></span>
Proposals
@ -463,7 +422,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-question"></span>
<span class="fa fa-question"></span>
How to
@ -483,7 +442,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-life-ring"></span>
<span class="fa fa-life-ring"></span>
Support
@ -505,7 +464,7 @@ div.tocify {
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/OHDSI/CommonDataModel">
<span class="fas fa-github"></span>
<span class="fa fa-github"></span>
</a>
</li>
@ -514,7 +473,7 @@ div.tocify {
</div><!--/.container -->
</div><!--/.navbar -->
<div class="fluid-row" id="header">
<div id="header">
@ -886,7 +845,7 @@ $(document).ready(function () {
$(document).ready(function () {
$('.tabset-dropdown > .nav-tabs > li').click(function () {
$(this).parent().toggleClass('nav-tabs-open')
$(this).parent().toggleClass('nav-tabs-open');
});
});
</script>
@ -896,6 +855,9 @@ $(document).ready(function () {
<script>
$(document).ready(function () {
// temporarily add toc-ignore selector to headers for the consistency with Pandoc
$('.unlisted.unnumbered').addClass('toc-ignore')
// move toc-ignore selectors from section div to header
$('div.section.toc-ignore')
.removeClass('toc-ignore')

View File

@ -13,13 +13,22 @@
<title>Download</title>
<script src="site_libs/header-attrs-2.6/header-attrs.js"></script>
<script src="site_libs/jquery-1.11.3/jquery.min.js"></script>
<script src="site_libs/header-attrs-2.11/header-attrs.js"></script>
<script src="site_libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="site_libs/bootstrap-3.3.5/css/cosmo.min.css" rel="stylesheet" />
<script src="site_libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/respond.min.js"></script>
<style>h1 {font-size: 34px;}
h1.title {font-size: 38px;}
h2 {font-size: 30px;}
h3 {font-size: 24px;}
h4 {font-size: 18px;}
h5 {font-size: 16px;}
h6 {font-size: 12px;}
code {color: inherit; background-color: rgba(0, 0, 0, 0.04);}
pre:not([class]) { background-color: white }</style>
<script src="site_libs/jqueryui-1.11.4/jquery-ui.min.js"></script>
<link href="site_libs/tocify-1.9.1/jquery.tocify.css" rel="stylesheet" />
<script src="site_libs/tocify-1.9.1/jquery.tocify.js"></script>
@ -40,11 +49,6 @@
</style>
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
pre:not([class]) {
background-color: white;
}
</style>
<script type="text/javascript">
if (window.hljs) {
hljs.configure({languages: []});
@ -57,32 +61,6 @@ if (window.hljs) {
<style type="text/css">
h1 {
font-size: 34px;
}
h1.title {
font-size: 38px;
}
h2 {
font-size: 30px;
}
h3 {
font-size: 24px;
}
h4 {
font-size: 18px;
}
h5 {
font-size: 16px;
}
h6 {
font-size: 12px;
}
.table th:not([align]) {
text-align: left;
}
</style>
<link rel="stylesheet" href="style.css" type="text/css" />
@ -95,10 +73,6 @@ h6 {
margin-left: auto;
margin-right: auto;
}
code {
color: inherit;
background-color: rgba(0, 0, 0, 0.04);
}
img {
max-width:100%;
}
@ -114,40 +88,13 @@ button.code-folding-btn:focus {
summary {
display: list-item;
}
pre code {
padding: 0;
}
</style>
<style type="text/css">
/* padding for bootstrap navbar */
body {
padding-top: 51px;
padding-bottom: 40px;
}
/* offset scroll position for anchor links (for fixed navbar) */
.section h1 {
padding-top: 56px;
margin-top: -56px;
}
.section h2 {
padding-top: 56px;
margin-top: -56px;
}
.section h3 {
padding-top: 56px;
margin-top: -56px;
}
.section h4 {
padding-top: 56px;
margin-top: -56px;
}
.section h5 {
padding-top: 56px;
margin-top: -56px;
}
.section h6 {
padding-top: 56px;
margin-top: -56px;
}
.dropdown-submenu {
position: relative;
}
@ -175,7 +122,7 @@ body {
margin-right: -10px;
}
.dropdown-submenu:hover>a:after {
border-left-color: #ffffff;
border-left-color: #adb5bd;
}
.dropdown-submenu.pull-left {
float: none;
@ -187,7 +134,7 @@ body {
}
</style>
<script>
<script type="text/javascript">
// manage active state of menu based on current page
$(document).ready(function () {
// active menu anchor
@ -198,10 +145,23 @@ $(document).ready(function () {
var menuAnchor = $('a[href="' + href + '"]');
// mark it active
menuAnchor.parent().addClass('active');
menuAnchor.tab('show');
// if it's got a parent navbar menu mark it active as well
menuAnchor.closest('li.dropdown').addClass('active');
// Navbar adjustments
var navHeight = $(".navbar").first().height() + 15;
var style = document.createElement('style');
var pt = "padding-top: " + navHeight + "px; ";
var mt = "margin-top: -" + navHeight + "px; ";
var css = "";
// offset scroll position for anchor links (for fixed navbar)
for (var i = 1; i <= 6; i++) {
css += ".section h" + i + "{ " + pt + mt + "}\n";
}
style.innerHTML = "body {" + pt + "padding-bottom: 40px; }\n" + css;
document.head.appendChild(style);
});
</script>
@ -213,7 +173,6 @@ $(document).ready(function () {
max-height: 500px;
min-height: 44px;
overflow-y: auto;
background: white;
border: 1px solid #ddd;
border-radius: 4px;
}
@ -339,7 +298,7 @@ div.tocify {
<!-- setup 3col/9col grid for toc_float and main content -->
<div class="row-fluid">
<div class="row">
<div class="col-xs-12 col-sm-4 col-md-3">
<div id="TOC" class="tocify">
</div>
@ -364,13 +323,13 @@ div.tocify {
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fas fa-home"></span>
<span class="fa fa-home"></span>
</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-landmark"></span>
<span class="fa fa-landmark"></span>
Background
@ -390,7 +349,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-list-alt"></span>
<span class="fa fa-list-alt"></span>
Conventions
@ -410,7 +369,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-history"></span>
<span class="fa fa-history"></span>
CDM Versions
@ -441,7 +400,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-plus-square"></span>
<span class="fa fa-plus-square"></span>
Proposals
@ -463,7 +422,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-question"></span>
<span class="fa fa-question"></span>
How to
@ -483,7 +442,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-life-ring"></span>
<span class="fa fa-life-ring"></span>
Support
@ -505,7 +464,7 @@ div.tocify {
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/OHDSI/CommonDataModel">
<span class="fas fa-github"></span>
<span class="fa fa-github"></span>
</a>
</li>
@ -514,7 +473,7 @@ div.tocify {
</div><!--/.container -->
</div><!--/.navbar -->
<div class="fluid-row" id="header">
<div id="header">
@ -555,7 +514,7 @@ $(document).ready(function () {
$(document).ready(function () {
$('.tabset-dropdown > .nav-tabs > li').click(function () {
$(this).parent().toggleClass('nav-tabs-open')
$(this).parent().toggleClass('nav-tabs-open');
});
});
</script>
@ -565,6 +524,9 @@ $(document).ready(function () {
<script>
$(document).ready(function () {
// temporarily add toc-ignore selector to headers for the consistency with Pandoc
$('.unlisted.unnumbered').addClass('toc-ignore')
// move toc-ignore selectors from section div to header
$('div.section.toc-ignore')
.removeClass('toc-ignore')

View File

@ -13,15 +13,24 @@
<meta name="date" content="2020-10-06" />
<title>drug_dose.utf8</title>
<title>drug_dose.knit</title>
<script src="site_libs/header-attrs-2.6/header-attrs.js"></script>
<script src="site_libs/jquery-1.11.3/jquery.min.js"></script>
<script src="site_libs/header-attrs-2.11/header-attrs.js"></script>
<script src="site_libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="site_libs/bootstrap-3.3.5/css/cosmo.min.css" rel="stylesheet" />
<script src="site_libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/respond.min.js"></script>
<style>h1 {font-size: 34px;}
h1.title {font-size: 38px;}
h2 {font-size: 30px;}
h3 {font-size: 24px;}
h4 {font-size: 18px;}
h5 {font-size: 16px;}
h6 {font-size: 12px;}
code {color: inherit; background-color: rgba(0, 0, 0, 0.04);}
pre:not([class]) { background-color: white }</style>
<script src="site_libs/navigation-1.1/tabsets.js"></script>
<link href="site_libs/highlightjs-9.12.0/default.css" rel="stylesheet" />
<script src="site_libs/highlightjs-9.12.0/highlight.js"></script>
@ -39,11 +48,6 @@
</style>
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
pre:not([class]) {
background-color: white;
}
</style>
<script type="text/javascript">
if (window.hljs) {
hljs.configure({languages: []});
@ -56,32 +60,6 @@ if (window.hljs) {
<style type="text/css">
h1 {
font-size: 34px;
}
h1.title {
font-size: 38px;
}
h2 {
font-size: 30px;
}
h3 {
font-size: 24px;
}
h4 {
font-size: 18px;
}
h5 {
font-size: 16px;
}
h6 {
font-size: 12px;
}
.table th:not([align]) {
text-align: left;
}
</style>
<link rel="stylesheet" href="style.css" type="text/css" />
@ -94,10 +72,6 @@ h6 {
margin-left: auto;
margin-right: auto;
}
code {
color: inherit;
background-color: rgba(0, 0, 0, 0.04);
}
img {
max-width:100%;
}
@ -113,40 +87,13 @@ button.code-folding-btn:focus {
summary {
display: list-item;
}
pre code {
padding: 0;
}
</style>
<style type="text/css">
/* padding for bootstrap navbar */
body {
padding-top: 51px;
padding-bottom: 40px;
}
/* offset scroll position for anchor links (for fixed navbar) */
.section h1 {
padding-top: 56px;
margin-top: -56px;
}
.section h2 {
padding-top: 56px;
margin-top: -56px;
}
.section h3 {
padding-top: 56px;
margin-top: -56px;
}
.section h4 {
padding-top: 56px;
margin-top: -56px;
}
.section h5 {
padding-top: 56px;
margin-top: -56px;
}
.section h6 {
padding-top: 56px;
margin-top: -56px;
}
.dropdown-submenu {
position: relative;
}
@ -174,7 +121,7 @@ body {
margin-right: -10px;
}
.dropdown-submenu:hover>a:after {
border-left-color: #ffffff;
border-left-color: #adb5bd;
}
.dropdown-submenu.pull-left {
float: none;
@ -186,7 +133,7 @@ body {
}
</style>
<script>
<script type="text/javascript">
// manage active state of menu based on current page
$(document).ready(function () {
// active menu anchor
@ -197,10 +144,23 @@ $(document).ready(function () {
var menuAnchor = $('a[href="' + href + '"]');
// mark it active
menuAnchor.parent().addClass('active');
menuAnchor.tab('show');
// if it's got a parent navbar menu mark it active as well
menuAnchor.closest('li.dropdown').addClass('active');
// Navbar adjustments
var navHeight = $(".navbar").first().height() + 15;
var style = document.createElement('style');
var pt = "padding-top: " + navHeight + "px; ";
var mt = "margin-top: -" + navHeight + "px; ";
var css = "";
// offset scroll position for anchor links (for fixed navbar)
for (var i = 1; i <= 6; i++) {
css += ".section h" + i + "{ " + pt + mt + "}\n";
}
style.innerHTML = "body {" + pt + "padding-bottom: 40px; }\n" + css;
document.head.appendChild(style);
});
</script>
@ -212,7 +172,6 @@ $(document).ready(function () {
max-height: 500px;
min-height: 44px;
overflow-y: auto;
background: white;
border: 1px solid #ddd;
border-radius: 4px;
}
@ -290,13 +249,13 @@ $(document).ready(function () {
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fas fa-home"></span>
<span class="fa fa-home"></span>
</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-landmark"></span>
<span class="fa fa-landmark"></span>
Background
@ -316,7 +275,7 @@ $(document).ready(function () {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-list-alt"></span>
<span class="fa fa-list-alt"></span>
Conventions
@ -336,7 +295,7 @@ $(document).ready(function () {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-history"></span>
<span class="fa fa-history"></span>
CDM Versions
@ -367,7 +326,7 @@ $(document).ready(function () {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-plus-square"></span>
<span class="fa fa-plus-square"></span>
Proposals
@ -389,7 +348,7 @@ $(document).ready(function () {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-question"></span>
<span class="fa fa-question"></span>
How to
@ -409,7 +368,7 @@ $(document).ready(function () {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-life-ring"></span>
<span class="fa fa-life-ring"></span>
Support
@ -431,7 +390,7 @@ $(document).ready(function () {
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/OHDSI/CommonDataModel">
<span class="fas fa-github"></span>
<span class="fa fa-github"></span>
</a>
</li>
@ -440,7 +399,7 @@ $(document).ready(function () {
</div><!--/.container -->
</div><!--/.navbar -->
<div class="fluid-row" id="header">
<div id="header">
@ -482,7 +441,7 @@ $(document).ready(function () {
$(document).ready(function () {
$('.tabset-dropdown > .nav-tabs > li').click(function () {
$(this).parent().toggleClass('nav-tabs-open')
$(this).parent().toggleClass('nav-tabs-open');
});
});
</script>

View File

@ -13,13 +13,22 @@
<title>Observation Period Considerations for EHR Data</title>
<script src="site_libs/header-attrs-2.6/header-attrs.js"></script>
<script src="site_libs/jquery-1.11.3/jquery.min.js"></script>
<script src="site_libs/header-attrs-2.11/header-attrs.js"></script>
<script src="site_libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="site_libs/bootstrap-3.3.5/css/cosmo.min.css" rel="stylesheet" />
<script src="site_libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/respond.min.js"></script>
<style>h1 {font-size: 34px;}
h1.title {font-size: 38px;}
h2 {font-size: 30px;}
h3 {font-size: 24px;}
h4 {font-size: 18px;}
h5 {font-size: 16px;}
h6 {font-size: 12px;}
code {color: inherit; background-color: rgba(0, 0, 0, 0.04);}
pre:not([class]) { background-color: white }</style>
<script src="site_libs/navigation-1.1/tabsets.js"></script>
<link href="site_libs/highlightjs-9.12.0/default.css" rel="stylesheet" />
<script src="site_libs/highlightjs-9.12.0/highlight.js"></script>
@ -37,11 +46,6 @@
</style>
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
pre:not([class]) {
background-color: white;
}
</style>
<script type="text/javascript">
if (window.hljs) {
hljs.configure({languages: []});
@ -54,32 +58,6 @@ if (window.hljs) {
<style type="text/css">
h1 {
font-size: 34px;
}
h1.title {
font-size: 38px;
}
h2 {
font-size: 30px;
}
h3 {
font-size: 24px;
}
h4 {
font-size: 18px;
}
h5 {
font-size: 16px;
}
h6 {
font-size: 12px;
}
.table th:not([align]) {
text-align: left;
}
</style>
<link rel="stylesheet" href="style.css" type="text/css" />
@ -92,10 +70,6 @@ h6 {
margin-left: auto;
margin-right: auto;
}
code {
color: inherit;
background-color: rgba(0, 0, 0, 0.04);
}
img {
max-width:100%;
}
@ -111,40 +85,13 @@ button.code-folding-btn:focus {
summary {
display: list-item;
}
pre code {
padding: 0;
}
</style>
<style type="text/css">
/* padding for bootstrap navbar */
body {
padding-top: 51px;
padding-bottom: 40px;
}
/* offset scroll position for anchor links (for fixed navbar) */
.section h1 {
padding-top: 56px;
margin-top: -56px;
}
.section h2 {
padding-top: 56px;
margin-top: -56px;
}
.section h3 {
padding-top: 56px;
margin-top: -56px;
}
.section h4 {
padding-top: 56px;
margin-top: -56px;
}
.section h5 {
padding-top: 56px;
margin-top: -56px;
}
.section h6 {
padding-top: 56px;
margin-top: -56px;
}
.dropdown-submenu {
position: relative;
}
@ -172,7 +119,7 @@ body {
margin-right: -10px;
}
.dropdown-submenu:hover>a:after {
border-left-color: #ffffff;
border-left-color: #adb5bd;
}
.dropdown-submenu.pull-left {
float: none;
@ -184,7 +131,7 @@ body {
}
</style>
<script>
<script type="text/javascript">
// manage active state of menu based on current page
$(document).ready(function () {
// active menu anchor
@ -195,10 +142,23 @@ $(document).ready(function () {
var menuAnchor = $('a[href="' + href + '"]');
// mark it active
menuAnchor.parent().addClass('active');
menuAnchor.tab('show');
// if it's got a parent navbar menu mark it active as well
menuAnchor.closest('li.dropdown').addClass('active');
// Navbar adjustments
var navHeight = $(".navbar").first().height() + 15;
var style = document.createElement('style');
var pt = "padding-top: " + navHeight + "px; ";
var mt = "margin-top: -" + navHeight + "px; ";
var css = "";
// offset scroll position for anchor links (for fixed navbar)
for (var i = 1; i <= 6; i++) {
css += ".section h" + i + "{ " + pt + mt + "}\n";
}
style.innerHTML = "body {" + pt + "padding-bottom: 40px; }\n" + css;
document.head.appendChild(style);
});
</script>
@ -210,7 +170,6 @@ $(document).ready(function () {
max-height: 500px;
min-height: 44px;
overflow-y: auto;
background: white;
border: 1px solid #ddd;
border-radius: 4px;
}
@ -288,13 +247,13 @@ $(document).ready(function () {
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fas fa-home"></span>
<span class="fa fa-home"></span>
</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-landmark"></span>
<span class="fa fa-landmark"></span>
Background
@ -314,7 +273,7 @@ $(document).ready(function () {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-list-alt"></span>
<span class="fa fa-list-alt"></span>
Conventions
@ -334,7 +293,7 @@ $(document).ready(function () {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-history"></span>
<span class="fa fa-history"></span>
CDM Versions
@ -365,7 +324,7 @@ $(document).ready(function () {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-plus-square"></span>
<span class="fa fa-plus-square"></span>
Proposals
@ -387,7 +346,7 @@ $(document).ready(function () {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-question"></span>
<span class="fa fa-question"></span>
How to
@ -407,7 +366,7 @@ $(document).ready(function () {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-life-ring"></span>
<span class="fa fa-life-ring"></span>
Support
@ -429,7 +388,7 @@ $(document).ready(function () {
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/OHDSI/CommonDataModel">
<span class="fas fa-github"></span>
<span class="fa fa-github"></span>
</a>
</li>
@ -438,11 +397,11 @@ $(document).ready(function () {
</div><!--/.container -->
</div><!--/.navbar -->
<div class="fluid-row" id="header">
<div id="header">
<h1 class="title toc-ignore">Observation Period Considerations for EHR Data</h1>
<h1 class="title toc-ignore"><strong>Observation Period Considerations for EHR Data</strong></h1>
</div>
@ -537,7 +496,7 @@ $(document).ready(function () {
$(document).ready(function () {
$('.tabset-dropdown > .nav-tabs > li').click(function () {
$(this).parent().toggleClass('nav-tabs-open')
$(this).parent().toggleClass('nav-tabs-open');
});
});
</script>

View File

@ -13,13 +13,22 @@
<title>OMOP CDM Frequently Asked Questions</title>
<script src="site_libs/header-attrs-2.6/header-attrs.js"></script>
<script src="site_libs/jquery-1.11.3/jquery.min.js"></script>
<script src="site_libs/header-attrs-2.11/header-attrs.js"></script>
<script src="site_libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="site_libs/bootstrap-3.3.5/css/cosmo.min.css" rel="stylesheet" />
<script src="site_libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/respond.min.js"></script>
<style>h1 {font-size: 34px;}
h1.title {font-size: 38px;}
h2 {font-size: 30px;}
h3 {font-size: 24px;}
h4 {font-size: 18px;}
h5 {font-size: 16px;}
h6 {font-size: 12px;}
code {color: inherit; background-color: rgba(0, 0, 0, 0.04);}
pre:not([class]) { background-color: white }</style>
<script src="site_libs/navigation-1.1/tabsets.js"></script>
<link href="site_libs/highlightjs-9.12.0/default.css" rel="stylesheet" />
<script src="site_libs/highlightjs-9.12.0/highlight.js"></script>
@ -37,11 +46,6 @@
</style>
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
pre:not([class]) {
background-color: white;
}
</style>
<script type="text/javascript">
if (window.hljs) {
hljs.configure({languages: []});
@ -54,32 +58,6 @@ if (window.hljs) {
<style type="text/css">
h1 {
font-size: 34px;
}
h1.title {
font-size: 38px;
}
h2 {
font-size: 30px;
}
h3 {
font-size: 24px;
}
h4 {
font-size: 18px;
}
h5 {
font-size: 16px;
}
h6 {
font-size: 12px;
}
.table th:not([align]) {
text-align: left;
}
</style>
<link rel="stylesheet" href="style.css" type="text/css" />
@ -92,10 +70,6 @@ h6 {
margin-left: auto;
margin-right: auto;
}
code {
color: inherit;
background-color: rgba(0, 0, 0, 0.04);
}
img {
max-width:100%;
}
@ -111,40 +85,13 @@ button.code-folding-btn:focus {
summary {
display: list-item;
}
pre code {
padding: 0;
}
</style>
<style type="text/css">
/* padding for bootstrap navbar */
body {
padding-top: 51px;
padding-bottom: 40px;
}
/* offset scroll position for anchor links (for fixed navbar) */
.section h1 {
padding-top: 56px;
margin-top: -56px;
}
.section h2 {
padding-top: 56px;
margin-top: -56px;
}
.section h3 {
padding-top: 56px;
margin-top: -56px;
}
.section h4 {
padding-top: 56px;
margin-top: -56px;
}
.section h5 {
padding-top: 56px;
margin-top: -56px;
}
.section h6 {
padding-top: 56px;
margin-top: -56px;
}
.dropdown-submenu {
position: relative;
}
@ -172,7 +119,7 @@ body {
margin-right: -10px;
}
.dropdown-submenu:hover>a:after {
border-left-color: #ffffff;
border-left-color: #adb5bd;
}
.dropdown-submenu.pull-left {
float: none;
@ -184,7 +131,7 @@ body {
}
</style>
<script>
<script type="text/javascript">
// manage active state of menu based on current page
$(document).ready(function () {
// active menu anchor
@ -195,10 +142,23 @@ $(document).ready(function () {
var menuAnchor = $('a[href="' + href + '"]');
// mark it active
menuAnchor.parent().addClass('active');
menuAnchor.tab('show');
// if it's got a parent navbar menu mark it active as well
menuAnchor.closest('li.dropdown').addClass('active');
// Navbar adjustments
var navHeight = $(".navbar").first().height() + 15;
var style = document.createElement('style');
var pt = "padding-top: " + navHeight + "px; ";
var mt = "margin-top: -" + navHeight + "px; ";
var css = "";
// offset scroll position for anchor links (for fixed navbar)
for (var i = 1; i <= 6; i++) {
css += ".section h" + i + "{ " + pt + mt + "}\n";
}
style.innerHTML = "body {" + pt + "padding-bottom: 40px; }\n" + css;
document.head.appendChild(style);
});
</script>
@ -210,7 +170,6 @@ $(document).ready(function () {
max-height: 500px;
min-height: 44px;
overflow-y: auto;
background: white;
border: 1px solid #ddd;
border-radius: 4px;
}
@ -288,13 +247,13 @@ $(document).ready(function () {
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fas fa-home"></span>
<span class="fa fa-home"></span>
</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-landmark"></span>
<span class="fa fa-landmark"></span>
Background
@ -314,7 +273,7 @@ $(document).ready(function () {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-list-alt"></span>
<span class="fa fa-list-alt"></span>
Conventions
@ -334,7 +293,7 @@ $(document).ready(function () {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-history"></span>
<span class="fa fa-history"></span>
CDM Versions
@ -365,7 +324,7 @@ $(document).ready(function () {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-plus-square"></span>
<span class="fa fa-plus-square"></span>
Proposals
@ -387,7 +346,7 @@ $(document).ready(function () {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-question"></span>
<span class="fa fa-question"></span>
How to
@ -407,7 +366,7 @@ $(document).ready(function () {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-life-ring"></span>
<span class="fa fa-life-ring"></span>
Support
@ -429,7 +388,7 @@ $(document).ready(function () {
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/OHDSI/CommonDataModel">
<span class="fas fa-github"></span>
<span class="fa fa-github"></span>
</a>
</li>
@ -438,7 +397,7 @@ $(document).ready(function () {
</div><!--/.container -->
</div><!--/.navbar -->
<div class="fluid-row" id="header">
<div id="header">
@ -573,7 +532,7 @@ $(document).ready(function () {
$(document).ready(function () {
$('.tabset-dropdown > .nav-tabs > li').click(function () {
$(this).parent().toggleClass('nav-tabs-open')
$(this).parent().toggleClass('nav-tabs-open');
});
});
</script>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

View File

@ -417,7 +417,79 @@ $(document).ready(function () {
<li><a href="https://github.com/OHDSI/CommonDataModel/tree/v5.4.0/inst/ddl/5.4">Link to DDLs for CDM v5.4</a></li>
<li><a href="https://github.com/OHDSI/CommonDataModel/tree/master#readme">Link to ReadMe for instructions on how to use the R package</a></li>
</ul>
<p><img src="images/cdm54.png" /></p>
<p><img src="images/cdm54.png" /> <br></p>
<div id="current-support-for-cdm-v5.4" class="section level3">
<h3>Current Support for CDM v5.4</h3>
<p>The table below details which OHDSI tools support CDM v5.4. There are two levels of support: legacy support means that the tool supports all tables and fields that were present in CDM v5.3 and feature support indicates that the tool supports any new tables and fields in CDM v5.4 that were not present in CDM v5.3. A green heart 💚 indicates that the support level for the listed tool is in place, has been tested, and released. A yellow heart 💛 indicates that the support level for the listed tool has been initiated but has not yet been tested and released. <br></p>
<table>
<colgroup>
<col width="25%" />
<col width="25%" />
<col width="25%" />
<col width="25%" />
</colgroup>
<thead>
<tr class="header">
<th><strong>Tool</strong></th>
<th><strong>Description</strong></th>
<th><strong>Legacy Support</strong></th>
<th><strong>Feature Support</strong></th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><strong>CDM R package</strong></td>
<td>This package can be downloaded from <a href="https://github.com/OHDSI/CommonDataModel/">https://github.com/OHDSI/CommonDataModel/</a>. It functions to dynamically create the OMOP CDM documentation and DDL scripts to instantiate the CDM tables.</td>
<td>💚</td>
<td>💚</td>
</tr>
<tr class="even">
<td><strong>Data Quality Dashboard</strong></td>
<td>This package can be downloaded from <a href="https://github.com/OHDSI/DataQualityDashboard">https://github.com/OHDSI/DataQualityDashboard</a>. It runs a set of &gt; 3500 data quality checks against an OMOP CDM instance and is required to be run on all databases prior to participating in an OHDSI network research study.</td>
<td>💚</td>
<td>💛</td>
</tr>
<tr class="odd">
<td><strong>Achilles</strong></td>
<td>This package can be downloaded from <a href="https://github.com/OHDSI/Achilles">https://github.com/OHDSI/Achilles</a>, performing a set of broad database characterizations agains an OMOP CDM instance.</td>
<td>💚</td>
<td>💛</td>
</tr>
<tr class="even">
<td><strong>ARES</strong></td>
<td>This package can be downloaded from <a href="https://github.com/OHDSI/Ares">https://github.com/OHDSI/Ares</a> and is designed to display the results from both the ACHILLES and DataQualityDashboard packages to support data quality and characterization research.</td>
<td>💚</td>
<td>💛</td>
</tr>
<tr class="odd">
<td><strong>ATLAS</strong></td>
<td>ATLAS is an open source software tool for researchers to conduct scientific analyses on standardized observational data. <a href="http://atlas-demo.ohdsi.org/">Demo</a></td>
<td>💚</td>
<td>💛</td>
</tr>
<tr class="even">
<td><strong>Rabbit-In-A-Hat</strong></td>
<td>This package can be downloaded from <a href="https://github.com/OHDSI/WhiteRabbit">https://github.com/OHDSI/WhiteRabbit</a> and is an application for interactive design of an ETL to the OMOP Common Data Model with the help of the the scan report generated by White Rabbit.</td>
<td>💚</td>
<td>💚</td>
</tr>
<tr class="odd">
<td><strong>Feature Extraction</strong></td>
<td>This package can be downloaded from <a href="https://github.com/OHDSI/FeatureExtraction">https://github.com/OHDSI/FeatureExtraction</a>. It is designed to generate features (covariates) for a cohort generated using the OMOP CDM.</td>
<td>💚</td>
<td>💚*</td>
</tr>
<tr class="even">
<td><strong>Cohort Diagnostics</strong></td>
<td>This package can be downloaded from <a href="https://github.com/OHDSI/CohortDiagnostics">https://github.com/OHDSI/CohortDiagnostics</a> and is used to critically evaluate cohort phenotypes.</td>
<td>💚</td>
<td>💛</td>
</tr>
</tbody>
</table>
<p><br> * The <strong>Feature Extraction</strong> package supports all relevant new features in CDM v5.4. For example, it was decided that, from a methodological perspective, the EPISODE and EPISODE_EVENT tables should not be included to define cohort covariates because the events that make up episodes are already pulled in as potential covariates.</p>
<p><br></p>
</div>
</div>
<div id="the-cdm-working-group" class="section level2">
<h2>The CDM Working Group</h2>

View File

@ -13,13 +13,22 @@
<title>Indices, Primary Keys and Foreign Key Constraints</title>
<script src="site_libs/header-attrs-2.6/header-attrs.js"></script>
<script src="site_libs/jquery-1.11.3/jquery.min.js"></script>
<script src="site_libs/header-attrs-2.11/header-attrs.js"></script>
<script src="site_libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="site_libs/bootstrap-3.3.5/css/cosmo.min.css" rel="stylesheet" />
<script src="site_libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/respond.min.js"></script>
<style>h1 {font-size: 34px;}
h1.title {font-size: 38px;}
h2 {font-size: 30px;}
h3 {font-size: 24px;}
h4 {font-size: 18px;}
h5 {font-size: 16px;}
h6 {font-size: 12px;}
code {color: inherit; background-color: rgba(0, 0, 0, 0.04);}
pre:not([class]) { background-color: white }</style>
<script src="site_libs/jqueryui-1.11.4/jquery-ui.min.js"></script>
<link href="site_libs/tocify-1.9.1/jquery.tocify.css" rel="stylesheet" />
<script src="site_libs/tocify-1.9.1/jquery.tocify.js"></script>
@ -40,11 +49,6 @@
</style>
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
pre:not([class]) {
background-color: white;
}
</style>
<script type="text/javascript">
if (window.hljs) {
hljs.configure({languages: []});
@ -57,32 +61,6 @@ if (window.hljs) {
<style type="text/css">
h1 {
font-size: 34px;
}
h1.title {
font-size: 38px;
}
h2 {
font-size: 30px;
}
h3 {
font-size: 24px;
}
h4 {
font-size: 18px;
}
h5 {
font-size: 16px;
}
h6 {
font-size: 12px;
}
.table th:not([align]) {
text-align: left;
}
</style>
<link rel="stylesheet" href="style.css" type="text/css" />
@ -95,10 +73,6 @@ h6 {
margin-left: auto;
margin-right: auto;
}
code {
color: inherit;
background-color: rgba(0, 0, 0, 0.04);
}
img {
max-width:100%;
}
@ -114,40 +88,13 @@ button.code-folding-btn:focus {
summary {
display: list-item;
}
pre code {
padding: 0;
}
</style>
<style type="text/css">
/* padding for bootstrap navbar */
body {
padding-top: 51px;
padding-bottom: 40px;
}
/* offset scroll position for anchor links (for fixed navbar) */
.section h1 {
padding-top: 56px;
margin-top: -56px;
}
.section h2 {
padding-top: 56px;
margin-top: -56px;
}
.section h3 {
padding-top: 56px;
margin-top: -56px;
}
.section h4 {
padding-top: 56px;
margin-top: -56px;
}
.section h5 {
padding-top: 56px;
margin-top: -56px;
}
.section h6 {
padding-top: 56px;
margin-top: -56px;
}
.dropdown-submenu {
position: relative;
}
@ -175,7 +122,7 @@ body {
margin-right: -10px;
}
.dropdown-submenu:hover>a:after {
border-left-color: #ffffff;
border-left-color: #adb5bd;
}
.dropdown-submenu.pull-left {
float: none;
@ -187,7 +134,7 @@ body {
}
</style>
<script>
<script type="text/javascript">
// manage active state of menu based on current page
$(document).ready(function () {
// active menu anchor
@ -198,10 +145,23 @@ $(document).ready(function () {
var menuAnchor = $('a[href="' + href + '"]');
// mark it active
menuAnchor.parent().addClass('active');
menuAnchor.tab('show');
// if it's got a parent navbar menu mark it active as well
menuAnchor.closest('li.dropdown').addClass('active');
// Navbar adjustments
var navHeight = $(".navbar").first().height() + 15;
var style = document.createElement('style');
var pt = "padding-top: " + navHeight + "px; ";
var mt = "margin-top: -" + navHeight + "px; ";
var css = "";
// offset scroll position for anchor links (for fixed navbar)
for (var i = 1; i <= 6; i++) {
css += ".section h" + i + "{ " + pt + mt + "}\n";
}
style.innerHTML = "body {" + pt + "padding-bottom: 40px; }\n" + css;
document.head.appendChild(style);
});
</script>
@ -213,7 +173,6 @@ $(document).ready(function () {
max-height: 500px;
min-height: 44px;
overflow-y: auto;
background: white;
border: 1px solid #ddd;
border-radius: 4px;
}
@ -339,7 +298,7 @@ div.tocify {
<!-- setup 3col/9col grid for toc_float and main content -->
<div class="row-fluid">
<div class="row">
<div class="col-xs-12 col-sm-4 col-md-3">
<div id="TOC" class="tocify">
</div>
@ -364,13 +323,13 @@ div.tocify {
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fas fa-home"></span>
<span class="fa fa-home"></span>
</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-landmark"></span>
<span class="fa fa-landmark"></span>
Background
@ -390,7 +349,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-list-alt"></span>
<span class="fa fa-list-alt"></span>
Conventions
@ -410,7 +369,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-history"></span>
<span class="fa fa-history"></span>
CDM Versions
@ -441,7 +400,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-plus-square"></span>
<span class="fa fa-plus-square"></span>
Proposals
@ -463,7 +422,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-question"></span>
<span class="fa fa-question"></span>
How to
@ -483,7 +442,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-life-ring"></span>
<span class="fa fa-life-ring"></span>
Support
@ -505,7 +464,7 @@ div.tocify {
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/OHDSI/CommonDataModel">
<span class="fas fa-github"></span>
<span class="fa fa-github"></span>
</a>
</li>
@ -514,7 +473,7 @@ div.tocify {
</div><!--/.container -->
</div><!--/.navbar -->
<div class="fluid-row" id="header">
<div id="header">
@ -608,7 +567,7 @@ $(document).ready(function () {
$(document).ready(function () {
$('.tabset-dropdown > .nav-tabs > li').click(function () {
$(this).parent().toggleClass('nav-tabs-open')
$(this).parent().toggleClass('nav-tabs-open');
});
});
</script>
@ -618,6 +577,9 @@ $(document).ready(function () {
<script>
$(document).ready(function () {
// temporarily add toc-ignore selector to headers for the consistency with Pandoc
$('.unlisted.unnumbered').addClass('toc-ignore')
// move toc-ignore selectors from section div to header
$('div.section.toc-ignore')
.removeClass('toc-ignore')

View File

@ -13,13 +13,22 @@
<title>Oncology Extension</title>
<script src="site_libs/header-attrs-2.6/header-attrs.js"></script>
<script src="site_libs/jquery-1.11.3/jquery.min.js"></script>
<script src="site_libs/header-attrs-2.11/header-attrs.js"></script>
<script src="site_libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="site_libs/bootstrap-3.3.5/css/cosmo.min.css" rel="stylesheet" />
<script src="site_libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/respond.min.js"></script>
<style>h1 {font-size: 34px;}
h1.title {font-size: 38px;}
h2 {font-size: 30px;}
h3 {font-size: 24px;}
h4 {font-size: 18px;}
h5 {font-size: 16px;}
h6 {font-size: 12px;}
code {color: inherit; background-color: rgba(0, 0, 0, 0.04);}
pre:not([class]) { background-color: white }</style>
<script src="site_libs/jqueryui-1.11.4/jquery-ui.min.js"></script>
<link href="site_libs/tocify-1.9.1/jquery.tocify.css" rel="stylesheet" />
<script src="site_libs/tocify-1.9.1/jquery.tocify.js"></script>
@ -40,11 +49,6 @@
</style>
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
pre:not([class]) {
background-color: white;
}
</style>
<script type="text/javascript">
if (window.hljs) {
hljs.configure({languages: []});
@ -57,32 +61,6 @@ if (window.hljs) {
<style type="text/css">
h1 {
font-size: 34px;
}
h1.title {
font-size: 38px;
}
h2 {
font-size: 30px;
}
h3 {
font-size: 24px;
}
h4 {
font-size: 18px;
}
h5 {
font-size: 16px;
}
h6 {
font-size: 12px;
}
.table th:not([align]) {
text-align: left;
}
</style>
<link rel="stylesheet" href="style.css" type="text/css" />
@ -95,10 +73,6 @@ h6 {
margin-left: auto;
margin-right: auto;
}
code {
color: inherit;
background-color: rgba(0, 0, 0, 0.04);
}
img {
max-width:100%;
}
@ -114,40 +88,13 @@ button.code-folding-btn:focus {
summary {
display: list-item;
}
pre code {
padding: 0;
}
</style>
<style type="text/css">
/* padding for bootstrap navbar */
body {
padding-top: 51px;
padding-bottom: 40px;
}
/* offset scroll position for anchor links (for fixed navbar) */
.section h1 {
padding-top: 56px;
margin-top: -56px;
}
.section h2 {
padding-top: 56px;
margin-top: -56px;
}
.section h3 {
padding-top: 56px;
margin-top: -56px;
}
.section h4 {
padding-top: 56px;
margin-top: -56px;
}
.section h5 {
padding-top: 56px;
margin-top: -56px;
}
.section h6 {
padding-top: 56px;
margin-top: -56px;
}
.dropdown-submenu {
position: relative;
}
@ -175,7 +122,7 @@ body {
margin-right: -10px;
}
.dropdown-submenu:hover>a:after {
border-left-color: #ffffff;
border-left-color: #adb5bd;
}
.dropdown-submenu.pull-left {
float: none;
@ -187,7 +134,7 @@ body {
}
</style>
<script>
<script type="text/javascript">
// manage active state of menu based on current page
$(document).ready(function () {
// active menu anchor
@ -198,10 +145,23 @@ $(document).ready(function () {
var menuAnchor = $('a[href="' + href + '"]');
// mark it active
menuAnchor.parent().addClass('active');
menuAnchor.tab('show');
// if it's got a parent navbar menu mark it active as well
menuAnchor.closest('li.dropdown').addClass('active');
// Navbar adjustments
var navHeight = $(".navbar").first().height() + 15;
var style = document.createElement('style');
var pt = "padding-top: " + navHeight + "px; ";
var mt = "margin-top: -" + navHeight + "px; ";
var css = "";
// offset scroll position for anchor links (for fixed navbar)
for (var i = 1; i <= 6; i++) {
css += ".section h" + i + "{ " + pt + mt + "}\n";
}
style.innerHTML = "body {" + pt + "padding-bottom: 40px; }\n" + css;
document.head.appendChild(style);
});
</script>
@ -213,7 +173,6 @@ $(document).ready(function () {
max-height: 500px;
min-height: 44px;
overflow-y: auto;
background: white;
border: 1px solid #ddd;
border-radius: 4px;
}
@ -339,7 +298,7 @@ div.tocify {
<!-- setup 3col/9col grid for toc_float and main content -->
<div class="row-fluid">
<div class="row">
<div class="col-xs-12 col-sm-4 col-md-3">
<div id="TOC" class="tocify">
</div>
@ -364,13 +323,13 @@ div.tocify {
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fas fa-home"></span>
<span class="fa fa-home"></span>
</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-landmark"></span>
<span class="fa fa-landmark"></span>
Background
@ -390,7 +349,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-list-alt"></span>
<span class="fa fa-list-alt"></span>
Conventions
@ -410,7 +369,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-history"></span>
<span class="fa fa-history"></span>
CDM Versions
@ -441,7 +400,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-plus-square"></span>
<span class="fa fa-plus-square"></span>
Proposals
@ -463,7 +422,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-question"></span>
<span class="fa fa-question"></span>
How to
@ -483,7 +442,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-life-ring"></span>
<span class="fa fa-life-ring"></span>
Support
@ -505,7 +464,7 @@ div.tocify {
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/OHDSI/CommonDataModel">
<span class="fas fa-github"></span>
<span class="fa fa-github"></span>
</a>
</li>
@ -514,7 +473,7 @@ div.tocify {
</div><!--/.container -->
</div><!--/.navbar -->
<div class="fluid-row" id="header">
<div id="header">
@ -1224,7 +1183,7 @@ $(document).ready(function () {
$(document).ready(function () {
$('.tabset-dropdown > .nav-tabs > li').click(function () {
$(this).parent().toggleClass('nav-tabs-open')
$(this).parent().toggleClass('nav-tabs-open');
});
});
</script>
@ -1234,6 +1193,9 @@ $(document).ready(function () {
<script>
$(document).ready(function () {
// temporarily add toc-ignore selector to headers for the consistency with Pandoc
$('.unlisted.unnumbered').addClass('toc-ignore')
// move toc-ignore selectors from section div to header
$('div.section.toc-ignore')
.removeClass('toc-ignore')

View File

@ -15,13 +15,22 @@
<title>Example_Queries</title>
<script src="site_libs/header-attrs-2.6/header-attrs.js"></script>
<script src="site_libs/jquery-1.11.3/jquery.min.js"></script>
<script src="site_libs/header-attrs-2.11/header-attrs.js"></script>
<script src="site_libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="site_libs/bootstrap-3.3.5/css/cosmo.min.css" rel="stylesheet" />
<script src="site_libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/respond.min.js"></script>
<style>h1 {font-size: 34px;}
h1.title {font-size: 38px;}
h2 {font-size: 30px;}
h3 {font-size: 24px;}
h4 {font-size: 18px;}
h5 {font-size: 16px;}
h6 {font-size: 12px;}
code {color: inherit; background-color: rgba(0, 0, 0, 0.04);}
pre:not([class]) { background-color: white }</style>
<script src="site_libs/navigation-1.1/tabsets.js"></script>
<link href="site_libs/highlightjs-9.12.0/default.css" rel="stylesheet" />
<script src="site_libs/highlightjs-9.12.0/highlight.js"></script>
@ -39,11 +48,6 @@
</style>
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
pre:not([class]) {
background-color: white;
}
</style>
<script type="text/javascript">
if (window.hljs) {
hljs.configure({languages: []});
@ -56,32 +60,6 @@ if (window.hljs) {
<style type="text/css">
h1 {
font-size: 34px;
}
h1.title {
font-size: 38px;
}
h2 {
font-size: 30px;
}
h3 {
font-size: 24px;
}
h4 {
font-size: 18px;
}
h5 {
font-size: 16px;
}
h6 {
font-size: 12px;
}
.table th:not([align]) {
text-align: left;
}
</style>
<link rel="stylesheet" href="style.css" type="text/css" />
@ -94,10 +72,6 @@ h6 {
margin-left: auto;
margin-right: auto;
}
code {
color: inherit;
background-color: rgba(0, 0, 0, 0.04);
}
img {
max-width:100%;
}
@ -113,40 +87,13 @@ button.code-folding-btn:focus {
summary {
display: list-item;
}
pre code {
padding: 0;
}
</style>
<style type="text/css">
/* padding for bootstrap navbar */
body {
padding-top: 51px;
padding-bottom: 40px;
}
/* offset scroll position for anchor links (for fixed navbar) */
.section h1 {
padding-top: 56px;
margin-top: -56px;
}
.section h2 {
padding-top: 56px;
margin-top: -56px;
}
.section h3 {
padding-top: 56px;
margin-top: -56px;
}
.section h4 {
padding-top: 56px;
margin-top: -56px;
}
.section h5 {
padding-top: 56px;
margin-top: -56px;
}
.section h6 {
padding-top: 56px;
margin-top: -56px;
}
.dropdown-submenu {
position: relative;
}
@ -174,7 +121,7 @@ body {
margin-right: -10px;
}
.dropdown-submenu:hover>a:after {
border-left-color: #ffffff;
border-left-color: #adb5bd;
}
.dropdown-submenu.pull-left {
float: none;
@ -186,7 +133,7 @@ body {
}
</style>
<script>
<script type="text/javascript">
// manage active state of menu based on current page
$(document).ready(function () {
// active menu anchor
@ -197,10 +144,23 @@ $(document).ready(function () {
var menuAnchor = $('a[href="' + href + '"]');
// mark it active
menuAnchor.parent().addClass('active');
menuAnchor.tab('show');
// if it's got a parent navbar menu mark it active as well
menuAnchor.closest('li.dropdown').addClass('active');
// Navbar adjustments
var navHeight = $(".navbar").first().height() + 15;
var style = document.createElement('style');
var pt = "padding-top: " + navHeight + "px; ";
var mt = "margin-top: -" + navHeight + "px; ";
var css = "";
// offset scroll position for anchor links (for fixed navbar)
for (var i = 1; i <= 6; i++) {
css += ".section h" + i + "{ " + pt + mt + "}\n";
}
style.innerHTML = "body {" + pt + "padding-bottom: 40px; }\n" + css;
document.head.appendChild(style);
});
</script>
@ -212,7 +172,6 @@ $(document).ready(function () {
max-height: 500px;
min-height: 44px;
overflow-y: auto;
background: white;
border: 1px solid #ddd;
border-radius: 4px;
}
@ -290,13 +249,13 @@ $(document).ready(function () {
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fas fa-home"></span>
<span class="fa fa-home"></span>
</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-landmark"></span>
<span class="fa fa-landmark"></span>
Background
@ -316,7 +275,7 @@ $(document).ready(function () {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-list-alt"></span>
<span class="fa fa-list-alt"></span>
Conventions
@ -336,7 +295,7 @@ $(document).ready(function () {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-history"></span>
<span class="fa fa-history"></span>
CDM Versions
@ -367,7 +326,7 @@ $(document).ready(function () {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-plus-square"></span>
<span class="fa fa-plus-square"></span>
Proposals
@ -389,7 +348,7 @@ $(document).ready(function () {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-question"></span>
<span class="fa fa-question"></span>
How to
@ -409,7 +368,7 @@ $(document).ready(function () {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-life-ring"></span>
<span class="fa fa-life-ring"></span>
Support
@ -431,7 +390,7 @@ $(document).ready(function () {
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/OHDSI/CommonDataModel">
<span class="fas fa-github"></span>
<span class="fa fa-github"></span>
</a>
</li>
@ -440,7 +399,7 @@ $(document).ready(function () {
</div><!--/.container -->
</div><!--/.navbar -->
<div class="fluid-row" id="header">
<div id="header">
@ -481,7 +440,7 @@ $(document).ready(function () {
$(document).ready(function () {
$('.tabset-dropdown > .nav-tabs > li').click(function () {
$(this).parent().toggleClass('nav-tabs-open')
$(this).parent().toggleClass('nav-tabs-open');
});
});
</script>

View File

@ -13,13 +13,22 @@
<title>CDM Proposals Under Review</title>
<script src="site_libs/header-attrs-2.6/header-attrs.js"></script>
<script src="site_libs/jquery-1.11.3/jquery.min.js"></script>
<script src="site_libs/header-attrs-2.11/header-attrs.js"></script>
<script src="site_libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="site_libs/bootstrap-3.3.5/css/cosmo.min.css" rel="stylesheet" />
<script src="site_libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/respond.min.js"></script>
<style>h1 {font-size: 34px;}
h1.title {font-size: 38px;}
h2 {font-size: 30px;}
h3 {font-size: 24px;}
h4 {font-size: 18px;}
h5 {font-size: 16px;}
h6 {font-size: 12px;}
code {color: inherit; background-color: rgba(0, 0, 0, 0.04);}
pre:not([class]) { background-color: white }</style>
<script src="site_libs/navigation-1.1/tabsets.js"></script>
<link href="site_libs/highlightjs-9.12.0/default.css" rel="stylesheet" />
<script src="site_libs/highlightjs-9.12.0/highlight.js"></script>
@ -37,11 +46,6 @@
</style>
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
pre:not([class]) {
background-color: white;
}
</style>
<script type="text/javascript">
if (window.hljs) {
hljs.configure({languages: []});
@ -54,32 +58,6 @@ if (window.hljs) {
<style type="text/css">
h1 {
font-size: 34px;
}
h1.title {
font-size: 38px;
}
h2 {
font-size: 30px;
}
h3 {
font-size: 24px;
}
h4 {
font-size: 18px;
}
h5 {
font-size: 16px;
}
h6 {
font-size: 12px;
}
.table th:not([align]) {
text-align: left;
}
</style>
<link rel="stylesheet" href="style.css" type="text/css" />
@ -92,10 +70,6 @@ h6 {
margin-left: auto;
margin-right: auto;
}
code {
color: inherit;
background-color: rgba(0, 0, 0, 0.04);
}
img {
max-width:100%;
}
@ -111,40 +85,13 @@ button.code-folding-btn:focus {
summary {
display: list-item;
}
pre code {
padding: 0;
}
</style>
<style type="text/css">
/* padding for bootstrap navbar */
body {
padding-top: 51px;
padding-bottom: 40px;
}
/* offset scroll position for anchor links (for fixed navbar) */
.section h1 {
padding-top: 56px;
margin-top: -56px;
}
.section h2 {
padding-top: 56px;
margin-top: -56px;
}
.section h3 {
padding-top: 56px;
margin-top: -56px;
}
.section h4 {
padding-top: 56px;
margin-top: -56px;
}
.section h5 {
padding-top: 56px;
margin-top: -56px;
}
.section h6 {
padding-top: 56px;
margin-top: -56px;
}
.dropdown-submenu {
position: relative;
}
@ -172,7 +119,7 @@ body {
margin-right: -10px;
}
.dropdown-submenu:hover>a:after {
border-left-color: #ffffff;
border-left-color: #adb5bd;
}
.dropdown-submenu.pull-left {
float: none;
@ -184,7 +131,7 @@ body {
}
</style>
<script>
<script type="text/javascript">
// manage active state of menu based on current page
$(document).ready(function () {
// active menu anchor
@ -195,10 +142,23 @@ $(document).ready(function () {
var menuAnchor = $('a[href="' + href + '"]');
// mark it active
menuAnchor.parent().addClass('active');
menuAnchor.tab('show');
// if it's got a parent navbar menu mark it active as well
menuAnchor.closest('li.dropdown').addClass('active');
// Navbar adjustments
var navHeight = $(".navbar").first().height() + 15;
var style = document.createElement('style');
var pt = "padding-top: " + navHeight + "px; ";
var mt = "margin-top: -" + navHeight + "px; ";
var css = "";
// offset scroll position for anchor links (for fixed navbar)
for (var i = 1; i <= 6; i++) {
css += ".section h" + i + "{ " + pt + mt + "}\n";
}
style.innerHTML = "body {" + pt + "padding-bottom: 40px; }\n" + css;
document.head.appendChild(style);
});
</script>
@ -210,7 +170,6 @@ $(document).ready(function () {
max-height: 500px;
min-height: 44px;
overflow-y: auto;
background: white;
border: 1px solid #ddd;
border-radius: 4px;
}
@ -288,13 +247,13 @@ $(document).ready(function () {
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fas fa-home"></span>
<span class="fa fa-home"></span>
</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-landmark"></span>
<span class="fa fa-landmark"></span>
Background
@ -314,7 +273,7 @@ $(document).ready(function () {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-list-alt"></span>
<span class="fa fa-list-alt"></span>
Conventions
@ -334,7 +293,7 @@ $(document).ready(function () {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-history"></span>
<span class="fa fa-history"></span>
CDM Versions
@ -365,7 +324,7 @@ $(document).ready(function () {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-plus-square"></span>
<span class="fa fa-plus-square"></span>
Proposals
@ -387,7 +346,7 @@ $(document).ready(function () {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-question"></span>
<span class="fa fa-question"></span>
How to
@ -407,7 +366,7 @@ $(document).ready(function () {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-life-ring"></span>
<span class="fa fa-life-ring"></span>
Support
@ -429,7 +388,7 @@ $(document).ready(function () {
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/OHDSI/CommonDataModel">
<span class="fas fa-github"></span>
<span class="fa fa-github"></span>
</a>
</li>
@ -438,7 +397,7 @@ $(document).ready(function () {
</div><!--/.container -->
</div><!--/.navbar -->
<div class="fluid-row" id="header">
<div id="header">
@ -476,7 +435,7 @@ $(document).ready(function () {
$(document).ready(function () {
$('.tabset-dropdown > .nav-tabs > li').click(function () {
$(this).parent().toggleClass('nav-tabs-open')
$(this).parent().toggleClass('nav-tabs-open');
});
});
</script>

File diff suppressed because one or more lines are too long

10881
docs/site_libs/jquery-3.6.0/jquery-3.6.0.js vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -23,7 +23,6 @@ window.initializeCodeFolding = function(show) {
// create a collapsable div to wrap the code in
var div = $('<div class="collapse r-code-collapse"></div>');
var showThis = (show || $(this).hasClass('fold-show')) && !$(this).hasClass('fold-hide');
if (showThis) div.addClass('in');
var id = 'rcode-643E0F36' + currentIndex++;
div.attr('id', id);
$(this).before(div);
@ -31,7 +30,7 @@ window.initializeCodeFolding = function(show) {
// add a show code button right above
var showCodeText = $('<span>' + (showThis ? 'Hide' : 'Code') + '</span>');
var showCodeButton = $('<button type="button" class="btn btn-default btn-xs code-folding-btn pull-right"></button>');
var showCodeButton = $('<button type="button" class="btn btn-default btn-xs btn-secondary btn-sm code-folding-btn pull-right float-right"></button>');
showCodeButton.append(showCodeText);
showCodeButton
.attr('data-toggle', 'collapse')
@ -47,13 +46,27 @@ window.initializeCodeFolding = function(show) {
div.before(buttonRow);
// show the div if necessary
if (showThis) div.collapse('show');
// update state of button on show/hide
div.on('hidden.bs.collapse', function () {
// * Change text
// * add a class for intermediate states styling
div.on('hide.bs.collapse', function () {
showCodeText.text('Code');
showCodeButton.addClass('btn-collapsing');
});
div.on('hidden.bs.collapse', function () {
showCodeButton.removeClass('btn-collapsing');
});
div.on('show.bs.collapse', function () {
showCodeText.text('Hide');
showCodeButton.addClass('btn-expanding');
});
div.on('shown.bs.collapse', function () {
showCodeButton.removeClass('btn-expanding');
});
});
}

View File

@ -176,7 +176,7 @@
self._setEventHandlers();
// Binding to the Window load event to make sure the correct scrollTop is calculated
$(window).load(function() {
$(window).on("load", function() {
// Sets the active TOC item
self._setActiveElement(true);

View File

@ -11,15 +11,24 @@
<title>sqlScripts.utf8</title>
<title>sqlScripts.knit</title>
<script src="site_libs/header-attrs-2.6/header-attrs.js"></script>
<script src="site_libs/jquery-1.11.3/jquery.min.js"></script>
<script src="site_libs/header-attrs-2.11/header-attrs.js"></script>
<script src="site_libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="site_libs/bootstrap-3.3.5/css/cosmo.min.css" rel="stylesheet" />
<script src="site_libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/respond.min.js"></script>
<style>h1 {font-size: 34px;}
h1.title {font-size: 38px;}
h2 {font-size: 30px;}
h3 {font-size: 24px;}
h4 {font-size: 18px;}
h5 {font-size: 16px;}
h6 {font-size: 12px;}
code {color: inherit; background-color: rgba(0, 0, 0, 0.04);}
pre:not([class]) { background-color: white }</style>
<script src="site_libs/jqueryui-1.11.4/jquery-ui.min.js"></script>
<link href="site_libs/tocify-1.9.1/jquery.tocify.css" rel="stylesheet" />
<script src="site_libs/tocify-1.9.1/jquery.tocify.js"></script>
@ -40,11 +49,6 @@
</style>
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
pre:not([class]) {
background-color: white;
}
</style>
<script type="text/javascript">
if (window.hljs) {
hljs.configure({languages: []});
@ -57,32 +61,6 @@ if (window.hljs) {
<style type="text/css">
h1 {
font-size: 34px;
}
h1.title {
font-size: 38px;
}
h2 {
font-size: 30px;
}
h3 {
font-size: 24px;
}
h4 {
font-size: 18px;
}
h5 {
font-size: 16px;
}
h6 {
font-size: 12px;
}
.table th:not([align]) {
text-align: left;
}
</style>
<link rel="stylesheet" href="style.css" type="text/css" />
@ -95,10 +73,6 @@ h6 {
margin-left: auto;
margin-right: auto;
}
code {
color: inherit;
background-color: rgba(0, 0, 0, 0.04);
}
img {
max-width:100%;
}
@ -114,40 +88,13 @@ button.code-folding-btn:focus {
summary {
display: list-item;
}
pre code {
padding: 0;
}
</style>
<style type="text/css">
/* padding for bootstrap navbar */
body {
padding-top: 51px;
padding-bottom: 40px;
}
/* offset scroll position for anchor links (for fixed navbar) */
.section h1 {
padding-top: 56px;
margin-top: -56px;
}
.section h2 {
padding-top: 56px;
margin-top: -56px;
}
.section h3 {
padding-top: 56px;
margin-top: -56px;
}
.section h4 {
padding-top: 56px;
margin-top: -56px;
}
.section h5 {
padding-top: 56px;
margin-top: -56px;
}
.section h6 {
padding-top: 56px;
margin-top: -56px;
}
.dropdown-submenu {
position: relative;
}
@ -175,7 +122,7 @@ body {
margin-right: -10px;
}
.dropdown-submenu:hover>a:after {
border-left-color: #ffffff;
border-left-color: #adb5bd;
}
.dropdown-submenu.pull-left {
float: none;
@ -187,7 +134,7 @@ body {
}
</style>
<script>
<script type="text/javascript">
// manage active state of menu based on current page
$(document).ready(function () {
// active menu anchor
@ -198,10 +145,23 @@ $(document).ready(function () {
var menuAnchor = $('a[href="' + href + '"]');
// mark it active
menuAnchor.parent().addClass('active');
menuAnchor.tab('show');
// if it's got a parent navbar menu mark it active as well
menuAnchor.closest('li.dropdown').addClass('active');
// Navbar adjustments
var navHeight = $(".navbar").first().height() + 15;
var style = document.createElement('style');
var pt = "padding-top: " + navHeight + "px; ";
var mt = "margin-top: -" + navHeight + "px; ";
var css = "";
// offset scroll position for anchor links (for fixed navbar)
for (var i = 1; i <= 6; i++) {
css += ".section h" + i + "{ " + pt + mt + "}\n";
}
style.innerHTML = "body {" + pt + "padding-bottom: 40px; }\n" + css;
document.head.appendChild(style);
});
</script>
@ -213,7 +173,6 @@ $(document).ready(function () {
max-height: 500px;
min-height: 44px;
overflow-y: auto;
background: white;
border: 1px solid #ddd;
border-radius: 4px;
}
@ -339,7 +298,7 @@ div.tocify {
<!-- setup 3col/9col grid for toc_float and main content -->
<div class="row-fluid">
<div class="row">
<div class="col-xs-12 col-sm-4 col-md-3">
<div id="TOC" class="tocify">
</div>
@ -364,13 +323,13 @@ div.tocify {
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fas fa-home"></span>
<span class="fa fa-home"></span>
</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-landmark"></span>
<span class="fa fa-landmark"></span>
Background
@ -390,7 +349,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-list-alt"></span>
<span class="fa fa-list-alt"></span>
Conventions
@ -410,7 +369,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-history"></span>
<span class="fa fa-history"></span>
CDM Versions
@ -441,7 +400,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-plus-square"></span>
<span class="fa fa-plus-square"></span>
Proposals
@ -463,7 +422,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-question"></span>
<span class="fa fa-question"></span>
How to
@ -483,7 +442,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-life-ring"></span>
<span class="fa fa-life-ring"></span>
Support
@ -505,7 +464,7 @@ div.tocify {
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/OHDSI/CommonDataModel">
<span class="fas fa-github"></span>
<span class="fa fa-github"></span>
</a>
</li>
@ -514,7 +473,7 @@ div.tocify {
</div><!--/.container -->
</div><!--/.navbar -->
<div class="fluid-row" id="header">
<div id="header">
@ -795,7 +754,8 @@ FROM @TARGET_CDMV5_SCHEMA.DRUG_EXPOSURE d
INNER JOIN @TARGET_CDMV5_SCHEMA.CONCEPT_ANCESTOR ca ON ca.DESCENDANT_CONCEPT_ID = d.DRUG_CONCEPT_ID
INNER JOIN @TARGET_CDMV5_SCHEMA.CONCEPT c ON ca.ANCESTOR_CONCEPT_ID = c.CONCEPT_ID
WHERE c.DOMAIN_ID = &#39;Drug&#39;
AND c.CONCEPT_CLASS_ID = &#39;Ingredient&#39;;
AND c.CONCEPT_CLASS_ID = &#39;Ingredient&#39;
AND c.STANDARD_CONCEPT = &#39;S&#39;;
/* / */
@ -988,7 +948,7 @@ $(document).ready(function () {
$(document).ready(function () {
$('.tabset-dropdown > .nav-tabs > li').click(function () {
$(this).parent().toggleClass('nav-tabs-open')
$(this).parent().toggleClass('nav-tabs-open');
});
});
</script>
@ -998,6 +958,9 @@ $(document).ready(function () {
<script>
$(document).ready(function () {
// temporarily add toc-ignore selector to headers for the consistency with Pandoc
$('.unlisted.unnumbered').addClass('toc-ignore')
// move toc-ignore selectors from section div to header
$('div.section.toc-ignore')
.removeClass('toc-ignore')

View File

@ -13,13 +13,22 @@
<title>How the Vocabulary is Built</title>
<script src="site_libs/header-attrs-2.6/header-attrs.js"></script>
<script src="site_libs/jquery-1.11.3/jquery.min.js"></script>
<script src="site_libs/header-attrs-2.11/header-attrs.js"></script>
<script src="site_libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="site_libs/bootstrap-3.3.5/css/cosmo.min.css" rel="stylesheet" />
<script src="site_libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/respond.min.js"></script>
<style>h1 {font-size: 34px;}
h1.title {font-size: 38px;}
h2 {font-size: 30px;}
h3 {font-size: 24px;}
h4 {font-size: 18px;}
h5 {font-size: 16px;}
h6 {font-size: 12px;}
code {color: inherit; background-color: rgba(0, 0, 0, 0.04);}
pre:not([class]) { background-color: white }</style>
<script src="site_libs/jqueryui-1.11.4/jquery-ui.min.js"></script>
<link href="site_libs/tocify-1.9.1/jquery.tocify.css" rel="stylesheet" />
<script src="site_libs/tocify-1.9.1/jquery.tocify.js"></script>
@ -40,11 +49,6 @@
</style>
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
pre:not([class]) {
background-color: white;
}
</style>
<script type="text/javascript">
if (window.hljs) {
hljs.configure({languages: []});
@ -57,32 +61,6 @@ if (window.hljs) {
<style type="text/css">
h1 {
font-size: 34px;
}
h1.title {
font-size: 38px;
}
h2 {
font-size: 30px;
}
h3 {
font-size: 24px;
}
h4 {
font-size: 18px;
}
h5 {
font-size: 16px;
}
h6 {
font-size: 12px;
}
.table th:not([align]) {
text-align: left;
}
</style>
<link rel="stylesheet" href="style.css" type="text/css" />
@ -95,10 +73,6 @@ h6 {
margin-left: auto;
margin-right: auto;
}
code {
color: inherit;
background-color: rgba(0, 0, 0, 0.04);
}
img {
max-width:100%;
}
@ -114,40 +88,13 @@ button.code-folding-btn:focus {
summary {
display: list-item;
}
pre code {
padding: 0;
}
</style>
<style type="text/css">
/* padding for bootstrap navbar */
body {
padding-top: 51px;
padding-bottom: 40px;
}
/* offset scroll position for anchor links (for fixed navbar) */
.section h1 {
padding-top: 56px;
margin-top: -56px;
}
.section h2 {
padding-top: 56px;
margin-top: -56px;
}
.section h3 {
padding-top: 56px;
margin-top: -56px;
}
.section h4 {
padding-top: 56px;
margin-top: -56px;
}
.section h5 {
padding-top: 56px;
margin-top: -56px;
}
.section h6 {
padding-top: 56px;
margin-top: -56px;
}
.dropdown-submenu {
position: relative;
}
@ -175,7 +122,7 @@ body {
margin-right: -10px;
}
.dropdown-submenu:hover>a:after {
border-left-color: #ffffff;
border-left-color: #adb5bd;
}
.dropdown-submenu.pull-left {
float: none;
@ -187,7 +134,7 @@ body {
}
</style>
<script>
<script type="text/javascript">
// manage active state of menu based on current page
$(document).ready(function () {
// active menu anchor
@ -198,10 +145,23 @@ $(document).ready(function () {
var menuAnchor = $('a[href="' + href + '"]');
// mark it active
menuAnchor.parent().addClass('active');
menuAnchor.tab('show');
// if it's got a parent navbar menu mark it active as well
menuAnchor.closest('li.dropdown').addClass('active');
// Navbar adjustments
var navHeight = $(".navbar").first().height() + 15;
var style = document.createElement('style');
var pt = "padding-top: " + navHeight + "px; ";
var mt = "margin-top: -" + navHeight + "px; ";
var css = "";
// offset scroll position for anchor links (for fixed navbar)
for (var i = 1; i <= 6; i++) {
css += ".section h" + i + "{ " + pt + mt + "}\n";
}
style.innerHTML = "body {" + pt + "padding-bottom: 40px; }\n" + css;
document.head.appendChild(style);
});
</script>
@ -213,7 +173,6 @@ $(document).ready(function () {
max-height: 500px;
min-height: 44px;
overflow-y: auto;
background: white;
border: 1px solid #ddd;
border-radius: 4px;
}
@ -339,7 +298,7 @@ div.tocify {
<!-- setup 3col/9col grid for toc_float and main content -->
<div class="row-fluid">
<div class="row">
<div class="col-xs-12 col-sm-4 col-md-3">
<div id="TOC" class="tocify">
</div>
@ -364,13 +323,13 @@ div.tocify {
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fas fa-home"></span>
<span class="fa fa-home"></span>
</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-landmark"></span>
<span class="fa fa-landmark"></span>
Background
@ -390,7 +349,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-list-alt"></span>
<span class="fa fa-list-alt"></span>
Conventions
@ -410,7 +369,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-history"></span>
<span class="fa fa-history"></span>
CDM Versions
@ -441,7 +400,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-plus-square"></span>
<span class="fa fa-plus-square"></span>
Proposals
@ -463,7 +422,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-question"></span>
<span class="fa fa-question"></span>
How to
@ -483,7 +442,7 @@ div.tocify {
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-life-ring"></span>
<span class="fa fa-life-ring"></span>
Support
@ -505,7 +464,7 @@ div.tocify {
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/OHDSI/CommonDataModel">
<span class="fas fa-github"></span>
<span class="fa fa-github"></span>
</a>
</li>
@ -514,7 +473,7 @@ div.tocify {
</div><!--/.container -->
</div><!--/.navbar -->
<div class="fluid-row" id="header">
<div id="header">
@ -1220,7 +1179,7 @@ $(document).ready(function () {
$(document).ready(function () {
$('.tabset-dropdown > .nav-tabs > li').click(function () {
$(this).parent().toggleClass('nav-tabs-open')
$(this).parent().toggleClass('nav-tabs-open');
});
});
</script>
@ -1230,6 +1189,9 @@ $(document).ready(function () {
<script>
$(document).ready(function () {
// temporarily add toc-ignore selector to headers for the consistency with Pandoc
$('.unlisted.unnumbered').addClass('toc-ignore')
// move toc-ignore selectors from section div to header
$('div.section.toc-ignore')
.removeClass('toc-ignore')

View File

@ -1,13 +1,13 @@
# This script is meant to create the OMOP Common Data Model DDLs for each dialect as well as the pdf of the documentation.
# For a given cdmVersion, create all ddl sql files for every sql dialect
# Results are written to ddl/cdm_version/dialect.
cdmVersion <- "5.3"
# Results are written to inst/ddl/cdm_version/dialect.
cdmVersion <- "5.4"
supportedVersions <- listSupportedVersions()
for (cdmVersion in supportedVersions) {
for (targetDialect in c("oracle", "postgresql", "pdw", "redshift", "impala", "netezza", "bigquery", "sql server")) {
for (targetDialect in c("oracle", "postgresql", "pdw", "redshift", "impala", "netezza", "bigquery", "sql server", "spark")) {
writeDdl(targetDialect = targetDialect,
cdmVersion = cdmVersion)
@ -22,10 +22,14 @@ for (cdmVersion in supportedVersions) {
}
}
CommonDataModel::buildRelease("5.4")
#############
# Zipping release
# All dialects
buildReleaseZip(cdmVersion="5.3", outputfolder="output")
buildReleaseZip(cdmVersion="5.4", outputfolder="output")
buildReleaseZip()
# One dialect
buildReleaseZip(cdmVersion="5.4", targetDialect="postgresql", outputfolder="output")

View File

@ -351,8 +351,8 @@ create table @cdmDatabaseSchema.drug_era (
drug_era_id INT64 not null,
person_id INT64 not null,
drug_concept_id INT64 not null,
drug_era_start_date datetime not null,
drug_era_end_date datetime not null,
drug_era_start_date date not null,
drug_era_end_date date not null,
drug_exposure_count INT64,
gap_days INT64 );
@ -363,16 +363,16 @@ create table @cdmDatabaseSchema.dose_era (
drug_concept_id INT64 not null,
unit_concept_id INT64 not null,
dose_value FLOAT64 not null,
dose_era_start_date datetime not null,
dose_era_end_date datetime not null );
dose_era_start_date date not null,
dose_era_end_date date not null );
--HINT DISTRIBUTE ON KEY (person_id)
create table @cdmDatabaseSchema.condition_era (
condition_era_id INT64 not null,
person_id INT64 not null,
condition_concept_id INT64 not null,
condition_era_start_date datetime not null,
condition_era_end_date datetime not null,
condition_era_start_date date not null,
condition_era_end_date date not null,
condition_occurrence_count INT64 );
--HINT DISTRIBUTE ON RANDOM

View File

@ -351,8 +351,8 @@ CREATE TABLE @cdmDatabaseSchema.DRUG_ERA (
drug_era_id integer NOT NULL,
person_id integer NOT NULL,
drug_concept_id integer NOT NULL,
drug_era_start_date TIMESTAMP NOT NULL,
drug_era_end_date TIMESTAMP NOT NULL,
drug_era_start_date date NOT NULL,
drug_era_end_date date NOT NULL,
drug_exposure_count integer NULL,
gap_days integer NULL );
@ -363,16 +363,16 @@ CREATE TABLE @cdmDatabaseSchema.DOSE_ERA (
drug_concept_id integer NOT NULL,
unit_concept_id integer NOT NULL,
dose_value FLOAT(6) NOT NULL,
dose_era_start_date TIMESTAMP NOT NULL,
dose_era_end_date TIMESTAMP NOT NULL );
dose_era_start_date date NOT NULL,
dose_era_end_date date NOT NULL );
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.CONDITION_ERA (
condition_era_id integer NOT NULL,
person_id integer NOT NULL,
condition_concept_id integer NOT NULL,
condition_era_start_date TIMESTAMP NOT NULL,
condition_era_end_date TIMESTAMP NOT NULL,
condition_era_start_date date NOT NULL,
condition_era_end_date date NOT NULL,
condition_occurrence_count integer NULL );
--HINT DISTRIBUTE ON RANDOM

View File

@ -351,8 +351,8 @@ CREATE TABLE @cdmDatabaseSchema.DRUG_ERA (
drug_era_id integer NOT NULL,
person_id integer NOT NULL,
drug_concept_id integer NOT NULL,
drug_era_start_date TIMESTAMP NOT NULL,
drug_era_end_date TIMESTAMP NOT NULL,
drug_era_start_date date NOT NULL,
drug_era_end_date date NOT NULL,
drug_exposure_count integer NULL,
gap_days integer NULL );
@ -363,16 +363,16 @@ CREATE TABLE @cdmDatabaseSchema.DOSE_ERA (
drug_concept_id integer NOT NULL,
unit_concept_id integer NOT NULL,
dose_value float NOT NULL,
dose_era_start_date TIMESTAMP NOT NULL,
dose_era_end_date TIMESTAMP NOT NULL );
dose_era_start_date date NOT NULL,
dose_era_end_date date NOT NULL );
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.CONDITION_ERA (
condition_era_id integer NOT NULL,
person_id integer NOT NULL,
condition_concept_id integer NOT NULL,
condition_era_start_date TIMESTAMP NOT NULL,
condition_era_end_date TIMESTAMP NOT NULL,
condition_era_start_date date NOT NULL,
condition_era_end_date date NOT NULL,
condition_occurrence_count integer NULL );
--HINT DISTRIBUTE ON RANDOM

View File

@ -350,8 +350,8 @@ WITH (DISTRIBUTION = REPLICATE);
IF XACT_STATE() = 1 COMMIT; CREATE TABLE @cdmDatabaseSchema.DRUG_ERA (drug_era_id integer NOT NULL,
person_id integer NOT NULL,
drug_concept_id integer NOT NULL,
drug_era_start_date datetime NOT NULL,
drug_era_end_date datetime NOT NULL,
drug_era_start_date date NOT NULL,
drug_era_end_date date NOT NULL,
drug_exposure_count integer NULL,
gap_days integer NULL )
WITH (DISTRIBUTION = HASH(person_id));
@ -362,16 +362,16 @@ IF XACT_STATE() = 1 COMMIT; CREATE TABLE @cdmDatabaseSchema.DOSE_ERA (dose_era
drug_concept_id integer NOT NULL,
unit_concept_id integer NOT NULL,
dose_value float NOT NULL,
dose_era_start_date datetime NOT NULL,
dose_era_end_date datetime NOT NULL )
dose_era_start_date date NOT NULL,
dose_era_end_date date NOT NULL )
WITH (DISTRIBUTION = HASH(person_id));
--HINT DISTRIBUTE ON KEY (person_id)
IF XACT_STATE() = 1 COMMIT; CREATE TABLE @cdmDatabaseSchema.CONDITION_ERA (condition_era_id integer NOT NULL,
person_id integer NOT NULL,
condition_concept_id integer NOT NULL,
condition_era_start_date datetime NOT NULL,
condition_era_end_date datetime NOT NULL,
condition_era_start_date date NOT NULL,
condition_era_end_date date NOT NULL,
condition_occurrence_count integer NULL )
WITH (DISTRIBUTION = HASH(person_id));

View File

@ -351,8 +351,8 @@ CREATE TABLE @cdmDatabaseSchema.DRUG_ERA (
drug_era_id integer NOT NULL,
person_id integer NOT NULL,
drug_concept_id integer NOT NULL,
drug_era_start_date TIMESTAMP NOT NULL,
drug_era_end_date TIMESTAMP NOT NULL,
drug_era_start_date date NOT NULL,
drug_era_end_date date NOT NULL,
drug_exposure_count integer NULL,
gap_days integer NULL );
@ -363,16 +363,16 @@ CREATE TABLE @cdmDatabaseSchema.DOSE_ERA (
drug_concept_id integer NOT NULL,
unit_concept_id integer NOT NULL,
dose_value NUMERIC NOT NULL,
dose_era_start_date TIMESTAMP NOT NULL,
dose_era_end_date TIMESTAMP NOT NULL );
dose_era_start_date date NOT NULL,
dose_era_end_date date NOT NULL );
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.CONDITION_ERA (
condition_era_id integer NOT NULL,
person_id integer NOT NULL,
condition_concept_id integer NOT NULL,
condition_era_start_date TIMESTAMP NOT NULL,
condition_era_end_date TIMESTAMP NOT NULL,
condition_era_start_date date NOT NULL,
condition_era_end_date date NOT NULL,
condition_occurrence_count integer NULL );
--HINT DISTRIBUTE ON RANDOM

View File

@ -350,8 +350,8 @@ DISTSTYLE ALL;
CREATE TABLE @cdmDatabaseSchema.DRUG_ERA (drug_era_id integer NOT NULL,
person_id integer NOT NULL,
drug_concept_id integer NOT NULL,
drug_era_start_date TIMESTAMP NOT NULL,
drug_era_end_date TIMESTAMP NOT NULL,
drug_era_start_date date NOT NULL,
drug_era_end_date date NOT NULL,
drug_exposure_count integer NULL,
gap_days integer NULL )
DISTKEY(person_id);
@ -362,16 +362,16 @@ CREATE TABLE @cdmDatabaseSchema.DOSE_ERA (dose_era_id integer NOT NULL,
drug_concept_id integer NOT NULL,
unit_concept_id integer NOT NULL,
dose_value float NOT NULL,
dose_era_start_date TIMESTAMP NOT NULL,
dose_era_end_date TIMESTAMP NOT NULL )
dose_era_start_date date NOT NULL,
dose_era_end_date date NOT NULL )
DISTKEY(person_id);
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.CONDITION_ERA (condition_era_id integer NOT NULL,
person_id integer NOT NULL,
condition_concept_id integer NOT NULL,
condition_era_start_date TIMESTAMP NOT NULL,
condition_era_end_date TIMESTAMP NOT NULL,
condition_era_start_date date NOT NULL,
condition_era_end_date date NOT NULL,
condition_occurrence_count integer NULL )
DISTKEY(person_id);

View File

@ -0,0 +1,158 @@
ALTER TABLE @cdmDatabaseSchema.PERSON ADD CONSTRAINT fpk_PERSON_gender_concept_id FOREIGN KEY (gender_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.PERSON ADD CONSTRAINT fpk_PERSON_race_concept_id FOREIGN KEY (race_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.PERSON ADD CONSTRAINT fpk_PERSON_ethnicity_concept_id FOREIGN KEY (ethnicity_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.PERSON ADD CONSTRAINT fpk_PERSON_location_id FOREIGN KEY (location_id) REFERENCES @cdmDatabaseSchema.LOCATION (LOCATION_ID);
ALTER TABLE @cdmDatabaseSchema.PERSON ADD CONSTRAINT fpk_PERSON_provider_id FOREIGN KEY (provider_id) REFERENCES @cdmDatabaseSchema.PROVIDER (PROVIDER_ID);
ALTER TABLE @cdmDatabaseSchema.PERSON ADD CONSTRAINT fpk_PERSON_care_site_id FOREIGN KEY (care_site_id) REFERENCES @cdmDatabaseSchema.CARE_SITE (CARE_SITE_ID);
ALTER TABLE @cdmDatabaseSchema.PERSON ADD CONSTRAINT fpk_PERSON_gender_source_concept_id FOREIGN KEY (gender_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.PERSON ADD CONSTRAINT fpk_PERSON_race_source_concept_id FOREIGN KEY (race_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.PERSON ADD CONSTRAINT fpk_PERSON_ethnicity_source_concept_id FOREIGN KEY (ethnicity_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.OBSERVATION_PERIOD ADD CONSTRAINT fpk_OBSERVATION_PERIOD_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID);
ALTER TABLE @cdmDatabaseSchema.OBSERVATION_PERIOD ADD CONSTRAINT fpk_OBSERVATION_PERIOD_period_type_concept_id FOREIGN KEY (period_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.VISIT_OCCURRENCE ADD CONSTRAINT fpk_VISIT_OCCURRENCE_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID);
ALTER TABLE @cdmDatabaseSchema.VISIT_OCCURRENCE ADD CONSTRAINT fpk_VISIT_OCCURRENCE_visit_concept_id FOREIGN KEY (visit_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.VISIT_OCCURRENCE ADD CONSTRAINT fpk_VISIT_OCCURRENCE_visit_type_concept_id FOREIGN KEY (visit_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.VISIT_OCCURRENCE ADD CONSTRAINT fpk_VISIT_OCCURRENCE_provider_id FOREIGN KEY (provider_id) REFERENCES @cdmDatabaseSchema.PROVIDER (PROVIDER_ID);
ALTER TABLE @cdmDatabaseSchema.VISIT_OCCURRENCE ADD CONSTRAINT fpk_VISIT_OCCURRENCE_care_site_id FOREIGN KEY (care_site_id) REFERENCES @cdmDatabaseSchema.CARE_SITE (CARE_SITE_ID);
ALTER TABLE @cdmDatabaseSchema.VISIT_OCCURRENCE ADD CONSTRAINT fpk_VISIT_OCCURRENCE_visit_source_concept_id FOREIGN KEY (visit_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.VISIT_OCCURRENCE ADD CONSTRAINT fpk_VISIT_OCCURRENCE_admitting_source_concept_id FOREIGN KEY (admitting_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.VISIT_OCCURRENCE ADD CONSTRAINT fpk_VISIT_OCCURRENCE_discharge_to_concept_id FOREIGN KEY (discharge_to_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.VISIT_OCCURRENCE ADD CONSTRAINT fpk_VISIT_OCCURRENCE_preceding_visit_occurrence_id FOREIGN KEY (preceding_visit_occurrence_id) REFERENCES @cdmDatabaseSchema.VISIT_OCCURRENCE (VISIT_OCCURRENCE_ID);
ALTER TABLE @cdmDatabaseSchema.VISIT_DETAIL ADD CONSTRAINT fpk_VISIT_DETAIL_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID);
ALTER TABLE @cdmDatabaseSchema.VISIT_DETAIL ADD CONSTRAINT fpk_VISIT_DETAIL_visit_detail_concept_id FOREIGN KEY (visit_detail_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.VISIT_DETAIL ADD CONSTRAINT fpk_VISIT_DETAIL_visit_detail_type_concept_id FOREIGN KEY (visit_detail_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.VISIT_DETAIL ADD CONSTRAINT fpk_VISIT_DETAIL_provider_id FOREIGN KEY (provider_id) REFERENCES @cdmDatabaseSchema.PROVIDER (PROVIDER_ID);
ALTER TABLE @cdmDatabaseSchema.VISIT_DETAIL ADD CONSTRAINT fpk_VISIT_DETAIL_care_site_id FOREIGN KEY (care_site_id) REFERENCES @cdmDatabaseSchema.CARE_SITE (CARE_SITE_ID);
ALTER TABLE @cdmDatabaseSchema.VISIT_DETAIL ADD CONSTRAINT fpk_VISIT_DETAIL_visit_detail_source_concept_id FOREIGN KEY (visit_detail_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.VISIT_DETAIL ADD CONSTRAINT fpk_VISIT_DETAIL_admitting_source_concept_id FOREIGN KEY (admitting_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.VISIT_DETAIL ADD CONSTRAINT fpk_VISIT_DETAIL_discharge_to_concept_id FOREIGN KEY (discharge_to_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.VISIT_DETAIL ADD CONSTRAINT fpk_VISIT_DETAIL_preceding_visit_detail_id FOREIGN KEY (preceding_visit_detail_id) REFERENCES @cdmDatabaseSchema.VISIT_DETAIL (VISIT_DETAIL_ID);
ALTER TABLE @cdmDatabaseSchema.VISIT_DETAIL ADD CONSTRAINT fpk_VISIT_DETAIL_visit_detail_parent_id FOREIGN KEY (visit_detail_parent_id) REFERENCES @cdmDatabaseSchema.VISIT_DETAIL (VISIT_DETAIL_ID);
ALTER TABLE @cdmDatabaseSchema.VISIT_DETAIL ADD CONSTRAINT fpk_VISIT_DETAIL_visit_occurrence_id FOREIGN KEY (visit_occurrence_id) REFERENCES @cdmDatabaseSchema.VISIT_OCCURRENCE (VISIT_OCCURRENCE_ID);
ALTER TABLE @cdmDatabaseSchema.CONDITION_OCCURRENCE ADD CONSTRAINT fpk_CONDITION_OCCURRENCE_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID);
ALTER TABLE @cdmDatabaseSchema.CONDITION_OCCURRENCE ADD CONSTRAINT fpk_CONDITION_OCCURRENCE_condition_concept_id FOREIGN KEY (condition_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.CONDITION_OCCURRENCE ADD CONSTRAINT fpk_CONDITION_OCCURRENCE_condition_type_concept_id FOREIGN KEY (condition_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.CONDITION_OCCURRENCE ADD CONSTRAINT fpk_CONDITION_OCCURRENCE_condition_status_concept_id FOREIGN KEY (condition_status_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.CONDITION_OCCURRENCE ADD CONSTRAINT fpk_CONDITION_OCCURRENCE_provider_id FOREIGN KEY (provider_id) REFERENCES @cdmDatabaseSchema.PROVIDER (PROVIDER_ID);
ALTER TABLE @cdmDatabaseSchema.CONDITION_OCCURRENCE ADD CONSTRAINT fpk_CONDITION_OCCURRENCE_visit_occurrence_id FOREIGN KEY (visit_occurrence_id) REFERENCES @cdmDatabaseSchema.VISIT_OCCURRENCE (VISIT_OCCURRENCE_ID);
ALTER TABLE @cdmDatabaseSchema.CONDITION_OCCURRENCE ADD CONSTRAINT fpk_CONDITION_OCCURRENCE_visit_detail_id FOREIGN KEY (visit_detail_id) REFERENCES @cdmDatabaseSchema.VISIT_DETAIL (VISIT_DETAIL_ID);
ALTER TABLE @cdmDatabaseSchema.CONDITION_OCCURRENCE ADD CONSTRAINT fpk_CONDITION_OCCURRENCE_condition_source_concept_id FOREIGN KEY (condition_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.DRUG_EXPOSURE ADD CONSTRAINT fpk_DRUG_EXPOSURE_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID);
ALTER TABLE @cdmDatabaseSchema.DRUG_EXPOSURE ADD CONSTRAINT fpk_DRUG_EXPOSURE_drug_concept_id FOREIGN KEY (drug_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.DRUG_EXPOSURE ADD CONSTRAINT fpk_DRUG_EXPOSURE_drug_type_concept_id FOREIGN KEY (drug_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.DRUG_EXPOSURE ADD CONSTRAINT fpk_DRUG_EXPOSURE_route_concept_id FOREIGN KEY (route_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.DRUG_EXPOSURE ADD CONSTRAINT fpk_DRUG_EXPOSURE_provider_id FOREIGN KEY (provider_id) REFERENCES @cdmDatabaseSchema.PROVIDER (PROVIDER_ID);
ALTER TABLE @cdmDatabaseSchema.DRUG_EXPOSURE ADD CONSTRAINT fpk_DRUG_EXPOSURE_visit_occurrence_id FOREIGN KEY (visit_occurrence_id) REFERENCES @cdmDatabaseSchema.VISIT_OCCURRENCE (VISIT_OCCURRENCE_ID);
ALTER TABLE @cdmDatabaseSchema.DRUG_EXPOSURE ADD CONSTRAINT fpk_DRUG_EXPOSURE_visit_detail_id FOREIGN KEY (visit_detail_id) REFERENCES @cdmDatabaseSchema.VISIT_DETAIL (VISIT_DETAIL_ID);
ALTER TABLE @cdmDatabaseSchema.DRUG_EXPOSURE ADD CONSTRAINT fpk_DRUG_EXPOSURE_drug_source_concept_id FOREIGN KEY (drug_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.PROCEDURE_OCCURRENCE ADD CONSTRAINT fpk_PROCEDURE_OCCURRENCE_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID);
ALTER TABLE @cdmDatabaseSchema.PROCEDURE_OCCURRENCE ADD CONSTRAINT fpk_PROCEDURE_OCCURRENCE_procedure_concept_id FOREIGN KEY (procedure_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.PROCEDURE_OCCURRENCE ADD CONSTRAINT fpk_PROCEDURE_OCCURRENCE_procedure_type_concept_id FOREIGN KEY (procedure_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.PROCEDURE_OCCURRENCE ADD CONSTRAINT fpk_PROCEDURE_OCCURRENCE_modifier_concept_id FOREIGN KEY (modifier_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.DEVICE_EXPOSURE ADD CONSTRAINT fpk_DEVICE_EXPOSURE_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID);
ALTER TABLE @cdmDatabaseSchema.DEVICE_EXPOSURE ADD CONSTRAINT fpk_DEVICE_EXPOSURE_device_concept_id FOREIGN KEY (device_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.DEVICE_EXPOSURE ADD CONSTRAINT fpk_DEVICE_EXPOSURE_device_type_concept_id FOREIGN KEY (device_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.DEVICE_EXPOSURE ADD CONSTRAINT fpk_DEVICE_EXPOSURE_provider_id FOREIGN KEY (provider_id) REFERENCES @cdmDatabaseSchema.PROVIDER (PROVIDER_ID);
ALTER TABLE @cdmDatabaseSchema.DEVICE_EXPOSURE ADD CONSTRAINT fpk_DEVICE_EXPOSURE_visit_occurrence_id FOREIGN KEY (visit_occurrence_id) REFERENCES @cdmDatabaseSchema.VISIT_OCCURRENCE (VISIT_OCCURRENCE_ID);
ALTER TABLE @cdmDatabaseSchema.DEVICE_EXPOSURE ADD CONSTRAINT fpk_DEVICE_EXPOSURE_visit_detail_id FOREIGN KEY (visit_detail_id) REFERENCES @cdmDatabaseSchema.VISIT_DETAIL (VISIT_DETAIL_ID);
ALTER TABLE @cdmDatabaseSchema.DEVICE_EXPOSURE ADD CONSTRAINT fpk_DEVICE_EXPOSURE_device_source_concept_id FOREIGN KEY (device_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.MEASUREMENT ADD CONSTRAINT fpk_MEASUREMENT_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID);
ALTER TABLE @cdmDatabaseSchema.MEASUREMENT ADD CONSTRAINT fpk_MEASUREMENT_measurement_concept_id FOREIGN KEY (measurement_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.MEASUREMENT ADD CONSTRAINT fpk_MEASUREMENT_measurement_type_concept_id FOREIGN KEY (measurement_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.MEASUREMENT ADD CONSTRAINT fpk_MEASUREMENT_operator_concept_id FOREIGN KEY (operator_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.MEASUREMENT ADD CONSTRAINT fpk_MEASUREMENT_value_as_concept_id FOREIGN KEY (value_as_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.MEASUREMENT ADD CONSTRAINT fpk_MEASUREMENT_unit_concept_id FOREIGN KEY (unit_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.MEASUREMENT ADD CONSTRAINT fpk_MEASUREMENT_provider_id FOREIGN KEY (provider_id) REFERENCES @cdmDatabaseSchema.PROVIDER (PROVIDER_ID);
ALTER TABLE @cdmDatabaseSchema.MEASUREMENT ADD CONSTRAINT fpk_MEASUREMENT_visit_occurrence_id FOREIGN KEY (visit_occurrence_id) REFERENCES @cdmDatabaseSchema.VISIT_OCCURRENCE (VISIT_OCCURRENCE_ID);
ALTER TABLE @cdmDatabaseSchema.MEASUREMENT ADD CONSTRAINT fpk_MEASUREMENT_visit_detail_id FOREIGN KEY (visit_detail_id) REFERENCES @cdmDatabaseSchema.VISIT_DETAIL (VISIT_DETAIL_ID);
ALTER TABLE @cdmDatabaseSchema.MEASUREMENT ADD CONSTRAINT fpk_MEASUREMENT_measurement_source_concept_id FOREIGN KEY (measurement_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.OBSERVATION ADD CONSTRAINT fpk_OBSERVATION_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID);
ALTER TABLE @cdmDatabaseSchema.OBSERVATION ADD CONSTRAINT fpk_OBSERVATION_observation_concept_id FOREIGN KEY (observation_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.OBSERVATION ADD CONSTRAINT fpk_OBSERVATION_observation_type_concept_id FOREIGN KEY (observation_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.OBSERVATION ADD CONSTRAINT fpk_OBSERVATION_value_as_concept_id FOREIGN KEY (value_as_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.OBSERVATION ADD CONSTRAINT fpk_OBSERVATION_qualifier_concept_id FOREIGN KEY (qualifier_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.OBSERVATION ADD CONSTRAINT fpk_OBSERVATION_unit_concept_id FOREIGN KEY (unit_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.OBSERVATION ADD CONSTRAINT fpk_OBSERVATION_provider_id FOREIGN KEY (provider_id) REFERENCES @cdmDatabaseSchema.PROVIDER (PROVIDER_ID);
ALTER TABLE @cdmDatabaseSchema.OBSERVATION ADD CONSTRAINT fpk_OBSERVATION_visit_occurrence_id FOREIGN KEY (visit_occurrence_id) REFERENCES @cdmDatabaseSchema.VISIT_OCCURRENCE (VISIT_OCCURRENCE_ID);
ALTER TABLE @cdmDatabaseSchema.OBSERVATION ADD CONSTRAINT fpk_OBSERVATION_visit_detail_id FOREIGN KEY (visit_detail_id) REFERENCES @cdmDatabaseSchema.VISIT_DETAIL (VISIT_DETAIL_ID);
ALTER TABLE @cdmDatabaseSchema.OBSERVATION ADD CONSTRAINT fpk_OBSERVATION_observation_source_concept_id FOREIGN KEY (observation_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.DEATH ADD CONSTRAINT fpk_DEATH_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID);
ALTER TABLE @cdmDatabaseSchema.DEATH ADD CONSTRAINT fpk_DEATH_death_type_concept_id FOREIGN KEY (death_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.DEATH ADD CONSTRAINT fpk_DEATH_cause_concept_id FOREIGN KEY (cause_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.DEATH ADD CONSTRAINT fpk_DEATH_cause_source_concept_id FOREIGN KEY (cause_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.NOTE ADD CONSTRAINT fpk_NOTE_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID);
ALTER TABLE @cdmDatabaseSchema.NOTE ADD CONSTRAINT fpk_NOTE_note_type_concept_id FOREIGN KEY (note_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.NOTE ADD CONSTRAINT fpk_NOTE_note_class_concept_id FOREIGN KEY (note_class_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.NOTE ADD CONSTRAINT fpk_NOTE_encoding_concept_id FOREIGN KEY (encoding_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.NOTE ADD CONSTRAINT fpk_NOTE_language_concept_id FOREIGN KEY (language_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.NOTE ADD CONSTRAINT fpk_NOTE_provider_id FOREIGN KEY (provider_id) REFERENCES @cdmDatabaseSchema.PROVIDER (PROVIDER_ID);
ALTER TABLE @cdmDatabaseSchema.NOTE ADD CONSTRAINT fpk_NOTE_visit_occurrence_id FOREIGN KEY (visit_occurrence_id) REFERENCES @cdmDatabaseSchema.VISIT_OCCURRENCE (VISIT_OCCURRENCE_ID);
ALTER TABLE @cdmDatabaseSchema.NOTE ADD CONSTRAINT fpk_NOTE_visit_detail_id FOREIGN KEY (visit_detail_id) REFERENCES @cdmDatabaseSchema.VISIT_DETAIL (VISIT_DETAIL_ID);
ALTER TABLE @cdmDatabaseSchema.NOTE_NLP ADD CONSTRAINT fpk_NOTE_NLP_section_concept_id FOREIGN KEY (section_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.NOTE_NLP ADD CONSTRAINT fpk_NOTE_NLP_note_nlp_concept_id FOREIGN KEY (note_nlp_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.NOTE_NLP ADD CONSTRAINT fpk_NOTE_NLP_note_nlp_source_concept_id FOREIGN KEY (note_nlp_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.SPECIMEN ADD CONSTRAINT fpk_SPECIMEN_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID);
ALTER TABLE @cdmDatabaseSchema.SPECIMEN ADD CONSTRAINT fpk_SPECIMEN_specimen_concept_id FOREIGN KEY (specimen_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.SPECIMEN ADD CONSTRAINT fpk_SPECIMEN_specimen_type_concept_id FOREIGN KEY (specimen_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.SPECIMEN ADD CONSTRAINT fpk_SPECIMEN_unit_concept_id FOREIGN KEY (unit_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.SPECIMEN ADD CONSTRAINT fpk_SPECIMEN_anatomic_site_concept_id FOREIGN KEY (anatomic_site_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.SPECIMEN ADD CONSTRAINT fpk_SPECIMEN_disease_status_concept_id FOREIGN KEY (disease_status_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.FACT_RELATIONSHIP ADD CONSTRAINT fpk_FACT_RELATIONSHIP_domain_concept_id_1 FOREIGN KEY (domain_concept_id_1) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.FACT_RELATIONSHIP ADD CONSTRAINT fpk_FACT_RELATIONSHIP_domain_concept_id_2 FOREIGN KEY (domain_concept_id_2) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.FACT_RELATIONSHIP ADD CONSTRAINT fpk_FACT_RELATIONSHIP_relationship_concept_id FOREIGN KEY (relationship_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.CARE_SITE ADD CONSTRAINT fpk_CARE_SITE_place_of_service_concept_id FOREIGN KEY (place_of_service_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.CARE_SITE ADD CONSTRAINT fpk_CARE_SITE_location_id FOREIGN KEY (location_id) REFERENCES @cdmDatabaseSchema.LOCATION (LOCATION_ID);
ALTER TABLE @cdmDatabaseSchema.PROVIDER ADD CONSTRAINT fpk_PROVIDER_specialty_concept_id FOREIGN KEY (specialty_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.PROVIDER ADD CONSTRAINT fpk_PROVIDER_care_site_id FOREIGN KEY (care_site_id) REFERENCES @cdmDatabaseSchema.CARE_SITE (CARE_SITE_ID);
ALTER TABLE @cdmDatabaseSchema.PROVIDER ADD CONSTRAINT fpk_PROVIDER_gender_concept_id FOREIGN KEY (gender_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.PROVIDER ADD CONSTRAINT fpk_PROVIDER_specialty_source_concept_id FOREIGN KEY (specialty_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.PROVIDER ADD CONSTRAINT fpk_PROVIDER_gender_source_concept_id FOREIGN KEY (gender_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_payer_plan_period_id FOREIGN KEY (payer_plan_period_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID);
ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID);
ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_payer_concept_id FOREIGN KEY (payer_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_payer_source_concept_id FOREIGN KEY (payer_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_plan_concept_id FOREIGN KEY (plan_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_plan_source_concept_id FOREIGN KEY (plan_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_sponsor_concept_id FOREIGN KEY (sponsor_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_sponsor_source_concept_id FOREIGN KEY (sponsor_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_stop_reason_concept_id FOREIGN KEY (stop_reason_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_stop_reason_source_concept_id FOREIGN KEY (stop_reason_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.COST ADD CONSTRAINT fpk_COST_cost_domain_id FOREIGN KEY (cost_domain_id) REFERENCES @cdmDatabaseSchema.DOMAIN (DOMAIN_ID);
ALTER TABLE @cdmDatabaseSchema.COST ADD CONSTRAINT fpk_COST_cost_type_concept_id FOREIGN KEY (cost_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.COST ADD CONSTRAINT fpk_COST_currency_concept_id FOREIGN KEY (currency_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.COST ADD CONSTRAINT fpk_COST_revenue_code_concept_id FOREIGN KEY (revenue_code_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.COST ADD CONSTRAINT fpk_COST_drg_concept_id FOREIGN KEY (drg_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.DRUG_ERA ADD CONSTRAINT fpk_DRUG_ERA_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID);
ALTER TABLE @cdmDatabaseSchema.DRUG_ERA ADD CONSTRAINT fpk_DRUG_ERA_drug_concept_id FOREIGN KEY (drug_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.DOSE_ERA ADD CONSTRAINT fpk_DOSE_ERA_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID);
ALTER TABLE @cdmDatabaseSchema.DOSE_ERA ADD CONSTRAINT fpk_DOSE_ERA_drug_concept_id FOREIGN KEY (drug_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.DOSE_ERA ADD CONSTRAINT fpk_DOSE_ERA_unit_concept_id FOREIGN KEY (unit_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.CONDITION_ERA ADD CONSTRAINT fpk_CONDITION_ERA_condition_concept_id FOREIGN KEY (condition_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.METADATA ADD CONSTRAINT fpk_METADATA_metadata_concept_id FOREIGN KEY (metadata_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.METADATA ADD CONSTRAINT fpk_METADATA_metadata_type_concept_id FOREIGN KEY (metadata_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.METADATA ADD CONSTRAINT fpk_METADATA_value_as_concept_id FOREIGN KEY (value_as_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.CONCEPT ADD CONSTRAINT fpk_CONCEPT_domain_id FOREIGN KEY (domain_id) REFERENCES @cdmDatabaseSchema.DOMAIN (DOMAIN_ID);
ALTER TABLE @cdmDatabaseSchema.CONCEPT ADD CONSTRAINT fpk_CONCEPT_vocabulary_id FOREIGN KEY (vocabulary_id) REFERENCES @cdmDatabaseSchema.VOCABULARY (VOCABULARY_ID);
ALTER TABLE @cdmDatabaseSchema.CONCEPT ADD CONSTRAINT fpk_CONCEPT_concept_class_id FOREIGN KEY (concept_class_id) REFERENCES @cdmDatabaseSchema.CONCEPT_CLASS (CONCEPT_CLASS_ID);
ALTER TABLE @cdmDatabaseSchema.VOCABULARY ADD CONSTRAINT fpk_VOCABULARY_vocabulary_concept_id FOREIGN KEY (vocabulary_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.DOMAIN ADD CONSTRAINT fpk_DOMAIN_domain_concept_id FOREIGN KEY (domain_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.CONCEPT_CLASS ADD CONSTRAINT fpk_CONCEPT_CLASS_concept_class_concept_id FOREIGN KEY (concept_class_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.CONCEPT_RELATIONSHIP ADD CONSTRAINT fpk_CONCEPT_RELATIONSHIP_concept_id_1 FOREIGN KEY (concept_id_1) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.CONCEPT_RELATIONSHIP ADD CONSTRAINT fpk_CONCEPT_RELATIONSHIP_concept_id_2 FOREIGN KEY (concept_id_2) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.CONCEPT_RELATIONSHIP ADD CONSTRAINT fpk_CONCEPT_RELATIONSHIP_relationship_id FOREIGN KEY (relationship_id) REFERENCES @cdmDatabaseSchema.RELATIONSHIP (RELATIONSHIP_ID);
ALTER TABLE @cdmDatabaseSchema.RELATIONSHIP ADD CONSTRAINT fpk_RELATIONSHIP_relationship_concept_id FOREIGN KEY (relationship_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.CONCEPT_SYNONYM ADD CONSTRAINT fpk_CONCEPT_SYNONYM_concept_id FOREIGN KEY (concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.CONCEPT_SYNONYM ADD CONSTRAINT fpk_CONCEPT_SYNONYM_language_concept_id FOREIGN KEY (language_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.CONCEPT_ANCESTOR ADD CONSTRAINT fpk_CONCEPT_ANCESTOR_ancestor_concept_id FOREIGN KEY (ancestor_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.CONCEPT_ANCESTOR ADD CONSTRAINT fpk_CONCEPT_ANCESTOR_descendant_concept_id FOREIGN KEY (descendant_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.SOURCE_TO_CONCEPT_MAP ADD CONSTRAINT fpk_SOURCE_TO_CONCEPT_MAP_source_concept_id FOREIGN KEY (source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.SOURCE_TO_CONCEPT_MAP ADD CONSTRAINT fpk_SOURCE_TO_CONCEPT_MAP_target_concept_id FOREIGN KEY (target_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.SOURCE_TO_CONCEPT_MAP ADD CONSTRAINT fpk_SOURCE_TO_CONCEPT_MAP_target_vocabulary_id FOREIGN KEY (target_vocabulary_id) REFERENCES @cdmDatabaseSchema.VOCABULARY (VOCABULARY_ID);
ALTER TABLE @cdmDatabaseSchema.DRUG_STRENGTH ADD CONSTRAINT fpk_DRUG_STRENGTH_drug_concept_id FOREIGN KEY (drug_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.DRUG_STRENGTH ADD CONSTRAINT fpk_DRUG_STRENGTH_ingredient_concept_id FOREIGN KEY (ingredient_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.DRUG_STRENGTH ADD CONSTRAINT fpk_DRUG_STRENGTH_amount_unit_concept_id FOREIGN KEY (amount_unit_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.DRUG_STRENGTH ADD CONSTRAINT fpk_DRUG_STRENGTH_numerator_unit_concept_id FOREIGN KEY (numerator_unit_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.DRUG_STRENGTH ADD CONSTRAINT fpk_DRUG_STRENGTH_denominator_unit_concept_id FOREIGN KEY (denominator_unit_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.COHORT_DEFINITION ADD CONSTRAINT fpk_COHORT_DEFINITION_definition_type_concept_id FOREIGN KEY (definition_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.COHORT_DEFINITION ADD CONSTRAINT fpk_COHORT_DEFINITION_subject_concept_id FOREIGN KEY (subject_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.ATTRIBUTE_DEFINITION ADD CONSTRAINT fpk_ATTRIBUTE_DEFINITION_attribute_type_concept_id FOREIGN KEY (attribute_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);

View File

@ -0,0 +1,544 @@
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.PERSON
USING DELTA
AS
SELECT CAST(NULL AS integer) AS person_id,
CAST(NULL AS integer) AS gender_concept_id,
CAST(NULL AS integer) AS year_of_birth,
CAST(NULL AS integer) AS month_of_birth,
CAST(NULL AS integer) AS day_of_birth,
CAST(NULL AS TIMESTAMP) AS birth_datetime,
CAST(NULL AS integer) AS race_concept_id,
CAST(NULL AS integer) AS ethnicity_concept_id,
CAST(NULL AS integer) AS location_id,
CAST(NULL AS integer) AS provider_id,
CAST(NULL AS integer) AS care_site_id,
CAST(NULL AS STRING) AS person_source_value,
CAST(NULL AS STRING) AS gender_source_value,
CAST(NULL AS integer) AS gender_source_concept_id,
CAST(NULL AS STRING) AS race_source_value,
CAST(NULL AS integer) AS race_source_concept_id,
CAST(NULL AS STRING) AS ethnicity_source_value,
CAST(NULL AS integer) AS ethnicity_source_concept_id WHERE 1 = 0;
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.OBSERVATION_PERIOD
USING DELTA
AS
SELECT CAST(NULL AS integer) AS observation_period_id,
CAST(NULL AS integer) AS person_id,
CAST(NULL AS date) AS observation_period_start_date,
CAST(NULL AS date) AS observation_period_end_date,
CAST(NULL AS integer) AS period_type_concept_id WHERE 1 = 0;
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.VISIT_OCCURRENCE
USING DELTA
AS
SELECT CAST(NULL AS integer) AS visit_occurrence_id,
CAST(NULL AS integer) AS person_id,
CAST(NULL AS integer) AS visit_concept_id,
CAST(NULL AS date) AS visit_start_date,
CAST(NULL AS TIMESTAMP) AS visit_start_datetime,
CAST(NULL AS date) AS visit_end_date,
CAST(NULL AS TIMESTAMP) AS visit_end_datetime,
CAST(NULL AS integer) AS visit_type_concept_id,
CAST(NULL AS integer) AS provider_id,
CAST(NULL AS integer) AS care_site_id,
CAST(NULL AS STRING) AS visit_source_value,
CAST(NULL AS integer) AS visit_source_concept_id,
CAST(NULL AS integer) AS admitting_source_concept_id,
CAST(NULL AS STRING) AS admitting_source_value,
CAST(NULL AS integer) AS discharge_to_concept_id,
CAST(NULL AS STRING) AS discharge_to_source_value,
CAST(NULL AS integer) AS preceding_visit_occurrence_id WHERE 1 = 0;
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.VISIT_DETAIL
USING DELTA
AS
SELECT CAST(NULL AS integer) AS visit_detail_id,
CAST(NULL AS integer) AS person_id,
CAST(NULL AS integer) AS visit_detail_concept_id,
CAST(NULL AS date) AS visit_detail_start_date,
CAST(NULL AS TIMESTAMP) AS visit_detail_start_datetime,
CAST(NULL AS date) AS visit_detail_end_date,
CAST(NULL AS TIMESTAMP) AS visit_detail_end_datetime,
CAST(NULL AS integer) AS visit_detail_type_concept_id,
CAST(NULL AS integer) AS provider_id,
CAST(NULL AS integer) AS care_site_id,
CAST(NULL AS STRING) AS visit_detail_source_value,
CAST(NULL AS integer) AS visit_detail_source_concept_id,
CAST(NULL AS STRING) AS admitting_source_value,
CAST(NULL AS integer) AS admitting_source_concept_id,
CAST(NULL AS STRING) AS discharge_to_source_value,
CAST(NULL AS integer) AS discharge_to_concept_id,
CAST(NULL AS integer) AS preceding_visit_detail_id,
CAST(NULL AS integer) AS visit_detail_parent_id,
CAST(NULL AS integer) AS visit_occurrence_id WHERE 1 = 0;
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.CONDITION_OCCURRENCE
USING DELTA
AS
SELECT CAST(NULL AS integer) AS condition_occurrence_id,
CAST(NULL AS integer) AS person_id,
CAST(NULL AS integer) AS condition_concept_id,
CAST(NULL AS date) AS condition_start_date,
CAST(NULL AS TIMESTAMP) AS condition_start_datetime,
CAST(NULL AS date) AS condition_end_date,
CAST(NULL AS TIMESTAMP) AS condition_end_datetime,
CAST(NULL AS integer) AS condition_type_concept_id,
CAST(NULL AS integer) AS condition_status_concept_id,
CAST(NULL AS STRING) AS stop_reason,
CAST(NULL AS integer) AS provider_id,
CAST(NULL AS integer) AS visit_occurrence_id,
CAST(NULL AS integer) AS visit_detail_id,
CAST(NULL AS STRING) AS condition_source_value,
CAST(NULL AS integer) AS condition_source_concept_id,
CAST(NULL AS STRING) AS condition_status_source_value WHERE 1 = 0;
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.DRUG_EXPOSURE
USING DELTA
AS
SELECT CAST(NULL AS integer) AS drug_exposure_id,
CAST(NULL AS integer) AS person_id,
CAST(NULL AS integer) AS drug_concept_id,
CAST(NULL AS date) AS drug_exposure_start_date,
CAST(NULL AS TIMESTAMP) AS drug_exposure_start_datetime,
CAST(NULL AS date) AS drug_exposure_end_date,
CAST(NULL AS TIMESTAMP) AS drug_exposure_end_datetime,
CAST(NULL AS date) AS verbatim_end_date,
CAST(NULL AS integer) AS drug_type_concept_id,
CAST(NULL AS STRING) AS stop_reason,
CAST(NULL AS integer) AS refills,
CAST(NULL AS float) AS quantity,
CAST(NULL AS integer) AS days_supply,
CAST(NULL AS STRING) AS sig,
CAST(NULL AS integer) AS route_concept_id,
CAST(NULL AS STRING) AS lot_number,
CAST(NULL AS integer) AS provider_id,
CAST(NULL AS integer) AS visit_occurrence_id,
CAST(NULL AS integer) AS visit_detail_id,
CAST(NULL AS STRING) AS drug_source_value,
CAST(NULL AS integer) AS drug_source_concept_id,
CAST(NULL AS STRING) AS route_source_value,
CAST(NULL AS STRING) AS dose_unit_source_value WHERE 1 = 0;
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.PROCEDURE_OCCURRENCE
USING DELTA
AS
SELECT CAST(NULL AS integer) AS procedure_occurrence_id,
CAST(NULL AS integer) AS person_id,
CAST(NULL AS integer) AS procedure_concept_id,
CAST(NULL AS date) AS procedure_date,
CAST(NULL AS TIMESTAMP) AS procedure_datetime,
CAST(NULL AS integer) AS procedure_type_concept_id,
CAST(NULL AS integer) AS modifier_concept_id,
CAST(NULL AS integer) AS quantity,
CAST(NULL AS integer) AS provider_id,
CAST(NULL AS integer) AS visit_occurrence_id,
CAST(NULL AS integer) AS visit_detail_id,
CAST(NULL AS STRING) AS procedure_source_value,
CAST(NULL AS integer) AS procedure_source_concept_id,
CAST(NULL AS STRING) AS modifier_source_value WHERE 1 = 0;
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.DEVICE_EXPOSURE
USING DELTA
AS
SELECT CAST(NULL AS integer) AS device_exposure_id,
CAST(NULL AS integer) AS person_id,
CAST(NULL AS integer) AS device_concept_id,
CAST(NULL AS date) AS device_exposure_start_date,
CAST(NULL AS TIMESTAMP) AS device_exposure_start_datetime,
CAST(NULL AS date) AS device_exposure_end_date,
CAST(NULL AS TIMESTAMP) AS device_exposure_end_datetime,
CAST(NULL AS integer) AS device_type_concept_id,
CAST(NULL AS STRING) AS unique_device_id,
CAST(NULL AS integer) AS quantity,
CAST(NULL AS integer) AS provider_id,
CAST(NULL AS integer) AS visit_occurrence_id,
CAST(NULL AS integer) AS visit_detail_id,
CAST(NULL AS STRING) AS device_source_value,
CAST(NULL AS integer) AS device_source_concept_id WHERE 1 = 0;
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.MEASUREMENT
USING DELTA
AS
SELECT CAST(NULL AS integer) AS measurement_id,
CAST(NULL AS integer) AS person_id,
CAST(NULL AS integer) AS measurement_concept_id,
CAST(NULL AS date) AS measurement_date,
CAST(NULL AS TIMESTAMP) AS measurement_datetime,
CAST(NULL AS STRING) AS measurement_time,
CAST(NULL AS integer) AS measurement_type_concept_id,
CAST(NULL AS integer) AS operator_concept_id,
CAST(NULL AS float) AS value_as_number,
CAST(NULL AS integer) AS value_as_concept_id,
CAST(NULL AS integer) AS unit_concept_id,
CAST(NULL AS float) AS range_low,
CAST(NULL AS float) AS range_high,
CAST(NULL AS integer) AS provider_id,
CAST(NULL AS integer) AS visit_occurrence_id,
CAST(NULL AS integer) AS visit_detail_id,
CAST(NULL AS STRING) AS measurement_source_value,
CAST(NULL AS integer) AS measurement_source_concept_id,
CAST(NULL AS STRING) AS unit_source_value,
CAST(NULL AS STRING) AS value_source_value WHERE 1 = 0;
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.OBSERVATION
USING DELTA
AS
SELECT CAST(NULL AS integer) AS observation_id,
CAST(NULL AS integer) AS person_id,
CAST(NULL AS integer) AS observation_concept_id,
CAST(NULL AS date) AS observation_date,
CAST(NULL AS TIMESTAMP) AS observation_datetime,
CAST(NULL AS integer) AS observation_type_concept_id,
CAST(NULL AS float) AS value_as_number,
CAST(NULL AS STRING) AS value_as_string,
CAST(NULL AS integer) AS value_as_concept_id,
CAST(NULL AS integer) AS qualifier_concept_id,
CAST(NULL AS integer) AS unit_concept_id,
CAST(NULL AS integer) AS provider_id,
CAST(NULL AS integer) AS visit_occurrence_id,
CAST(NULL AS integer) AS visit_detail_id,
CAST(NULL AS STRING) AS observation_source_value,
CAST(NULL AS integer) AS observation_source_concept_id,
CAST(NULL AS STRING) AS unit_source_value,
CAST(NULL AS STRING) AS qualifier_source_value WHERE 1 = 0;
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.DEATH
USING DELTA
AS
SELECT CAST(NULL AS integer) AS person_id,
CAST(NULL AS date) AS death_date,
CAST(NULL AS TIMESTAMP) AS death_datetime,
CAST(NULL AS integer) AS death_type_concept_id,
CAST(NULL AS integer) AS cause_concept_id,
CAST(NULL AS STRING) AS cause_source_value,
CAST(NULL AS integer) AS cause_source_concept_id WHERE 1 = 0;
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.NOTE
USING DELTA
AS
SELECT CAST(NULL AS integer) AS note_id,
CAST(NULL AS integer) AS person_id,
CAST(NULL AS date) AS note_date,
CAST(NULL AS TIMESTAMP) AS note_datetime,
CAST(NULL AS integer) AS note_type_concept_id,
CAST(NULL AS integer) AS note_class_concept_id,
CAST(NULL AS STRING) AS note_title,
CAST(NULL AS STRING) AS note_text,
CAST(NULL AS integer) AS encoding_concept_id,
CAST(NULL AS integer) AS language_concept_id,
CAST(NULL AS integer) AS provider_id,
CAST(NULL AS integer) AS visit_occurrence_id,
CAST(NULL AS integer) AS visit_detail_id,
CAST(NULL AS STRING) AS note_source_value WHERE 1 = 0;
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.NOTE_NLP
USING DELTA
AS
SELECT CAST(NULL AS integer) AS note_nlp_id,
CAST(NULL AS integer) AS note_id,
CAST(NULL AS integer) AS section_concept_id,
CAST(NULL AS STRING) AS snippet,
CAST(NULL AS STRING) AS offset,
CAST(NULL AS STRING) AS lexical_variant,
CAST(NULL AS integer) AS note_nlp_concept_id,
CAST(NULL AS integer) AS note_nlp_source_concept_id,
CAST(NULL AS STRING) AS nlp_system,
CAST(NULL AS date) AS nlp_date,
CAST(NULL AS TIMESTAMP) AS nlp_datetime,
CAST(NULL AS STRING) AS term_exists,
CAST(NULL AS STRING) AS term_temporal,
CAST(NULL AS STRING) AS term_modifiers WHERE 1 = 0;
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.SPECIMEN
USING DELTA
AS
SELECT CAST(NULL AS integer) AS specimen_id,
CAST(NULL AS integer) AS person_id,
CAST(NULL AS integer) AS specimen_concept_id,
CAST(NULL AS integer) AS specimen_type_concept_id,
CAST(NULL AS date) AS specimen_date,
CAST(NULL AS TIMESTAMP) AS specimen_datetime,
CAST(NULL AS float) AS quantity,
CAST(NULL AS integer) AS unit_concept_id,
CAST(NULL AS integer) AS anatomic_site_concept_id,
CAST(NULL AS integer) AS disease_status_concept_id,
CAST(NULL AS STRING) AS specimen_source_id,
CAST(NULL AS STRING) AS specimen_source_value,
CAST(NULL AS STRING) AS unit_source_value,
CAST(NULL AS STRING) AS anatomic_site_source_value,
CAST(NULL AS STRING) AS disease_status_source_value WHERE 1 = 0;
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.FACT_RELATIONSHIP
USING DELTA
AS
SELECT CAST(NULL AS integer) AS domain_concept_id_1,
CAST(NULL AS integer) AS fact_id_1,
CAST(NULL AS integer) AS domain_concept_id_2,
CAST(NULL AS integer) AS fact_id_2,
CAST(NULL AS integer) AS relationship_concept_id WHERE 1 = 0;
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.LOCATION
USING DELTA
AS
SELECT CAST(NULL AS integer) AS location_id,
CAST(NULL AS STRING) AS address_1,
CAST(NULL AS STRING) AS address_2,
CAST(NULL AS STRING) AS city,
CAST(NULL AS STRING) AS state,
CAST(NULL AS STRING) AS zip,
CAST(NULL AS STRING) AS county,
CAST(NULL AS STRING) AS location_source_value WHERE 1 = 0;
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.CARE_SITE
USING DELTA
AS
SELECT CAST(NULL AS integer) AS care_site_id,
CAST(NULL AS STRING) AS care_site_name,
CAST(NULL AS integer) AS place_of_service_concept_id,
CAST(NULL AS integer) AS location_id,
CAST(NULL AS STRING) AS care_site_source_value,
CAST(NULL AS STRING) AS place_of_service_source_value WHERE 1 = 0;
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.PROVIDER
USING DELTA
AS
SELECT CAST(NULL AS integer) AS provider_id,
CAST(NULL AS STRING) AS provider_name,
CAST(NULL AS STRING) AS npi,
CAST(NULL AS STRING) AS dea,
CAST(NULL AS integer) AS specialty_concept_id,
CAST(NULL AS integer) AS care_site_id,
CAST(NULL AS integer) AS year_of_birth,
CAST(NULL AS integer) AS gender_concept_id,
CAST(NULL AS STRING) AS provider_source_value,
CAST(NULL AS STRING) AS specialty_source_value,
CAST(NULL AS integer) AS specialty_source_concept_id,
CAST(NULL AS STRING) AS gender_source_value,
CAST(NULL AS integer) AS gender_source_concept_id WHERE 1 = 0;
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD
USING DELTA
AS
SELECT CAST(NULL AS integer) AS payer_plan_period_id,
CAST(NULL AS integer) AS person_id,
CAST(NULL AS date) AS payer_plan_period_start_date,
CAST(NULL AS date) AS payer_plan_period_end_date,
CAST(NULL AS integer) AS payer_concept_id,
CAST(NULL AS STRING) AS payer_source_value,
CAST(NULL AS integer) AS payer_source_concept_id,
CAST(NULL AS integer) AS plan_concept_id,
CAST(NULL AS STRING) AS plan_source_value,
CAST(NULL AS integer) AS plan_source_concept_id,
CAST(NULL AS integer) AS sponsor_concept_id,
CAST(NULL AS STRING) AS sponsor_source_value,
CAST(NULL AS integer) AS sponsor_source_concept_id,
CAST(NULL AS STRING) AS family_source_value,
CAST(NULL AS integer) AS stop_reason_concept_id,
CAST(NULL AS STRING) AS stop_reason_source_value,
CAST(NULL AS integer) AS stop_reason_source_concept_id WHERE 1 = 0;
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.COST
USING DELTA
AS
SELECT CAST(NULL AS integer) AS cost_id,
CAST(NULL AS integer) AS cost_event_id,
CAST(NULL AS STRING) AS cost_domain_id,
CAST(NULL AS integer) AS cost_type_concept_id,
CAST(NULL AS integer) AS currency_concept_id,
CAST(NULL AS float) AS total_charge,
CAST(NULL AS float) AS total_cost,
CAST(NULL AS float) AS total_paid,
CAST(NULL AS float) AS paid_by_payer,
CAST(NULL AS float) AS paid_by_patient,
CAST(NULL AS float) AS paid_patient_copay,
CAST(NULL AS float) AS paid_patient_coinsurance,
CAST(NULL AS float) AS paid_patient_deductible,
CAST(NULL AS float) AS paid_by_primary,
CAST(NULL AS float) AS paid_ingredient_cost,
CAST(NULL AS float) AS paid_dispensing_fee,
CAST(NULL AS integer) AS payer_plan_period_id,
CAST(NULL AS float) AS amount_allowed,
CAST(NULL AS integer) AS revenue_code_concept_id,
CAST(NULL AS STRING) AS revenue_code_source_value,
CAST(NULL AS integer) AS drg_concept_id,
CAST(NULL AS STRING) AS drg_source_value WHERE 1 = 0;
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.DRUG_ERA
USING DELTA
AS
SELECT CAST(NULL AS integer) AS drug_era_id,
CAST(NULL AS integer) AS person_id,
CAST(NULL AS integer) AS drug_concept_id,
CAST(NULL AS date) AS drug_era_start_date,
CAST(NULL AS date) AS drug_era_end_date,
CAST(NULL AS integer) AS drug_exposure_count,
CAST(NULL AS integer) AS gap_days WHERE 1 = 0;
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.DOSE_ERA
USING DELTA
AS
SELECT CAST(NULL AS integer) AS dose_era_id,
CAST(NULL AS integer) AS person_id,
CAST(NULL AS integer) AS drug_concept_id,
CAST(NULL AS integer) AS unit_concept_id,
CAST(NULL AS float) AS dose_value,
CAST(NULL AS date) AS dose_era_start_date,
CAST(NULL AS date) AS dose_era_end_date WHERE 1 = 0;
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.CONDITION_ERA
USING DELTA
AS
SELECT CAST(NULL AS integer) AS condition_era_id,
CAST(NULL AS integer) AS person_id,
CAST(NULL AS integer) AS condition_concept_id,
CAST(NULL AS date) AS condition_era_start_date,
CAST(NULL AS date) AS condition_era_end_date,
CAST(NULL AS integer) AS condition_occurrence_count WHERE 1 = 0;
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.METADATA
USING DELTA
AS
SELECT CAST(NULL AS integer) AS metadata_concept_id,
CAST(NULL AS integer) AS metadata_type_concept_id,
CAST(NULL AS STRING) AS name,
CAST(NULL AS STRING) AS value_as_string,
CAST(NULL AS integer) AS value_as_concept_id,
CAST(NULL AS date) AS metadata_date,
CAST(NULL AS TIMESTAMP) AS metadata_datetime WHERE 1 = 0;
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.CDM_SOURCE
USING DELTA
AS
SELECT CAST(NULL AS STRING) AS cdm_source_name,
CAST(NULL AS STRING) AS cdm_source_abbreviation,
CAST(NULL AS STRING) AS cdm_holder,
CAST(NULL AS STRING) AS source_description,
CAST(NULL AS STRING) AS source_documentation_reference,
CAST(NULL AS STRING) AS cdm_etl_reference,
CAST(NULL AS date) AS source_release_date,
CAST(NULL AS date) AS cdm_release_date,
CAST(NULL AS STRING) AS cdm_version,
CAST(NULL AS STRING) AS vocabulary_version WHERE 1 = 0;
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.CONCEPT
USING DELTA
AS
SELECT CAST(NULL AS integer) AS concept_id,
CAST(NULL AS STRING) AS concept_name,
CAST(NULL AS STRING) AS domain_id,
CAST(NULL AS STRING) AS vocabulary_id,
CAST(NULL AS STRING) AS concept_class_id,
CAST(NULL AS STRING) AS standard_concept,
CAST(NULL AS STRING) AS concept_code,
CAST(NULL AS date) AS valid_start_date,
CAST(NULL AS date) AS valid_end_date,
CAST(NULL AS STRING) AS invalid_reason WHERE 1 = 0;
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.VOCABULARY
USING DELTA
AS
SELECT CAST(NULL AS STRING) AS vocabulary_id,
CAST(NULL AS STRING) AS vocabulary_name,
CAST(NULL AS STRING) AS vocabulary_reference,
CAST(NULL AS STRING) AS vocabulary_version,
CAST(NULL AS integer) AS vocabulary_concept_id WHERE 1 = 0;
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.DOMAIN
USING DELTA
AS
SELECT CAST(NULL AS STRING) AS domain_id,
CAST(NULL AS STRING) AS domain_name,
CAST(NULL AS integer) AS domain_concept_id WHERE 1 = 0;
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.CONCEPT_CLASS
USING DELTA
AS
SELECT CAST(NULL AS STRING) AS concept_class_id,
CAST(NULL AS STRING) AS concept_class_name,
CAST(NULL AS integer) AS concept_class_concept_id WHERE 1 = 0;
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.CONCEPT_RELATIONSHIP
USING DELTA
AS
SELECT CAST(NULL AS integer) AS concept_id_1,
CAST(NULL AS integer) AS concept_id_2,
CAST(NULL AS STRING) AS relationship_id,
CAST(NULL AS date) AS valid_start_date,
CAST(NULL AS date) AS valid_end_date,
CAST(NULL AS STRING) AS invalid_reason WHERE 1 = 0;
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.RELATIONSHIP
USING DELTA
AS
SELECT CAST(NULL AS STRING) AS relationship_id,
CAST(NULL AS STRING) AS relationship_name,
CAST(NULL AS STRING) AS is_hierarchical,
CAST(NULL AS STRING) AS defines_ancestry,
CAST(NULL AS STRING) AS reverse_relationship_id,
CAST(NULL AS integer) AS relationship_concept_id WHERE 1 = 0;
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.CONCEPT_SYNONYM
USING DELTA
AS
SELECT CAST(NULL AS integer) AS concept_id,
CAST(NULL AS STRING) AS concept_synonym_name,
CAST(NULL AS integer) AS language_concept_id WHERE 1 = 0;
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.CONCEPT_ANCESTOR
USING DELTA
AS
SELECT CAST(NULL AS integer) AS ancestor_concept_id,
CAST(NULL AS integer) AS descendant_concept_id,
CAST(NULL AS integer) AS min_levels_of_separation,
CAST(NULL AS integer) AS max_levels_of_separation WHERE 1 = 0;
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.SOURCE_TO_CONCEPT_MAP
USING DELTA
AS
SELECT CAST(NULL AS STRING) AS source_code,
CAST(NULL AS integer) AS source_concept_id,
CAST(NULL AS STRING) AS source_vocabulary_id,
CAST(NULL AS STRING) AS source_code_description,
CAST(NULL AS integer) AS target_concept_id,
CAST(NULL AS STRING) AS target_vocabulary_id,
CAST(NULL AS date) AS valid_start_date,
CAST(NULL AS date) AS valid_end_date,
CAST(NULL AS STRING) AS invalid_reason WHERE 1 = 0;
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.DRUG_STRENGTH
USING DELTA
AS
SELECT CAST(NULL AS integer) AS drug_concept_id,
CAST(NULL AS integer) AS ingredient_concept_id,
CAST(NULL AS float) AS amount_value,
CAST(NULL AS integer) AS amount_unit_concept_id,
CAST(NULL AS float) AS numerator_value,
CAST(NULL AS integer) AS numerator_unit_concept_id,
CAST(NULL AS float) AS denominator_value,
CAST(NULL AS integer) AS denominator_unit_concept_id,
CAST(NULL AS integer) AS box_size,
CAST(NULL AS date) AS valid_start_date,
CAST(NULL AS date) AS valid_end_date,
CAST(NULL AS STRING) AS invalid_reason WHERE 1 = 0;
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.COHORT_DEFINITION
USING DELTA
AS
SELECT CAST(NULL AS integer) AS cohort_definition_id,
CAST(NULL AS STRING) AS cohort_definition_name,
CAST(NULL AS STRING) AS cohort_definition_description,
CAST(NULL AS integer) AS definition_type_concept_id,
CAST(NULL AS STRING) AS cohort_definition_syntax,
CAST(NULL AS integer) AS subject_concept_id,
CAST(NULL AS date) AS cohort_initiation_date WHERE 1 = 0;
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.ATTRIBUTE_DEFINITION
USING DELTA
AS
SELECT CAST(NULL AS integer) AS attribute_definition_id,
CAST(NULL AS STRING) AS attribute_name,
CAST(NULL AS STRING) AS attribute_description,
CAST(NULL AS integer) AS attribute_type_concept_id,
CAST(NULL AS STRING) AS attribute_syntax WHERE 1 = 0;

View File

@ -0,0 +1,70 @@
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes

View File

@ -0,0 +1,26 @@
ALTER TABLE @cdmDatabaseSchema.PERSON ADD CONSTRAINT xpk_PERSON (person_id);
ALTER TABLE @cdmDatabaseSchema.OBSERVATION_PERIOD ADD CONSTRAINT xpk_OBSERVATION_PERIOD (observation_period_id);
ALTER TABLE @cdmDatabaseSchema.VISIT_OCCURRENCE ADD CONSTRAINT xpk_VISIT_OCCURRENCE (visit_occurrence_id);
ALTER TABLE @cdmDatabaseSchema.VISIT_DETAIL ADD CONSTRAINT xpk_VISIT_DETAIL (visit_detail_id);
ALTER TABLE @cdmDatabaseSchema.CONDITION_OCCURRENCE ADD CONSTRAINT xpk_CONDITION_OCCURRENCE (condition_occurrence_id);
ALTER TABLE @cdmDatabaseSchema.DRUG_EXPOSURE ADD CONSTRAINT xpk_DRUG_EXPOSURE (drug_exposure_id);
ALTER TABLE @cdmDatabaseSchema.PROCEDURE_OCCURRENCE ADD CONSTRAINT xpk_PROCEDURE_OCCURRENCE (procedure_occurrence_id);
ALTER TABLE @cdmDatabaseSchema.DEVICE_EXPOSURE ADD CONSTRAINT xpk_DEVICE_EXPOSURE (device_exposure_id);
ALTER TABLE @cdmDatabaseSchema.MEASUREMENT ADD CONSTRAINT xpk_MEASUREMENT (measurement_id);
ALTER TABLE @cdmDatabaseSchema.OBSERVATION ADD CONSTRAINT xpk_OBSERVATION (observation_id);
ALTER TABLE @cdmDatabaseSchema.NOTE ADD CONSTRAINT xpk_NOTE (note_id);
ALTER TABLE @cdmDatabaseSchema.NOTE_NLP ADD CONSTRAINT xpk_NOTE_NLP (note_nlp_id);
ALTER TABLE @cdmDatabaseSchema.SPECIMEN ADD CONSTRAINT xpk_SPECIMEN (specimen_id);
ALTER TABLE @cdmDatabaseSchema.LOCATION ADD CONSTRAINT xpk_LOCATION (location_id);
ALTER TABLE @cdmDatabaseSchema.CARE_SITE ADD CONSTRAINT xpk_CARE_SITE (care_site_id);
ALTER TABLE @cdmDatabaseSchema.PROVIDER ADD CONSTRAINT xpk_PROVIDER (provider_id);
ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT xpk_PAYER_PLAN_PERIOD (payer_plan_period_id);
ALTER TABLE @cdmDatabaseSchema.COST ADD CONSTRAINT xpk_COST (cost_id);
ALTER TABLE @cdmDatabaseSchema.DRUG_ERA ADD CONSTRAINT xpk_DRUG_ERA (drug_era_id);
ALTER TABLE @cdmDatabaseSchema.DOSE_ERA ADD CONSTRAINT xpk_DOSE_ERA (dose_era_id);
ALTER TABLE @cdmDatabaseSchema.CONDITION_ERA ADD CONSTRAINT xpk_CONDITION_ERA (condition_era_id);
ALTER TABLE @cdmDatabaseSchema.CONCEPT ADD CONSTRAINT xpk_CONCEPT (concept_id);
ALTER TABLE @cdmDatabaseSchema.VOCABULARY ADD CONSTRAINT xpk_VOCABULARY (vocabulary_id);
ALTER TABLE @cdmDatabaseSchema.DOMAIN ADD CONSTRAINT xpk_DOMAIN (domain_id);
ALTER TABLE @cdmDatabaseSchema.CONCEPT_CLASS ADD CONSTRAINT xpk_CONCEPT_CLASS (concept_class_id);
ALTER TABLE @cdmDatabaseSchema.RELATIONSHIP ADD CONSTRAINT xpk_RELATIONSHIP (relationship_id);

View File

@ -351,8 +351,8 @@ CREATE TABLE @cdmDatabaseSchema.DRUG_ERA (
drug_era_id integer NOT NULL,
person_id integer NOT NULL,
drug_concept_id integer NOT NULL,
drug_era_start_date datetime NOT NULL,
drug_era_end_date datetime NOT NULL,
drug_era_start_date date NOT NULL,
drug_era_end_date date NOT NULL,
drug_exposure_count integer NULL,
gap_days integer NULL );
@ -363,16 +363,16 @@ CREATE TABLE @cdmDatabaseSchema.DOSE_ERA (
drug_concept_id integer NOT NULL,
unit_concept_id integer NOT NULL,
dose_value float NOT NULL,
dose_era_start_date datetime NOT NULL,
dose_era_end_date datetime NOT NULL );
dose_era_start_date date NOT NULL,
dose_era_end_date date NOT NULL );
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.CONDITION_ERA (
condition_era_id integer NOT NULL,
person_id integer NOT NULL,
condition_concept_id integer NOT NULL,
condition_era_start_date datetime NOT NULL,
condition_era_end_date datetime NOT NULL,
condition_era_start_date date NOT NULL,
condition_era_end_date date NOT NULL,
condition_occurrence_count integer NULL );
--HINT DISTRIBUTE ON RANDOM

View File

@ -350,8 +350,6 @@ alter table @cdmDatabaseSchema.drug_strength add constraint fpk_drug_strength_nu
alter table @cdmDatabaseSchema.drug_strength add constraint fpk_drug_strength_denominator_unit_concept_id foreign key (denominator_unit_concept_id) references @cdmDatabaseSchema.concept (concept_id);
alter table @cdmDatabaseSchema.cohort_definition add constraint fpk_cohort_definition_cohort_definition_id foreign key (cohort_definition_id) references @cdmDatabaseSchema.cohort (cohort_definition_id);
alter table @cdmDatabaseSchema.cohort_definition add constraint fpk_cohort_definition_definition_type_concept_id foreign key (definition_type_concept_id) references @cdmDatabaseSchema.concept (concept_id);
alter table @cdmDatabaseSchema.cohort_definition add constraint fpk_cohort_definition_subject_concept_id foreign key (subject_concept_id) references @cdmDatabaseSchema.concept (concept_id);

View File

@ -369,8 +369,8 @@ create table @cdmDatabaseSchema.drug_era (
drug_era_id INT64 not null,
person_id INT64 not null,
drug_concept_id INT64 not null,
drug_era_start_date datetime not null,
drug_era_end_date datetime not null,
drug_era_start_date date not null,
drug_era_end_date date not null,
drug_exposure_count INT64,
gap_days INT64 );
@ -381,16 +381,16 @@ create table @cdmDatabaseSchema.dose_era (
drug_concept_id INT64 not null,
unit_concept_id INT64 not null,
dose_value FLOAT64 not null,
dose_era_start_date datetime not null,
dose_era_end_date datetime not null );
dose_era_start_date date not null,
dose_era_end_date date not null );
--HINT DISTRIBUTE ON KEY (person_id)
create table @cdmDatabaseSchema.condition_era (
condition_era_id INT64 not null,
person_id INT64 not null,
condition_concept_id INT64 not null,
condition_era_start_date datetime not null,
condition_era_end_date datetime not null,
condition_era_start_date date not null,
condition_era_end_date date not null,
condition_occurrence_count INT64 );
--HINT DISTRIBUTE ON KEY (person_id)

View File

@ -350,8 +350,6 @@ ALTER TABLE @cdmDatabaseSchema.DRUG_STRENGTH ADD CONSTRAINT fpk_DRUG_STRENGTH_nu
ALTER TABLE @cdmDatabaseSchema.DRUG_STRENGTH ADD CONSTRAINT fpk_DRUG_STRENGTH_denominator_unit_concept_id FOREIGN KEY (denominator_unit_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.COHORT_DEFINITION ADD CONSTRAINT fpk_COHORT_DEFINITION_cohort_definition_id FOREIGN KEY (cohort_definition_id) REFERENCES @cdmDatabaseSchema.COHORT (COHORT_DEFINITION_ID);
ALTER TABLE @cdmDatabaseSchema.COHORT_DEFINITION ADD CONSTRAINT fpk_COHORT_DEFINITION_definition_type_concept_id FOREIGN KEY (definition_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.COHORT_DEFINITION ADD CONSTRAINT fpk_COHORT_DEFINITION_subject_concept_id FOREIGN KEY (subject_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);

View File

@ -180,7 +180,7 @@ CREATE TABLE @cdmDatabaseSchema.MEASUREMENT (
unit_source_value VARCHAR(50),
unit_source_concept_id integer NULL,
value_source_value VARCHAR(50),
measurement_event_id BIGINT,
measurement_event_id integer NULL,
meas_event_field_concept_id integer NULL );
--HINT DISTRIBUTE ON KEY (person_id)
@ -204,7 +204,7 @@ CREATE TABLE @cdmDatabaseSchema.OBSERVATION (
unit_source_value VARCHAR(50),
qualifier_source_value VARCHAR(50),
value_source_value VARCHAR(50),
observation_event_id BIGINT,
observation_event_id integer NULL,
obs_event_field_concept_id integer NULL );
--HINT DISTRIBUTE ON KEY (person_id)
@ -233,7 +233,7 @@ CREATE TABLE @cdmDatabaseSchema.NOTE (
visit_occurrence_id integer NULL,
visit_detail_id integer NULL,
note_source_value VARCHAR(50),
note_event_id BIGINT,
note_event_id integer NULL,
note_event_field_concept_id integer NULL );
--HINT DISTRIBUTE ON RANDOM
@ -395,14 +395,14 @@ CREATE TABLE @cdmDatabaseSchema.CONDITION_ERA (
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.EPISODE (
episode_id BIGINT,
person_id BIGINT,
episode_id INT,
person_id INT,
episode_concept_id INT,
episode_start_date TIMESTAMP,
episode_start_datetime TIMESTAMP,
episode_end_date TIMESTAMP,
episode_end_datetime TIMESTAMP,
episode_parent_id BIGINT,
episode_parent_id integer NULL,
episode_number integer NULL,
episode_object_concept_id INT,
episode_type_concept_id INT,
@ -411,8 +411,8 @@ CREATE TABLE @cdmDatabaseSchema.EPISODE (
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.EPISODE_EVENT (
episode_id BIGINT,
event_id BIGINT,
episode_id INT,
event_id INT,
episode_event_field_concept_id INT );
--HINT DISTRIBUTE ON RANDOM

View File

@ -350,8 +350,6 @@ ALTER TABLE @cdmDatabaseSchema.DRUG_STRENGTH ADD CONSTRAINT fpk_DRUG_STRENGTH_nu
ALTER TABLE @cdmDatabaseSchema.DRUG_STRENGTH ADD CONSTRAINT fpk_DRUG_STRENGTH_denominator_unit_concept_id FOREIGN KEY (denominator_unit_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.COHORT_DEFINITION ADD CONSTRAINT fpk_COHORT_DEFINITION_cohort_definition_id FOREIGN KEY (cohort_definition_id) REFERENCES @cdmDatabaseSchema.COHORT (COHORT_DEFINITION_ID);
ALTER TABLE @cdmDatabaseSchema.COHORT_DEFINITION ADD CONSTRAINT fpk_COHORT_DEFINITION_definition_type_concept_id FOREIGN KEY (definition_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.COHORT_DEFINITION ADD CONSTRAINT fpk_COHORT_DEFINITION_subject_concept_id FOREIGN KEY (subject_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);

View File

@ -180,7 +180,7 @@ CREATE TABLE @cdmDatabaseSchema.MEASUREMENT (
unit_source_value varchar(50) NULL,
unit_source_concept_id integer NULL,
value_source_value varchar(50) NULL,
measurement_event_id bigint NULL,
measurement_event_id integer NULL,
meas_event_field_concept_id integer NULL );
--HINT DISTRIBUTE ON KEY (person_id)
@ -204,7 +204,7 @@ CREATE TABLE @cdmDatabaseSchema.OBSERVATION (
unit_source_value varchar(50) NULL,
qualifier_source_value varchar(50) NULL,
value_source_value varchar(50) NULL,
observation_event_id bigint NULL,
observation_event_id integer NULL,
obs_event_field_concept_id integer NULL );
--HINT DISTRIBUTE ON KEY (person_id)
@ -233,7 +233,7 @@ CREATE TABLE @cdmDatabaseSchema.NOTE (
visit_occurrence_id integer NULL,
visit_detail_id integer NULL,
note_source_value varchar(50) NULL,
note_event_id bigint NULL,
note_event_id integer NULL,
note_event_field_concept_id integer NULL );
--HINT DISTRIBUTE ON RANDOM
@ -369,8 +369,8 @@ CREATE TABLE @cdmDatabaseSchema.DRUG_ERA (
drug_era_id integer NOT NULL,
person_id integer NOT NULL,
drug_concept_id integer NOT NULL,
drug_era_start_date TIMESTAMP NOT NULL,
drug_era_end_date TIMESTAMP NOT NULL,
drug_era_start_date date NOT NULL,
drug_era_end_date date NOT NULL,
drug_exposure_count integer NULL,
gap_days integer NULL );
@ -381,28 +381,28 @@ CREATE TABLE @cdmDatabaseSchema.DOSE_ERA (
drug_concept_id integer NOT NULL,
unit_concept_id integer NOT NULL,
dose_value FLOAT(6) NOT NULL,
dose_era_start_date TIMESTAMP NOT NULL,
dose_era_end_date TIMESTAMP NOT NULL );
dose_era_start_date date NOT NULL,
dose_era_end_date date NOT NULL );
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.CONDITION_ERA (
condition_era_id integer NOT NULL,
person_id integer NOT NULL,
condition_concept_id integer NOT NULL,
condition_era_start_date TIMESTAMP NOT NULL,
condition_era_end_date TIMESTAMP NOT NULL,
condition_era_start_date date NOT NULL,
condition_era_end_date date NOT NULL,
condition_occurrence_count integer NULL );
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.EPISODE (
episode_id bigint NOT NULL,
person_id bigint NOT NULL,
episode_id integer NOT NULL,
person_id integer NOT NULL,
episode_concept_id integer NOT NULL,
episode_start_date date NOT NULL,
episode_start_datetime TIMESTAMP NULL,
episode_end_date date NULL,
episode_end_datetime TIMESTAMP NULL,
episode_parent_id bigint NULL,
episode_parent_id integer NULL,
episode_number integer NULL,
episode_object_concept_id integer NOT NULL,
episode_type_concept_id integer NOT NULL,
@ -411,8 +411,8 @@ CREATE TABLE @cdmDatabaseSchema.EPISODE (
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.EPISODE_EVENT (
episode_id bigint NOT NULL,
event_id bigint NOT NULL,
episode_id integer NOT NULL,
event_id integer NOT NULL,
episode_event_field_concept_id integer NOT NULL );
--HINT DISTRIBUTE ON RANDOM

View File

@ -350,8 +350,6 @@ ALTER TABLE @cdmDatabaseSchema.DRUG_STRENGTH ADD CONSTRAINT fpk_DRUG_STRENGTH_nu
ALTER TABLE @cdmDatabaseSchema.DRUG_STRENGTH ADD CONSTRAINT fpk_DRUG_STRENGTH_denominator_unit_concept_id FOREIGN KEY (denominator_unit_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.COHORT_DEFINITION ADD CONSTRAINT fpk_COHORT_DEFINITION_cohort_definition_id FOREIGN KEY (cohort_definition_id) REFERENCES @cdmDatabaseSchema.COHORT (COHORT_DEFINITION_ID);
ALTER TABLE @cdmDatabaseSchema.COHORT_DEFINITION ADD CONSTRAINT fpk_COHORT_DEFINITION_definition_type_concept_id FOREIGN KEY (definition_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.COHORT_DEFINITION ADD CONSTRAINT fpk_COHORT_DEFINITION_subject_concept_id FOREIGN KEY (subject_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);

View File

@ -180,7 +180,7 @@ CREATE TABLE @cdmDatabaseSchema.MEASUREMENT (
unit_source_value varchar(50) NULL,
unit_source_concept_id integer NULL,
value_source_value varchar(50) NULL,
measurement_event_id NUMBER(19) NULL,
measurement_event_id integer NULL,
meas_event_field_concept_id integer NULL );
--HINT DISTRIBUTE ON KEY (person_id)
@ -204,7 +204,7 @@ CREATE TABLE @cdmDatabaseSchema.OBSERVATION (
unit_source_value varchar(50) NULL,
qualifier_source_value varchar(50) NULL,
value_source_value varchar(50) NULL,
observation_event_id NUMBER(19) NULL,
observation_event_id integer NULL,
obs_event_field_concept_id integer NULL );
--HINT DISTRIBUTE ON KEY (person_id)
@ -233,7 +233,7 @@ CREATE TABLE @cdmDatabaseSchema.NOTE (
visit_occurrence_id integer NULL,
visit_detail_id integer NULL,
note_source_value varchar(50) NULL,
note_event_id NUMBER(19) NULL,
note_event_id integer NULL,
note_event_field_concept_id integer NULL );
--HINT DISTRIBUTE ON RANDOM
@ -369,8 +369,8 @@ CREATE TABLE @cdmDatabaseSchema.DRUG_ERA (
drug_era_id integer NOT NULL,
person_id integer NOT NULL,
drug_concept_id integer NOT NULL,
drug_era_start_date TIMESTAMP NOT NULL,
drug_era_end_date TIMESTAMP NOT NULL,
drug_era_start_date date NOT NULL,
drug_era_end_date date NOT NULL,
drug_exposure_count integer NULL,
gap_days integer NULL );
@ -381,28 +381,28 @@ CREATE TABLE @cdmDatabaseSchema.DOSE_ERA (
drug_concept_id integer NOT NULL,
unit_concept_id integer NOT NULL,
dose_value float NOT NULL,
dose_era_start_date TIMESTAMP NOT NULL,
dose_era_end_date TIMESTAMP NOT NULL );
dose_era_start_date date NOT NULL,
dose_era_end_date date NOT NULL );
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.CONDITION_ERA (
condition_era_id integer NOT NULL,
person_id integer NOT NULL,
condition_concept_id integer NOT NULL,
condition_era_start_date TIMESTAMP NOT NULL,
condition_era_end_date TIMESTAMP NOT NULL,
condition_era_start_date date NOT NULL,
condition_era_end_date date NOT NULL,
condition_occurrence_count integer NULL );
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.EPISODE (
episode_id NUMBER(19) NOT NULL,
person_id NUMBER(19) NOT NULL,
episode_id integer NOT NULL,
person_id integer NOT NULL,
episode_concept_id integer NOT NULL,
episode_start_date date NOT NULL,
episode_start_datetime TIMESTAMP NULL,
episode_end_date date NULL,
episode_end_datetime TIMESTAMP NULL,
episode_parent_id NUMBER(19) NULL,
episode_parent_id integer NULL,
episode_number integer NULL,
episode_object_concept_id integer NOT NULL,
episode_type_concept_id integer NOT NULL,
@ -411,8 +411,8 @@ CREATE TABLE @cdmDatabaseSchema.EPISODE (
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.EPISODE_EVENT (
episode_id NUMBER(19) NOT NULL,
event_id NUMBER(19) NOT NULL,
episode_id integer NOT NULL,
event_id integer NOT NULL,
episode_event_field_concept_id integer NOT NULL );
--HINT DISTRIBUTE ON RANDOM

View File

@ -350,8 +350,6 @@ ALTER TABLE @cdmDatabaseSchema.DRUG_STRENGTH ADD CONSTRAINT fpk_DRUG_STRENGTH_nu
ALTER TABLE @cdmDatabaseSchema.DRUG_STRENGTH ADD CONSTRAINT fpk_DRUG_STRENGTH_denominator_unit_concept_id FOREIGN KEY (denominator_unit_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.COHORT_DEFINITION ADD CONSTRAINT fpk_COHORT_DEFINITION_cohort_definition_id FOREIGN KEY (cohort_definition_id) REFERENCES @cdmDatabaseSchema.COHORT (COHORT_DEFINITION_ID);
ALTER TABLE @cdmDatabaseSchema.COHORT_DEFINITION ADD CONSTRAINT fpk_COHORT_DEFINITION_definition_type_concept_id FOREIGN KEY (definition_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.COHORT_DEFINITION ADD CONSTRAINT fpk_COHORT_DEFINITION_subject_concept_id FOREIGN KEY (subject_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);

View File

@ -179,7 +179,7 @@ IF XACT_STATE() = 1 COMMIT; CREATE TABLE @cdmDatabaseSchema.MEASUREMENT (measu
unit_source_value varchar(50) NULL,
unit_source_concept_id integer NULL,
value_source_value varchar(50) NULL,
measurement_event_id bigint NULL,
measurement_event_id integer NULL,
meas_event_field_concept_id integer NULL )
WITH (DISTRIBUTION = HASH(person_id));
@ -203,7 +203,7 @@ IF XACT_STATE() = 1 COMMIT; CREATE TABLE @cdmDatabaseSchema.OBSERVATION (obser
unit_source_value varchar(50) NULL,
qualifier_source_value varchar(50) NULL,
value_source_value varchar(50) NULL,
observation_event_id bigint NULL,
observation_event_id integer NULL,
obs_event_field_concept_id integer NULL )
WITH (DISTRIBUTION = HASH(person_id));
@ -232,7 +232,7 @@ IF XACT_STATE() = 1 COMMIT; CREATE TABLE @cdmDatabaseSchema.NOTE (note_id inte
visit_occurrence_id integer NULL,
visit_detail_id integer NULL,
note_source_value varchar(50) NULL,
note_event_id bigint NULL,
note_event_id integer NULL,
note_event_field_concept_id integer NULL )
WITH (DISTRIBUTION = HASH(person_id));
@ -368,8 +368,8 @@ WITH (DISTRIBUTION = REPLICATE);
IF XACT_STATE() = 1 COMMIT; CREATE TABLE @cdmDatabaseSchema.DRUG_ERA (drug_era_id integer NOT NULL,
person_id integer NOT NULL,
drug_concept_id integer NOT NULL,
drug_era_start_date datetime NOT NULL,
drug_era_end_date datetime NOT NULL,
drug_era_start_date date NOT NULL,
drug_era_end_date date NOT NULL,
drug_exposure_count integer NULL,
gap_days integer NULL )
WITH (DISTRIBUTION = HASH(person_id));
@ -380,28 +380,28 @@ IF XACT_STATE() = 1 COMMIT; CREATE TABLE @cdmDatabaseSchema.DOSE_ERA (dose_era
drug_concept_id integer NOT NULL,
unit_concept_id integer NOT NULL,
dose_value float NOT NULL,
dose_era_start_date datetime NOT NULL,
dose_era_end_date datetime NOT NULL )
dose_era_start_date date NOT NULL,
dose_era_end_date date NOT NULL )
WITH (DISTRIBUTION = HASH(person_id));
--HINT DISTRIBUTE ON KEY (person_id)
IF XACT_STATE() = 1 COMMIT; CREATE TABLE @cdmDatabaseSchema.CONDITION_ERA (condition_era_id integer NOT NULL,
person_id integer NOT NULL,
condition_concept_id integer NOT NULL,
condition_era_start_date datetime NOT NULL,
condition_era_end_date datetime NOT NULL,
condition_era_start_date date NOT NULL,
condition_era_end_date date NOT NULL,
condition_occurrence_count integer NULL )
WITH (DISTRIBUTION = HASH(person_id));
--HINT DISTRIBUTE ON KEY (person_id)
IF XACT_STATE() = 1 COMMIT; CREATE TABLE @cdmDatabaseSchema.EPISODE (episode_id bigint NOT NULL,
person_id bigint NOT NULL,
IF XACT_STATE() = 1 COMMIT; CREATE TABLE @cdmDatabaseSchema.EPISODE (episode_id integer NOT NULL,
person_id integer NOT NULL,
episode_concept_id integer NOT NULL,
episode_start_date date NOT NULL,
episode_start_datetime datetime NULL,
episode_end_date date NULL,
episode_end_datetime datetime NULL,
episode_parent_id bigint NULL,
episode_parent_id integer NULL,
episode_number integer NULL,
episode_object_concept_id integer NOT NULL,
episode_type_concept_id integer NOT NULL,
@ -410,8 +410,8 @@ IF XACT_STATE() = 1 COMMIT; CREATE TABLE @cdmDatabaseSchema.EPISODE (episode_i
WITH (DISTRIBUTION = HASH(person_id));
--HINT DISTRIBUTE ON RANDOM
IF XACT_STATE() = 1 COMMIT; CREATE TABLE @cdmDatabaseSchema.EPISODE_EVENT (episode_id bigint NOT NULL,
event_id bigint NOT NULL,
IF XACT_STATE() = 1 COMMIT; CREATE TABLE @cdmDatabaseSchema.EPISODE_EVENT (episode_id integer NOT NULL,
event_id integer NOT NULL,
episode_event_field_concept_id integer NOT NULL )
WITH (DISTRIBUTION = REPLICATE);

View File

@ -350,8 +350,6 @@ ALTER TABLE @cdmDatabaseSchema.DRUG_STRENGTH ADD CONSTRAINT fpk_DRUG_STRENGTH_nu
ALTER TABLE @cdmDatabaseSchema.DRUG_STRENGTH ADD CONSTRAINT fpk_DRUG_STRENGTH_denominator_unit_concept_id FOREIGN KEY (denominator_unit_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.COHORT_DEFINITION ADD CONSTRAINT fpk_COHORT_DEFINITION_cohort_definition_id FOREIGN KEY (cohort_definition_id) REFERENCES @cdmDatabaseSchema.COHORT (COHORT_DEFINITION_ID);
ALTER TABLE @cdmDatabaseSchema.COHORT_DEFINITION ADD CONSTRAINT fpk_COHORT_DEFINITION_definition_type_concept_id FOREIGN KEY (definition_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.COHORT_DEFINITION ADD CONSTRAINT fpk_COHORT_DEFINITION_subject_concept_id FOREIGN KEY (subject_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);

View File

@ -180,7 +180,7 @@ CREATE TABLE @cdmDatabaseSchema.MEASUREMENT (
unit_source_value varchar(50) NULL,
unit_source_concept_id integer NULL,
value_source_value varchar(50) NULL,
measurement_event_id bigint NULL,
measurement_event_id integer NULL,
meas_event_field_concept_id integer NULL );
--HINT DISTRIBUTE ON KEY (person_id)
@ -204,7 +204,7 @@ CREATE TABLE @cdmDatabaseSchema.OBSERVATION (
unit_source_value varchar(50) NULL,
qualifier_source_value varchar(50) NULL,
value_source_value varchar(50) NULL,
observation_event_id bigint NULL,
observation_event_id integer NULL,
obs_event_field_concept_id integer NULL );
--HINT DISTRIBUTE ON KEY (person_id)
@ -233,7 +233,7 @@ CREATE TABLE @cdmDatabaseSchema.NOTE (
visit_occurrence_id integer NULL,
visit_detail_id integer NULL,
note_source_value varchar(50) NULL,
note_event_id bigint NULL,
note_event_id integer NULL,
note_event_field_concept_id integer NULL );
--HINT DISTRIBUTE ON RANDOM
@ -369,8 +369,8 @@ CREATE TABLE @cdmDatabaseSchema.DRUG_ERA (
drug_era_id integer NOT NULL,
person_id integer NOT NULL,
drug_concept_id integer NOT NULL,
drug_era_start_date TIMESTAMP NOT NULL,
drug_era_end_date TIMESTAMP NOT NULL,
drug_era_start_date date NOT NULL,
drug_era_end_date date NOT NULL,
drug_exposure_count integer NULL,
gap_days integer NULL );
@ -381,28 +381,28 @@ CREATE TABLE @cdmDatabaseSchema.DOSE_ERA (
drug_concept_id integer NOT NULL,
unit_concept_id integer NOT NULL,
dose_value NUMERIC NOT NULL,
dose_era_start_date TIMESTAMP NOT NULL,
dose_era_end_date TIMESTAMP NOT NULL );
dose_era_start_date date NOT NULL,
dose_era_end_date date NOT NULL );
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.CONDITION_ERA (
condition_era_id integer NOT NULL,
person_id integer NOT NULL,
condition_concept_id integer NOT NULL,
condition_era_start_date TIMESTAMP NOT NULL,
condition_era_end_date TIMESTAMP NOT NULL,
condition_era_start_date date NOT NULL,
condition_era_end_date date NOT NULL,
condition_occurrence_count integer NULL );
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.EPISODE (
episode_id bigint NOT NULL,
person_id bigint NOT NULL,
episode_id integer NOT NULL,
person_id integer NOT NULL,
episode_concept_id integer NOT NULL,
episode_start_date date NOT NULL,
episode_start_datetime TIMESTAMP NULL,
episode_end_date date NULL,
episode_end_datetime TIMESTAMP NULL,
episode_parent_id bigint NULL,
episode_parent_id integer NULL,
episode_number integer NULL,
episode_object_concept_id integer NOT NULL,
episode_type_concept_id integer NOT NULL,
@ -411,8 +411,8 @@ CREATE TABLE @cdmDatabaseSchema.EPISODE (
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.EPISODE_EVENT (
episode_id bigint NOT NULL,
event_id bigint NOT NULL,
episode_id integer NOT NULL,
event_id integer NOT NULL,
episode_event_field_concept_id integer NOT NULL );
--HINT DISTRIBUTE ON RANDOM

View File

@ -350,8 +350,6 @@ ALTER TABLE @cdmDatabaseSchema.DRUG_STRENGTH ADD CONSTRAINT fpk_DRUG_STRENGTH_nu
ALTER TABLE @cdmDatabaseSchema.DRUG_STRENGTH ADD CONSTRAINT fpk_DRUG_STRENGTH_denominator_unit_concept_id FOREIGN KEY (denominator_unit_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.COHORT_DEFINITION ADD CONSTRAINT fpk_COHORT_DEFINITION_cohort_definition_id FOREIGN KEY (cohort_definition_id) REFERENCES @cdmDatabaseSchema.COHORT (COHORT_DEFINITION_ID);
ALTER TABLE @cdmDatabaseSchema.COHORT_DEFINITION ADD CONSTRAINT fpk_COHORT_DEFINITION_definition_type_concept_id FOREIGN KEY (definition_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.COHORT_DEFINITION ADD CONSTRAINT fpk_COHORT_DEFINITION_subject_concept_id FOREIGN KEY (subject_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);

View File

@ -179,7 +179,7 @@ CREATE TABLE @cdmDatabaseSchema.MEASUREMENT (measurement_id integer NOT NULL,
unit_source_value varchar(50) NULL,
unit_source_concept_id integer NULL,
value_source_value varchar(50) NULL,
measurement_event_id bigint NULL,
measurement_event_id integer NULL,
meas_event_field_concept_id integer NULL )
DISTKEY(person_id);
@ -203,7 +203,7 @@ CREATE TABLE @cdmDatabaseSchema.OBSERVATION (observation_id integer NOT NULL,
unit_source_value varchar(50) NULL,
qualifier_source_value varchar(50) NULL,
value_source_value varchar(50) NULL,
observation_event_id bigint NULL,
observation_event_id integer NULL,
obs_event_field_concept_id integer NULL )
DISTKEY(person_id);
@ -232,7 +232,7 @@ CREATE TABLE @cdmDatabaseSchema.NOTE (note_id integer NOT NULL,
visit_occurrence_id integer NULL,
visit_detail_id integer NULL,
note_source_value varchar(50) NULL,
note_event_id bigint NULL,
note_event_id integer NULL,
note_event_field_concept_id integer NULL )
DISTKEY(person_id);
@ -368,8 +368,8 @@ DISTSTYLE ALL;
CREATE TABLE @cdmDatabaseSchema.DRUG_ERA (drug_era_id integer NOT NULL,
person_id integer NOT NULL,
drug_concept_id integer NOT NULL,
drug_era_start_date TIMESTAMP NOT NULL,
drug_era_end_date TIMESTAMP NOT NULL,
drug_era_start_date date NOT NULL,
drug_era_end_date date NOT NULL,
drug_exposure_count integer NULL,
gap_days integer NULL )
DISTKEY(person_id);
@ -380,28 +380,28 @@ CREATE TABLE @cdmDatabaseSchema.DOSE_ERA (dose_era_id integer NOT NULL,
drug_concept_id integer NOT NULL,
unit_concept_id integer NOT NULL,
dose_value float NOT NULL,
dose_era_start_date TIMESTAMP NOT NULL,
dose_era_end_date TIMESTAMP NOT NULL )
dose_era_start_date date NOT NULL,
dose_era_end_date date NOT NULL )
DISTKEY(person_id);
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.CONDITION_ERA (condition_era_id integer NOT NULL,
person_id integer NOT NULL,
condition_concept_id integer NOT NULL,
condition_era_start_date TIMESTAMP NOT NULL,
condition_era_end_date TIMESTAMP NOT NULL,
condition_era_start_date date NOT NULL,
condition_era_end_date date NOT NULL,
condition_occurrence_count integer NULL )
DISTKEY(person_id);
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.EPISODE (episode_id bigint NOT NULL,
person_id bigint NOT NULL,
CREATE TABLE @cdmDatabaseSchema.EPISODE (episode_id integer NOT NULL,
person_id integer NOT NULL,
episode_concept_id integer NOT NULL,
episode_start_date date NOT NULL,
episode_start_datetime TIMESTAMP NULL,
episode_end_date date NULL,
episode_end_datetime TIMESTAMP NULL,
episode_parent_id bigint NULL,
episode_parent_id integer NULL,
episode_number integer NULL,
episode_object_concept_id integer NOT NULL,
episode_type_concept_id integer NOT NULL,
@ -410,8 +410,8 @@ CREATE TABLE @cdmDatabaseSchema.EPISODE (episode_id bigint NOT NULL,
DISTKEY(person_id);
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.EPISODE_EVENT (episode_id bigint NOT NULL,
event_id bigint NOT NULL,
CREATE TABLE @cdmDatabaseSchema.EPISODE_EVENT (episode_id integer NOT NULL,
event_id integer NOT NULL,
episode_event_field_concept_id integer NOT NULL )
DISTSTYLE ALL;

View File

@ -0,0 +1,177 @@
ALTER TABLE @cdmDatabaseSchema.PERSON ADD CONSTRAINT fpk_PERSON_gender_concept_id FOREIGN KEY (gender_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.PERSON ADD CONSTRAINT fpk_PERSON_race_concept_id FOREIGN KEY (race_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.PERSON ADD CONSTRAINT fpk_PERSON_ethnicity_concept_id FOREIGN KEY (ethnicity_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.PERSON ADD CONSTRAINT fpk_PERSON_location_id FOREIGN KEY (location_id) REFERENCES @cdmDatabaseSchema.LOCATION (LOCATION_ID);
ALTER TABLE @cdmDatabaseSchema.PERSON ADD CONSTRAINT fpk_PERSON_provider_id FOREIGN KEY (provider_id) REFERENCES @cdmDatabaseSchema.PROVIDER (PROVIDER_ID);
ALTER TABLE @cdmDatabaseSchema.PERSON ADD CONSTRAINT fpk_PERSON_care_site_id FOREIGN KEY (care_site_id) REFERENCES @cdmDatabaseSchema.CARE_SITE (CARE_SITE_ID);
ALTER TABLE @cdmDatabaseSchema.PERSON ADD CONSTRAINT fpk_PERSON_gender_source_concept_id FOREIGN KEY (gender_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.PERSON ADD CONSTRAINT fpk_PERSON_race_source_concept_id FOREIGN KEY (race_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.PERSON ADD CONSTRAINT fpk_PERSON_ethnicity_source_concept_id FOREIGN KEY (ethnicity_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.OBSERVATION_PERIOD ADD CONSTRAINT fpk_OBSERVATION_PERIOD_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID);
ALTER TABLE @cdmDatabaseSchema.OBSERVATION_PERIOD ADD CONSTRAINT fpk_OBSERVATION_PERIOD_period_type_concept_id FOREIGN KEY (period_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.VISIT_OCCURRENCE ADD CONSTRAINT fpk_VISIT_OCCURRENCE_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID);
ALTER TABLE @cdmDatabaseSchema.VISIT_OCCURRENCE ADD CONSTRAINT fpk_VISIT_OCCURRENCE_visit_concept_id FOREIGN KEY (visit_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.VISIT_OCCURRENCE ADD CONSTRAINT fpk_VISIT_OCCURRENCE_visit_type_concept_id FOREIGN KEY (visit_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.VISIT_OCCURRENCE ADD CONSTRAINT fpk_VISIT_OCCURRENCE_provider_id FOREIGN KEY (provider_id) REFERENCES @cdmDatabaseSchema.PROVIDER (PROVIDER_ID);
ALTER TABLE @cdmDatabaseSchema.VISIT_OCCURRENCE ADD CONSTRAINT fpk_VISIT_OCCURRENCE_care_site_id FOREIGN KEY (care_site_id) REFERENCES @cdmDatabaseSchema.CARE_SITE (CARE_SITE_ID);
ALTER TABLE @cdmDatabaseSchema.VISIT_OCCURRENCE ADD CONSTRAINT fpk_VISIT_OCCURRENCE_visit_source_concept_id FOREIGN KEY (visit_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.VISIT_OCCURRENCE ADD CONSTRAINT fpk_VISIT_OCCURRENCE_admitted_from_concept_id FOREIGN KEY (admitted_from_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.VISIT_OCCURRENCE ADD CONSTRAINT fpk_VISIT_OCCURRENCE_discharged_to_concept_id FOREIGN KEY (discharged_to_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.VISIT_OCCURRENCE ADD CONSTRAINT fpk_VISIT_OCCURRENCE_preceding_visit_occurrence_id FOREIGN KEY (preceding_visit_occurrence_id) REFERENCES @cdmDatabaseSchema.VISIT_OCCURRENCE (VISIT_OCCURRENCE_ID);
ALTER TABLE @cdmDatabaseSchema.VISIT_DETAIL ADD CONSTRAINT fpk_VISIT_DETAIL_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID);
ALTER TABLE @cdmDatabaseSchema.VISIT_DETAIL ADD CONSTRAINT fpk_VISIT_DETAIL_visit_detail_concept_id FOREIGN KEY (visit_detail_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.VISIT_DETAIL ADD CONSTRAINT fpk_VISIT_DETAIL_visit_detail_type_concept_id FOREIGN KEY (visit_detail_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.VISIT_DETAIL ADD CONSTRAINT fpk_VISIT_DETAIL_provider_id FOREIGN KEY (provider_id) REFERENCES @cdmDatabaseSchema.PROVIDER (PROVIDER_ID);
ALTER TABLE @cdmDatabaseSchema.VISIT_DETAIL ADD CONSTRAINT fpk_VISIT_DETAIL_care_site_id FOREIGN KEY (care_site_id) REFERENCES @cdmDatabaseSchema.CARE_SITE (CARE_SITE_ID);
ALTER TABLE @cdmDatabaseSchema.VISIT_DETAIL ADD CONSTRAINT fpk_VISIT_DETAIL_visit_detail_source_concept_id FOREIGN KEY (visit_detail_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.VISIT_DETAIL ADD CONSTRAINT fpk_VISIT_DETAIL_admitted_from_concept_id FOREIGN KEY (admitted_from_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.VISIT_DETAIL ADD CONSTRAINT fpk_VISIT_DETAIL_discharged_to_concept_id FOREIGN KEY (discharged_to_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.VISIT_DETAIL ADD CONSTRAINT fpk_VISIT_DETAIL_preceding_visit_detail_id FOREIGN KEY (preceding_visit_detail_id) REFERENCES @cdmDatabaseSchema.VISIT_DETAIL (VISIT_DETAIL_ID);
ALTER TABLE @cdmDatabaseSchema.VISIT_DETAIL ADD CONSTRAINT fpk_VISIT_DETAIL_parent_visit_detail_id FOREIGN KEY (parent_visit_detail_id) REFERENCES @cdmDatabaseSchema.VISIT_DETAIL (VISIT_DETAIL_ID);
ALTER TABLE @cdmDatabaseSchema.VISIT_DETAIL ADD CONSTRAINT fpk_VISIT_DETAIL_visit_occurrence_id FOREIGN KEY (visit_occurrence_id) REFERENCES @cdmDatabaseSchema.VISIT_OCCURRENCE (VISIT_OCCURRENCE_ID);
ALTER TABLE @cdmDatabaseSchema.CONDITION_OCCURRENCE ADD CONSTRAINT fpk_CONDITION_OCCURRENCE_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID);
ALTER TABLE @cdmDatabaseSchema.CONDITION_OCCURRENCE ADD CONSTRAINT fpk_CONDITION_OCCURRENCE_condition_concept_id FOREIGN KEY (condition_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.CONDITION_OCCURRENCE ADD CONSTRAINT fpk_CONDITION_OCCURRENCE_condition_type_concept_id FOREIGN KEY (condition_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.CONDITION_OCCURRENCE ADD CONSTRAINT fpk_CONDITION_OCCURRENCE_condition_status_concept_id FOREIGN KEY (condition_status_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.CONDITION_OCCURRENCE ADD CONSTRAINT fpk_CONDITION_OCCURRENCE_provider_id FOREIGN KEY (provider_id) REFERENCES @cdmDatabaseSchema.PROVIDER (PROVIDER_ID);
ALTER TABLE @cdmDatabaseSchema.CONDITION_OCCURRENCE ADD CONSTRAINT fpk_CONDITION_OCCURRENCE_visit_occurrence_id FOREIGN KEY (visit_occurrence_id) REFERENCES @cdmDatabaseSchema.VISIT_OCCURRENCE (VISIT_OCCURRENCE_ID);
ALTER TABLE @cdmDatabaseSchema.CONDITION_OCCURRENCE ADD CONSTRAINT fpk_CONDITION_OCCURRENCE_visit_detail_id FOREIGN KEY (visit_detail_id) REFERENCES @cdmDatabaseSchema.VISIT_DETAIL (VISIT_DETAIL_ID);
ALTER TABLE @cdmDatabaseSchema.CONDITION_OCCURRENCE ADD CONSTRAINT fpk_CONDITION_OCCURRENCE_condition_source_concept_id FOREIGN KEY (condition_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.DRUG_EXPOSURE ADD CONSTRAINT fpk_DRUG_EXPOSURE_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID);
ALTER TABLE @cdmDatabaseSchema.DRUG_EXPOSURE ADD CONSTRAINT fpk_DRUG_EXPOSURE_drug_concept_id FOREIGN KEY (drug_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.DRUG_EXPOSURE ADD CONSTRAINT fpk_DRUG_EXPOSURE_drug_type_concept_id FOREIGN KEY (drug_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.DRUG_EXPOSURE ADD CONSTRAINT fpk_DRUG_EXPOSURE_route_concept_id FOREIGN KEY (route_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.DRUG_EXPOSURE ADD CONSTRAINT fpk_DRUG_EXPOSURE_provider_id FOREIGN KEY (provider_id) REFERENCES @cdmDatabaseSchema.PROVIDER (PROVIDER_ID);
ALTER TABLE @cdmDatabaseSchema.DRUG_EXPOSURE ADD CONSTRAINT fpk_DRUG_EXPOSURE_visit_occurrence_id FOREIGN KEY (visit_occurrence_id) REFERENCES @cdmDatabaseSchema.VISIT_OCCURRENCE (VISIT_OCCURRENCE_ID);
ALTER TABLE @cdmDatabaseSchema.DRUG_EXPOSURE ADD CONSTRAINT fpk_DRUG_EXPOSURE_visit_detail_id FOREIGN KEY (visit_detail_id) REFERENCES @cdmDatabaseSchema.VISIT_DETAIL (VISIT_DETAIL_ID);
ALTER TABLE @cdmDatabaseSchema.DRUG_EXPOSURE ADD CONSTRAINT fpk_DRUG_EXPOSURE_drug_source_concept_id FOREIGN KEY (drug_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.PROCEDURE_OCCURRENCE ADD CONSTRAINT fpk_PROCEDURE_OCCURRENCE_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID);
ALTER TABLE @cdmDatabaseSchema.PROCEDURE_OCCURRENCE ADD CONSTRAINT fpk_PROCEDURE_OCCURRENCE_procedure_concept_id FOREIGN KEY (procedure_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.PROCEDURE_OCCURRENCE ADD CONSTRAINT fpk_PROCEDURE_OCCURRENCE_procedure_type_concept_id FOREIGN KEY (procedure_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.PROCEDURE_OCCURRENCE ADD CONSTRAINT fpk_PROCEDURE_OCCURRENCE_modifier_concept_id FOREIGN KEY (modifier_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.PROCEDURE_OCCURRENCE ADD CONSTRAINT fpk_PROCEDURE_OCCURRENCE_provider_id FOREIGN KEY (provider_id) REFERENCES @cdmDatabaseSchema.PROVIDER (PROVIDER_ID);
ALTER TABLE @cdmDatabaseSchema.PROCEDURE_OCCURRENCE ADD CONSTRAINT fpk_PROCEDURE_OCCURRENCE_visit_occurrence_id FOREIGN KEY (visit_occurrence_id) REFERENCES @cdmDatabaseSchema.VISIT_OCCURRENCE (VISIT_OCCURRENCE_ID);
ALTER TABLE @cdmDatabaseSchema.PROCEDURE_OCCURRENCE ADD CONSTRAINT fpk_PROCEDURE_OCCURRENCE_visit_detail_id FOREIGN KEY (visit_detail_id) REFERENCES @cdmDatabaseSchema.VISIT_DETAIL (VISIT_DETAIL_ID);
ALTER TABLE @cdmDatabaseSchema.PROCEDURE_OCCURRENCE ADD CONSTRAINT fpk_PROCEDURE_OCCURRENCE_procedure_source_concept_id FOREIGN KEY (procedure_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.DEVICE_EXPOSURE ADD CONSTRAINT fpk_DEVICE_EXPOSURE_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID);
ALTER TABLE @cdmDatabaseSchema.DEVICE_EXPOSURE ADD CONSTRAINT fpk_DEVICE_EXPOSURE_device_concept_id FOREIGN KEY (device_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.DEVICE_EXPOSURE ADD CONSTRAINT fpk_DEVICE_EXPOSURE_device_type_concept_id FOREIGN KEY (device_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.DEVICE_EXPOSURE ADD CONSTRAINT fpk_DEVICE_EXPOSURE_provider_id FOREIGN KEY (provider_id) REFERENCES @cdmDatabaseSchema.PROVIDER (PROVIDER_ID);
ALTER TABLE @cdmDatabaseSchema.DEVICE_EXPOSURE ADD CONSTRAINT fpk_DEVICE_EXPOSURE_visit_occurrence_id FOREIGN KEY (visit_occurrence_id) REFERENCES @cdmDatabaseSchema.VISIT_OCCURRENCE (VISIT_OCCURRENCE_ID);
ALTER TABLE @cdmDatabaseSchema.DEVICE_EXPOSURE ADD CONSTRAINT fpk_DEVICE_EXPOSURE_visit_detail_id FOREIGN KEY (visit_detail_id) REFERENCES @cdmDatabaseSchema.VISIT_DETAIL (VISIT_DETAIL_ID);
ALTER TABLE @cdmDatabaseSchema.DEVICE_EXPOSURE ADD CONSTRAINT fpk_DEVICE_EXPOSURE_device_source_concept_id FOREIGN KEY (device_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.DEVICE_EXPOSURE ADD CONSTRAINT fpk_DEVICE_EXPOSURE_unit_concept_id FOREIGN KEY (unit_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.DEVICE_EXPOSURE ADD CONSTRAINT fpk_DEVICE_EXPOSURE_unit_source_concept_id FOREIGN KEY (unit_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.MEASUREMENT ADD CONSTRAINT fpk_MEASUREMENT_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID);
ALTER TABLE @cdmDatabaseSchema.MEASUREMENT ADD CONSTRAINT fpk_MEASUREMENT_measurement_concept_id FOREIGN KEY (measurement_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.MEASUREMENT ADD CONSTRAINT fpk_MEASUREMENT_measurement_type_concept_id FOREIGN KEY (measurement_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.MEASUREMENT ADD CONSTRAINT fpk_MEASUREMENT_operator_concept_id FOREIGN KEY (operator_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.MEASUREMENT ADD CONSTRAINT fpk_MEASUREMENT_value_as_concept_id FOREIGN KEY (value_as_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.MEASUREMENT ADD CONSTRAINT fpk_MEASUREMENT_unit_concept_id FOREIGN KEY (unit_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.MEASUREMENT ADD CONSTRAINT fpk_MEASUREMENT_provider_id FOREIGN KEY (provider_id) REFERENCES @cdmDatabaseSchema.PROVIDER (PROVIDER_ID);
ALTER TABLE @cdmDatabaseSchema.MEASUREMENT ADD CONSTRAINT fpk_MEASUREMENT_visit_occurrence_id FOREIGN KEY (visit_occurrence_id) REFERENCES @cdmDatabaseSchema.VISIT_OCCURRENCE (VISIT_OCCURRENCE_ID);
ALTER TABLE @cdmDatabaseSchema.MEASUREMENT ADD CONSTRAINT fpk_MEASUREMENT_visit_detail_id FOREIGN KEY (visit_detail_id) REFERENCES @cdmDatabaseSchema.VISIT_DETAIL (VISIT_DETAIL_ID);
ALTER TABLE @cdmDatabaseSchema.MEASUREMENT ADD CONSTRAINT fpk_MEASUREMENT_measurement_source_concept_id FOREIGN KEY (measurement_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.MEASUREMENT ADD CONSTRAINT fpk_MEASUREMENT_unit_source_concept_id FOREIGN KEY (unit_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.MEASUREMENT ADD CONSTRAINT fpk_MEASUREMENT_meas_event_field_concept_id FOREIGN KEY (meas_event_field_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.OBSERVATION ADD CONSTRAINT fpk_OBSERVATION_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID);
ALTER TABLE @cdmDatabaseSchema.OBSERVATION ADD CONSTRAINT fpk_OBSERVATION_observation_concept_id FOREIGN KEY (observation_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.OBSERVATION ADD CONSTRAINT fpk_OBSERVATION_observation_type_concept_id FOREIGN KEY (observation_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.OBSERVATION ADD CONSTRAINT fpk_OBSERVATION_value_as_concept_id FOREIGN KEY (value_as_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.OBSERVATION ADD CONSTRAINT fpk_OBSERVATION_qualifier_concept_id FOREIGN KEY (qualifier_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.OBSERVATION ADD CONSTRAINT fpk_OBSERVATION_unit_concept_id FOREIGN KEY (unit_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.OBSERVATION ADD CONSTRAINT fpk_OBSERVATION_provider_id FOREIGN KEY (provider_id) REFERENCES @cdmDatabaseSchema.PROVIDER (PROVIDER_ID);
ALTER TABLE @cdmDatabaseSchema.OBSERVATION ADD CONSTRAINT fpk_OBSERVATION_visit_occurrence_id FOREIGN KEY (visit_occurrence_id) REFERENCES @cdmDatabaseSchema.VISIT_OCCURRENCE (VISIT_OCCURRENCE_ID);
ALTER TABLE @cdmDatabaseSchema.OBSERVATION ADD CONSTRAINT fpk_OBSERVATION_visit_detail_id FOREIGN KEY (visit_detail_id) REFERENCES @cdmDatabaseSchema.VISIT_DETAIL (VISIT_DETAIL_ID);
ALTER TABLE @cdmDatabaseSchema.OBSERVATION ADD CONSTRAINT fpk_OBSERVATION_observation_source_concept_id FOREIGN KEY (observation_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.OBSERVATION ADD CONSTRAINT fpk_OBSERVATION_obs_event_field_concept_id FOREIGN KEY (obs_event_field_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.DEATH ADD CONSTRAINT fpk_DEATH_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID);
ALTER TABLE @cdmDatabaseSchema.DEATH ADD CONSTRAINT fpk_DEATH_death_type_concept_id FOREIGN KEY (death_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.DEATH ADD CONSTRAINT fpk_DEATH_cause_concept_id FOREIGN KEY (cause_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.DEATH ADD CONSTRAINT fpk_DEATH_cause_source_concept_id FOREIGN KEY (cause_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.NOTE ADD CONSTRAINT fpk_NOTE_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID);
ALTER TABLE @cdmDatabaseSchema.NOTE ADD CONSTRAINT fpk_NOTE_note_type_concept_id FOREIGN KEY (note_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.NOTE ADD CONSTRAINT fpk_NOTE_note_class_concept_id FOREIGN KEY (note_class_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.NOTE ADD CONSTRAINT fpk_NOTE_encoding_concept_id FOREIGN KEY (encoding_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.NOTE ADD CONSTRAINT fpk_NOTE_language_concept_id FOREIGN KEY (language_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.NOTE ADD CONSTRAINT fpk_NOTE_provider_id FOREIGN KEY (provider_id) REFERENCES @cdmDatabaseSchema.PROVIDER (PROVIDER_ID);
ALTER TABLE @cdmDatabaseSchema.NOTE ADD CONSTRAINT fpk_NOTE_visit_occurrence_id FOREIGN KEY (visit_occurrence_id) REFERENCES @cdmDatabaseSchema.VISIT_OCCURRENCE (VISIT_OCCURRENCE_ID);
ALTER TABLE @cdmDatabaseSchema.NOTE ADD CONSTRAINT fpk_NOTE_visit_detail_id FOREIGN KEY (visit_detail_id) REFERENCES @cdmDatabaseSchema.VISIT_DETAIL (VISIT_DETAIL_ID);
ALTER TABLE @cdmDatabaseSchema.NOTE ADD CONSTRAINT fpk_NOTE_note_event_field_concept_id FOREIGN KEY (note_event_field_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.NOTE_NLP ADD CONSTRAINT fpk_NOTE_NLP_section_concept_id FOREIGN KEY (section_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.NOTE_NLP ADD CONSTRAINT fpk_NOTE_NLP_note_nlp_concept_id FOREIGN KEY (note_nlp_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.NOTE_NLP ADD CONSTRAINT fpk_NOTE_NLP_note_nlp_source_concept_id FOREIGN KEY (note_nlp_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.SPECIMEN ADD CONSTRAINT fpk_SPECIMEN_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID);
ALTER TABLE @cdmDatabaseSchema.SPECIMEN ADD CONSTRAINT fpk_SPECIMEN_specimen_concept_id FOREIGN KEY (specimen_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.SPECIMEN ADD CONSTRAINT fpk_SPECIMEN_specimen_type_concept_id FOREIGN KEY (specimen_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.SPECIMEN ADD CONSTRAINT fpk_SPECIMEN_unit_concept_id FOREIGN KEY (unit_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.SPECIMEN ADD CONSTRAINT fpk_SPECIMEN_anatomic_site_concept_id FOREIGN KEY (anatomic_site_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.SPECIMEN ADD CONSTRAINT fpk_SPECIMEN_disease_status_concept_id FOREIGN KEY (disease_status_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.FACT_RELATIONSHIP ADD CONSTRAINT fpk_FACT_RELATIONSHIP_domain_concept_id_1 FOREIGN KEY (domain_concept_id_1) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.FACT_RELATIONSHIP ADD CONSTRAINT fpk_FACT_RELATIONSHIP_domain_concept_id_2 FOREIGN KEY (domain_concept_id_2) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.FACT_RELATIONSHIP ADD CONSTRAINT fpk_FACT_RELATIONSHIP_relationship_concept_id FOREIGN KEY (relationship_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.LOCATION ADD CONSTRAINT fpk_LOCATION_country_concept_id FOREIGN KEY (country_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.CARE_SITE ADD CONSTRAINT fpk_CARE_SITE_place_of_service_concept_id FOREIGN KEY (place_of_service_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.CARE_SITE ADD CONSTRAINT fpk_CARE_SITE_location_id FOREIGN KEY (location_id) REFERENCES @cdmDatabaseSchema.LOCATION (LOCATION_ID);
ALTER TABLE @cdmDatabaseSchema.PROVIDER ADD CONSTRAINT fpk_PROVIDER_specialty_concept_id FOREIGN KEY (specialty_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.PROVIDER ADD CONSTRAINT fpk_PROVIDER_care_site_id FOREIGN KEY (care_site_id) REFERENCES @cdmDatabaseSchema.CARE_SITE (CARE_SITE_ID);
ALTER TABLE @cdmDatabaseSchema.PROVIDER ADD CONSTRAINT fpk_PROVIDER_gender_concept_id FOREIGN KEY (gender_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.PROVIDER ADD CONSTRAINT fpk_PROVIDER_specialty_source_concept_id FOREIGN KEY (specialty_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.PROVIDER ADD CONSTRAINT fpk_PROVIDER_gender_source_concept_id FOREIGN KEY (gender_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_payer_plan_period_id FOREIGN KEY (payer_plan_period_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID);
ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID);
ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_payer_concept_id FOREIGN KEY (payer_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_payer_source_concept_id FOREIGN KEY (payer_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_plan_concept_id FOREIGN KEY (plan_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_plan_source_concept_id FOREIGN KEY (plan_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_sponsor_concept_id FOREIGN KEY (sponsor_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_sponsor_source_concept_id FOREIGN KEY (sponsor_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_stop_reason_concept_id FOREIGN KEY (stop_reason_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_stop_reason_source_concept_id FOREIGN KEY (stop_reason_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.COST ADD CONSTRAINT fpk_COST_cost_domain_id FOREIGN KEY (cost_domain_id) REFERENCES @cdmDatabaseSchema.DOMAIN (DOMAIN_ID);
ALTER TABLE @cdmDatabaseSchema.COST ADD CONSTRAINT fpk_COST_cost_type_concept_id FOREIGN KEY (cost_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.COST ADD CONSTRAINT fpk_COST_currency_concept_id FOREIGN KEY (currency_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.COST ADD CONSTRAINT fpk_COST_revenue_code_concept_id FOREIGN KEY (revenue_code_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.COST ADD CONSTRAINT fpk_COST_drg_concept_id FOREIGN KEY (drg_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.DRUG_ERA ADD CONSTRAINT fpk_DRUG_ERA_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID);
ALTER TABLE @cdmDatabaseSchema.DRUG_ERA ADD CONSTRAINT fpk_DRUG_ERA_drug_concept_id FOREIGN KEY (drug_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.DOSE_ERA ADD CONSTRAINT fpk_DOSE_ERA_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID);
ALTER TABLE @cdmDatabaseSchema.DOSE_ERA ADD CONSTRAINT fpk_DOSE_ERA_drug_concept_id FOREIGN KEY (drug_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.DOSE_ERA ADD CONSTRAINT fpk_DOSE_ERA_unit_concept_id FOREIGN KEY (unit_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.CONDITION_ERA ADD CONSTRAINT fpk_CONDITION_ERA_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID);
ALTER TABLE @cdmDatabaseSchema.CONDITION_ERA ADD CONSTRAINT fpk_CONDITION_ERA_condition_concept_id FOREIGN KEY (condition_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.EPISODE ADD CONSTRAINT fpk_EPISODE_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID);
ALTER TABLE @cdmDatabaseSchema.EPISODE ADD CONSTRAINT fpk_EPISODE_episode_concept_id FOREIGN KEY (episode_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.EPISODE ADD CONSTRAINT fpk_EPISODE_episode_object_concept_id FOREIGN KEY (episode_object_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.EPISODE ADD CONSTRAINT fpk_EPISODE_episode_type_concept_id FOREIGN KEY (episode_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.EPISODE ADD CONSTRAINT fpk_EPISODE_episode_source_concept_id FOREIGN KEY (episode_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.EPISODE_EVENT ADD CONSTRAINT fpk_EPISODE_EVENT_episode_id FOREIGN KEY (episode_id) REFERENCES @cdmDatabaseSchema.EPISODE (EPISODE_ID);
ALTER TABLE @cdmDatabaseSchema.EPISODE_EVENT ADD CONSTRAINT fpk_EPISODE_EVENT_episode_event_field_concept_id FOREIGN KEY (episode_event_field_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.METADATA ADD CONSTRAINT fpk_METADATA_metadata_concept_id FOREIGN KEY (metadata_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.METADATA ADD CONSTRAINT fpk_METADATA_metadata_type_concept_id FOREIGN KEY (metadata_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.METADATA ADD CONSTRAINT fpk_METADATA_value_as_concept_id FOREIGN KEY (value_as_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.CDM_SOURCE ADD CONSTRAINT fpk_CDM_SOURCE_cdm_version_concept_id FOREIGN KEY (cdm_version_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.CONCEPT ADD CONSTRAINT fpk_CONCEPT_domain_id FOREIGN KEY (domain_id) REFERENCES @cdmDatabaseSchema.DOMAIN (DOMAIN_ID);
ALTER TABLE @cdmDatabaseSchema.CONCEPT ADD CONSTRAINT fpk_CONCEPT_vocabulary_id FOREIGN KEY (vocabulary_id) REFERENCES @cdmDatabaseSchema.VOCABULARY (VOCABULARY_ID);
ALTER TABLE @cdmDatabaseSchema.CONCEPT ADD CONSTRAINT fpk_CONCEPT_concept_class_id FOREIGN KEY (concept_class_id) REFERENCES @cdmDatabaseSchema.CONCEPT_CLASS (CONCEPT_CLASS_ID);
ALTER TABLE @cdmDatabaseSchema.VOCABULARY ADD CONSTRAINT fpk_VOCABULARY_vocabulary_concept_id FOREIGN KEY (vocabulary_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.DOMAIN ADD CONSTRAINT fpk_DOMAIN_domain_concept_id FOREIGN KEY (domain_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.CONCEPT_CLASS ADD CONSTRAINT fpk_CONCEPT_CLASS_concept_class_concept_id FOREIGN KEY (concept_class_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.CONCEPT_RELATIONSHIP ADD CONSTRAINT fpk_CONCEPT_RELATIONSHIP_concept_id_1 FOREIGN KEY (concept_id_1) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.CONCEPT_RELATIONSHIP ADD CONSTRAINT fpk_CONCEPT_RELATIONSHIP_concept_id_2 FOREIGN KEY (concept_id_2) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.CONCEPT_RELATIONSHIP ADD CONSTRAINT fpk_CONCEPT_RELATIONSHIP_relationship_id FOREIGN KEY (relationship_id) REFERENCES @cdmDatabaseSchema.RELATIONSHIP (RELATIONSHIP_ID);
ALTER TABLE @cdmDatabaseSchema.RELATIONSHIP ADD CONSTRAINT fpk_RELATIONSHIP_relationship_concept_id FOREIGN KEY (relationship_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.CONCEPT_SYNONYM ADD CONSTRAINT fpk_CONCEPT_SYNONYM_concept_id FOREIGN KEY (concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.CONCEPT_SYNONYM ADD CONSTRAINT fpk_CONCEPT_SYNONYM_language_concept_id FOREIGN KEY (language_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.CONCEPT_ANCESTOR ADD CONSTRAINT fpk_CONCEPT_ANCESTOR_ancestor_concept_id FOREIGN KEY (ancestor_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.CONCEPT_ANCESTOR ADD CONSTRAINT fpk_CONCEPT_ANCESTOR_descendant_concept_id FOREIGN KEY (descendant_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.SOURCE_TO_CONCEPT_MAP ADD CONSTRAINT fpk_SOURCE_TO_CONCEPT_MAP_source_concept_id FOREIGN KEY (source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.SOURCE_TO_CONCEPT_MAP ADD CONSTRAINT fpk_SOURCE_TO_CONCEPT_MAP_target_concept_id FOREIGN KEY (target_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.SOURCE_TO_CONCEPT_MAP ADD CONSTRAINT fpk_SOURCE_TO_CONCEPT_MAP_target_vocabulary_id FOREIGN KEY (target_vocabulary_id) REFERENCES @cdmDatabaseSchema.VOCABULARY (VOCABULARY_ID);
ALTER TABLE @cdmDatabaseSchema.DRUG_STRENGTH ADD CONSTRAINT fpk_DRUG_STRENGTH_drug_concept_id FOREIGN KEY (drug_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.DRUG_STRENGTH ADD CONSTRAINT fpk_DRUG_STRENGTH_ingredient_concept_id FOREIGN KEY (ingredient_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.DRUG_STRENGTH ADD CONSTRAINT fpk_DRUG_STRENGTH_amount_unit_concept_id FOREIGN KEY (amount_unit_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.DRUG_STRENGTH ADD CONSTRAINT fpk_DRUG_STRENGTH_numerator_unit_concept_id FOREIGN KEY (numerator_unit_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.DRUG_STRENGTH ADD CONSTRAINT fpk_DRUG_STRENGTH_denominator_unit_concept_id FOREIGN KEY (denominator_unit_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.COHORT_DEFINITION ADD CONSTRAINT fpk_COHORT_DEFINITION_definition_type_concept_id FOREIGN KEY (definition_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.COHORT_DEFINITION ADD CONSTRAINT fpk_COHORT_DEFINITION_subject_concept_id FOREIGN KEY (subject_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);

View File

@ -0,0 +1,588 @@
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.PERSON
USING DELTA
AS
SELECT CAST(NULL AS integer) AS person_id,
CAST(NULL AS integer) AS gender_concept_id,
CAST(NULL AS integer) AS year_of_birth,
CAST(NULL AS integer) AS month_of_birth,
CAST(NULL AS integer) AS day_of_birth,
CAST(NULL AS TIMESTAMP) AS birth_datetime,
CAST(NULL AS integer) AS race_concept_id,
CAST(NULL AS integer) AS ethnicity_concept_id,
CAST(NULL AS integer) AS location_id,
CAST(NULL AS integer) AS provider_id,
CAST(NULL AS integer) AS care_site_id,
CAST(NULL AS STRING) AS person_source_value,
CAST(NULL AS STRING) AS gender_source_value,
CAST(NULL AS integer) AS gender_source_concept_id,
CAST(NULL AS STRING) AS race_source_value,
CAST(NULL AS integer) AS race_source_concept_id,
CAST(NULL AS STRING) AS ethnicity_source_value,
CAST(NULL AS integer) AS ethnicity_source_concept_id WHERE 1 = 0;
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.OBSERVATION_PERIOD
USING DELTA
AS
SELECT CAST(NULL AS integer) AS observation_period_id,
CAST(NULL AS integer) AS person_id,
CAST(NULL AS date) AS observation_period_start_date,
CAST(NULL AS date) AS observation_period_end_date,
CAST(NULL AS integer) AS period_type_concept_id WHERE 1 = 0;
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.VISIT_OCCURRENCE
USING DELTA
AS
SELECT CAST(NULL AS integer) AS visit_occurrence_id,
CAST(NULL AS integer) AS person_id,
CAST(NULL AS integer) AS visit_concept_id,
CAST(NULL AS date) AS visit_start_date,
CAST(NULL AS TIMESTAMP) AS visit_start_datetime,
CAST(NULL AS date) AS visit_end_date,
CAST(NULL AS TIMESTAMP) AS visit_end_datetime,
CAST(NULL AS integer) AS visit_type_concept_id,
CAST(NULL AS integer) AS provider_id,
CAST(NULL AS integer) AS care_site_id,
CAST(NULL AS STRING) AS visit_source_value,
CAST(NULL AS integer) AS visit_source_concept_id,
CAST(NULL AS integer) AS admitted_from_concept_id,
CAST(NULL AS STRING) AS admitted_from_source_value,
CAST(NULL AS integer) AS discharged_to_concept_id,
CAST(NULL AS STRING) AS discharged_to_source_value,
CAST(NULL AS integer) AS preceding_visit_occurrence_id WHERE 1 = 0;
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.VISIT_DETAIL
USING DELTA
AS
SELECT CAST(NULL AS integer) AS visit_detail_id,
CAST(NULL AS integer) AS person_id,
CAST(NULL AS integer) AS visit_detail_concept_id,
CAST(NULL AS date) AS visit_detail_start_date,
CAST(NULL AS TIMESTAMP) AS visit_detail_start_datetime,
CAST(NULL AS date) AS visit_detail_end_date,
CAST(NULL AS TIMESTAMP) AS visit_detail_end_datetime,
CAST(NULL AS integer) AS visit_detail_type_concept_id,
CAST(NULL AS integer) AS provider_id,
CAST(NULL AS integer) AS care_site_id,
CAST(NULL AS STRING) AS visit_detail_source_value,
CAST(NULL AS integer) AS visit_detail_source_concept_id,
CAST(NULL AS integer) AS admitted_from_concept_id,
CAST(NULL AS STRING) AS admitted_from_source_value,
CAST(NULL AS STRING) AS discharged_to_source_value,
CAST(NULL AS integer) AS discharged_to_concept_id,
CAST(NULL AS integer) AS preceding_visit_detail_id,
CAST(NULL AS integer) AS parent_visit_detail_id,
CAST(NULL AS integer) AS visit_occurrence_id WHERE 1 = 0;
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.CONDITION_OCCURRENCE
USING DELTA
AS
SELECT CAST(NULL AS integer) AS condition_occurrence_id,
CAST(NULL AS integer) AS person_id,
CAST(NULL AS integer) AS condition_concept_id,
CAST(NULL AS date) AS condition_start_date,
CAST(NULL AS TIMESTAMP) AS condition_start_datetime,
CAST(NULL AS date) AS condition_end_date,
CAST(NULL AS TIMESTAMP) AS condition_end_datetime,
CAST(NULL AS integer) AS condition_type_concept_id,
CAST(NULL AS integer) AS condition_status_concept_id,
CAST(NULL AS STRING) AS stop_reason,
CAST(NULL AS integer) AS provider_id,
CAST(NULL AS integer) AS visit_occurrence_id,
CAST(NULL AS integer) AS visit_detail_id,
CAST(NULL AS STRING) AS condition_source_value,
CAST(NULL AS integer) AS condition_source_concept_id,
CAST(NULL AS STRING) AS condition_status_source_value WHERE 1 = 0;
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.DRUG_EXPOSURE
USING DELTA
AS
SELECT CAST(NULL AS integer) AS drug_exposure_id,
CAST(NULL AS integer) AS person_id,
CAST(NULL AS integer) AS drug_concept_id,
CAST(NULL AS date) AS drug_exposure_start_date,
CAST(NULL AS TIMESTAMP) AS drug_exposure_start_datetime,
CAST(NULL AS date) AS drug_exposure_end_date,
CAST(NULL AS TIMESTAMP) AS drug_exposure_end_datetime,
CAST(NULL AS date) AS verbatim_end_date,
CAST(NULL AS integer) AS drug_type_concept_id,
CAST(NULL AS STRING) AS stop_reason,
CAST(NULL AS integer) AS refills,
CAST(NULL AS float) AS quantity,
CAST(NULL AS integer) AS days_supply,
CAST(NULL AS STRING) AS sig,
CAST(NULL AS integer) AS route_concept_id,
CAST(NULL AS STRING) AS lot_number,
CAST(NULL AS integer) AS provider_id,
CAST(NULL AS integer) AS visit_occurrence_id,
CAST(NULL AS integer) AS visit_detail_id,
CAST(NULL AS STRING) AS drug_source_value,
CAST(NULL AS integer) AS drug_source_concept_id,
CAST(NULL AS STRING) AS route_source_value,
CAST(NULL AS STRING) AS dose_unit_source_value WHERE 1 = 0;
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.PROCEDURE_OCCURRENCE
USING DELTA
AS
SELECT CAST(NULL AS integer) AS procedure_occurrence_id,
CAST(NULL AS integer) AS person_id,
CAST(NULL AS integer) AS procedure_concept_id,
CAST(NULL AS date) AS procedure_date,
CAST(NULL AS TIMESTAMP) AS procedure_datetime,
CAST(NULL AS date) AS procedure_end_date,
CAST(NULL AS TIMESTAMP) AS procedure_end_datetime,
CAST(NULL AS integer) AS procedure_type_concept_id,
CAST(NULL AS integer) AS modifier_concept_id,
CAST(NULL AS integer) AS quantity,
CAST(NULL AS integer) AS provider_id,
CAST(NULL AS integer) AS visit_occurrence_id,
CAST(NULL AS integer) AS visit_detail_id,
CAST(NULL AS STRING) AS procedure_source_value,
CAST(NULL AS integer) AS procedure_source_concept_id,
CAST(NULL AS STRING) AS modifier_source_value WHERE 1 = 0;
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.DEVICE_EXPOSURE
USING DELTA
AS
SELECT CAST(NULL AS integer) AS device_exposure_id,
CAST(NULL AS integer) AS person_id,
CAST(NULL AS integer) AS device_concept_id,
CAST(NULL AS date) AS device_exposure_start_date,
CAST(NULL AS TIMESTAMP) AS device_exposure_start_datetime,
CAST(NULL AS date) AS device_exposure_end_date,
CAST(NULL AS TIMESTAMP) AS device_exposure_end_datetime,
CAST(NULL AS integer) AS device_type_concept_id,
CAST(NULL AS STRING) AS unique_device_id,
CAST(NULL AS STRING) AS production_id,
CAST(NULL AS integer) AS quantity,
CAST(NULL AS integer) AS provider_id,
CAST(NULL AS integer) AS visit_occurrence_id,
CAST(NULL AS integer) AS visit_detail_id,
CAST(NULL AS STRING) AS device_source_value,
CAST(NULL AS integer) AS device_source_concept_id,
CAST(NULL AS integer) AS unit_concept_id,
CAST(NULL AS STRING) AS unit_source_value,
CAST(NULL AS integer) AS unit_source_concept_id WHERE 1 = 0;
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.MEASUREMENT
USING DELTA
AS
SELECT CAST(NULL AS integer) AS measurement_id,
CAST(NULL AS integer) AS person_id,
CAST(NULL AS integer) AS measurement_concept_id,
CAST(NULL AS date) AS measurement_date,
CAST(NULL AS TIMESTAMP) AS measurement_datetime,
CAST(NULL AS STRING) AS measurement_time,
CAST(NULL AS integer) AS measurement_type_concept_id,
CAST(NULL AS integer) AS operator_concept_id,
CAST(NULL AS float) AS value_as_number,
CAST(NULL AS integer) AS value_as_concept_id,
CAST(NULL AS integer) AS unit_concept_id,
CAST(NULL AS float) AS range_low,
CAST(NULL AS float) AS range_high,
CAST(NULL AS integer) AS provider_id,
CAST(NULL AS integer) AS visit_occurrence_id,
CAST(NULL AS integer) AS visit_detail_id,
CAST(NULL AS STRING) AS measurement_source_value,
CAST(NULL AS integer) AS measurement_source_concept_id,
CAST(NULL AS STRING) AS unit_source_value,
CAST(NULL AS integer) AS unit_source_concept_id,
CAST(NULL AS STRING) AS value_source_value,
CAST(NULL AS integer) AS measurement_event_id,
CAST(NULL AS integer) AS meas_event_field_concept_id WHERE 1 = 0;
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.OBSERVATION
USING DELTA
AS
SELECT CAST(NULL AS integer) AS observation_id,
CAST(NULL AS integer) AS person_id,
CAST(NULL AS integer) AS observation_concept_id,
CAST(NULL AS date) AS observation_date,
CAST(NULL AS TIMESTAMP) AS observation_datetime,
CAST(NULL AS integer) AS observation_type_concept_id,
CAST(NULL AS float) AS value_as_number,
CAST(NULL AS STRING) AS value_as_string,
CAST(NULL AS integer) AS value_as_concept_id,
CAST(NULL AS integer) AS qualifier_concept_id,
CAST(NULL AS integer) AS unit_concept_id,
CAST(NULL AS integer) AS provider_id,
CAST(NULL AS integer) AS visit_occurrence_id,
CAST(NULL AS integer) AS visit_detail_id,
CAST(NULL AS STRING) AS observation_source_value,
CAST(NULL AS integer) AS observation_source_concept_id,
CAST(NULL AS STRING) AS unit_source_value,
CAST(NULL AS STRING) AS qualifier_source_value,
CAST(NULL AS STRING) AS value_source_value,
CAST(NULL AS integer) AS observation_event_id,
CAST(NULL AS integer) AS obs_event_field_concept_id WHERE 1 = 0;
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.DEATH
USING DELTA
AS
SELECT CAST(NULL AS integer) AS person_id,
CAST(NULL AS date) AS death_date,
CAST(NULL AS TIMESTAMP) AS death_datetime,
CAST(NULL AS integer) AS death_type_concept_id,
CAST(NULL AS integer) AS cause_concept_id,
CAST(NULL AS STRING) AS cause_source_value,
CAST(NULL AS integer) AS cause_source_concept_id WHERE 1 = 0;
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.NOTE
USING DELTA
AS
SELECT CAST(NULL AS integer) AS note_id,
CAST(NULL AS integer) AS person_id,
CAST(NULL AS date) AS note_date,
CAST(NULL AS TIMESTAMP) AS note_datetime,
CAST(NULL AS integer) AS note_type_concept_id,
CAST(NULL AS integer) AS note_class_concept_id,
CAST(NULL AS STRING) AS note_title,
CAST(NULL AS STRING) AS note_text,
CAST(NULL AS integer) AS encoding_concept_id,
CAST(NULL AS integer) AS language_concept_id,
CAST(NULL AS integer) AS provider_id,
CAST(NULL AS integer) AS visit_occurrence_id,
CAST(NULL AS integer) AS visit_detail_id,
CAST(NULL AS STRING) AS note_source_value,
CAST(NULL AS integer) AS note_event_id,
CAST(NULL AS integer) AS note_event_field_concept_id WHERE 1 = 0;
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.NOTE_NLP
USING DELTA
AS
SELECT CAST(NULL AS integer) AS note_nlp_id,
CAST(NULL AS integer) AS note_id,
CAST(NULL AS integer) AS section_concept_id,
CAST(NULL AS STRING) AS snippet,
CAST(NULL AS STRING) AS offset,
CAST(NULL AS STRING) AS lexical_variant,
CAST(NULL AS integer) AS note_nlp_concept_id,
CAST(NULL AS integer) AS note_nlp_source_concept_id,
CAST(NULL AS STRING) AS nlp_system,
CAST(NULL AS date) AS nlp_date,
CAST(NULL AS TIMESTAMP) AS nlp_datetime,
CAST(NULL AS STRING) AS term_exists,
CAST(NULL AS STRING) AS term_temporal,
CAST(NULL AS STRING) AS term_modifiers WHERE 1 = 0;
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.SPECIMEN
USING DELTA
AS
SELECT CAST(NULL AS integer) AS specimen_id,
CAST(NULL AS integer) AS person_id,
CAST(NULL AS integer) AS specimen_concept_id,
CAST(NULL AS integer) AS specimen_type_concept_id,
CAST(NULL AS date) AS specimen_date,
CAST(NULL AS TIMESTAMP) AS specimen_datetime,
CAST(NULL AS float) AS quantity,
CAST(NULL AS integer) AS unit_concept_id,
CAST(NULL AS integer) AS anatomic_site_concept_id,
CAST(NULL AS integer) AS disease_status_concept_id,
CAST(NULL AS STRING) AS specimen_source_id,
CAST(NULL AS STRING) AS specimen_source_value,
CAST(NULL AS STRING) AS unit_source_value,
CAST(NULL AS STRING) AS anatomic_site_source_value,
CAST(NULL AS STRING) AS disease_status_source_value WHERE 1 = 0;
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.FACT_RELATIONSHIP
USING DELTA
AS
SELECT CAST(NULL AS integer) AS domain_concept_id_1,
CAST(NULL AS integer) AS fact_id_1,
CAST(NULL AS integer) AS domain_concept_id_2,
CAST(NULL AS integer) AS fact_id_2,
CAST(NULL AS integer) AS relationship_concept_id WHERE 1 = 0;
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.LOCATION
USING DELTA
AS
SELECT CAST(NULL AS integer) AS location_id,
CAST(NULL AS STRING) AS address_1,
CAST(NULL AS STRING) AS address_2,
CAST(NULL AS STRING) AS city,
CAST(NULL AS STRING) AS state,
CAST(NULL AS STRING) AS zip,
CAST(NULL AS STRING) AS county,
CAST(NULL AS STRING) AS location_source_value,
CAST(NULL AS integer) AS country_concept_id,
CAST(NULL AS STRING) AS country_source_value,
CAST(NULL AS float) AS latitude,
CAST(NULL AS float) AS longitude WHERE 1 = 0;
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.CARE_SITE
USING DELTA
AS
SELECT CAST(NULL AS integer) AS care_site_id,
CAST(NULL AS STRING) AS care_site_name,
CAST(NULL AS integer) AS place_of_service_concept_id,
CAST(NULL AS integer) AS location_id,
CAST(NULL AS STRING) AS care_site_source_value,
CAST(NULL AS STRING) AS place_of_service_source_value WHERE 1 = 0;
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.PROVIDER
USING DELTA
AS
SELECT CAST(NULL AS integer) AS provider_id,
CAST(NULL AS STRING) AS provider_name,
CAST(NULL AS STRING) AS npi,
CAST(NULL AS STRING) AS dea,
CAST(NULL AS integer) AS specialty_concept_id,
CAST(NULL AS integer) AS care_site_id,
CAST(NULL AS integer) AS year_of_birth,
CAST(NULL AS integer) AS gender_concept_id,
CAST(NULL AS STRING) AS provider_source_value,
CAST(NULL AS STRING) AS specialty_source_value,
CAST(NULL AS integer) AS specialty_source_concept_id,
CAST(NULL AS STRING) AS gender_source_value,
CAST(NULL AS integer) AS gender_source_concept_id WHERE 1 = 0;
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD
USING DELTA
AS
SELECT CAST(NULL AS integer) AS payer_plan_period_id,
CAST(NULL AS integer) AS person_id,
CAST(NULL AS date) AS payer_plan_period_start_date,
CAST(NULL AS date) AS payer_plan_period_end_date,
CAST(NULL AS integer) AS payer_concept_id,
CAST(NULL AS STRING) AS payer_source_value,
CAST(NULL AS integer) AS payer_source_concept_id,
CAST(NULL AS integer) AS plan_concept_id,
CAST(NULL AS STRING) AS plan_source_value,
CAST(NULL AS integer) AS plan_source_concept_id,
CAST(NULL AS integer) AS sponsor_concept_id,
CAST(NULL AS STRING) AS sponsor_source_value,
CAST(NULL AS integer) AS sponsor_source_concept_id,
CAST(NULL AS STRING) AS family_source_value,
CAST(NULL AS integer) AS stop_reason_concept_id,
CAST(NULL AS STRING) AS stop_reason_source_value,
CAST(NULL AS integer) AS stop_reason_source_concept_id WHERE 1 = 0;
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.COST
USING DELTA
AS
SELECT CAST(NULL AS integer) AS cost_id,
CAST(NULL AS integer) AS cost_event_id,
CAST(NULL AS STRING) AS cost_domain_id,
CAST(NULL AS integer) AS cost_type_concept_id,
CAST(NULL AS integer) AS currency_concept_id,
CAST(NULL AS float) AS total_charge,
CAST(NULL AS float) AS total_cost,
CAST(NULL AS float) AS total_paid,
CAST(NULL AS float) AS paid_by_payer,
CAST(NULL AS float) AS paid_by_patient,
CAST(NULL AS float) AS paid_patient_copay,
CAST(NULL AS float) AS paid_patient_coinsurance,
CAST(NULL AS float) AS paid_patient_deductible,
CAST(NULL AS float) AS paid_by_primary,
CAST(NULL AS float) AS paid_ingredient_cost,
CAST(NULL AS float) AS paid_dispensing_fee,
CAST(NULL AS integer) AS payer_plan_period_id,
CAST(NULL AS float) AS amount_allowed,
CAST(NULL AS integer) AS revenue_code_concept_id,
CAST(NULL AS STRING) AS revenue_code_source_value,
CAST(NULL AS integer) AS drg_concept_id,
CAST(NULL AS STRING) AS drg_source_value WHERE 1 = 0;
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.DRUG_ERA
USING DELTA
AS
SELECT CAST(NULL AS integer) AS drug_era_id,
CAST(NULL AS integer) AS person_id,
CAST(NULL AS integer) AS drug_concept_id,
CAST(NULL AS date) AS drug_era_start_date,
CAST(NULL AS date) AS drug_era_end_date,
CAST(NULL AS integer) AS drug_exposure_count,
CAST(NULL AS integer) AS gap_days WHERE 1 = 0;
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.DOSE_ERA
USING DELTA
AS
SELECT CAST(NULL AS integer) AS dose_era_id,
CAST(NULL AS integer) AS person_id,
CAST(NULL AS integer) AS drug_concept_id,
CAST(NULL AS integer) AS unit_concept_id,
CAST(NULL AS float) AS dose_value,
CAST(NULL AS date) AS dose_era_start_date,
CAST(NULL AS date) AS dose_era_end_date WHERE 1 = 0;
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.CONDITION_ERA
USING DELTA
AS
SELECT CAST(NULL AS integer) AS condition_era_id,
CAST(NULL AS integer) AS person_id,
CAST(NULL AS integer) AS condition_concept_id,
CAST(NULL AS date) AS condition_era_start_date,
CAST(NULL AS date) AS condition_era_end_date,
CAST(NULL AS integer) AS condition_occurrence_count WHERE 1 = 0;
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.EPISODE
USING DELTA
AS
SELECT CAST(NULL AS integer) AS episode_id,
CAST(NULL AS integer) AS person_id,
CAST(NULL AS integer) AS episode_concept_id,
CAST(NULL AS date) AS episode_start_date,
CAST(NULL AS TIMESTAMP) AS episode_start_datetime,
CAST(NULL AS date) AS episode_end_date,
CAST(NULL AS TIMESTAMP) AS episode_end_datetime,
CAST(NULL AS integer) AS episode_parent_id,
CAST(NULL AS integer) AS episode_number,
CAST(NULL AS integer) AS episode_object_concept_id,
CAST(NULL AS integer) AS episode_type_concept_id,
CAST(NULL AS STRING) AS episode_source_value,
CAST(NULL AS integer) AS episode_source_concept_id WHERE 1 = 0;
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.EPISODE_EVENT
USING DELTA
AS
SELECT CAST(NULL AS integer) AS episode_id,
CAST(NULL AS integer) AS event_id,
CAST(NULL AS integer) AS episode_event_field_concept_id WHERE 1 = 0;
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.METADATA
USING DELTA
AS
SELECT CAST(NULL AS integer) AS metadata_id,
CAST(NULL AS integer) AS metadata_concept_id,
CAST(NULL AS integer) AS metadata_type_concept_id,
CAST(NULL AS STRING) AS name,
CAST(NULL AS STRING) AS value_as_string,
CAST(NULL AS integer) AS value_as_concept_id,
CAST(NULL AS float) AS value_as_number,
CAST(NULL AS date) AS metadata_date,
CAST(NULL AS TIMESTAMP) AS metadata_datetime WHERE 1 = 0;
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.CDM_SOURCE
USING DELTA
AS
SELECT CAST(NULL AS STRING) AS cdm_source_name,
CAST(NULL AS STRING) AS cdm_source_abbreviation,
CAST(NULL AS STRING) AS cdm_holder,
CAST(NULL AS STRING) AS source_description,
CAST(NULL AS STRING) AS source_documentation_reference,
CAST(NULL AS STRING) AS cdm_etl_reference,
CAST(NULL AS date) AS source_release_date,
CAST(NULL AS date) AS cdm_release_date,
CAST(NULL AS STRING) AS cdm_version,
CAST(NULL AS integer) AS cdm_version_concept_id,
CAST(NULL AS STRING) AS vocabulary_version WHERE 1 = 0;
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.CONCEPT
USING DELTA
AS
SELECT CAST(NULL AS integer) AS concept_id,
CAST(NULL AS STRING) AS concept_name,
CAST(NULL AS STRING) AS domain_id,
CAST(NULL AS STRING) AS vocabulary_id,
CAST(NULL AS STRING) AS concept_class_id,
CAST(NULL AS STRING) AS standard_concept,
CAST(NULL AS STRING) AS concept_code,
CAST(NULL AS date) AS valid_start_date,
CAST(NULL AS date) AS valid_end_date,
CAST(NULL AS STRING) AS invalid_reason WHERE 1 = 0;
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.VOCABULARY
USING DELTA
AS
SELECT CAST(NULL AS STRING) AS vocabulary_id,
CAST(NULL AS STRING) AS vocabulary_name,
CAST(NULL AS STRING) AS vocabulary_reference,
CAST(NULL AS STRING) AS vocabulary_version,
CAST(NULL AS integer) AS vocabulary_concept_id WHERE 1 = 0;
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.DOMAIN
USING DELTA
AS
SELECT CAST(NULL AS STRING) AS domain_id,
CAST(NULL AS STRING) AS domain_name,
CAST(NULL AS integer) AS domain_concept_id WHERE 1 = 0;
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.CONCEPT_CLASS
USING DELTA
AS
SELECT CAST(NULL AS STRING) AS concept_class_id,
CAST(NULL AS STRING) AS concept_class_name,
CAST(NULL AS integer) AS concept_class_concept_id WHERE 1 = 0;
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.CONCEPT_RELATIONSHIP
USING DELTA
AS
SELECT CAST(NULL AS integer) AS concept_id_1,
CAST(NULL AS integer) AS concept_id_2,
CAST(NULL AS STRING) AS relationship_id,
CAST(NULL AS date) AS valid_start_date,
CAST(NULL AS date) AS valid_end_date,
CAST(NULL AS STRING) AS invalid_reason WHERE 1 = 0;
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.RELATIONSHIP
USING DELTA
AS
SELECT CAST(NULL AS STRING) AS relationship_id,
CAST(NULL AS STRING) AS relationship_name,
CAST(NULL AS STRING) AS is_hierarchical,
CAST(NULL AS STRING) AS defines_ancestry,
CAST(NULL AS STRING) AS reverse_relationship_id,
CAST(NULL AS integer) AS relationship_concept_id WHERE 1 = 0;
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.CONCEPT_SYNONYM
USING DELTA
AS
SELECT CAST(NULL AS integer) AS concept_id,
CAST(NULL AS STRING) AS concept_synonym_name,
CAST(NULL AS integer) AS language_concept_id WHERE 1 = 0;
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.CONCEPT_ANCESTOR
USING DELTA
AS
SELECT CAST(NULL AS integer) AS ancestor_concept_id,
CAST(NULL AS integer) AS descendant_concept_id,
CAST(NULL AS integer) AS min_levels_of_separation,
CAST(NULL AS integer) AS max_levels_of_separation WHERE 1 = 0;
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.SOURCE_TO_CONCEPT_MAP
USING DELTA
AS
SELECT CAST(NULL AS STRING) AS source_code,
CAST(NULL AS integer) AS source_concept_id,
CAST(NULL AS STRING) AS source_vocabulary_id,
CAST(NULL AS STRING) AS source_code_description,
CAST(NULL AS integer) AS target_concept_id,
CAST(NULL AS STRING) AS target_vocabulary_id,
CAST(NULL AS date) AS valid_start_date,
CAST(NULL AS date) AS valid_end_date,
CAST(NULL AS STRING) AS invalid_reason WHERE 1 = 0;
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.DRUG_STRENGTH
USING DELTA
AS
SELECT CAST(NULL AS integer) AS drug_concept_id,
CAST(NULL AS integer) AS ingredient_concept_id,
CAST(NULL AS float) AS amount_value,
CAST(NULL AS integer) AS amount_unit_concept_id,
CAST(NULL AS float) AS numerator_value,
CAST(NULL AS integer) AS numerator_unit_concept_id,
CAST(NULL AS float) AS denominator_value,
CAST(NULL AS integer) AS denominator_unit_concept_id,
CAST(NULL AS integer) AS box_size,
CAST(NULL AS date) AS valid_start_date,
CAST(NULL AS date) AS valid_end_date,
CAST(NULL AS STRING) AS invalid_reason WHERE 1 = 0;
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.COHORT
USING DELTA
AS
SELECT CAST(NULL AS integer) AS cohort_definition_id,
CAST(NULL AS integer) AS subject_id,
CAST(NULL AS date) AS cohort_start_date,
CAST(NULL AS date) AS cohort_end_date WHERE 1 = 0;
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.COHORT_DEFINITION
USING DELTA
AS
SELECT CAST(NULL AS integer) AS cohort_definition_id,
CAST(NULL AS STRING) AS cohort_definition_name,
CAST(NULL AS STRING) AS cohort_definition_description,
CAST(NULL AS integer) AS definition_type_concept_id,
CAST(NULL AS STRING) AS cohort_definition_syntax,
CAST(NULL AS integer) AS subject_concept_id,
CAST(NULL AS date) AS cohort_initiation_date WHERE 1 = 0;

View File

@ -0,0 +1,70 @@
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes
-- spark does not support indexes

View File

@ -0,0 +1,28 @@
ALTER TABLE @cdmDatabaseSchema.PERSON ADD CONSTRAINT xpk_PERSON (person_id);
ALTER TABLE @cdmDatabaseSchema.OBSERVATION_PERIOD ADD CONSTRAINT xpk_OBSERVATION_PERIOD (observation_period_id);
ALTER TABLE @cdmDatabaseSchema.VISIT_OCCURRENCE ADD CONSTRAINT xpk_VISIT_OCCURRENCE (visit_occurrence_id);
ALTER TABLE @cdmDatabaseSchema.VISIT_DETAIL ADD CONSTRAINT xpk_VISIT_DETAIL (visit_detail_id);
ALTER TABLE @cdmDatabaseSchema.CONDITION_OCCURRENCE ADD CONSTRAINT xpk_CONDITION_OCCURRENCE (condition_occurrence_id);
ALTER TABLE @cdmDatabaseSchema.DRUG_EXPOSURE ADD CONSTRAINT xpk_DRUG_EXPOSURE (drug_exposure_id);
ALTER TABLE @cdmDatabaseSchema.PROCEDURE_OCCURRENCE ADD CONSTRAINT xpk_PROCEDURE_OCCURRENCE (procedure_occurrence_id);
ALTER TABLE @cdmDatabaseSchema.DEVICE_EXPOSURE ADD CONSTRAINT xpk_DEVICE_EXPOSURE (device_exposure_id);
ALTER TABLE @cdmDatabaseSchema.MEASUREMENT ADD CONSTRAINT xpk_MEASUREMENT (measurement_id);
ALTER TABLE @cdmDatabaseSchema.OBSERVATION ADD CONSTRAINT xpk_OBSERVATION (observation_id);
ALTER TABLE @cdmDatabaseSchema.NOTE ADD CONSTRAINT xpk_NOTE (note_id);
ALTER TABLE @cdmDatabaseSchema.NOTE_NLP ADD CONSTRAINT xpk_NOTE_NLP (note_nlp_id);
ALTER TABLE @cdmDatabaseSchema.SPECIMEN ADD CONSTRAINT xpk_SPECIMEN (specimen_id);
ALTER TABLE @cdmDatabaseSchema.LOCATION ADD CONSTRAINT xpk_LOCATION (location_id);
ALTER TABLE @cdmDatabaseSchema.CARE_SITE ADD CONSTRAINT xpk_CARE_SITE (care_site_id);
ALTER TABLE @cdmDatabaseSchema.PROVIDER ADD CONSTRAINT xpk_PROVIDER (provider_id);
ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT xpk_PAYER_PLAN_PERIOD (payer_plan_period_id);
ALTER TABLE @cdmDatabaseSchema.COST ADD CONSTRAINT xpk_COST (cost_id);
ALTER TABLE @cdmDatabaseSchema.DRUG_ERA ADD CONSTRAINT xpk_DRUG_ERA (drug_era_id);
ALTER TABLE @cdmDatabaseSchema.DOSE_ERA ADD CONSTRAINT xpk_DOSE_ERA (dose_era_id);
ALTER TABLE @cdmDatabaseSchema.CONDITION_ERA ADD CONSTRAINT xpk_CONDITION_ERA (condition_era_id);
ALTER TABLE @cdmDatabaseSchema.EPISODE ADD CONSTRAINT xpk_EPISODE (episode_id);
ALTER TABLE @cdmDatabaseSchema.METADATA ADD CONSTRAINT xpk_METADATA (metadata_id);
ALTER TABLE @cdmDatabaseSchema.CONCEPT ADD CONSTRAINT xpk_CONCEPT (concept_id);
ALTER TABLE @cdmDatabaseSchema.VOCABULARY ADD CONSTRAINT xpk_VOCABULARY (vocabulary_id);
ALTER TABLE @cdmDatabaseSchema.DOMAIN ADD CONSTRAINT xpk_DOMAIN (domain_id);
ALTER TABLE @cdmDatabaseSchema.CONCEPT_CLASS ADD CONSTRAINT xpk_CONCEPT_CLASS (concept_class_id);
ALTER TABLE @cdmDatabaseSchema.RELATIONSHIP ADD CONSTRAINT xpk_RELATIONSHIP (relationship_id);

View File

@ -350,8 +350,6 @@ ALTER TABLE @cdmDatabaseSchema.DRUG_STRENGTH ADD CONSTRAINT fpk_DRUG_STRENGTH_nu
ALTER TABLE @cdmDatabaseSchema.DRUG_STRENGTH ADD CONSTRAINT fpk_DRUG_STRENGTH_denominator_unit_concept_id FOREIGN KEY (denominator_unit_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.COHORT_DEFINITION ADD CONSTRAINT fpk_COHORT_DEFINITION_cohort_definition_id FOREIGN KEY (cohort_definition_id) REFERENCES @cdmDatabaseSchema.COHORT (COHORT_DEFINITION_ID);
ALTER TABLE @cdmDatabaseSchema.COHORT_DEFINITION ADD CONSTRAINT fpk_COHORT_DEFINITION_definition_type_concept_id FOREIGN KEY (definition_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.COHORT_DEFINITION ADD CONSTRAINT fpk_COHORT_DEFINITION_subject_concept_id FOREIGN KEY (subject_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);

View File

@ -180,7 +180,7 @@ CREATE TABLE @cdmDatabaseSchema.MEASUREMENT (
unit_source_value varchar(50) NULL,
unit_source_concept_id integer NULL,
value_source_value varchar(50) NULL,
measurement_event_id bigint NULL,
measurement_event_id integer NULL,
meas_event_field_concept_id integer NULL );
--HINT DISTRIBUTE ON KEY (person_id)
@ -204,7 +204,7 @@ CREATE TABLE @cdmDatabaseSchema.OBSERVATION (
unit_source_value varchar(50) NULL,
qualifier_source_value varchar(50) NULL,
value_source_value varchar(50) NULL,
observation_event_id bigint NULL,
observation_event_id integer NULL,
obs_event_field_concept_id integer NULL );
--HINT DISTRIBUTE ON KEY (person_id)
@ -233,7 +233,7 @@ CREATE TABLE @cdmDatabaseSchema.NOTE (
visit_occurrence_id integer NULL,
visit_detail_id integer NULL,
note_source_value varchar(50) NULL,
note_event_id bigint NULL,
note_event_id integer NULL,
note_event_field_concept_id integer NULL );
--HINT DISTRIBUTE ON RANDOM
@ -369,8 +369,8 @@ CREATE TABLE @cdmDatabaseSchema.DRUG_ERA (
drug_era_id integer NOT NULL,
person_id integer NOT NULL,
drug_concept_id integer NOT NULL,
drug_era_start_date datetime NOT NULL,
drug_era_end_date datetime NOT NULL,
drug_era_start_date date NOT NULL,
drug_era_end_date date NOT NULL,
drug_exposure_count integer NULL,
gap_days integer NULL );
@ -381,28 +381,28 @@ CREATE TABLE @cdmDatabaseSchema.DOSE_ERA (
drug_concept_id integer NOT NULL,
unit_concept_id integer NOT NULL,
dose_value float NOT NULL,
dose_era_start_date datetime NOT NULL,
dose_era_end_date datetime NOT NULL );
dose_era_start_date date NOT NULL,
dose_era_end_date date NOT NULL );
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.CONDITION_ERA (
condition_era_id integer NOT NULL,
person_id integer NOT NULL,
condition_concept_id integer NOT NULL,
condition_era_start_date datetime NOT NULL,
condition_era_end_date datetime NOT NULL,
condition_era_start_date date NOT NULL,
condition_era_end_date date NOT NULL,
condition_occurrence_count integer NULL );
--HINT DISTRIBUTE ON KEY (person_id)
CREATE TABLE @cdmDatabaseSchema.EPISODE (
episode_id bigint NOT NULL,
person_id bigint NOT NULL,
episode_id integer NOT NULL,
person_id integer NOT NULL,
episode_concept_id integer NOT NULL,
episode_start_date date NOT NULL,
episode_start_datetime datetime NULL,
episode_end_date date NULL,
episode_end_datetime datetime NULL,
episode_parent_id bigint NULL,
episode_parent_id integer NULL,
episode_number integer NULL,
episode_object_concept_id integer NOT NULL,
episode_type_concept_id integer NOT NULL,
@ -411,8 +411,8 @@ CREATE TABLE @cdmDatabaseSchema.EPISODE (
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @cdmDatabaseSchema.EPISODE_EVENT (
episode_id bigint NOT NULL,
event_id bigint NOT NULL,
episode_id integer NOT NULL,
event_id integer NOT NULL,
episode_event_field_concept_id integer NOT NULL );
--HINT DISTRIBUTE ON RANDOM

View File

@ -19,7 +19,28 @@ library(stringr)
```
Below is the specification document for the OMOP Common Data Model, v5.4. **This is the latest version of the OMOP CDM.** Each table is represented with a high-level description and ETL conventions that should be followed. This is continued with a discussion of each field in each table, any conventions related to the field, and constraints that should be followed (like primary key, foreign key, etc). Should you have questions please feel free to visit the [forums](https://forums.ohdsi.org/) or the [github issue](https://github.com/ohdsi/CommonDataModel/issues) page.
This is the specification document for the OMOP Common Data Model, v5.4. **This is the latest version of the OMOP CDM.** Each table is represented with a high-level description and ETL conventions that should be followed. This is continued with a discussion of each field in each table, any conventions related to the field, and constraints that should be followed (like primary key, foreign key, etc). Should you have questions please feel free to visit the [forums](https://forums.ohdsi.org/) or the [github issue](https://github.com/ohdsi/CommonDataModel/issues) page.
### Current Support for CDM v5.4
The table below details which OHDSI tools support CDM v5.4. There are two levels of support: legacy support means that the tool supports all tables and fields that were present in CDM v5.3 and feature support indicates that the tool supports any new tables and fields in CDM v5.4 that were not present in CDM v5.3. A green heart `r emo::ji("green heart")` indicates that the support level for the listed tool is in place, has been tested, and released. A yellow heart `r emo::ji("yellow heart")` indicates that the support level for the listed tool has been initiated but has not yet been tested and released.
<br>
|**Tool**|**Description**|**Legacy Support**|**Feature Support**|
|--|--|--|--|
|**CDM R package**|This package can be downloaded from [https://github.com/OHDSI/CommonDataModel/](https://github.com/OHDSI/CommonDataModel/). It functions to dynamically create the OMOP CDM documentation and DDL scripts to instantiate the CDM tables. |`r emo::ji("green heart")`|`r emo::ji("green heart")`
|**Data Quality Dashboard**|This package can be downloaded from [https://github.com/OHDSI/DataQualityDashboard](https://github.com/OHDSI/DataQualityDashboard). It runs a set of > 3500 data quality checks against an OMOP CDM instance and is required to be run on all databases prior to participating in an OHDSI network research study.|`r emo::ji("green heart")`| `r emo::ji("yellow heart")`
|**Achilles**|This package can be downloaded from [https://github.com/OHDSI/Achilles](https://github.com/OHDSI/Achilles), performing a set of broad database characterizations agains an OMOP CDM instance. |`r emo::ji("green heart")`|`r emo::ji("yellow heart")`
|**ARES**|This package can be downloaded from [https://github.com/OHDSI/Ares](https://github.com/OHDSI/Ares) and is designed to display the results from both the ACHILLES and DataQualityDashboard packages to support data quality and characterization research.|`r emo::ji("green heart")`|`r emo::ji("yellow heart")`
|**ATLAS**|ATLAS is an open source software tool for researchers to conduct scientific analyses on standardized observational data. [Demo](http://atlas-demo.ohdsi.org/) |`r emo::ji("green heart")`|`r emo::ji("yellow heart")`
|**Rabbit-In-A-Hat**|This package can be downloaded from [https://github.com/OHDSI/WhiteRabbit](https://github.com/OHDSI/WhiteRabbit) and is an application for interactive design of an ETL to the OMOP Common Data Model with the help of the the scan report generated by White Rabbit.|`r emo::ji("green heart")`|`r emo::ji("green heart")`
|**Feature Extraction**|This package can be downloaded from [https://github.com/OHDSI/FeatureExtraction](https://github.com/OHDSI/FeatureExtraction). It is designed to generate features (covariates) for a cohort generated using the OMOP CDM. |`r emo::ji("green heart")`|`r emo::ji("green heart")`*
|**Cohort Diagnostics**|This package can be downloaded from [https://github.com/OHDSI/CohortDiagnostics](https://github.com/OHDSI/CohortDiagnostics) and is used to critically evaluate cohort phenotypes. |`r emo::ji("green heart")`|`r emo::ji("yellow heart")`
<br>
\* The **Feature Extraction** package supports all relevant new features in CDM v5.4. For example, it was decided that, from a methodological perspective, the EPISODE and EPISODE_EVENT tables should not be included to define cohort covariates because the events that make up episodes are already pulled in as potential covariates.
<br>
Looking to send us a pull request for a bug fix? Please see the [readme](https://github.com/OHDSI/CommonDataModel#readme) on the main github page.

View File

@ -1,6 +1,8 @@
---
title: "**CDM R Package Demo**"
output: html_document
output:
html_document:
toc: no
---
Below is an example showing two different ways the CDM R package can be used to create the tables in your environment. First, it uses the `buildRelease` function to create the DDL files on your machine. Once you have these downloaded you can then run them in your SQL client to set up the empty CDM tables. Second, the script shows the `executeDdl` function that will connect up to your SQL client directly (assuming your dbms is one of the supported dialects) and instantiate the tables through R.

View File

@ -15,6 +15,28 @@ The current CDM version is [CDM v5.4](http://ohdsi.github.io/CommonDataModel/cdm
- [Link to ReadMe for instructions on how to use the R package](https://github.com/OHDSI/CommonDataModel/tree/master#readme)
![](images/cdm54.png)
<br>
### Current Support for CDM v5.4
The table below details which OHDSI tools support CDM v5.4. There are two levels of support: legacy support means that the tool supports all tables and fields that were present in CDM v5.3 and feature support indicates that the tool supports any new tables and fields in CDM v5.4 that were not present in CDM v5.3. A green heart `r emo::ji("green heart")` indicates that the support level for the listed tool is in place, has been tested, and released. A yellow heart `r emo::ji("yellow heart")` indicates that the support level for the listed tool has been initiated but has not yet been tested and released.
<br>
|**Tool**|**Description**|**Legacy Support**|**Feature Support**|
|--|--|--|--|
|**CDM R package**|This package can be downloaded from [https://github.com/OHDSI/CommonDataModel/](https://github.com/OHDSI/CommonDataModel/). It functions to dynamically create the OMOP CDM documentation and DDL scripts to instantiate the CDM tables. |`r emo::ji("green heart")`|`r emo::ji("green heart")`
|**Data Quality Dashboard**|This package can be downloaded from [https://github.com/OHDSI/DataQualityDashboard](https://github.com/OHDSI/DataQualityDashboard). It runs a set of > 3500 data quality checks against an OMOP CDM instance and is required to be run on all databases prior to participating in an OHDSI network research study.|`r emo::ji("green heart")`| `r emo::ji("yellow heart")`
|**Achilles**|This package can be downloaded from [https://github.com/OHDSI/Achilles](https://github.com/OHDSI/Achilles), performing a set of broad database characterizations agains an OMOP CDM instance. |`r emo::ji("green heart")`|`r emo::ji("yellow heart")`
|**ARES**|This package can be downloaded from [https://github.com/OHDSI/Ares](https://github.com/OHDSI/Ares) and is designed to display the results from both the ACHILLES and DataQualityDashboard packages to support data quality and characterization research.|`r emo::ji("green heart")`|`r emo::ji("yellow heart")`
|**ATLAS**|ATLAS is an open source software tool for researchers to conduct scientific analyses on standardized observational data. [Demo](http://atlas-demo.ohdsi.org/) |`r emo::ji("green heart")`|`r emo::ji("yellow heart")`
|**Rabbit-In-A-Hat**|This package can be downloaded from [https://github.com/OHDSI/WhiteRabbit](https://github.com/OHDSI/WhiteRabbit) and is an application for interactive design of an ETL to the OMOP Common Data Model with the help of the the scan report generated by White Rabbit.|`r emo::ji("green heart")`|`r emo::ji("green heart")`
|**Feature Extraction**|This package can be downloaded from [https://github.com/OHDSI/FeatureExtraction](https://github.com/OHDSI/FeatureExtraction). It is designed to generate features (covariates) for a cohort generated using the OMOP CDM. |`r emo::ji("green heart")`|`r emo::ji("green heart")`*
|**Cohort Diagnostics**|This package can be downloaded from [https://github.com/OHDSI/CohortDiagnostics](https://github.com/OHDSI/CohortDiagnostics) and is used to critically evaluate cohort phenotypes. |`r emo::ji("green heart")`|`r emo::ji("yellow heart")`
<br>
\* The **Feature Extraction** package supports all relevant new features in CDM v5.4. For example, it was decided that, from a methodological perspective, the EPISODE and EPISODE_EVENT tables should not be included to define cohort covariates because the events that make up episodes are already pulled in as potential covariates.
<br>
## The CDM Working Group