Compare commits
155 Commits
Author | SHA1 | Date |
---|---|---|
|
1e0360980a | |
|
a00afcd6ef | |
|
4b96b13b55 | |
|
4c707cdd64 | |
|
7cc1ad81ac | |
|
0ca99109dc | |
|
014b50fcda | |
|
4a08b6276e | |
|
71474f855b | |
|
7921e51b32 | |
|
ab8a55dfa3 | |
|
b60f4f43dd | |
|
8e7f8d48ca | |
|
b4d867c5f1 | |
|
766171a6a3 | |
|
d2dddc5318 | |
|
4e14518681 | |
|
f8c78f882c | |
|
225f5e5a7e | |
|
9f098edced | |
|
863898b883 | |
|
ab08bea1af | |
|
eecba279eb | |
|
76d3701a6f | |
|
033253f49a | |
|
bbc3fb9f74 | |
|
696cf58b5a | |
|
9b5f756648 | |
|
561c93dc65 | |
|
330c087340 | |
|
c914c1ac65 | |
|
720b5480e9 | |
|
080816f659 | |
|
c84042399c | |
|
17b2d139c7 | |
|
41253286a7 | |
|
b53e7da8fe | |
|
aa047a3c62 | |
|
5fa4ad33cb | |
|
032e842b57 | |
|
b437f60f1b | |
|
bf335b87ff | |
|
1de5a4b0f7 | |
|
ce456b4971 | |
|
990531b3b2 | |
|
feb0b7964d | |
|
abe75876ae | |
|
af17663f67 | |
|
ad666fdd9d | |
|
3b84ef6114 | |
|
ce6499e0f8 | |
|
e5d2bc3d6a | |
|
4033a2b5a3 | |
|
eddd8b04c9 | |
|
2d42d9cd77 | |
|
91414a60c1 | |
|
4f96366924 | |
|
5f55a89fd4 | |
|
e2370317da | |
|
c92b9d7b90 | |
|
f2f202d056 | |
|
6d80bb3f55 | |
|
6eaeab4e6a | |
|
c721007114 | |
|
011f8e6ebb | |
|
3806428b2d | |
|
51f047b1a9 | |
|
8ee8a7b2f6 | |
|
4869f7c4ca | |
|
13fc5982ef | |
|
b7e1111678 | |
|
803f4157d4 | |
|
46e95eb296 | |
|
7111a4f681 | |
|
ab74f34403 | |
|
2835564a2e | |
|
98bea2c6f5 | |
|
201204fdfb | |
|
802d9ee2a3 | |
|
f114b8d5fd | |
|
b4d156c3c5 | |
|
8fe01fa52c | |
|
75a9ae41ae | |
|
51e91f526e | |
|
03136c39aa | |
|
71503f9a3c | |
|
9127e0bae1 | |
|
55c9a5cb1f | |
|
b65d9f1f0a | |
|
cf5c366cc4 | |
|
901b05fe59 | |
|
88e362c04b | |
|
a47cf59898 | |
|
86db83477a | |
|
1364d6b7fe | |
|
9d5db4ca8b | |
|
a7d620f199 | |
|
bf37173742 | |
|
fea8068294 | |
|
2f0bb8229c | |
|
47701541de | |
|
f65047daaa | |
|
880d0b6eeb | |
|
356cc6e7f0 | |
|
1889e31e1f | |
|
4aaf0140c5 | |
|
f9ebc22848 | |
|
8971ed2f66 | |
|
611e810dbe | |
|
c6fbdd6077 | |
|
ed8463b3e0 | |
|
cf30d00cb7 | |
|
e80f0e4df9 | |
|
dceb3a182b | |
|
0c031eee12 | |
|
df61fe512c | |
|
5a966aa5e3 | |
|
53ab6acd2d | |
|
320cc7a871 | |
|
91d24515f0 | |
|
8b74e16ce0 | |
|
8ed7a3908e | |
|
56e1d1a59f | |
|
c1c8e6a4f0 | |
|
22fe755ae0 | |
|
f774a0743b | |
|
119db6b2ea | |
|
d38086c36b | |
|
2346c49c0d | |
|
0d92edf5f7 | |
|
4145f5bd97 | |
|
f1d1c3a23d | |
|
00bd05daac | |
|
47eced44c9 | |
|
6333928fe0 | |
|
03ce1d5260 | |
|
4e90a3529e | |
|
d9dfaff735 | |
|
fd20424faa | |
|
7be2cd2a84 | |
|
95fef98c90 | |
|
46e13a1a3c | |
|
4a764dcca1 | |
|
6e03fab118 | |
|
0c07bfe881 | |
|
759270d000 | |
|
c4ab611981 | |
|
4ac3d61c6f | |
|
074bd288f8 | |
|
65166e4bd7 | |
|
e10628d954 | |
|
bdb5789d4a | |
|
2c61a520fb | |
|
64a8fd6645 | |
|
2456c66c62 |
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
name: Codespell
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
codespell:
|
||||
name: Check for spelling errors
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Codespell
|
||||
uses: codespell-project/actions-codespell@v2
|
|
@ -1,3 +1,3 @@
|
|||
Version: 0.2.0
|
||||
Date: 2024-02-06 20:13:33 UTC
|
||||
SHA: d152472484fb2bedd2596e2279a24afbd0084f0b
|
||||
Version: 1.0.1
|
||||
Date: 2024-10-01 17:22:58 UTC
|
||||
SHA: 17b2d139c7e982c33cd8abb2ea7db0cd104e756a
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
Package: CommonDataModel
|
||||
Type: Package
|
||||
Title: OMOP CDM DDL and Documentation Generator
|
||||
Version: 0.2.0
|
||||
Author: Clair Blacketer [aut, cre]
|
||||
Version: 1.0.1
|
||||
Authors@R: person(given = "Clair",
|
||||
family = "Blacketer",
|
||||
role = c("aut", "cre"),
|
||||
email = "mblacke@its.jnj.com")
|
||||
Maintainer: Clair Blacketer <mblacke@its.jnj.com>
|
||||
Description: Generates the scripts required to create an Observational Medical Outcomes Partnership (OMOP) Common Data Model (CDM) database and associated documentation for supported database platforms. Leverages the 'SqlRender' package to convert the Data Definition Language (DDL) script written in parameterized Structured Query Language (SQL) to the other supported dialects.
|
||||
License: Apache License 2.0
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
CommonDataModel v5.4.2
|
||||
======================
|
||||
|
||||
Bigfixes:
|
||||
|
||||
1. Removed package test that was causing issues with downstream dependencies (test-BuildRelease.R)
|
||||
|
||||
Documentation:
|
||||
|
||||
1. Updated documentation for the OMOP Common Data Model based on the April Olympians 2024 initiative.
|
|
@ -17,7 +17,7 @@
|
|||
#' Create OMOP CDM SQL files
|
||||
#'
|
||||
#' Writes DDL, ForeignKey, PrimaryKey and index SQL files for given cdmVersion
|
||||
#' and targetDialect to the 'ddl' folder in specifed output folder.
|
||||
#' and targetDialect to the 'ddl' folder in specified output folder.
|
||||
#'
|
||||
#' @param cdmVersions The versions of the CDM you are creating, e.g. 5.3, 5.4.
|
||||
#' Defaults to all supported CDM versions.
|
||||
|
@ -26,7 +26,7 @@
|
|||
#' @param outputfolder The base folder where the SQL files will be written.
|
||||
#' Subfolders will be created for each cdmVersion and targetDialect.
|
||||
#' @return Writes DDL, ForeignKey, PrimaryKey and index SQL files for given cdmVersion
|
||||
#' and targetDialect to the 'ddl' folder in specifed output folder.
|
||||
#' and targetDialect to the 'ddl' folder in specified output folder.
|
||||
#' @export
|
||||
buildRelease <- function(cdmVersions = listSupportedVersions(),
|
||||
targetDialects = listSupportedDialects(),
|
||||
|
|
|
@ -51,7 +51,7 @@ CommonDataModel::buildRelease(cdmVersions = "5.4",
|
|||
If you have an empty schema ready to go, the package will connect and instantiate the tables for you. To start, you need to download DatabaseConnector in order to connect to your database.
|
||||
|
||||
```
|
||||
devtools::install_github("DatabaseConnector")
|
||||
devtools::install_github("ohdsi/DatabaseConnector")
|
||||
|
||||
cd <- DatabaseConnector::createConnectionDetails(dbms = "postgresql",
|
||||
server = "localhost/ohdsi",
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
One test was removed due to its restricting of downstream dependencies.
|
||||
|
||||
## R CMD check results
|
||||
|
||||
* This is a new release
|
||||
|
||||
# Update based on reviewer feedback
|
||||
- turned off tests when environment variables are not set
|
||||
- removed vignetteBuilder field from DESCRIPTION
|
||||
- added return values in function documentation
|
||||
- updated buildRelease.R default output folder to tempdir()
|
||||
There were no ERRORs or WARNINGs.
|
||||
|
||||
0 errors | 0 warnings | 0 notes
|
||||
|
||||
## Comments from reviewer
|
||||
|
||||
Edited the author field in the DESCRIPTION file.
|
||||
|
||||
|
|
|
@ -357,14 +357,17 @@ div.tocify {
|
|||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://ohdsi.github.io/Themis">THEMIS Convention Library</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="dataModelConventions.html">General Conventions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="ehrObsPeriods.html">Observation Periods for EHR Data</a>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
<a href="customConcepts.html">Custom Concepts</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -380,14 +383,11 @@ div.tocify {
|
|||
<li>
|
||||
<a href="cdm30.html">CDM v3.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm60.html">CDM v6.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm53.html">CDM v5.3</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">NEW CDM v5.4</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">CDM v5.4</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdm54.html">CDM v5.4</a>
|
||||
|
@ -398,6 +398,9 @@ div.tocify {
|
|||
<li>
|
||||
<a href="cdm54erd.html">Entity Relationships</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm54ToolingSupport.html">Detailed tooling support per CDM field</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -406,22 +409,22 @@ div.tocify {
|
|||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-plus-square"></span>
|
||||
|
||||
CDM Proposals
|
||||
CDM Additions
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
<a href="typesOfAdditions.html">Types of CDM Additions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues?q=is%3Aopen+is%3Aissue+label%3AProposal">Under Review</a>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted Changes</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues/252">Region_concept_id</a>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/tree/develop">CDM version in development</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -357,14 +357,17 @@ div.tocify {
|
|||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://ohdsi.github.io/Themis">THEMIS Convention Library</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="dataModelConventions.html">General Conventions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="ehrObsPeriods.html">Observation Periods for EHR Data</a>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
<a href="customConcepts.html">Custom Concepts</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -380,14 +383,11 @@ div.tocify {
|
|||
<li>
|
||||
<a href="cdm30.html">CDM v3.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm60.html">CDM v6.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm53.html">CDM v5.3</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">NEW CDM v5.4</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">CDM v5.4</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdm54.html">CDM v5.4</a>
|
||||
|
@ -398,6 +398,9 @@ div.tocify {
|
|||
<li>
|
||||
<a href="cdm54erd.html">Entity Relationships</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm54ToolingSupport.html">Detailed tooling support per CDM field</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -406,22 +409,22 @@ div.tocify {
|
|||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-plus-square"></span>
|
||||
|
||||
CDM Proposals
|
||||
CDM Additions
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
<a href="typesOfAdditions.html">Types of CDM Additions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues?q=is%3Aopen+is%3Aissue+label%3AProposal">Under Review</a>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted Changes</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues/252">Region_concept_id</a>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/tree/develop">CDM version in development</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
607
docs/cdm53.html
607
docs/cdm53.html
File diff suppressed because it is too large
Load Diff
|
@ -357,14 +357,17 @@ div.tocify {
|
|||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://ohdsi.github.io/Themis">THEMIS Convention Library</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="dataModelConventions.html">General Conventions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="ehrObsPeriods.html">Observation Periods for EHR Data</a>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
<a href="customConcepts.html">Custom Concepts</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -380,14 +383,11 @@ div.tocify {
|
|||
<li>
|
||||
<a href="cdm30.html">CDM v3.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm60.html">CDM v6.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm53.html">CDM v5.3</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">NEW CDM v5.4</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">CDM v5.4</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdm54.html">CDM v5.4</a>
|
||||
|
@ -398,6 +398,9 @@ div.tocify {
|
|||
<li>
|
||||
<a href="cdm54erd.html">Entity Relationships</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm54ToolingSupport.html">Detailed tooling support per CDM field</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -406,22 +409,22 @@ div.tocify {
|
|||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-plus-square"></span>
|
||||
|
||||
CDM Proposals
|
||||
CDM Additions
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
<a href="typesOfAdditions.html">Types of CDM Additions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues?q=is%3Aopen+is%3Aissue+label%3AProposal">Under Review</a>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted Changes</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues/252">Region_concept_id</a>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/tree/develop">CDM version in development</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
705
docs/cdm54.html
705
docs/cdm54.html
File diff suppressed because it is too large
Load Diff
|
@ -13,7 +13,7 @@
|
|||
|
||||
<title>Changes by Table</title>
|
||||
|
||||
<script src="site_libs/header-attrs-2.25/header-attrs.js"></script>
|
||||
<script src="site_libs/header-attrs-2.27/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" />
|
||||
|
@ -357,14 +357,17 @@ div.tocify {
|
|||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://ohdsi.github.io/Themis">THEMIS Convention Library</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="dataModelConventions.html">General Conventions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="ehrObsPeriods.html">Observation Periods for EHR Data</a>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
<a href="customConcepts.html">Custom Concepts</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -380,14 +383,11 @@ div.tocify {
|
|||
<li>
|
||||
<a href="cdm30.html">CDM v3.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm60.html">CDM v6.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm53.html">CDM v5.3</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">NEW CDM v5.4</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">CDM v5.4</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdm54.html">CDM v5.4</a>
|
||||
|
@ -398,6 +398,9 @@ div.tocify {
|
|||
<li>
|
||||
<a href="cdm54erd.html">Entity Relationships</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm54ToolingSupport.html">Detailed tooling support per CDM field</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -406,22 +409,22 @@ div.tocify {
|
|||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-plus-square"></span>
|
||||
|
||||
CDM Proposals
|
||||
CDM Additions
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
<a href="typesOfAdditions.html">Types of CDM Additions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues?q=is%3Aopen+is%3Aissue+label%3AProposal">Under Review</a>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted Changes</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues/252">Region_concept_id</a>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/tree/develop">CDM version in development</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -642,6 +645,12 @@ a table or field</li>
|
|||
<li>No change</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="provider" class="section level2">
|
||||
<h2>PROVIDER</h2>
|
||||
<ul>
|
||||
<li>No change</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="cost" class="section level2">
|
||||
<h2>COST</h2>
|
||||
<ul>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -281,14 +281,17 @@ $(document).ready(function () {
|
|||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://ohdsi.github.io/Themis">THEMIS Convention Library</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="dataModelConventions.html">General Conventions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="ehrObsPeriods.html">Observation Periods for EHR Data</a>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
<a href="customConcepts.html">Custom Concepts</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -304,14 +307,11 @@ $(document).ready(function () {
|
|||
<li>
|
||||
<a href="cdm30.html">CDM v3.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm60.html">CDM v6.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm53.html">CDM v5.3</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">NEW CDM v5.4</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">CDM v5.4</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdm54.html">CDM v5.4</a>
|
||||
|
@ -322,6 +322,9 @@ $(document).ready(function () {
|
|||
<li>
|
||||
<a href="cdm54erd.html">Entity Relationships</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm54ToolingSupport.html">Detailed tooling support per CDM field</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -330,22 +333,22 @@ $(document).ready(function () {
|
|||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-plus-square"></span>
|
||||
|
||||
CDM Proposals
|
||||
CDM Additions
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
<a href="typesOfAdditions.html">Types of CDM Additions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues?q=is%3Aopen+is%3Aissue+label%3AProposal">Under Review</a>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted Changes</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues/252">Region_concept_id</a>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/tree/develop">CDM version in development</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
148
docs/cdm60.html
148
docs/cdm60.html
|
@ -13,7 +13,7 @@
|
|||
|
||||
<title>OMOP CDM v6.0</title>
|
||||
|
||||
<script src="site_libs/header-attrs-2.25/header-attrs.js"></script>
|
||||
<script src="site_libs/header-attrs-2.27/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" />
|
||||
|
@ -357,14 +357,17 @@ div.tocify {
|
|||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://ohdsi.github.io/Themis">THEMIS Convention Library</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="dataModelConventions.html">General Conventions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="ehrObsPeriods.html">Observation Periods for EHR Data</a>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
<a href="customConcepts.html">Custom Concepts</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -380,14 +383,11 @@ div.tocify {
|
|||
<li>
|
||||
<a href="cdm30.html">CDM v3.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm60.html">CDM v6.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm53.html">CDM v5.3</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">NEW CDM v5.4</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">CDM v5.4</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdm54.html">CDM v5.4</a>
|
||||
|
@ -398,6 +398,9 @@ div.tocify {
|
|||
<li>
|
||||
<a href="cdm54erd.html">Entity Relationships</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm54ToolingSupport.html">Detailed tooling support per CDM field</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -406,22 +409,22 @@ div.tocify {
|
|||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-plus-square"></span>
|
||||
|
||||
CDM Proposals
|
||||
CDM Additions
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
<a href="typesOfAdditions.html">Types of CDM Additions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues?q=is%3Aopen+is%3Aissue+label%3AProposal">Under Review</a>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted Changes</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues/252">Region_concept_id</a>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/tree/develop">CDM version in development</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -515,12 +518,13 @@ v6.0. 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
|
||||
etc). All tables should be instantiated in a CDM instance but do not
|
||||
need to be populated. Similarly, fields that are not required should
|
||||
exist in the CDM table but do not need to be populated. 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>–after regeneration of DDLs link to csv of cdm link to pdf of cdm
|
||||
documentation link to forum on doc page</p>
|
||||
</div>
|
||||
<div id="changes-in-v6.0" class="section level2">
|
||||
<h2><strong>Changes in v6.0</strong></h2>
|
||||
|
@ -687,7 +691,8 @@ Compute age using year_of_birth.
|
|||
For data sources with date of birth, the year should be extracted. For
|
||||
data sources where the year of birth is not available, the approximate
|
||||
year of birth could be derived based on age group categorization, if
|
||||
available.
|
||||
available. If no year of birth is available all the person’s data should
|
||||
be dropped from the CDM instance.
|
||||
</td>
|
||||
<td style="text-align:left;">
|
||||
integer
|
||||
|
@ -1217,7 +1222,7 @@ CONCEPT
|
|||
<p><strong>Table Description</strong></p>
|
||||
<p>This table contains records which define spans of time during which
|
||||
two conditions are expected to hold: (i) Clinical Events that happened
|
||||
to the Person are recorded in the Event tables, and (ii) absense of
|
||||
to the Person are recorded in the Event tables, and (ii) absence of
|
||||
records indicate such Events did not occur during this span of time.</p>
|
||||
<p><strong>User Guide</strong></p>
|
||||
<p>For each Person, one or more OBSERVATION_PERIOD records may be
|
||||
|
@ -1245,7 +1250,7 @@ occurrence or the first high quality occurrence of a Clinical Event
|
|||
(Condition, Drug, Procedure, Device, Measurement, Visit) is defined as
|
||||
the start of the OBSERVATION_PERIOD record, and the end date of the last
|
||||
occurrence of last high quality occurrence of a Clinical Event, or the
|
||||
end of the database period becomes the end of the OBSERVATOIN_PERIOD for
|
||||
end of the database period becomes the end of the OBSERVATION_PERIOD for
|
||||
each Person. If a Person only has a single Clinical Event the
|
||||
OBSERVATION_PERIOD record can be as short as one day. Depending on these
|
||||
definitions it is possible that Clinical Events fall outside the time
|
||||
|
@ -2557,7 +2562,7 @@ CONCEPT
|
|||
</tr>
|
||||
<tr>
|
||||
<td style="text-align:left;font-weight: bold;">
|
||||
admitted_from_concept_id
|
||||
admitted_from_source_value
|
||||
</td>
|
||||
<td style="text-align:left;">
|
||||
</td>
|
||||
|
@ -2586,7 +2591,7 @@ No
|
|||
</tr>
|
||||
<tr>
|
||||
<td style="text-align:left;font-weight: bold;">
|
||||
admitted_from_source_value
|
||||
admitted_from_concept_id
|
||||
</td>
|
||||
<td style="text-align:left;">
|
||||
Use this field to determine where the patient was admitted from. This
|
||||
|
@ -2799,21 +2804,21 @@ identifying Persons who should suffer from the recorded Condition.
|
|||
Record all conditions as they exist in the source data. Any decisions
|
||||
about diagnosis/phenotype definitions would be done through cohort
|
||||
specifications. These cohorts can be housed in the <a
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm531.html#payer_plan_period">COHORT</a>
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm60.html#payer_plan_period">COHORT</a>
|
||||
table. Conditions span a time interval from start to end, but are
|
||||
typically recorded as single snapshot records with no end date. The
|
||||
reason is twofold: (i) At the time of the recording the duration is not
|
||||
known and later not recorded, and (ii) the Persons typically cease
|
||||
interacting with the healthcare system when they feel better, which
|
||||
leads to incomplete capture of resolved Conditions. The <a
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm531.html#condition_era">CONDITION_ERA</a>
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm60.html#condition_era">CONDITION_ERA</a>
|
||||
table addresses this issue. Family history and past diagnoses (‘history
|
||||
of’) are not recorded in this table. Instead, they are listed in the <a
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm531.html#observation">OBSERVATION</a>
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm60.html#observation">OBSERVATION</a>
|
||||
table. Codes written in the process of establishing the diagnosis, such
|
||||
as ‘question of’ of and ‘rule out’, should not represented here.
|
||||
Instead, they should be recorded in the <a
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm531.html#observation">OBSERVATION</a>
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm60.html#observation">OBSERVATION</a>
|
||||
table, if they are used for analyses. However, this information is not
|
||||
always available.</p>
|
||||
<p><strong>ETL Conventions</strong></p>
|
||||
|
@ -3608,22 +3613,10 @@ the patient.
|
|||
</td>
|
||||
<td style="text-align:left;">
|
||||
If this information is not explicitly available in the data, infer the
|
||||
end date using the following methods:/n/n 1. Start first with duration
|
||||
or days supply using the calculation drug start date + days supply -1
|
||||
day. 2. Use quantity divided by daily dose that you may obtain from the
|
||||
sig or a source field (or assumed daily dose of 1) for solid,
|
||||
indivisibile, drug products. If quantity represents ingredient amount,
|
||||
quantity divided by daily dose * concentration (from drug_strength) drug
|
||||
concept id tells you the dose form. 3. If it is an administration
|
||||
record, set drug end date equal to drug start date. If the record is a
|
||||
written prescription then set end date to start date + 29. If the record
|
||||
is a mail-order prescription set end date to start date + 89. The end
|
||||
date must be equal to or greater than the start date. Ibuprofen 20mg/mL
|
||||
oral solution concept tells us this is oral solution. Calculate duration
|
||||
as quantity (200 example) * daily dose (5mL) /concentration (20mg/mL)
|
||||
200*5/20 = 50 days. <a
|
||||
href="https://ohdsi.github.io/CommonDataModel/drug_dose.html">Examples
|
||||
by dose form</a>
|
||||
end date from start date and duration.<br>For detailed conventions
|
||||
for how to populate this field, please see the <a
|
||||
href="https://ohdsi.github.io/Themis/tag_drug_exposure.html">THEMIS
|
||||
repository</a>.
|
||||
</td>
|
||||
<td style="text-align:left;">
|
||||
date
|
||||
|
@ -3837,12 +3830,20 @@ No
|
|||
days_supply
|
||||
</td>
|
||||
<td style="text-align:left;">
|
||||
The number of days of supply of the medication as recorded in the
|
||||
original prescription or dispensing record. Days supply can differ from
|
||||
actual drug duration (i.e. prescribed days supply vs actual exposure).
|
||||
</td>
|
||||
<td style="text-align:left;">
|
||||
Days supply of the drug. This should be the verbatim days_supply as
|
||||
given on the prescription. If the drug is physician administered use
|
||||
duration end date if given or set to 1 as default if duration is not
|
||||
available.
|
||||
The field should be left empty if the source data does not contain a
|
||||
verbatim days_supply, and should not be calculated from other
|
||||
fields.Negative values are not allowed. Several actions are possible: 1)
|
||||
record is not trustworthy and we remove the record entirely. 2) we trust
|
||||
the record and leave days_supply empty or 3) record needs to be combined
|
||||
with other record (e.g. reversal of prescription). High values (>365
|
||||
days) should be investigated. If considered an error in the source data
|
||||
(e.g. typo), the value needs to be excluded to prevent creation of
|
||||
unrealistic long eras.
|
||||
</td>
|
||||
<td style="text-align:left;">
|
||||
integer
|
||||
|
@ -4940,7 +4941,7 @@ href="https://athena.ohdsi.org/search-terms/terms?domain=Type+Concept&standa
|
|||
Concepts</a>.
|
||||
</td>
|
||||
<td style="text-align:left;">
|
||||
Choose the drug_type_concept_id that best represents the provenance of
|
||||
Choose the device_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.
|
||||
</td>
|
||||
|
@ -8847,7 +8848,7 @@ Source value representing the validation status of the survey.
|
|||
<td style="text-align:left;">
|
||||
</td>
|
||||
<td style="text-align:left;">
|
||||
integer
|
||||
varchar(100)
|
||||
</td>
|
||||
<td style="text-align:left;">
|
||||
No
|
||||
|
@ -11587,6 +11588,8 @@ No
|
|||
drug_exposure_count
|
||||
</td>
|
||||
<td style="text-align:left;">
|
||||
The count of grouped DRUG_EXPOSURE records that were included in the
|
||||
DRUG_ERA row.
|
||||
</td>
|
||||
<td style="text-align:left;">
|
||||
</td>
|
||||
|
@ -12764,7 +12767,7 @@ domain_id
|
|||
</td>
|
||||
<td style="text-align:left;">
|
||||
A foreign key to the <a
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm531.html#domain">DOMAIN</a>
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm60.html#domain">DOMAIN</a>
|
||||
table the Concept belongs to.
|
||||
</td>
|
||||
<td style="text-align:left;">
|
||||
|
@ -12793,7 +12796,7 @@ vocabulary_id
|
|||
</td>
|
||||
<td style="text-align:left;">
|
||||
A foreign key to the <a
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm531.html#vocabulary">VOCABULARY</a>
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm60.html#vocabulary">VOCABULARY</a>
|
||||
table indicating from which source the Concept has been adapted.
|
||||
</td>
|
||||
<td style="text-align:left;">
|
||||
|
@ -13641,10 +13644,18 @@ No
|
|||
<h3 class="tabset tabset-pills">relationship</h3>
|
||||
<p><strong>Table Description</strong></p>
|
||||
<p>The RELATIONSHIP table provides a reference list of all types of
|
||||
relationships that can be used to associate any two concepts in the
|
||||
CONCEPT_RELATIONSHP table.</p>
|
||||
relationships that can be used to associate any two Concepts in the
|
||||
CONCEPT_RELATIONSHIP table, the respective reverse relationships, and
|
||||
their hierarchical characteristics. Note, that Concepts representing
|
||||
relationships between the clinical facts, used for filling in the
|
||||
FACT_RELATIONSHIP table are stored in the CONCEPT table and belong to
|
||||
the Relationship Domain.</p>
|
||||
<p><strong>User Guide</strong></p>
|
||||
<p>NA</p>
|
||||
<p>Users can leverage the RELATIONSHIP table to explore the full list of
|
||||
direct and reverse relationships within the OMOP vocabulary system.
|
||||
Also, users can get insight into how these relationships can be used in
|
||||
ETL, cohort creation, and other tasks according to their ancestral
|
||||
characteristics.</p>
|
||||
<p><strong>ETL Conventions</strong></p>
|
||||
<p>NA</p>
|
||||
<table class="table table-condensed table-hover" style="font-size: 13px; margin-left: auto; margin-right: auto;">
|
||||
|
@ -13837,10 +13848,17 @@ CONCEPT
|
|||
<div id="concept_synonym" class="section level3 tabset tabset-pills">
|
||||
<h3 class="tabset tabset-pills">concept_synonym</h3>
|
||||
<p><strong>Table Description</strong></p>
|
||||
<p>The CONCEPT_SYNONYM table is used to store alternate names and
|
||||
descriptions for Concepts.</p>
|
||||
<p>The CONCEPT_SYNONYM table captures alternative terms, synonyms, and
|
||||
translations of Concept Name into various languages linked to specific
|
||||
concepts, providing users with a comprehensive view of how Concepts may
|
||||
be expressed or referenced.</p>
|
||||
<p><strong>User Guide</strong></p>
|
||||
<p>NA</p>
|
||||
<p>Users can leverage the CONCEPT_SYNONYM table to expand search
|
||||
capabilities and improve query accuracy by incorporating synonymous
|
||||
terms into data analysis and retrieval processes. Also, users can
|
||||
enhance their mapping efforts between local terminologies and
|
||||
standardized concepts by identifying synonymous terms associated with
|
||||
concepts in the CONCEPT_SYNONYM table.</p>
|
||||
<p><strong>ETL Conventions</strong></p>
|
||||
<p>NA</p>
|
||||
<table class="table table-condensed table-hover" style="font-size: 13px; margin-left: auto; margin-right: auto;">
|
||||
|
@ -13962,18 +13980,26 @@ CONCEPT
|
|||
<p>The CONCEPT_ANCESTOR table is designed to simplify observational
|
||||
analysis by providing the complete hierarchical relationships between
|
||||
Concepts. Only direct parent-child relationships between Concepts are
|
||||
stored in the CONCEPT_RELATIONSHIP table. To determine higher level
|
||||
stored in the CONCEPT_RELATIONSHIP table. To determine higher-level
|
||||
ancestry connections, all individual direct relationships would have to
|
||||
be navigated at analysis time. The CONCEPT_ANCESTOR table includes
|
||||
records for all parent-child relationships, as well as
|
||||
grandparent-grandchild relationships and those of any other level of
|
||||
lineage. Using the CONCEPT_ANCESTOR table allows for querying for all
|
||||
descendants of a hierarchical concept. For example, drug ingredients and
|
||||
drug products are all descendants of a drug class ancestor.</p>
|
||||
<p>This table is entirely derived from the CONCEPT, CONCEPT_RELATIONSHIP
|
||||
and RELATIONSHIP tables.</p>
|
||||
lineage for Standard or Classification concepts. Using the
|
||||
CONCEPT_ANCESTOR table allows for querying for all descendants of a
|
||||
hierarchical concept, and the other way around. For example, drug
|
||||
ingredients and drug products, beneath them in the hierarchy, are all
|
||||
descendants of a drug class ancestor. This table is entirely derived
|
||||
from the CONCEPT, CONCEPT_RELATIONSHIP, and RELATIONSHIP tables.</p>
|
||||
<p><strong>User Guide</strong></p>
|
||||
<p>NA</p>
|
||||
<p>The CONCEPT_ANCESTOR table can be used to explore the hierarchical
|
||||
relationships captured in the table to gain insights into the
|
||||
hierarchical structure of clinical concepts. Understanding the
|
||||
hierarchical relationships of concepts can facilitate accurate
|
||||
interpretation and analysis of healthcare data. Also, by incorporating
|
||||
hierarchical relationships from the CONCEPT_ANCESTOR table, users can
|
||||
create cohorts containing related concepts within a hierarchical
|
||||
structure, enabling more comprehensive cohort definitions.</p>
|
||||
<p><strong>ETL Conventions</strong></p>
|
||||
<p>NA</p>
|
||||
<table class="table table-condensed table-hover" style="font-size: 13px; margin-left: auto; margin-right: auto;">
|
||||
|
|
|
@ -281,14 +281,17 @@ $(document).ready(function () {
|
|||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://ohdsi.github.io/Themis">THEMIS Convention Library</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="dataModelConventions.html">General Conventions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="ehrObsPeriods.html">Observation Periods for EHR Data</a>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
<a href="customConcepts.html">Custom Concepts</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -304,14 +307,11 @@ $(document).ready(function () {
|
|||
<li>
|
||||
<a href="cdm30.html">CDM v3.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm60.html">CDM v6.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm53.html">CDM v5.3</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">NEW CDM v5.4</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">CDM v5.4</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdm54.html">CDM v5.4</a>
|
||||
|
@ -322,6 +322,9 @@ $(document).ready(function () {
|
|||
<li>
|
||||
<a href="cdm54erd.html">Entity Relationships</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm54ToolingSupport.html">Detailed tooling support per CDM field</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -330,22 +333,22 @@ $(document).ready(function () {
|
|||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-plus-square"></span>
|
||||
|
||||
CDM Proposals
|
||||
CDM Additions
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
<a href="typesOfAdditions.html">Types of CDM Additions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues?q=is%3Aopen+is%3Aissue+label%3AProposal">Under Review</a>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted Changes</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues/252">Region_concept_id</a>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/tree/develop">CDM version in development</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -357,14 +357,17 @@ div.tocify {
|
|||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://ohdsi.github.io/Themis">THEMIS Convention Library</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="dataModelConventions.html">General Conventions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="ehrObsPeriods.html">Observation Periods for EHR Data</a>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
<a href="customConcepts.html">Custom Concepts</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -380,14 +383,11 @@ div.tocify {
|
|||
<li>
|
||||
<a href="cdm30.html">CDM v3.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm60.html">CDM v6.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm53.html">CDM v5.3</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">NEW CDM v5.4</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">CDM v5.4</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdm54.html">CDM v5.4</a>
|
||||
|
@ -398,6 +398,9 @@ div.tocify {
|
|||
<li>
|
||||
<a href="cdm54erd.html">Entity Relationships</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm54ToolingSupport.html">Detailed tooling support per CDM field</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -406,22 +409,22 @@ div.tocify {
|
|||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-plus-square"></span>
|
||||
|
||||
CDM Proposals
|
||||
CDM Additions
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
<a href="typesOfAdditions.html">Types of CDM Additions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues?q=is%3Aopen+is%3Aissue+label%3AProposal">Under Review</a>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted Changes</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues/252">Region_concept_id</a>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/tree/develop">CDM version in development</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -281,14 +281,17 @@ $(document).ready(function () {
|
|||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://ohdsi.github.io/Themis">THEMIS Convention Library</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="dataModelConventions.html">General Conventions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="ehrObsPeriods.html">Observation Periods for EHR Data</a>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
<a href="customConcepts.html">Custom Concepts</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -304,14 +307,11 @@ $(document).ready(function () {
|
|||
<li>
|
||||
<a href="cdm30.html">CDM v3.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm60.html">CDM v6.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm53.html">CDM v5.3</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">NEW CDM v5.4</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">CDM v5.4</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdm54.html">CDM v5.4</a>
|
||||
|
@ -322,6 +322,9 @@ $(document).ready(function () {
|
|||
<li>
|
||||
<a href="cdm54erd.html">Entity Relationships</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm54ToolingSupport.html">Detailed tooling support per CDM field</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -330,22 +333,22 @@ $(document).ready(function () {
|
|||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-plus-square"></span>
|
||||
|
||||
CDM Proposals
|
||||
CDM Additions
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
<a href="typesOfAdditions.html">Types of CDM Additions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues?q=is%3Aopen+is%3Aissue+label%3AProposal">Under Review</a>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted Changes</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues/252">Region_concept_id</a>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/tree/develop">CDM version in development</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -357,14 +357,17 @@ div.tocify {
|
|||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://ohdsi.github.io/Themis">THEMIS Convention Library</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="dataModelConventions.html">General Conventions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="ehrObsPeriods.html">Observation Periods for EHR Data</a>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
<a href="customConcepts.html">Custom Concepts</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -380,14 +383,11 @@ div.tocify {
|
|||
<li>
|
||||
<a href="cdm30.html">CDM v3.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm60.html">CDM v6.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm53.html">CDM v5.3</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">NEW CDM v5.4</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">CDM v5.4</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdm54.html">CDM v5.4</a>
|
||||
|
@ -398,6 +398,9 @@ div.tocify {
|
|||
<li>
|
||||
<a href="cdm54erd.html">Entity Relationships</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm54ToolingSupport.html">Detailed tooling support per CDM field</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -406,22 +409,22 @@ div.tocify {
|
|||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-plus-square"></span>
|
||||
|
||||
CDM Proposals
|
||||
CDM Additions
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
<a href="typesOfAdditions.html">Types of CDM Additions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues?q=is%3Aopen+is%3Aissue+label%3AProposal">Under Review</a>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted Changes</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues/252">Region_concept_id</a>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/tree/develop">CDM version in development</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -357,14 +357,17 @@ div.tocify {
|
|||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://ohdsi.github.io/Themis">THEMIS Convention Library</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="dataModelConventions.html">General Conventions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="ehrObsPeriods.html">Observation Periods for EHR Data</a>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
<a href="customConcepts.html">Custom Concepts</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -380,14 +383,11 @@ div.tocify {
|
|||
<li>
|
||||
<a href="cdm30.html">CDM v3.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm60.html">CDM v6.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm53.html">CDM v5.3</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">NEW CDM v5.4</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">CDM v5.4</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdm54.html">CDM v5.4</a>
|
||||
|
@ -398,6 +398,9 @@ div.tocify {
|
|||
<li>
|
||||
<a href="cdm54erd.html">Entity Relationships</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm54ToolingSupport.html">Detailed tooling support per CDM field</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -406,22 +409,22 @@ div.tocify {
|
|||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-plus-square"></span>
|
||||
|
||||
CDM Proposals
|
||||
CDM Additions
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
<a href="typesOfAdditions.html">Types of CDM Additions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues?q=is%3Aopen+is%3Aissue+label%3AProposal">Under Review</a>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted Changes</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues/252">Region_concept_id</a>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/tree/develop">CDM version in development</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -281,14 +281,17 @@ $(document).ready(function () {
|
|||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://ohdsi.github.io/Themis">THEMIS Convention Library</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="dataModelConventions.html">General Conventions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="ehrObsPeriods.html">Observation Periods for EHR Data</a>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
<a href="customConcepts.html">Custom Concepts</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -304,14 +307,11 @@ $(document).ready(function () {
|
|||
<li>
|
||||
<a href="cdm30.html">CDM v3.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm60.html">CDM v6.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm53.html">CDM v5.3</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">NEW CDM v5.4</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">CDM v5.4</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdm54.html">CDM v5.4</a>
|
||||
|
@ -322,6 +322,9 @@ $(document).ready(function () {
|
|||
<li>
|
||||
<a href="cdm54erd.html">Entity Relationships</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm54ToolingSupport.html">Detailed tooling support per CDM field</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -330,22 +333,22 @@ $(document).ready(function () {
|
|||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-plus-square"></span>
|
||||
|
||||
CDM Proposals
|
||||
CDM Additions
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
<a href="typesOfAdditions.html">Types of CDM Additions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues?q=is%3Aopen+is%3Aissue+label%3AProposal">Under Review</a>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted Changes</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues/252">Region_concept_id</a>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/tree/develop">CDM version in development</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -357,14 +357,17 @@ div.tocify {
|
|||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://ohdsi.github.io/Themis">THEMIS Convention Library</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="dataModelConventions.html">General Conventions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="ehrObsPeriods.html">Observation Periods for EHR Data</a>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
<a href="customConcepts.html">Custom Concepts</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -380,14 +383,11 @@ div.tocify {
|
|||
<li>
|
||||
<a href="cdm30.html">CDM v3.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm60.html">CDM v6.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm53.html">CDM v5.3</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">NEW CDM v5.4</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">CDM v5.4</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdm54.html">CDM v5.4</a>
|
||||
|
@ -398,6 +398,9 @@ div.tocify {
|
|||
<li>
|
||||
<a href="cdm54erd.html">Entity Relationships</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm54ToolingSupport.html">Detailed tooling support per CDM field</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -406,22 +409,22 @@ div.tocify {
|
|||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-plus-square"></span>
|
||||
|
||||
CDM Proposals
|
||||
CDM Additions
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
<a href="typesOfAdditions.html">Types of CDM Additions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues?q=is%3Aopen+is%3Aissue+label%3AProposal">Under Review</a>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted Changes</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues/252">Region_concept_id</a>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/tree/develop">CDM version in development</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -0,0 +1,756 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8" />
|
||||
<meta name="generator" content="pandoc" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
|
||||
|
||||
|
||||
|
||||
|
||||
<title>Custom Concepts</title>
|
||||
|
||||
<script src="site_libs/header-attrs-2.25/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>
|
||||
<link href="site_libs/font-awesome-6.4.2/css/all.min.css" rel="stylesheet" />
|
||||
<link href="site_libs/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet" />
|
||||
<link rel='shortcut icon' type='image/x-icon' href='favicon.ico' />
|
||||
|
||||
<style type="text/css">
|
||||
code{white-space: pre-wrap;}
|
||||
span.smallcaps{font-variant: small-caps;}
|
||||
span.underline{text-decoration: underline;}
|
||||
div.column{display: inline-block; vertical-align: top; width: 50%;}
|
||||
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
|
||||
ul.task-list{list-style: none;}
|
||||
</style>
|
||||
|
||||
<style type="text/css">code{white-space: pre;}</style>
|
||||
<script type="text/javascript">
|
||||
if (window.hljs) {
|
||||
hljs.configure({languages: []});
|
||||
hljs.initHighlightingOnLoad();
|
||||
if (document.readyState && document.readyState === "complete") {
|
||||
window.setTimeout(function() { hljs.initHighlighting(); }, 0);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="style.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
<style type = "text/css">
|
||||
.main-container {
|
||||
max-width: 940px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
img {
|
||||
max-width:100%;
|
||||
}
|
||||
.tabbed-pane {
|
||||
padding-top: 12px;
|
||||
}
|
||||
.html-widget {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
button.code-folding-btn:focus {
|
||||
outline: none;
|
||||
}
|
||||
summary {
|
||||
display: list-item;
|
||||
}
|
||||
details > summary > p:only-child {
|
||||
display: inline;
|
||||
}
|
||||
pre code {
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<style type="text/css">
|
||||
.dropdown-submenu {
|
||||
position: relative;
|
||||
}
|
||||
.dropdown-submenu>.dropdown-menu {
|
||||
top: 0;
|
||||
left: 100%;
|
||||
margin-top: -6px;
|
||||
margin-left: -1px;
|
||||
border-radius: 0 6px 6px 6px;
|
||||
}
|
||||
.dropdown-submenu:hover>.dropdown-menu {
|
||||
display: block;
|
||||
}
|
||||
.dropdown-submenu>a:after {
|
||||
display: block;
|
||||
content: " ";
|
||||
float: right;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-color: transparent;
|
||||
border-style: solid;
|
||||
border-width: 5px 0 5px 5px;
|
||||
border-left-color: #cccccc;
|
||||
margin-top: 5px;
|
||||
margin-right: -10px;
|
||||
}
|
||||
.dropdown-submenu:hover>a:after {
|
||||
border-left-color: #adb5bd;
|
||||
}
|
||||
.dropdown-submenu.pull-left {
|
||||
float: none;
|
||||
}
|
||||
.dropdown-submenu.pull-left>.dropdown-menu {
|
||||
left: -100%;
|
||||
margin-left: 10px;
|
||||
border-radius: 6px 0 6px 6px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript">
|
||||
// manage active state of menu based on current page
|
||||
$(document).ready(function () {
|
||||
// active menu anchor
|
||||
href = window.location.pathname
|
||||
href = href.substr(href.lastIndexOf('/') + 1)
|
||||
if (href === "")
|
||||
href = "index.html";
|
||||
var menuAnchor = $('a[href="' + href + '"]');
|
||||
|
||||
// mark the anchor link active (and if it's in a dropdown, also mark that active)
|
||||
var dropdown = menuAnchor.closest('li.dropdown');
|
||||
if (window.bootstrap) { // Bootstrap 4+
|
||||
menuAnchor.addClass('active');
|
||||
dropdown.find('> .dropdown-toggle').addClass('active');
|
||||
} else { // Bootstrap 3
|
||||
menuAnchor.parent().addClass('active');
|
||||
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>
|
||||
|
||||
<!-- tabsets -->
|
||||
|
||||
<style type="text/css">
|
||||
.tabset-dropdown > .nav-tabs {
|
||||
display: inline-table;
|
||||
max-height: 500px;
|
||||
min-height: 44px;
|
||||
overflow-y: auto;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.tabset-dropdown > .nav-tabs > li.active:before, .tabset-dropdown > .nav-tabs.nav-tabs-open:before {
|
||||
content: "\e259";
|
||||
font-family: 'Glyphicons Halflings';
|
||||
display: inline-block;
|
||||
padding: 10px;
|
||||
border-right: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.tabset-dropdown > .nav-tabs.nav-tabs-open > li.active:before {
|
||||
content: "\e258";
|
||||
font-family: 'Glyphicons Halflings';
|
||||
border: none;
|
||||
}
|
||||
|
||||
.tabset-dropdown > .nav-tabs > li.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.tabset-dropdown > .nav-tabs > li > a,
|
||||
.tabset-dropdown > .nav-tabs > li > a:focus,
|
||||
.tabset-dropdown > .nav-tabs > li > a:hover {
|
||||
border: none;
|
||||
display: inline-block;
|
||||
border-radius: 4px;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.tabset-dropdown > .nav-tabs.nav-tabs-open > li {
|
||||
display: block;
|
||||
float: none;
|
||||
}
|
||||
|
||||
.tabset-dropdown > .nav-tabs > li {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- code folding -->
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
<div class="container-fluid main-container">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-bs-toggle="collapse" data-target="#navbar" data-bs-target="#navbar">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="index.html"><div><img src="ohdsi16x16.png"></img> OMOP Common Data Model </div></a>
|
||||
</div>
|
||||
<div id="navbar" class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li>
|
||||
<a href="index.html">
|
||||
<span class="fa fa-house"></span>
|
||||
|
||||
</a>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-landmark"></span>
|
||||
|
||||
Background
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="background.html">Model Background</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdmRefreshProcess.html">CDM Refresh Process</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="vocabulary.html">How the Vocabulary is Built</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-list-alt"></span>
|
||||
|
||||
Conventions
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://ohdsi.github.io/Themis">THEMIS Convention Library</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="dataModelConventions.html">General Conventions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="customConcepts.html">Custom Concepts</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-history"></span>
|
||||
|
||||
CDM Versions
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdm30.html">CDM v3.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm53.html">CDM v5.3</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">CDM v5.4</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdm54.html">CDM v5.4</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm54Changes.html">Changes from CDM v5.3</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm54erd.html">Entity Relationships</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm54ToolingSupport.html">Detailed tooling support per CDM field</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-plus-square"></span>
|
||||
|
||||
CDM Additions
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="typesOfAdditions.html">Types of CDM Additions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted Changes</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/tree/develop">CDM version in development</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-question"></span>
|
||||
|
||||
How to
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="download.html">Download the DDL</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdmRPackage.html">Use the CDM R Package</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="drug_dose.html">Calculate Drug Dose</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-life-ring"></span>
|
||||
|
||||
Support
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdmDecisionTree.html">Help! My Data Doesn't Fit!</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="faq.html">FAQ</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="sqlScripts.html">SQL Scripts</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="contribute.html">Ask a Question</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel">
|
||||
<span class="fa fa-github"></span>
|
||||
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
</div><!--/.container -->
|
||||
</div><!--/.navbar -->
|
||||
|
||||
<div id="header">
|
||||
|
||||
|
||||
|
||||
<h1 class="title toc-ignore"><strong>Custom Concepts</strong></h1>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<p><em>By Maxim Moinat and the Themis Working Group</em></p>
|
||||
<p>The Themis Working Group convened on October 6th and December 7th
|
||||
2023 to discuss the creation this convention for creating custom
|
||||
concepts.</p>
|
||||
<div id="introduction" class="section level2">
|
||||
<h2>Introduction</h2>
|
||||
<p>While the OMOP vocabularies are very comprehensive, it is not always
|
||||
possible to use concepts existing in the OMOP vocabularies. For example,
|
||||
when using a vocabulary that is only used in your institution or having
|
||||
custom defined variables. In these cases, custom concepts can be used.
|
||||
Custom concepts are concepts that are not part of the OMOP vocabularies,
|
||||
and are only used in your institution. There are two main reasons to
|
||||
define custom concepts in your local OMOP CDM vocabulary. The first is
|
||||
that they are available in your local Atlas instance, which has several
|
||||
use cases:</p>
|
||||
<ul>
|
||||
<li>When viewing a standard concept, you can see which custom concepts
|
||||
are mapped to it. This allows you to better understand what the standard
|
||||
concept represents in your institution.</li>
|
||||
<li>You can search for a custom concept and find which standard concepts
|
||||
it is mapped to, to include in your standard concept set.</li>
|
||||
<li>For studies only using your local data, you can define cohorts using
|
||||
custom concepts (through ‘Add attribute’->‘Add … Source
|
||||
Concept’).</li>
|
||||
</ul>
|
||||
<p>The second reason is using the custom concepts in your ETL. By
|
||||
creating both the custom concept, and the ‘Maps to’ relationship
|
||||
(example below), we can use this in the same way as mapping other source
|
||||
vocabularies.</p>
|
||||
<p><strong>Custom concepts are only defined locally. These cannot be
|
||||
used for network research. Therefore it remains very important to map to
|
||||
standard concepts.</strong></p>
|
||||
</div>
|
||||
<div id="conventions" class="section level2">
|
||||
<h2>Conventions</h2>
|
||||
<p>It is important to follow a set of conventions when creating custom
|
||||
concepts, to avoid negatively impacting network studies. The conventions
|
||||
are as follows:</p>
|
||||
<ul>
|
||||
<li>Custom concepts have a <code>concept_id</code> larger than
|
||||
2,000,000,000. This is to avoid clashes with existing
|
||||
concepts.<sup>†</sup></li>
|
||||
<li>Custom concepts are always non-standard
|
||||
(<code>concept.standard_concept = NULL</code>).</li>
|
||||
<li>Custom concepts can only be used in the
|
||||
<code>_source_concept_id</code> fields
|
||||
(e.g. <code>procedure_source_concept_id</code>)</li>
|
||||
<li>If the field <code>_source_concept_id</code> does not exist, add a
|
||||
custom column to your table (e.g. a
|
||||
<code>drug_exposure.route_source_concept_id</code>)<sup>1</sup>. If
|
||||
there is a wide need in the community, a proposal can be submitted to
|
||||
the CDM Working Group to add these fields in a future OMOP CDM
|
||||
version.</li>
|
||||
<li>Always add custom concepts to a new vocabulary specifically for your
|
||||
source (see example below). If you have a need to add concepts to an
|
||||
existing vocabulary, please contact the OHDSI Vocabulary Working
|
||||
Group.</li>
|
||||
<li>Do NOT add custom concepts to the hierarchy of existing vocabularies
|
||||
(either in the <code>concept_ancestor</code> table or
|
||||
<code>subsumes</code>/<code>is a</code> relations in the
|
||||
<code>concept_relationship</code> table). This is to avoid descendant
|
||||
concepts to differ between sites.</li>
|
||||
</ul>
|
||||
<p>In addition, it is recommended to follow these suggestions:</p>
|
||||
<ul>
|
||||
<li>For the <code>domain_id</code>, choose an appropriate existing value
|
||||
from the domain table (‘Condition’, ‘Drug’, ‘Procedure’, etc.). Note
|
||||
that this determines the target table the concept can be used in.</li>
|
||||
<li>For the <code>concept_class_id</code>, it is not required to create
|
||||
new classes for your source vocabulary. To leave the class empty
|
||||
explicitly, use class ‘Undefined’. It is also allowed to reuse existing
|
||||
concept classes (e.g. SNOMED’s ‘Clinical Finding’ for conditions or
|
||||
RxNorm drug classes ‘Ingredient’, ‘Clinical Drug’, ‘Branded Drug’
|
||||
etc.).</li>
|
||||
<li>In the new vocabulary record, the <code>vocabulary_concept_id</code>
|
||||
can be set to 0, as this is often not used in the OMOP CDM.</li>
|
||||
<li>Create mappings between custom concepts and standard concepts. This
|
||||
can be done by adding rows to the <code>concept_relationship</code>
|
||||
table, with the <code>Maps to</code> relation. The reverse relation,
|
||||
<code>Mapped from</code>, should also be added. This allows for easy
|
||||
navigation between custom and standard concepts<sup>2</sup>. The ‘mapped
|
||||
to’ concept should be a standard concept.</li>
|
||||
<li>Officially, <code>concept_hierarchy</code> is only for standard
|
||||
concepts. However, if you local use case requires this (e.g. for
|
||||
selection of descendants of custom concepts), the custom concepts can be
|
||||
added into their own, isolated, hierarchy.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="example" class="section level2">
|
||||
<h2>Example</h2>
|
||||
<p>In this example, we will add one custom concept for the ‘DHD Diagnose
|
||||
Thesaurus’. This is a Dutch vocabulary, which is not part of the OMOP
|
||||
vocabularies. We will add the concept ‘diabetes mellitus type 1’. This
|
||||
concept has a mapping to the standard concept ‘Diabetes mellitus type 1
|
||||
(disorder)’, concept_id 3341872.</p>
|
||||
<p>After creating these records, we can use the custom concept in our
|
||||
ETL to populate the <code>condition_source_concept_id</code> field.</p>
|
||||
<div id="custom-vocabulary" class="section level3">
|
||||
<h3>Custom vocabulary</h3>
|
||||
<table>
|
||||
<colgroup>
|
||||
<col width="50%" />
|
||||
<col width="50%" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr class="header">
|
||||
<th>Field</th>
|
||||
<th>Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td>vocabulary_id</td>
|
||||
<td>DHD Diagnose Thesaurus</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>vocabulary_name</td>
|
||||
<td>Dutch Hospital Data Diagnosethesaurus</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>vocabulary_reference</td>
|
||||
<td><a
|
||||
href="https://www.dhd.nl/producten-diensten/diagnosethesaurus/Paginas/diagnosethesaurus.asp"
|
||||
class="uri">https://www.dhd.nl/producten-diensten/diagnosethesaurus/Paginas/diagnosethesaurus.asp</a></td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>vocabulary_version</td>
|
||||
<td>2023-04-20</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>vocabulary_concept_id</td>
|
||||
<td>0</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="custom-concept" class="section level3">
|
||||
<h3>Custom concept</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<tr class="header">
|
||||
<th>Field</th>
|
||||
<th>Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td>concept_id</td>
|
||||
<td>2 000 000 001</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>concept_name</td>
|
||||
<td>diabetes mellitus type 1</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>domain_id</td>
|
||||
<td>Condition</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>vocabulary_id</td>
|
||||
<td>DHD Diagnose Thesaurus</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>concept_class_id</td>
|
||||
<td>Undefined</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>standard_concept</td>
|
||||
<td><code>NULL</code></td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>concept_code</td>
|
||||
<td>0000002630</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>valid_start_date</td>
|
||||
<td>2017-08-01</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>valid_end_date</td>
|
||||
<td>2099-12-31</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>invalid_reason</td>
|
||||
<td><code>NULL</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="mapping-relationship" class="section level3">
|
||||
<h3>Mapping relationship</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<tr class="header">
|
||||
<th>Field</th>
|
||||
<th>Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td>concept_id_1</td>
|
||||
<td>2 000 000 001</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>concept_id_2</td>
|
||||
<td>3341872</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>relationship_id</td>
|
||||
<td>Maps to</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>valid_start_date</td>
|
||||
<td>2017-08-01</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>valid_end_date</td>
|
||||
<td>2099-12-31</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>invalid_reason</td>
|
||||
<td><code>NULL</code></td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>Field</td>
|
||||
<td>Value</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>——-</td>
|
||||
<td>——-</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>concept_id_1</td>
|
||||
<td>3341872</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>concept_id_2</td>
|
||||
<td>2 000 000 001</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>relationship_id</td>
|
||||
<td>Mapped from</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>valid_start_date</td>
|
||||
<td>2017-08-01</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>valid_end_date</td>
|
||||
<td>2099-12-31</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>invalid_reason</td>
|
||||
<td><code>NULL</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>See the <a
|
||||
href="https://ohdsi.github.io/CommonDataModel/sqlScripts.html#Source_to_Standard">Source
|
||||
To Standard query</a> to map a code in the source data to a standard
|
||||
concept.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="getting-your-vocabulary-into-the-omop-vocabularies"
|
||||
class="section level2">
|
||||
<h2>Getting your vocabulary into the OMOP vocabularies</h2>
|
||||
<p>If you think your custom concepts are useful for others, you can
|
||||
submit them to the OMOP vocabularies. This could be as a supported
|
||||
source vocabulary (like ICD) or a new vocabulary with standard concepts
|
||||
(like LOINC). This is a separate process from the conventions described
|
||||
above. Please see the <a
|
||||
href="https://ohdsi.github.io/CommonDataModel/vocabRequest.html">this
|
||||
support page</a>.</p>
|
||||
</div>
|
||||
<div id="references" class="section level2">
|
||||
<h2>References</h2>
|
||||
<p><sup>1</sup><a
|
||||
href="https://www.ohdsi.org/2021-global-symposium-showcase-18/">Melanie
|
||||
Philofsky; Implementing & adopting a customized OMOP Common Data
|
||||
Model; OHDSI Symposium 2021</a></p>
|
||||
<p><sup>2</sup><a
|
||||
href="https://www.ohdsi.org/wp-content/uploads/2020/10/Melanie-Philofsky-Philofsky-Mapping-Source-Codes-Poster.pdf">Melanie
|
||||
Philofsky; Mapping Custom Source Codes to Standard Concepts: A
|
||||
Comparison of Two Approaches; OHDSI Symposium 2020</a> </br>
|
||||
<sup>†</sup>this is why custom concepts are sometimes referred to as
|
||||
“2B+” or “2billionaires”.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
// add bootstrap table styles to pandoc tables
|
||||
function bootstrapStylePandocTables() {
|
||||
$('tr.odd').parent('tbody').parent('table').addClass('table table-condensed');
|
||||
}
|
||||
$(document).ready(function () {
|
||||
bootstrapStylePandocTables();
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<!-- tabsets -->
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
window.buildTabsets("TOC");
|
||||
});
|
||||
|
||||
$(document).ready(function () {
|
||||
$('.tabset-dropdown > .nav-tabs > li').click(function () {
|
||||
$(this).parent().toggleClass('nav-tabs-open');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- code folding -->
|
||||
|
||||
|
||||
<!-- dynamically load mathjax for compatibility with self-contained -->
|
||||
<script>
|
||||
(function () {
|
||||
var script = document.createElement("script");
|
||||
script.type = "text/javascript";
|
||||
script.src = "https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
|
||||
document.getElementsByTagName("head")[0].appendChild(script);
|
||||
})();
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -357,14 +357,17 @@ div.tocify {
|
|||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://ohdsi.github.io/Themis">THEMIS Convention Library</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="dataModelConventions.html">General Conventions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="ehrObsPeriods.html">Observation Periods for EHR Data</a>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
<a href="customConcepts.html">Custom Concepts</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -380,14 +383,11 @@ div.tocify {
|
|||
<li>
|
||||
<a href="cdm30.html">CDM v3.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm60.html">CDM v6.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm53.html">CDM v5.3</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">NEW CDM v5.4</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">CDM v5.4</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdm54.html">CDM v5.4</a>
|
||||
|
@ -398,6 +398,9 @@ div.tocify {
|
|||
<li>
|
||||
<a href="cdm54erd.html">Entity Relationships</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm54ToolingSupport.html">Detailed tooling support per CDM field</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -406,22 +409,22 @@ div.tocify {
|
|||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-plus-square"></span>
|
||||
|
||||
CDM Proposals
|
||||
CDM Additions
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
<a href="typesOfAdditions.html">Types of CDM Additions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues?q=is%3Aopen+is%3Aissue+label%3AProposal">Under Review</a>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted Changes</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues/252">Region_concept_id</a>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/tree/develop">CDM version in development</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -600,7 +603,7 @@ the same Concept between releases of the Standardized Vocabularies.</li>
|
|||
<li>A descriptive name for each Concept is stored as the Concept Name as
|
||||
part of the CONCEPT table. Additional names and descriptions for the
|
||||
Concept are stored as Synonyms in the <a
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm531.html#concept_synonym">CONCEPT_SYNONYM</a>
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm54.html#concept_synonym">CONCEPT_SYNONYM</a>
|
||||
table.</li>
|
||||
<li>Each Concept is assigned to a Domain. For Standard Concepts, there
|
||||
is always a single Domain. Source Concepts can be composite or
|
||||
|
@ -628,7 +631,7 @@ participate in the construction of the CONCEPT_ANCESTOR table and can be
|
|||
used to identify Descendants that may appear in the data. See
|
||||
CONCEPT_ANCESTOR table. Non-standard Concepts can only appear in
|
||||
*_source_concept_id fields and are not used in <a
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm531.html#concept_ancestor">CONCEPT_ANCESTOR</a>
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm54.html#concept_ancestor">CONCEPT_ANCESTOR</a>
|
||||
table. Please refer to the Standardized Vocabularies specifications for
|
||||
details of the Standard Concept designation.</li>
|
||||
<li>The lifespan of a Concept is recorded through its valid_start_date,
|
||||
|
@ -757,12 +760,12 @@ concept_id_1 and concept_id_2 fields.</li>
|
|||
<li>Concept Relationships define direct relationships between Concepts.
|
||||
Indirect relationships through 3rd Concepts are not captured in this
|
||||
table. However, the <a
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm531.html#concept_ancestor">CONCEPT_ANCESTOR</a>
|
||||
table does this for hierachical relationships over several “generations”
|
||||
of direct relationships.</li>
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm54.html#concept_ancestor">CONCEPT_ANCESTOR</a>
|
||||
table does this for hierarchical relationships over several
|
||||
“generations” of direct relationships.</li>
|
||||
<li>In previous versions of the CDM, the relationship_id used to be a
|
||||
numerical identifier. See the <a
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm531.html#relationship">RELATIONSHIP</a>
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm54.html#relationship">RELATIONSHIP</a>
|
||||
table.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -787,7 +790,7 @@ purposes of creating a closed Information Model, where all entities in
|
|||
the OMOP CDM are covered by unique Concepts.</li>
|
||||
<li>Hierarchical Relationships are used to build a hierarchical tree out
|
||||
of the Concepts, which is recorded in the <a
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm531.html#concept_ancestor">CONCEPT_ANCESTOR</a>
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm54.html#concept_ancestor">CONCEPT_ANCESTOR</a>
|
||||
table. For example, “has_ingredient” is a Relationship between Concept
|
||||
of the Concept Class ‘Clinical Drug’ and those of ‘Ingredient’, and all
|
||||
Ingredients can be classified as the “parental” hierarchical Concepts
|
||||
|
@ -803,16 +806,16 @@ same Vocabulary or those adopted from different Vocabulary sources.</li>
|
|||
<li>The concept_synonym_name field contains a valid Synonym of a
|
||||
concept, including the description in the concept_name itself. I.e. each
|
||||
Concept has at least one Synonym in the <a
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm531.html#concept_synonym">CONCEPT_SYNONYM</a>
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm54.html#concept_synonym">CONCEPT_SYNONYM</a>
|
||||
table. As an example, for a SNOMED-CT Concept, if the fully specified
|
||||
name is stored as the concept_name of the <a
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm531.html#concept">CONCEPT</a>
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm54.html#concept">CONCEPT</a>
|
||||
table, then the Preferred Term and Synonyms associated with the Concept
|
||||
are stored in the <a
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm531.html#concept_synonym">CONCEPT_SYNONYM</a>
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm54.html#concept_synonym">CONCEPT_SYNONYM</a>
|
||||
table.</li>
|
||||
<li>Only Synonyms that are active and current are stored in the <a
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm531.html#concept_synonym">CONCEPT_SYNONYM</a>
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm54.html#concept_synonym">CONCEPT_SYNONYM</a>
|
||||
table. Tracking synonym/description history and mapping of obsolete
|
||||
synonyms to current Concepts/Synonyms is out of scope for the Standard
|
||||
Vocabularies.</li>
|
||||
|
@ -824,12 +827,12 @@ Vocabularies.</li>
|
|||
<ul>
|
||||
<li>Each concept is also recorded as an ancestor of itself.</li>
|
||||
<li>Only valid and Standard Concepts participate in the <a
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm531.html#concept_ancestor">CONCEPT_ANCESTOR</a>
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm54.html#concept_ancestor">CONCEPT_ANCESTOR</a>
|
||||
table. It is not possible to find ancestors or descendants of deprecated
|
||||
or Source Concepts.</li>
|
||||
<li>Usually, only Concepts of the same Domain are connected through
|
||||
records of the <a
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm531.html#concept_ancestor">CONCEPT_ANCESTOR</a>
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm54.html#concept_ancestor">CONCEPT_ANCESTOR</a>
|
||||
table, but there might be exceptions.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -357,14 +357,17 @@ div.tocify {
|
|||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://ohdsi.github.io/Themis">THEMIS Convention Library</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="dataModelConventions.html">General Conventions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="ehrObsPeriods.html">Observation Periods for EHR Data</a>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
<a href="customConcepts.html">Custom Concepts</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -380,14 +383,11 @@ div.tocify {
|
|||
<li>
|
||||
<a href="cdm30.html">CDM v3.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm60.html">CDM v6.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm53.html">CDM v5.3</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">NEW CDM v5.4</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">CDM v5.4</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdm54.html">CDM v5.4</a>
|
||||
|
@ -398,6 +398,9 @@ div.tocify {
|
|||
<li>
|
||||
<a href="cdm54erd.html">Entity Relationships</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm54ToolingSupport.html">Detailed tooling support per CDM field</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -406,22 +409,22 @@ div.tocify {
|
|||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-plus-square"></span>
|
||||
|
||||
CDM Proposals
|
||||
CDM Additions
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
<a href="typesOfAdditions.html">Types of CDM Additions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues?q=is%3Aopen+is%3Aissue+label%3AProposal">Under Review</a>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted Changes</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues/252">Region_concept_id</a>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/tree/develop">CDM version in development</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -283,14 +283,17 @@ $(document).ready(function () {
|
|||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://ohdsi.github.io/Themis">THEMIS Convention Library</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="dataModelConventions.html">General Conventions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="ehrObsPeriods.html">Observation Periods for EHR Data</a>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
<a href="customConcepts.html">Custom Concepts</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -306,14 +309,11 @@ $(document).ready(function () {
|
|||
<li>
|
||||
<a href="cdm30.html">CDM v3.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm60.html">CDM v6.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm53.html">CDM v5.3</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">NEW CDM v5.4</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">CDM v5.4</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdm54.html">CDM v5.4</a>
|
||||
|
@ -324,6 +324,9 @@ $(document).ready(function () {
|
|||
<li>
|
||||
<a href="cdm54erd.html">Entity Relationships</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm54ToolingSupport.html">Detailed tooling support per CDM field</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -332,22 +335,22 @@ $(document).ready(function () {
|
|||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-plus-square"></span>
|
||||
|
||||
CDM Proposals
|
||||
CDM Additions
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
<a href="typesOfAdditions.html">Types of CDM Additions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues?q=is%3Aopen+is%3Aissue+label%3AProposal">Under Review</a>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted Changes</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues/252">Region_concept_id</a>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/tree/develop">CDM version in development</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -281,14 +281,17 @@ $(document).ready(function () {
|
|||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://ohdsi.github.io/Themis">THEMIS Convention Library</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="dataModelConventions.html">General Conventions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="ehrObsPeriods.html">Observation Periods for EHR Data</a>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
<a href="customConcepts.html">Custom Concepts</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -304,14 +307,11 @@ $(document).ready(function () {
|
|||
<li>
|
||||
<a href="cdm30.html">CDM v3.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm60.html">CDM v6.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm53.html">CDM v5.3</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">NEW CDM v5.4</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">CDM v5.4</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdm54.html">CDM v5.4</a>
|
||||
|
@ -322,6 +322,9 @@ $(document).ready(function () {
|
|||
<li>
|
||||
<a href="cdm54erd.html">Entity Relationships</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm54ToolingSupport.html">Detailed tooling support per CDM field</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -330,22 +333,22 @@ $(document).ready(function () {
|
|||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-plus-square"></span>
|
||||
|
||||
CDM Proposals
|
||||
CDM Additions
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
<a href="typesOfAdditions.html">Types of CDM Additions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues?q=is%3Aopen+is%3Aissue+label%3AProposal">Under Review</a>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted Changes</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues/252">Region_concept_id</a>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/tree/develop">CDM version in development</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -357,14 +357,17 @@ div.tocify {
|
|||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://ohdsi.github.io/Themis">THEMIS Convention Library</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="dataModelConventions.html">General Conventions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="ehrObsPeriods.html">Observation Periods for EHR Data</a>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
<a href="customConcepts.html">Custom Concepts</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -380,14 +383,11 @@ div.tocify {
|
|||
<li>
|
||||
<a href="cdm30.html">CDM v3.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm60.html">CDM v6.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm53.html">CDM v5.3</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">NEW CDM v5.4</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">CDM v5.4</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdm54.html">CDM v5.4</a>
|
||||
|
@ -398,6 +398,9 @@ div.tocify {
|
|||
<li>
|
||||
<a href="cdm54erd.html">Entity Relationships</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm54ToolingSupport.html">Detailed tooling support per CDM field</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -406,22 +409,22 @@ div.tocify {
|
|||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-plus-square"></span>
|
||||
|
||||
CDM Proposals
|
||||
CDM Additions
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
<a href="typesOfAdditions.html">Types of CDM Additions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues?q=is%3Aopen+is%3Aissue+label%3AProposal">Under Review</a>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted Changes</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues/252">Region_concept_id</a>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/tree/develop">CDM version in development</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -523,34 +526,40 @@ to represent your data in the common data model. Members are usually
|
|||
very responsive!</p>
|
||||
<p><strong>3. Are any tables or fields optional?</strong></p>
|
||||
<p>It is expected that all tables will be present in a CDM though it is
|
||||
not a requirement that they are all populated. The two mandatory tables
|
||||
are:</p>
|
||||
not a requirement that they are all populated. The three mandatory
|
||||
tables are:</p>
|
||||
<ul>
|
||||
<li><a
|
||||
href="https://github.com/OHDSI/CommonDataModel/wiki/person">Person</a>:
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm54.html#person">Person</a>:
|
||||
Contains records that uniquely identify each patient in the source data
|
||||
who is at-risk to have clinical observations recorded within the source
|
||||
systems.</li>
|
||||
<li><a
|
||||
href="https://github.com/OHDSI/CommonDataModel/wiki/observation_period">Observation_period</a>:
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm54.html#observation_period">Observation_period</a>:
|
||||
Contains records which uniquely define the spans of time for which a
|
||||
Person is at-risk to have clinical events recorded within the source
|
||||
systems.</li>
|
||||
<li><a
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm54.html#cdm_source">CDM_Source</a>:
|
||||
Contains information on the CDM instance including the vocabulary
|
||||
version used, the date the native data were released and the date the
|
||||
CDM was released.</li>
|
||||
</ul>
|
||||
<p>It is then up to you which tables to populate, though the core event
|
||||
tables are generally agreed upon to be <a
|
||||
href="https://github.com/OHDSI/CommonDataModel/wiki/CONDITION_OCCURRENCE">Condition_occurrence</a>,
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm54.html#CONDITION_OCCURRENCE">Condition_occurrence</a>,
|
||||
<a
|
||||
href="https://github.com/OHDSI/CommonDataModel/wiki/PROCEDURE_OCCURRENCE">Procedure_occurrence</a>,
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm54.html#PROCEDURE_OCCURRENCE">Procedure_occurrence</a>,
|
||||
<a
|
||||
href="https://github.com/OHDSI/CommonDataModel/wiki/DRUG_EXPOSURE">Drug_exposure</a>,
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm54.html#DRUG_EXPOSURE">Drug_exposure</a>,
|
||||
<a
|
||||
href="https://github.com/OHDSI/CommonDataModel/wiki/MEASUREMENT">Measurement</a>,
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm54.html#MEASUREMENT">Measurement</a>,
|
||||
and <a
|
||||
href="https://github.com/OHDSI/CommonDataModel/wiki/OBSERVATION">Observation</a>.
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm54.html#OBSERVATION">Observation</a>.
|
||||
Each table has certain required fields, a full list of which can be
|
||||
found on the Common Data Model <a
|
||||
href="https://github.com/OHDSI/CommonDataModel/wiki/">wiki page</a>.</p>
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm54.html#">wiki
|
||||
page</a>.</p>
|
||||
<p><strong>4. Does the data model include any derived information? Which
|
||||
tables or values are derived?</strong></p>
|
||||
<p>The common data model stores verbatim data from the source across
|
||||
|
@ -558,15 +567,15 @@ various clinical domains, such as records for conditions, drugs,
|
|||
procedures, and measurements. In addition, to assist the analyst, the
|
||||
common data model also provides some derived tables, based on commonly
|
||||
used analytic procedures. For example, the <a
|
||||
href="https://github.com/OHDSI/CommonDataModel/wiki/CONDITION_ERA">Condition_era</a>
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm54.html#CONDITION_ERA">Condition_era</a>
|
||||
table is derived from the <a
|
||||
href="https://github.com/OHDSI/CommonDataModel/wiki/CONDITION_OCCURENCE">Condition_occurrence</a>
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm54.html#CONDITION_OCCURENCE">Condition_occurrence</a>
|
||||
table and both the <a
|
||||
href="https://github.com/OHDSI/CommonDataModel/wiki/DRUG_ERA">Drug_era</a>
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm54.html#DRUG_ERA">Drug_era</a>
|
||||
and <a
|
||||
href="https://github.com/OHDSI/CommonDataModel/wiki/DOSE_ERA">Dose_era</a>
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm54.html#DOSE_ERA">Dose_era</a>
|
||||
tables are derived from the <a
|
||||
href="https://github.com/OHDSI/CommonDataModel/wiki/DRUG_EXPOSURE">Drug_exposure</a>
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm54.html#DRUG_EXPOSURE">Drug_exposure</a>
|
||||
table. An era is defined as a span of time when a patient is assumed to
|
||||
have a given condition or exposure to a particular active ingredient.
|
||||
Members of the community have written code to create these tables and it
|
||||
|
@ -627,7 +636,7 @@ further.</p>
|
|||
Person’s information is valid?</strong></p>
|
||||
<p>The OMOP Common Data Model uses something called observation periods
|
||||
(stored in the <a
|
||||
href="https://github.com/OHDSI/CommonDataModel/wiki/observation_period">Observation_period</a>
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm54.html#observation_period">Observation_period</a>
|
||||
table) as a way to define the time span during which a patient is
|
||||
at-risk to have a clinical event recorded. In administrative claims
|
||||
databases, for example, these observation periods are often analogous to
|
||||
|
@ -635,7 +644,7 @@ the notion of ‘enrollment’.</p>
|
|||
<p><strong>10. How does the model capture start and stop dates for
|
||||
insurance coverage? What if a person’s coverage changes?</strong></p>
|
||||
<p>The <a
|
||||
href="https://github.com/OHDSI/CommonDataModel/wiki/payer_plan_period">Payer_plan_period</a>
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm54.html#payer_plan_period">Payer_plan_period</a>
|
||||
table captures details of the period of time that a Person is
|
||||
continuously enrolled under a specific health Plan benefit structure
|
||||
from a given Payer. Payer plan periods, as opposed to observation
|
||||
|
@ -661,7 +670,7 @@ supported, the mappings have been done for you. The full list is
|
|||
available from the open-source <a
|
||||
href="http://athena.ohdsi.org/search-terms/terms">ATHENA</a> tool under
|
||||
the download tab (see below). You can choose to download the ten <a
|
||||
href="https://github.com/OHDSI/CommonDataModel/wiki/Standardized-Vocabularies">vocabulary
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm54.html#Standardized-Vocabularies">vocabulary
|
||||
tables</a> from there as well – you will need a copy in your environment
|
||||
if you plan on building a CDM.</p>
|
||||
<p><img src="images/Athena_download_box.png" /></p>
|
||||
|
@ -674,7 +683,7 @@ searching.</p>
|
|||
<p><strong>13. If I want to apply the mappings myself, can I do so? Are
|
||||
they transparent to all users?</strong></p>
|
||||
<p>Yes, all mappings are available in the <a
|
||||
href="https://github.com/OHDSI/CommonDataModel/wiki/CONCEPT_RELATIONSHIP">Concept_relationship</a>
|
||||
href="https://ohdsi.github.io/CommonDataModel/cdm54.html#CONCEPT_RELATIONSHIP">Concept_relationship</a>
|
||||
table (which can be downloaded from <a
|
||||
href="http://athena.ohdsi.org/search-terms/terms">ATHENA</a>). Each
|
||||
value in a supported source terminology is assigned a Concept_id (which
|
||||
|
|
105
docs/index.html
105
docs/index.html
File diff suppressed because one or more lines are too long
|
@ -357,14 +357,17 @@ div.tocify {
|
|||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://ohdsi.github.io/Themis">THEMIS Convention Library</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="dataModelConventions.html">General Conventions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="ehrObsPeriods.html">Observation Periods for EHR Data</a>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
<a href="customConcepts.html">Custom Concepts</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -380,14 +383,11 @@ div.tocify {
|
|||
<li>
|
||||
<a href="cdm30.html">CDM v3.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm60.html">CDM v6.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm53.html">CDM v5.3</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">NEW CDM v5.4</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">CDM v5.4</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdm54.html">CDM v5.4</a>
|
||||
|
@ -398,6 +398,9 @@ div.tocify {
|
|||
<li>
|
||||
<a href="cdm54erd.html">Entity Relationships</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm54ToolingSupport.html">Detailed tooling support per CDM field</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -406,22 +409,22 @@ div.tocify {
|
|||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-plus-square"></span>
|
||||
|
||||
CDM Proposals
|
||||
CDM Additions
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
<a href="typesOfAdditions.html">Types of CDM Additions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues?q=is%3Aopen+is%3Aissue+label%3AProposal">Under Review</a>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted Changes</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues/252">Region_concept_id</a>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/tree/develop">CDM version in development</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -504,7 +507,7 @@ into the Observational Medical Outcome Partnership (OMOP) Common Data
|
|||
Model (CDM). The community that supports the design and development of
|
||||
the OHDSI/CommonDataModel Github repository is a diverse collaborative
|
||||
of healthcare and technical profesisonals whom have limited data base
|
||||
adminstrative (DBA) experience. As a result, the comments below should
|
||||
administrative (DBA) experience. As a result, the comments below should
|
||||
be interpreted as suggestions and recommendations to help increase
|
||||
performance. Your teams needs may call for a modified configuration.</p>
|
||||
</div>
|
||||
|
@ -570,9 +573,6 @@ href="https://forums.ohdsi.org/t/iso-best-practices-of-cdm-indexing/10939/2">Ref
|
|||
</div>
|
||||
<div id="databricks" class="section level3">
|
||||
<h3>Databricks</h3>
|
||||
<p>This database type is not yet supported but is actively being worked
|
||||
on by a number of collaborators. For more informtion, please contact
|
||||
Ajit Londhe of Amgen.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="references" class="section level2">
|
||||
|
|
|
@ -281,14 +281,17 @@ $(document).ready(function () {
|
|||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://ohdsi.github.io/Themis">THEMIS Convention Library</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="dataModelConventions.html">General Conventions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="ehrObsPeriods.html">Observation Periods for EHR Data</a>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
<a href="customConcepts.html">Custom Concepts</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -304,14 +307,11 @@ $(document).ready(function () {
|
|||
<li>
|
||||
<a href="cdm30.html">CDM v3.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm60.html">CDM v6.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm53.html">CDM v5.3</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">NEW CDM v5.4</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">CDM v5.4</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdm54.html">CDM v5.4</a>
|
||||
|
@ -322,6 +322,9 @@ $(document).ready(function () {
|
|||
<li>
|
||||
<a href="cdm54erd.html">Entity Relationships</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm54ToolingSupport.html">Detailed tooling support per CDM field</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -330,22 +333,22 @@ $(document).ready(function () {
|
|||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-plus-square"></span>
|
||||
|
||||
CDM Proposals
|
||||
CDM Additions
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
<a href="typesOfAdditions.html">Types of CDM Additions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues?q=is%3Aopen+is%3Aissue+label%3AProposal">Under Review</a>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted Changes</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues/252">Region_concept_id</a>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/tree/develop">CDM version in development</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -281,14 +281,17 @@ $(document).ready(function () {
|
|||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://ohdsi.github.io/Themis">THEMIS Convention Library</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="dataModelConventions.html">General Conventions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="ehrObsPeriods.html">Observation Periods for EHR Data</a>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
<a href="customConcepts.html">Custom Concepts</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -304,14 +307,11 @@ $(document).ready(function () {
|
|||
<li>
|
||||
<a href="cdm30.html">CDM v3.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm60.html">CDM v6.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm53.html">CDM v5.3</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">NEW CDM v5.4</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">CDM v5.4</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdm54.html">CDM v5.4</a>
|
||||
|
@ -322,6 +322,9 @@ $(document).ready(function () {
|
|||
<li>
|
||||
<a href="cdm54erd.html">Entity Relationships</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm54ToolingSupport.html">Detailed tooling support per CDM field</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -330,22 +333,22 @@ $(document).ready(function () {
|
|||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-plus-square"></span>
|
||||
|
||||
CDM Proposals
|
||||
CDM Additions
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
<a href="typesOfAdditions.html">Types of CDM Additions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues?q=is%3Aopen+is%3Aissue+label%3AProposal">Under Review</a>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted Changes</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues/252">Region_concept_id</a>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/tree/develop">CDM version in development</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -281,14 +281,17 @@ $(document).ready(function () {
|
|||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://ohdsi.github.io/Themis">THEMIS Convention Library</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="dataModelConventions.html">General Conventions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="ehrObsPeriods.html">Observation Periods for EHR Data</a>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
<a href="customConcepts.html">Custom Concepts</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -304,14 +307,11 @@ $(document).ready(function () {
|
|||
<li>
|
||||
<a href="cdm30.html">CDM v3.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm60.html">CDM v6.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm53.html">CDM v5.3</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">NEW CDM v5.4</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">CDM v5.4</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdm54.html">CDM v5.4</a>
|
||||
|
@ -322,6 +322,9 @@ $(document).ready(function () {
|
|||
<li>
|
||||
<a href="cdm54erd.html">Entity Relationships</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm54ToolingSupport.html">Detailed tooling support per CDM field</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -330,22 +333,22 @@ $(document).ready(function () {
|
|||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-plus-square"></span>
|
||||
|
||||
CDM Proposals
|
||||
CDM Additions
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
<a href="typesOfAdditions.html">Types of CDM Additions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues?q=is%3Aopen+is%3Aissue+label%3AProposal">Under Review</a>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted Changes</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues/252">Region_concept_id</a>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/tree/develop">CDM version in development</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -357,14 +357,17 @@ div.tocify {
|
|||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://ohdsi.github.io/Themis">THEMIS Convention Library</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="dataModelConventions.html">General Conventions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="ehrObsPeriods.html">Observation Periods for EHR Data</a>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
<a href="customConcepts.html">Custom Concepts</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -380,14 +383,11 @@ div.tocify {
|
|||
<li>
|
||||
<a href="cdm30.html">CDM v3.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm60.html">CDM v6.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm53.html">CDM v5.3</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">NEW CDM v5.4</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">CDM v5.4</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdm54.html">CDM v5.4</a>
|
||||
|
@ -398,6 +398,9 @@ div.tocify {
|
|||
<li>
|
||||
<a href="cdm54erd.html">Entity Relationships</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm54ToolingSupport.html">Detailed tooling support per CDM field</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -406,22 +409,22 @@ div.tocify {
|
|||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-plus-square"></span>
|
||||
|
||||
CDM Proposals
|
||||
CDM Additions
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
<a href="typesOfAdditions.html">Types of CDM Additions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues?q=is%3Aopen+is%3Aissue+label%3AProposal">Under Review</a>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted Changes</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues/252">Region_concept_id</a>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/tree/develop">CDM version in development</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -283,14 +283,17 @@ $(document).ready(function () {
|
|||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://ohdsi.github.io/Themis">THEMIS Convention Library</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="dataModelConventions.html">General Conventions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="ehrObsPeriods.html">Observation Periods for EHR Data</a>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
<a href="customConcepts.html">Custom Concepts</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -306,14 +309,11 @@ $(document).ready(function () {
|
|||
<li>
|
||||
<a href="cdm30.html">CDM v3.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm60.html">CDM v6.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm53.html">CDM v5.3</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">NEW CDM v5.4</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">CDM v5.4</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdm54.html">CDM v5.4</a>
|
||||
|
@ -324,6 +324,9 @@ $(document).ready(function () {
|
|||
<li>
|
||||
<a href="cdm54erd.html">Entity Relationships</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm54ToolingSupport.html">Detailed tooling support per CDM field</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -332,22 +335,22 @@ $(document).ready(function () {
|
|||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-plus-square"></span>
|
||||
|
||||
CDM Proposals
|
||||
CDM Additions
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
<a href="typesOfAdditions.html">Types of CDM Additions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues?q=is%3Aopen+is%3Aissue+label%3AProposal">Under Review</a>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted Changes</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues/252">Region_concept_id</a>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/tree/develop">CDM version in development</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -281,14 +281,17 @@ $(document).ready(function () {
|
|||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://ohdsi.github.io/Themis">THEMIS Convention Library</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="dataModelConventions.html">General Conventions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="ehrObsPeriods.html">Observation Periods for EHR Data</a>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
<a href="customConcepts.html">Custom Concepts</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -304,14 +307,11 @@ $(document).ready(function () {
|
|||
<li>
|
||||
<a href="cdm30.html">CDM v3.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm60.html">CDM v6.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm53.html">CDM v5.3</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">NEW CDM v5.4</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">CDM v5.4</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdm54.html">CDM v5.4</a>
|
||||
|
@ -322,6 +322,9 @@ $(document).ready(function () {
|
|||
<li>
|
||||
<a href="cdm54erd.html">Entity Relationships</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm54ToolingSupport.html">Detailed tooling support per CDM field</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -330,22 +333,22 @@ $(document).ready(function () {
|
|||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-plus-square"></span>
|
||||
|
||||
CDM Proposals
|
||||
CDM Additions
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
<a href="typesOfAdditions.html">Types of CDM Additions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues?q=is%3Aopen+is%3Aissue+label%3AProposal">Under Review</a>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted Changes</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues/252">Region_concept_id</a>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/tree/develop">CDM version in development</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
// Pandoc 2.9 adds attributes on both header and div. We remove the former (to
|
||||
// be compatible with the behavior of Pandoc < 2.8).
|
||||
document.addEventListener('DOMContentLoaded', function(e) {
|
||||
var hs = document.querySelectorAll("div.section[class*='level'] > :first-child");
|
||||
var i, h, a;
|
||||
for (i = 0; i < hs.length; i++) {
|
||||
h = hs[i];
|
||||
if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6
|
||||
a = h.attributes;
|
||||
while (a.length > 0) h.removeAttribute(a[0].name);
|
||||
}
|
||||
});
|
|
@ -0,0 +1,21 @@
|
|||
@layer htmltools {
|
||||
.html-fill-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
/* Prevent the container from expanding vertically or horizontally beyond its
|
||||
parent's constraints. */
|
||||
min-height: 0;
|
||||
min-width: 0;
|
||||
}
|
||||
.html-fill-container > .html-fill-item {
|
||||
/* Fill items can grow and shrink freely within
|
||||
available vertical space in fillable container */
|
||||
flex: 1 1 auto;
|
||||
min-height: 0;
|
||||
min-width: 0;
|
||||
}
|
||||
.html-fill-container > :not(.html-fill-item) {
|
||||
/* Prevent shrinking or growing of non-fill items */
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
}
|
|
@ -357,14 +357,17 @@ div.tocify {
|
|||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://ohdsi.github.io/Themis">THEMIS Convention Library</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="dataModelConventions.html">General Conventions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="ehrObsPeriods.html">Observation Periods for EHR Data</a>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
<a href="customConcepts.html">Custom Concepts</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -380,14 +383,11 @@ div.tocify {
|
|||
<li>
|
||||
<a href="cdm30.html">CDM v3.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm60.html">CDM v6.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm53.html">CDM v5.3</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">NEW CDM v5.4</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">CDM v5.4</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdm54.html">CDM v5.4</a>
|
||||
|
@ -398,6 +398,9 @@ div.tocify {
|
|||
<li>
|
||||
<a href="cdm54erd.html">Entity Relationships</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm54ToolingSupport.html">Detailed tooling support per CDM field</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -406,22 +409,22 @@ div.tocify {
|
|||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-plus-square"></span>
|
||||
|
||||
CDM Proposals
|
||||
CDM Additions
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
<a href="typesOfAdditions.html">Types of CDM Additions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues?q=is%3Aopen+is%3Aissue+label%3AProposal">Under Review</a>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted Changes</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues/252">Region_concept_id</a>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/tree/develop">CDM version in development</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -508,7 +511,7 @@ were to map source codes on the fly. It is important to note that this
|
|||
script will show ALL mappings, not just those to Standard, Valid
|
||||
Concepts. Be sure to add a filter that will only grab the correct
|
||||
Standard, Valid codes.</p>
|
||||
<pre class="sql"><code>SELECT c.concept_code AS SOURCE_CODE, c.concept_id AS SOURCE_CONCEPT_ID, c.concept_name AS SOURCE_CODE_DESCRIPTION, c.vocabulary_id AS SOURCE_VOCABULARY_ID, c.domain_id AS SOURCE_DOMAIN_ID, c.CONCEPT_CLASS_ID AS SOURCE_CONCEPT_CLASS_ID, c.VALID_START_DATE AS SOURCE_VALID_START_DATE, c.VALID_END_DATE AS SOURCE_VALID_END_DATE, c.INVALID_REASON AS SOURCE_INVALID_REASON, c1.concept_id AS TARGET_CONCEPT_ID, c1.concept_name AS TARGET_CONCEPT_NAME, c1.VOCABULARY_ID AS TARGET_VOCABUALRY_ID, c1.domain_id AS TARGET_DOMAIN_ID, c1.concept_class_id AS TARGET_CONCEPT_CLASS_ID, c1.INVALID_REASON AS TARGET_INVALID_REASON, c1.standard_concept AS TARGET_STANDARD_CONCEPT
|
||||
<pre class="sql"><code>SELECT c.concept_code AS SOURCE_CODE, c.concept_id AS SOURCE_CONCEPT_ID, c.concept_name AS SOURCE_CODE_DESCRIPTION, c.vocabulary_id AS SOURCE_VOCABULARY_ID, c.domain_id AS SOURCE_DOMAIN_ID, c.CONCEPT_CLASS_ID AS SOURCE_CONCEPT_CLASS_ID, c.VALID_START_DATE AS SOURCE_VALID_START_DATE, c.VALID_END_DATE AS SOURCE_VALID_END_DATE, c.INVALID_REASON AS SOURCE_INVALID_REASON, c1.concept_id AS TARGET_CONCEPT_ID, c1.concept_name AS TARGET_CONCEPT_NAME, c1.VOCABULARY_ID AS TARGET_VOCABULARY_ID, c1.domain_id AS TARGET_DOMAIN_ID, c1.concept_class_id AS TARGET_CONCEPT_CLASS_ID, c1.INVALID_REASON AS TARGET_INVALID_REASON, c1.standard_concept AS TARGET_STANDARD_CONCEPT
|
||||
FROM CONCEPT C
|
||||
JOIN CONCEPT_RELATIONSHIP CR
|
||||
ON C.CONCEPT_ID = CR.CONCEPT_ID_1
|
||||
|
@ -974,7 +977,7 @@ WHERE vocabulary_id = 'None';</code></pre>
|
|||
<h2><strong>Bonus Queries</strong></h2>
|
||||
<div id="visit-concept-roll-up" class="section level3">
|
||||
<h3>Visit Concept Roll-up</h3>
|
||||
<p>The query below will utilize the Visit Concept hierarcy to find the
|
||||
<p>The query below will utilize the Visit Concept hierarchy to find the
|
||||
highest-level ancestors. In the case that both the VISIT_OCCURRENCE and
|
||||
VISIT_DETAIL tables are populated, it is good practice (though not
|
||||
required) to use the highest-level ancestors as the VISIT_CONCEPT_IDs in
|
||||
|
|
|
@ -0,0 +1,648 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8" />
|
||||
<meta name="generator" content="pandoc" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
|
||||
|
||||
|
||||
|
||||
|
||||
<title> Types of OMOP CDM Additions</title>
|
||||
|
||||
<script src="site_libs/header-attrs-2.25/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.13.2/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>
|
||||
<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>
|
||||
<link href="site_libs/font-awesome-6.4.2/css/all.min.css" rel="stylesheet" />
|
||||
<link href="site_libs/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet" />
|
||||
<link rel='shortcut icon' type='image/x-icon' href='favicon.ico' />
|
||||
|
||||
<style type="text/css">
|
||||
code{white-space: pre-wrap;}
|
||||
span.smallcaps{font-variant: small-caps;}
|
||||
span.underline{text-decoration: underline;}
|
||||
div.column{display: inline-block; vertical-align: top; width: 50%;}
|
||||
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
|
||||
ul.task-list{list-style: none;}
|
||||
</style>
|
||||
|
||||
<style type="text/css">code{white-space: pre;}</style>
|
||||
<script type="text/javascript">
|
||||
if (window.hljs) {
|
||||
hljs.configure({languages: []});
|
||||
hljs.initHighlightingOnLoad();
|
||||
if (document.readyState && document.readyState === "complete") {
|
||||
window.setTimeout(function() { hljs.initHighlighting(); }, 0);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="style.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
<style type = "text/css">
|
||||
.main-container {
|
||||
max-width: 940px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
img {
|
||||
max-width:100%;
|
||||
}
|
||||
.tabbed-pane {
|
||||
padding-top: 12px;
|
||||
}
|
||||
.html-widget {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
button.code-folding-btn:focus {
|
||||
outline: none;
|
||||
}
|
||||
summary {
|
||||
display: list-item;
|
||||
}
|
||||
details > summary > p:only-child {
|
||||
display: inline;
|
||||
}
|
||||
pre code {
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<style type="text/css">
|
||||
.dropdown-submenu {
|
||||
position: relative;
|
||||
}
|
||||
.dropdown-submenu>.dropdown-menu {
|
||||
top: 0;
|
||||
left: 100%;
|
||||
margin-top: -6px;
|
||||
margin-left: -1px;
|
||||
border-radius: 0 6px 6px 6px;
|
||||
}
|
||||
.dropdown-submenu:hover>.dropdown-menu {
|
||||
display: block;
|
||||
}
|
||||
.dropdown-submenu>a:after {
|
||||
display: block;
|
||||
content: " ";
|
||||
float: right;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-color: transparent;
|
||||
border-style: solid;
|
||||
border-width: 5px 0 5px 5px;
|
||||
border-left-color: #cccccc;
|
||||
margin-top: 5px;
|
||||
margin-right: -10px;
|
||||
}
|
||||
.dropdown-submenu:hover>a:after {
|
||||
border-left-color: #adb5bd;
|
||||
}
|
||||
.dropdown-submenu.pull-left {
|
||||
float: none;
|
||||
}
|
||||
.dropdown-submenu.pull-left>.dropdown-menu {
|
||||
left: -100%;
|
||||
margin-left: 10px;
|
||||
border-radius: 6px 0 6px 6px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript">
|
||||
// manage active state of menu based on current page
|
||||
$(document).ready(function () {
|
||||
// active menu anchor
|
||||
href = window.location.pathname
|
||||
href = href.substr(href.lastIndexOf('/') + 1)
|
||||
if (href === "")
|
||||
href = "index.html";
|
||||
var menuAnchor = $('a[href="' + href + '"]');
|
||||
|
||||
// mark the anchor link active (and if it's in a dropdown, also mark that active)
|
||||
var dropdown = menuAnchor.closest('li.dropdown');
|
||||
if (window.bootstrap) { // Bootstrap 4+
|
||||
menuAnchor.addClass('active');
|
||||
dropdown.find('> .dropdown-toggle').addClass('active');
|
||||
} else { // Bootstrap 3
|
||||
menuAnchor.parent().addClass('active');
|
||||
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>
|
||||
|
||||
<!-- tabsets -->
|
||||
|
||||
<style type="text/css">
|
||||
.tabset-dropdown > .nav-tabs {
|
||||
display: inline-table;
|
||||
max-height: 500px;
|
||||
min-height: 44px;
|
||||
overflow-y: auto;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.tabset-dropdown > .nav-tabs > li.active:before, .tabset-dropdown > .nav-tabs.nav-tabs-open:before {
|
||||
content: "\e259";
|
||||
font-family: 'Glyphicons Halflings';
|
||||
display: inline-block;
|
||||
padding: 10px;
|
||||
border-right: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.tabset-dropdown > .nav-tabs.nav-tabs-open > li.active:before {
|
||||
content: "\e258";
|
||||
font-family: 'Glyphicons Halflings';
|
||||
border: none;
|
||||
}
|
||||
|
||||
.tabset-dropdown > .nav-tabs > li.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.tabset-dropdown > .nav-tabs > li > a,
|
||||
.tabset-dropdown > .nav-tabs > li > a:focus,
|
||||
.tabset-dropdown > .nav-tabs > li > a:hover {
|
||||
border: none;
|
||||
display: inline-block;
|
||||
border-radius: 4px;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.tabset-dropdown > .nav-tabs.nav-tabs-open > li {
|
||||
display: block;
|
||||
float: none;
|
||||
}
|
||||
|
||||
.tabset-dropdown > .nav-tabs > li {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- code folding -->
|
||||
|
||||
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
#TOC {
|
||||
margin: 25px 0px 20px 0px;
|
||||
}
|
||||
@media (max-width: 768px) {
|
||||
#TOC {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@media print {
|
||||
.toc-content {
|
||||
/* see https://github.com/w3c/csswg-drafts/issues/4434 */
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
|
||||
.toc-content {
|
||||
padding-left: 30px;
|
||||
padding-right: 40px;
|
||||
}
|
||||
|
||||
div.main-container {
|
||||
max-width: 1200px;
|
||||
}
|
||||
|
||||
div.tocify {
|
||||
width: 20%;
|
||||
max-width: 260px;
|
||||
max-height: 85%;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) and (max-width: 991px) {
|
||||
div.tocify {
|
||||
width: 25%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
div.tocify {
|
||||
width: 100%;
|
||||
max-width: none;
|
||||
}
|
||||
}
|
||||
|
||||
.tocify ul, .tocify li {
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.tocify-subheader .tocify-item {
|
||||
font-size: 0.90em;
|
||||
}
|
||||
|
||||
.tocify .list-group-item {
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
<div class="container-fluid main-container">
|
||||
|
||||
|
||||
<!-- setup 3col/9col grid for toc_float and main content -->
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-4 col-md-3">
|
||||
<div id="TOC" class="tocify">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="toc-content col-xs-12 col-sm-8 col-md-9">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-bs-toggle="collapse" data-target="#navbar" data-bs-target="#navbar">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="index.html"><div><img src="ohdsi16x16.png"></img> OMOP Common Data Model </div></a>
|
||||
</div>
|
||||
<div id="navbar" class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li>
|
||||
<a href="index.html">
|
||||
<span class="fa fa-house"></span>
|
||||
|
||||
</a>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-landmark"></span>
|
||||
|
||||
Background
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="background.html">Model Background</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdmRefreshProcess.html">CDM Refresh Process</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="vocabulary.html">How the Vocabulary is Built</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-list-alt"></span>
|
||||
|
||||
Conventions
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://ohdsi.github.io/Themis">THEMIS Convention Library</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="dataModelConventions.html">General Conventions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="customConcepts.html">Custom Concepts</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-history"></span>
|
||||
|
||||
CDM Versions
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdm30.html">CDM v3.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm53.html">CDM v5.3</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">CDM v5.4</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdm54.html">CDM v5.4</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm54Changes.html">Changes from CDM v5.3</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm54erd.html">Entity Relationships</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm54ToolingSupport.html">Detailed tooling support per CDM field</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-plus-square"></span>
|
||||
|
||||
CDM Additions
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="typesOfAdditions.html">Types of CDM Additions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted Changes</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/tree/develop">CDM version in development</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-question"></span>
|
||||
|
||||
How to
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="download.html">Download the DDL</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdmRPackage.html">Use the CDM R Package</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="drug_dose.html">Calculate Drug Dose</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-life-ring"></span>
|
||||
|
||||
Support
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdmDecisionTree.html">Help! My Data Doesn't Fit!</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="faq.html">FAQ</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="sqlScripts.html">SQL Scripts</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="contribute.html">Ask a Question</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel">
|
||||
<span class="fa fa-github"></span>
|
||||
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
</div><!--/.container -->
|
||||
</div><!--/.navbar -->
|
||||
|
||||
<div id="header">
|
||||
|
||||
|
||||
|
||||
<h1 class="title toc-ignore"><img src="ohdsi40x40.png"></img> Types of
|
||||
OMOP CDM Additions</h1>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<p>While the OMOP CDM supports a diverse set of use cases and data
|
||||
types, we acknowledge that not all can be represented in the CDM in its
|
||||
current form. Based on your use case it may be necessary to modify just
|
||||
your database, create an expansion, or suggest changes to the model that
|
||||
will be incorporated into the next official version. This document
|
||||
describes the types of additions that can be made to the CDM and how
|
||||
they should be utilized by the community.</p>
|
||||
<div id="site---specific-add-on" class="section level2">
|
||||
<h2>Site - Specific Add on</h2>
|
||||
<p>It is entirely within your rights as a data owner or holder to create
|
||||
additional columns or even tables in your own instance of your CDM that
|
||||
is specific to your site. However, they are not supported or recognized
|
||||
by OHDSI tools and not part of the canonical OMOP CDM. The Add on column
|
||||
or table is used for a site specific use case or data element. Examples
|
||||
include: privacy flags, source table identifiers or other data elements.
|
||||
See <a
|
||||
href="https://www.ohdsi.org/wp-content/uploads/2021/09/18-Implementing-Adopting-a-Customized-OMOP-Common-Data-Model.pdf">this
|
||||
poster</a> for background information and an implementation guide.</p>
|
||||
</div>
|
||||
<div id="expansionextension" class="section level2">
|
||||
<h2>Expansion/Extension</h2>
|
||||
<p>These are typically sets of tables created by working groups to model
|
||||
a specific type of data. The idea is that these tables follow the
|
||||
general conventions of the OMOP CDM but are not part of the canonical
|
||||
data model and therefore do not fall under the purview of the CDM
|
||||
working group. They are developed using OMOP conventions applied to
|
||||
domain specific datasets. It is possible they could become part of the
|
||||
CDM in the future (like the episode and episode_event tables) but that
|
||||
is not a given. If using an expansion/extension with your data they are
|
||||
invisible to the tools. They can be used as part of network research but
|
||||
you would need to ensure that all participating databases are using the
|
||||
extension/expansion before writing a study package that incorporates the
|
||||
tables.</p>
|
||||
<p><strong>Examples include:</strong></p>
|
||||
<ul>
|
||||
<li>Oncology
|
||||
<ul>
|
||||
<li>Github: <a href="https://ohdsi.github.io/OncologyWG/"
|
||||
class="uri">https://ohdsi.github.io/OncologyWG/</a></li>
|
||||
</ul></li>
|
||||
<li>Medical Imaging
|
||||
<ul>
|
||||
<li>Github: <a href="https://github.com/paulnagy/DICOM2OMOP"
|
||||
class="uri">https://github.com/paulnagy/DICOM2OMOP</a></li>
|
||||
<li>Paper: <a
|
||||
href="https://link-springer-com.ezjandj.infotrieve.com/article/10.1007/s10278-024-00982-6"
|
||||
class="uri">https://link-springer-com.ezjandj.infotrieve.com/article/10.1007/s10278-024-00982-6</a></li>
|
||||
</ul></li>
|
||||
<li>GIS
|
||||
<ul>
|
||||
<li>Github: <a href="https://ohdsi.github.io/GIS/"
|
||||
class="uri">https://ohdsi.github.io/GIS/</a></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="change-to-canonical-cdm" class="section level2">
|
||||
<h2>Change to Canonical CDM</h2>
|
||||
<p>Please see the <a href="/CommonDataModel/cdmRequestProcess.html">full
|
||||
process</a> for how to request changes to the current version of the
|
||||
OMOP CDM. These change requests MUST be backed by network uses cases and
|
||||
MUST be approved by the <a
|
||||
href="https://forms.office.com/Pages/ResponsePage.aspx?id=lAAPoyCRq0q6TOVQkCOy1ZyG6Ud_r2tKuS0HcGnqiQZUOVJFUzBFWE1aSVlLN0ozR01MUVQ4T0RGNyQlQCN0PWcu">CDM
|
||||
working group</a>. Overall these are typically small changes or
|
||||
additions that make the CDM more usable from a network perspective or
|
||||
fulfill a clearly demonstrated need. Good examples are the recently
|
||||
ratified <a
|
||||
href="https://github.com/OHDSI/CommonDataModel/tree/NLP_Proposal_2023">NOTE_NLP
|
||||
updates</a> and presentation by the vocabulary team to add <a
|
||||
href="https://ohdsiorg.sharepoint.com/:v:/s/Workgroup-CommonDataModel/EcMaYjUPeSVMrmSozflBsmQBNEtPpiCJ9AfZ3QQtGHIuFg?e=UnVgIh&nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJTdHJlYW1XZWJBcHAiLCJyZWZlcnJhbFZpZXciOiJTaGFyZURpYWxvZy1MaW5rIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXcifX0%3D">value_source_concept_id</a>
|
||||
to the measurement and observation tables.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
// add bootstrap table styles to pandoc tables
|
||||
function bootstrapStylePandocTables() {
|
||||
$('tr.odd').parent('tbody').parent('table').addClass('table table-condensed');
|
||||
}
|
||||
$(document).ready(function () {
|
||||
bootstrapStylePandocTables();
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<!-- tabsets -->
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
window.buildTabsets("TOC");
|
||||
});
|
||||
|
||||
$(document).ready(function () {
|
||||
$('.tabset-dropdown > .nav-tabs > li').click(function () {
|
||||
$(this).parent().toggleClass('nav-tabs-open');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- code folding -->
|
||||
|
||||
<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')
|
||||
.children('h1,h2,h3,h4,h5').addClass('toc-ignore');
|
||||
|
||||
// establish options
|
||||
var options = {
|
||||
selectors: "h1,h2,h3",
|
||||
theme: "bootstrap3",
|
||||
context: '.toc-content',
|
||||
hashGenerator: function (text) {
|
||||
return text.replace(/[.\\/?&!#<>]/g, '').replace(/\s/g, '_');
|
||||
},
|
||||
ignoreSelector: ".toc-ignore",
|
||||
scrollTo: 0
|
||||
};
|
||||
options.showAndHide = true;
|
||||
options.smoothScroll = true;
|
||||
|
||||
// tocify
|
||||
var toc = $("#TOC").tocify(options).data("toc-tocify");
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- dynamically load mathjax for compatibility with self-contained -->
|
||||
<script>
|
||||
(function () {
|
||||
var script = document.createElement("script");
|
||||
script.type = "text/javascript";
|
||||
script.src = "https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
|
||||
document.getElementsByTagName("head")[0].appendChild(script);
|
||||
})();
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -281,14 +281,17 @@ $(document).ready(function () {
|
|||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://ohdsi.github.io/Themis">THEMIS Convention Library</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="dataModelConventions.html">General Conventions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="ehrObsPeriods.html">Observation Periods for EHR Data</a>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
<a href="customConcepts.html">Custom Concepts</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -304,14 +307,11 @@ $(document).ready(function () {
|
|||
<li>
|
||||
<a href="cdm30.html">CDM v3.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm60.html">CDM v6.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm53.html">CDM v5.3</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">NEW CDM v5.4</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">CDM v5.4</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdm54.html">CDM v5.4</a>
|
||||
|
@ -322,6 +322,9 @@ $(document).ready(function () {
|
|||
<li>
|
||||
<a href="cdm54erd.html">Entity Relationships</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm54ToolingSupport.html">Detailed tooling support per CDM field</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -330,22 +333,22 @@ $(document).ready(function () {
|
|||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-plus-square"></span>
|
||||
|
||||
CDM Proposals
|
||||
CDM Additions
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
<a href="typesOfAdditions.html">Types of CDM Additions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues?q=is%3Aopen+is%3Aissue+label%3AProposal">Under Review</a>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted Changes</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues/252">Region_concept_id</a>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/tree/develop">CDM version in development</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -281,14 +281,17 @@ $(document).ready(function () {
|
|||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://ohdsi.github.io/Themis">THEMIS Convention Library</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="dataModelConventions.html">General Conventions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="ehrObsPeriods.html">Observation Periods for EHR Data</a>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
<a href="customConcepts.html">Custom Concepts</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -304,14 +307,11 @@ $(document).ready(function () {
|
|||
<li>
|
||||
<a href="cdm30.html">CDM v3.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm60.html">CDM v6.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm53.html">CDM v5.3</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">NEW CDM v5.4</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">CDM v5.4</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdm54.html">CDM v5.4</a>
|
||||
|
@ -322,6 +322,9 @@ $(document).ready(function () {
|
|||
<li>
|
||||
<a href="cdm54erd.html">Entity Relationships</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm54ToolingSupport.html">Detailed tooling support per CDM field</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -330,22 +333,22 @@ $(document).ready(function () {
|
|||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-plus-square"></span>
|
||||
|
||||
CDM Proposals
|
||||
CDM Additions
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
<a href="typesOfAdditions.html">Types of CDM Additions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues?q=is%3Aopen+is%3Aissue+label%3AProposal">Under Review</a>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted Changes</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues/252">Region_concept_id</a>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/tree/develop">CDM version in development</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -281,14 +281,17 @@ $(document).ready(function () {
|
|||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://ohdsi.github.io/Themis">THEMIS Convention Library</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="dataModelConventions.html">General Conventions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="ehrObsPeriods.html">Observation Periods for EHR Data</a>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
<a href="customConcepts.html">Custom Concepts</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -304,14 +307,11 @@ $(document).ready(function () {
|
|||
<li>
|
||||
<a href="cdm30.html">CDM v3.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm60.html">CDM v6.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm53.html">CDM v5.3</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">NEW CDM v5.4</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">CDM v5.4</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdm54.html">CDM v5.4</a>
|
||||
|
@ -322,6 +322,9 @@ $(document).ready(function () {
|
|||
<li>
|
||||
<a href="cdm54erd.html">Entity Relationships</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm54ToolingSupport.html">Detailed tooling support per CDM field</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -330,22 +333,22 @@ $(document).ready(function () {
|
|||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-plus-square"></span>
|
||||
|
||||
CDM Proposals
|
||||
CDM Additions
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
<a href="typesOfAdditions.html">Types of CDM Additions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues?q=is%3Aopen+is%3Aissue+label%3AProposal">Under Review</a>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted Changes</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues/252">Region_concept_id</a>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/tree/develop">CDM version in development</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -281,14 +281,17 @@ $(document).ready(function () {
|
|||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://ohdsi.github.io/Themis">THEMIS Convention Library</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="dataModelConventions.html">General Conventions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="ehrObsPeriods.html">Observation Periods for EHR Data</a>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
<a href="customConcepts.html">Custom Concepts</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -304,14 +307,11 @@ $(document).ready(function () {
|
|||
<li>
|
||||
<a href="cdm30.html">CDM v3.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm60.html">CDM v6.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm53.html">CDM v5.3</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">NEW CDM v5.4</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">CDM v5.4</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdm54.html">CDM v5.4</a>
|
||||
|
@ -322,6 +322,9 @@ $(document).ready(function () {
|
|||
<li>
|
||||
<a href="cdm54erd.html">Entity Relationships</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm54ToolingSupport.html">Detailed tooling support per CDM field</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -330,22 +333,22 @@ $(document).ready(function () {
|
|||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-plus-square"></span>
|
||||
|
||||
CDM Proposals
|
||||
CDM Additions
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
<a href="typesOfAdditions.html">Types of CDM Additions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues?q=is%3Aopen+is%3Aissue+label%3AProposal">Under Review</a>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted Changes</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues/252">Region_concept_id</a>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/tree/develop">CDM version in development</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -281,14 +281,17 @@ $(document).ready(function () {
|
|||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://ohdsi.github.io/Themis">THEMIS Convention Library</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="dataModelConventions.html">General Conventions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="ehrObsPeriods.html">Observation Periods for EHR Data</a>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
<a href="customConcepts.html">Custom Concepts</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -304,14 +307,11 @@ $(document).ready(function () {
|
|||
<li>
|
||||
<a href="cdm30.html">CDM v3.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm60.html">CDM v6.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm53.html">CDM v5.3</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">NEW CDM v5.4</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">CDM v5.4</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdm54.html">CDM v5.4</a>
|
||||
|
@ -322,6 +322,9 @@ $(document).ready(function () {
|
|||
<li>
|
||||
<a href="cdm54erd.html">Entity Relationships</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm54ToolingSupport.html">Detailed tooling support per CDM field</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -330,22 +333,22 @@ $(document).ready(function () {
|
|||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-plus-square"></span>
|
||||
|
||||
CDM Proposals
|
||||
CDM Additions
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
<a href="typesOfAdditions.html">Types of CDM Additions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues?q=is%3Aopen+is%3Aissue+label%3AProposal">Under Review</a>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted Changes</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues/252">Region_concept_id</a>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/tree/develop">CDM version in development</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -357,14 +357,17 @@ div.tocify {
|
|||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://ohdsi.github.io/Themis">THEMIS Convention Library</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="dataModelConventions.html">General Conventions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="ehrObsPeriods.html">Observation Periods for EHR Data</a>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdmPrivacy.html">Patient Privacy and OMOP</a>
|
||||
<a href="customConcepts.html">Custom Concepts</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -380,14 +383,11 @@ div.tocify {
|
|||
<li>
|
||||
<a href="cdm30.html">CDM v3.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm60.html">CDM v6.0</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm53.html">CDM v5.3</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">NEW CDM v5.4</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">CDM v5.4</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdm54.html">CDM v5.4</a>
|
||||
|
@ -398,6 +398,9 @@ div.tocify {
|
|||
<li>
|
||||
<a href="cdm54erd.html">Entity Relationships</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="cdm54ToolingSupport.html">Detailed tooling support per CDM field</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -406,22 +409,22 @@ div.tocify {
|
|||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-plus-square"></span>
|
||||
|
||||
CDM Proposals
|
||||
CDM Additions
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
<a href="typesOfAdditions.html">Types of CDM Additions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues?q=is%3Aopen+is%3Aissue+label%3AProposal">Under Review</a>
|
||||
<a href="cdmRequestProcess.html">How to Propose Changes to the CDM</a>
|
||||
</li>
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted</a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Accepted Changes</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/issues/252">Region_concept_id</a>
|
||||
<a href="https://github.com/OHDSI/CommonDataModel/tree/develop">CDM version in development</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -0,0 +1,605 @@
|
|||
erDiagram
|
||||
PERSON {
|
||||
person_id integer
|
||||
gender_concept_id integer
|
||||
year_of_birth integer
|
||||
month_of_birth integer
|
||||
day_of_birth integer
|
||||
birth_datetime datetime
|
||||
race_concept_id integer
|
||||
ethnicity_concept_id integer
|
||||
location_id integer
|
||||
provider_id integer
|
||||
care_site_id integer
|
||||
person_source_value varchar
|
||||
gender_source_value varchar
|
||||
gender_source_concept_id integer
|
||||
race_source_value varchar
|
||||
race_source_concept_id integer
|
||||
ethnicity_source_value varchar
|
||||
ethnicity_source_concept_id integer
|
||||
}
|
||||
OBSERVATION_PERIOD {
|
||||
observation_period_id integer
|
||||
person_id integer
|
||||
observation_period_start_date date
|
||||
observation_period_end_date date
|
||||
period_type_concept_id integer
|
||||
}
|
||||
VISIT_OCCURRENCE {
|
||||
visit_occurrence_id integer
|
||||
person_id integer
|
||||
visit_concept_id integer
|
||||
visit_start_date date
|
||||
visit_start_datetime datetime
|
||||
visit_end_date date
|
||||
visit_end_datetime datetime
|
||||
visit_type_concept_id Integer
|
||||
provider_id integer
|
||||
care_site_id integer
|
||||
visit_source_value varchar
|
||||
visit_source_concept_id integer
|
||||
admitted_from_concept_id integer
|
||||
admitted_from_source_value varchar
|
||||
discharged_to_concept_id integer
|
||||
discharged_to_source_value varchar
|
||||
preceding_visit_occurrence_id integer
|
||||
}
|
||||
VISIT_DETAIL {
|
||||
visit_detail_id integer
|
||||
person_id integer
|
||||
visit_detail_concept_id integer
|
||||
visit_detail_start_date date
|
||||
visit_detail_start_datetime datetime
|
||||
visit_detail_end_date date
|
||||
visit_detail_end_datetime datetime
|
||||
visit_detail_type_concept_id integer
|
||||
provider_id integer
|
||||
care_site_id integer
|
||||
visit_detail_source_value varchar
|
||||
visit_detail_source_concept_id Integer
|
||||
admitted_from_concept_id Integer
|
||||
admitted_from_source_value varchar
|
||||
discharged_to_source_value varchar
|
||||
discharged_to_concept_id integer
|
||||
preceding_visit_detail_id integer
|
||||
parent_visit_detail_id integer
|
||||
visit_occurrence_id integer
|
||||
}
|
||||
CONDITION_OCCURRENCE {
|
||||
condition_occurrence_id integer
|
||||
person_id integer
|
||||
condition_concept_id integer
|
||||
condition_start_date date
|
||||
condition_start_datetime datetime
|
||||
condition_end_date date
|
||||
condition_end_datetime datetime
|
||||
condition_type_concept_id integer
|
||||
condition_status_concept_id integer
|
||||
stop_reason varchar
|
||||
provider_id integer
|
||||
visit_occurrence_id integer
|
||||
visit_detail_id integer
|
||||
condition_source_value varchar
|
||||
condition_source_concept_id integer
|
||||
condition_status_source_value varchar
|
||||
}
|
||||
DRUG_EXPOSURE {
|
||||
drug_exposure_id integer
|
||||
person_id integer
|
||||
drug_concept_id integer
|
||||
drug_exposure_start_date date
|
||||
drug_exposure_start_datetime datetime
|
||||
drug_exposure_end_date date
|
||||
drug_exposure_end_datetime datetime
|
||||
verbatim_end_date date
|
||||
drug_type_concept_id integer
|
||||
stop_reason varchar
|
||||
refills integer
|
||||
quantity float
|
||||
days_supply integer
|
||||
sig varchar
|
||||
route_concept_id integer
|
||||
lot_number varchar
|
||||
provider_id integer
|
||||
visit_occurrence_id integer
|
||||
visit_detail_id integer
|
||||
drug_source_value varchar
|
||||
drug_source_concept_id integer
|
||||
route_source_value varchar
|
||||
dose_unit_source_value varchar
|
||||
}
|
||||
PROCEDURE_OCCURRENCE {
|
||||
procedure_occurrence_id integer
|
||||
person_id integer
|
||||
procedure_concept_id integer
|
||||
procedure_date date
|
||||
procedure_datetime datetime
|
||||
procedure_end_date date
|
||||
procedure_end_datetime datetime
|
||||
procedure_type_concept_id integer
|
||||
modifier_concept_id integer
|
||||
quantity integer
|
||||
provider_id integer
|
||||
visit_occurrence_id integer
|
||||
visit_detail_id integer
|
||||
procedure_source_value varchar
|
||||
procedure_source_concept_id integer
|
||||
modifier_source_value varchar
|
||||
}
|
||||
DEVICE_EXPOSURE {
|
||||
device_exposure_id integer
|
||||
person_id integer
|
||||
device_concept_id integer
|
||||
device_exposure_start_date date
|
||||
device_exposure_start_datetime datetime
|
||||
device_exposure_end_date date
|
||||
device_exposure_end_datetime datetime
|
||||
device_type_concept_id integer
|
||||
unique_device_id varchar
|
||||
production_id varchar
|
||||
quantity integer
|
||||
provider_id integer
|
||||
visit_occurrence_id integer
|
||||
visit_detail_id integer
|
||||
device_source_value varchar
|
||||
device_source_concept_id integer
|
||||
unit_concept_id integer
|
||||
unit_source_value varchar
|
||||
unit_source_concept_id integer
|
||||
}
|
||||
MEASUREMENT {
|
||||
measurement_id integer
|
||||
person_id integer
|
||||
measurement_concept_id integer
|
||||
measurement_date date
|
||||
measurement_datetime datetime
|
||||
measurement_time varchar
|
||||
measurement_type_concept_id integer
|
||||
operator_concept_id integer
|
||||
value_as_number float
|
||||
value_as_concept_id integer
|
||||
unit_concept_id integer
|
||||
range_low float
|
||||
range_high float
|
||||
provider_id integer
|
||||
visit_occurrence_id integer
|
||||
visit_detail_id integer
|
||||
measurement_source_value varchar
|
||||
measurement_source_concept_id integer
|
||||
unit_source_value varchar
|
||||
unit_source_concept_id integer
|
||||
value_source_value varchar
|
||||
measurement_event_id integer
|
||||
meas_event_field_concept_id integer
|
||||
}
|
||||
OBSERVATION {
|
||||
observation_id integer
|
||||
person_id integer
|
||||
observation_concept_id integer
|
||||
observation_date date
|
||||
observation_datetime datetime
|
||||
observation_type_concept_id integer
|
||||
value_as_number float
|
||||
value_as_string varchar
|
||||
value_as_concept_id Integer
|
||||
qualifier_concept_id integer
|
||||
unit_concept_id integer
|
||||
provider_id integer
|
||||
visit_occurrence_id integer
|
||||
visit_detail_id integer
|
||||
observation_source_value varchar
|
||||
observation_source_concept_id integer
|
||||
unit_source_value varchar
|
||||
qualifier_source_value varchar
|
||||
value_source_value varchar
|
||||
observation_event_id integer
|
||||
obs_event_field_concept_id integer
|
||||
}
|
||||
DEATH {
|
||||
person_id integer
|
||||
death_date date
|
||||
death_datetime datetime
|
||||
death_type_concept_id integer
|
||||
cause_concept_id integer
|
||||
cause_source_value varchar
|
||||
cause_source_concept_id integer
|
||||
}
|
||||
NOTE {
|
||||
note_id integer
|
||||
person_id integer
|
||||
note_date date
|
||||
note_datetime datetime
|
||||
note_type_concept_id integer
|
||||
note_class_concept_id integer
|
||||
note_title varchar
|
||||
note_text varchar
|
||||
encoding_concept_id integer
|
||||
language_concept_id integer
|
||||
provider_id integer
|
||||
visit_occurrence_id integer
|
||||
visit_detail_id integer
|
||||
note_source_value varchar
|
||||
note_event_id integer
|
||||
note_event_field_concept_id integer
|
||||
}
|
||||
NOTE_NLP {
|
||||
note_nlp_id integer
|
||||
note_id integer
|
||||
section_concept_id integer
|
||||
snippet varchar
|
||||
offset varchar
|
||||
lexical_variant varchar
|
||||
note_nlp_concept_id integer
|
||||
note_nlp_source_concept_id integer
|
||||
nlp_system varchar
|
||||
nlp_date date
|
||||
nlp_datetime datetime
|
||||
term_exists varchar
|
||||
term_temporal varchar
|
||||
term_modifiers varchar
|
||||
}
|
||||
SPECIMEN {
|
||||
specimen_id integer
|
||||
person_id integer
|
||||
specimen_concept_id integer
|
||||
specimen_type_concept_id integer
|
||||
specimen_date date
|
||||
specimen_datetime datetime
|
||||
quantity float
|
||||
unit_concept_id integer
|
||||
anatomic_site_concept_id integer
|
||||
disease_status_concept_id integer
|
||||
specimen_source_id varchar
|
||||
specimen_source_value varchar
|
||||
unit_source_value varchar
|
||||
anatomic_site_source_value varchar
|
||||
disease_status_source_value varchar
|
||||
}
|
||||
FACT_RELATIONSHIP {
|
||||
domain_concept_id_1 integer
|
||||
fact_id_1 integer
|
||||
domain_concept_id_2 integer
|
||||
fact_id_2 integer
|
||||
relationship_concept_id integer
|
||||
}
|
||||
LOCATION {
|
||||
location_id integer
|
||||
address_1 varchar
|
||||
address_2 varchar
|
||||
city varchar
|
||||
state varchar
|
||||
zip varchar
|
||||
county varchar
|
||||
location_source_value varchar
|
||||
country_concept_id integer
|
||||
country_source_value varchar
|
||||
latitude float
|
||||
longitude float
|
||||
}
|
||||
CARE_SITE {
|
||||
care_site_id integer
|
||||
care_site_name varchar
|
||||
place_of_service_concept_id integer
|
||||
location_id integer
|
||||
care_site_source_value varchar
|
||||
place_of_service_source_value varchar
|
||||
}
|
||||
PROVIDER {
|
||||
provider_id integer
|
||||
provider_name varchar
|
||||
npi varchar
|
||||
dea varchar
|
||||
specialty_concept_id integer
|
||||
care_site_id integer
|
||||
year_of_birth integer
|
||||
gender_concept_id integer
|
||||
provider_source_value varchar
|
||||
specialty_source_value varchar
|
||||
specialty_source_concept_id integer
|
||||
gender_source_value varchar
|
||||
gender_source_concept_id integer
|
||||
}
|
||||
PAYER_PLAN_PERIOD {
|
||||
payer_plan_period_id integer
|
||||
person_id integer
|
||||
payer_plan_period_start_date date
|
||||
payer_plan_period_end_date date
|
||||
payer_concept_id integer
|
||||
payer_source_value varchar
|
||||
payer_source_concept_id integer
|
||||
plan_concept_id integer
|
||||
plan_source_value varchar
|
||||
plan_source_concept_id integer
|
||||
sponsor_concept_id integer
|
||||
sponsor_source_value varchar
|
||||
sponsor_source_concept_id integer
|
||||
family_source_value varchar
|
||||
stop_reason_concept_id integer
|
||||
stop_reason_source_value varchar
|
||||
stop_reason_source_concept_id integer
|
||||
}
|
||||
COST {
|
||||
cost_id integer
|
||||
cost_event_id integer
|
||||
cost_domain_id varchar
|
||||
cost_type_concept_id integer
|
||||
currency_concept_id integer
|
||||
total_charge float
|
||||
total_cost float
|
||||
total_paid float
|
||||
paid_by_payer float
|
||||
paid_by_patient float
|
||||
paid_patient_copay float
|
||||
paid_patient_coinsurance float
|
||||
paid_patient_deductible float
|
||||
paid_by_primary float
|
||||
paid_ingredient_cost float
|
||||
paid_dispensing_fee float
|
||||
payer_plan_period_id integer
|
||||
amount_allowed float
|
||||
revenue_code_concept_id integer
|
||||
revenue_code_source_value varchar
|
||||
drg_concept_id integer
|
||||
drg_source_value varchar
|
||||
}
|
||||
DRUG_ERA {
|
||||
drug_era_id integer
|
||||
person_id integer
|
||||
drug_concept_id integer
|
||||
drug_era_start_date date
|
||||
drug_era_end_date date
|
||||
drug_exposure_count integer
|
||||
gap_days integer
|
||||
}
|
||||
DOSE_ERA {
|
||||
dose_era_id integer
|
||||
person_id integer
|
||||
drug_concept_id integer
|
||||
unit_concept_id integer
|
||||
dose_value float
|
||||
dose_era_start_date date
|
||||
dose_era_end_date date
|
||||
}
|
||||
CONDITION_ERA {
|
||||
condition_era_id integer
|
||||
person_id integer
|
||||
condition_concept_id integer
|
||||
condition_era_start_date date
|
||||
condition_era_end_date date
|
||||
condition_occurrence_count integer
|
||||
}
|
||||
EPISODE {
|
||||
episode_id integer
|
||||
person_id integer
|
||||
episode_concept_id integer
|
||||
episode_start_date date
|
||||
episode_start_datetime datetime
|
||||
episode_end_date date
|
||||
episode_end_datetime datetime
|
||||
episode_parent_id integer
|
||||
episode_number integer
|
||||
episode_object_concept_id integer
|
||||
episode_type_concept_id integer
|
||||
episode_source_value varchar
|
||||
episode_source_concept_id integer
|
||||
}
|
||||
EPISODE_EVENT {
|
||||
episode_id integer
|
||||
event_id integer
|
||||
episode_event_field_concept_id integer
|
||||
}
|
||||
METADATA {
|
||||
metadata_id integer
|
||||
metadata_concept_id integer
|
||||
metadata_type_concept_id integer
|
||||
name varchar
|
||||
value_as_string varchar
|
||||
value_as_concept_id integer
|
||||
value_as_number float
|
||||
metadata_date date
|
||||
metadata_datetime datetime
|
||||
}
|
||||
CDM_SOURCE {
|
||||
cdm_source_name varchar
|
||||
cdm_source_abbreviation varchar
|
||||
cdm_holder varchar
|
||||
source_description varchar
|
||||
source_documentation_reference varchar
|
||||
cdm_etl_reference varchar
|
||||
source_release_date date
|
||||
cdm_release_date date
|
||||
cdm_version varchar
|
||||
cdm_version_concept_id integer
|
||||
vocabulary_version varchar
|
||||
}
|
||||
CONCEPT {
|
||||
concept_id integer
|
||||
concept_name varchar
|
||||
domain_id varchar
|
||||
vocabulary_id varchar
|
||||
concept_class_id varchar
|
||||
standard_concept varchar
|
||||
concept_code varchar
|
||||
valid_start_date date
|
||||
valid_end_date date
|
||||
invalid_reason varchar
|
||||
}
|
||||
VOCABULARY {
|
||||
vocabulary_id varchar
|
||||
vocabulary_name varchar
|
||||
vocabulary_reference varchar
|
||||
vocabulary_version varchar
|
||||
vocabulary_concept_id integer
|
||||
}
|
||||
DOMAIN {
|
||||
domain_id varchar
|
||||
domain_name varchar
|
||||
domain_concept_id integer
|
||||
}
|
||||
CONCEPT_CLASS {
|
||||
concept_class_id varchar
|
||||
concept_class_name varchar
|
||||
concept_class_concept_id integer
|
||||
}
|
||||
CONCEPT_RELATIONSHIP {
|
||||
concept_id_1 integer
|
||||
concept_id_2 integer
|
||||
relationship_id varchar
|
||||
valid_start_date date
|
||||
valid_end_date date
|
||||
invalid_reason varchar
|
||||
}
|
||||
RELATIONSHIP {
|
||||
relationship_id varchar
|
||||
relationship_name varchar
|
||||
is_hierarchical varchar
|
||||
defines_ancestry varchar
|
||||
reverse_relationship_id varchar
|
||||
relationship_concept_id integer
|
||||
}
|
||||
CONCEPT_SYNONYM {
|
||||
concept_id integer
|
||||
concept_synonym_name varchar
|
||||
language_concept_id integer
|
||||
}
|
||||
CONCEPT_ANCESTOR {
|
||||
ancestor_concept_id integer
|
||||
descendant_concept_id integer
|
||||
min_levels_of_separation integer
|
||||
max_levels_of_separation integer
|
||||
}
|
||||
SOURCE_TO_CONCEPT_MAP {
|
||||
source_code varchar
|
||||
source_concept_id integer
|
||||
source_vocabulary_id varchar
|
||||
source_code_description varchar
|
||||
target_concept_id integer
|
||||
target_vocabulary_id varchar
|
||||
valid_start_date date
|
||||
valid_end_date date
|
||||
invalid_reason varchar
|
||||
}
|
||||
DRUG_STRENGTH {
|
||||
drug_concept_id integer
|
||||
ingredient_concept_id integer
|
||||
amount_value float
|
||||
amount_unit_concept_id integer
|
||||
numerator_value float
|
||||
numerator_unit_concept_id integer
|
||||
denominator_value float
|
||||
denominator_unit_concept_id integer
|
||||
box_size integer
|
||||
valid_start_date date
|
||||
valid_end_date date
|
||||
invalid_reason varchar
|
||||
}
|
||||
COHORT {
|
||||
cohort_definition_id integer
|
||||
subject_id integer
|
||||
cohort_start_date date
|
||||
cohort_end_date date
|
||||
}
|
||||
COHORT_DEFINITION {
|
||||
cohort_definition_id integer
|
||||
cohort_definition_name varchar
|
||||
cohort_definition_description varchar
|
||||
definition_type_concept_id integer
|
||||
cohort_definition_syntax varchar
|
||||
subject_concept_id integer
|
||||
cohort_initiation_date date
|
||||
}
|
||||
PERSON ||--o{ CONCEPT : ""
|
||||
PERSON ||--o{ LOCATION : ""
|
||||
PERSON ||--o{ PROVIDER : ""
|
||||
PERSON ||--o{ CARE_SITE : ""
|
||||
OBSERVATION_PERIOD ||--o{ PERSON : ""
|
||||
OBSERVATION_PERIOD ||--o{ CONCEPT : ""
|
||||
VISIT_OCCURRENCE ||--o{ PERSON : ""
|
||||
VISIT_OCCURRENCE ||--o{ CONCEPT : ""
|
||||
VISIT_OCCURRENCE ||--o{ PROVIDER : ""
|
||||
VISIT_OCCURRENCE ||--o{ CARE_SITE : ""
|
||||
VISIT_OCCURRENCE ||--o{ VISIT_OCCURRENCE : ""
|
||||
VISIT_DETAIL ||--o{ PERSON : ""
|
||||
VISIT_DETAIL ||--o{ CONCEPT : ""
|
||||
VISIT_DETAIL ||--o{ PROVIDER : ""
|
||||
VISIT_DETAIL ||--o{ CARE_SITE : ""
|
||||
VISIT_DETAIL ||--o{ VISIT_DETAIL : ""
|
||||
VISIT_DETAIL ||--o{ VISIT_OCCURRENCE : ""
|
||||
CONDITION_OCCURRENCE ||--o{ PERSON : ""
|
||||
CONDITION_OCCURRENCE ||--o{ CONCEPT : ""
|
||||
CONDITION_OCCURRENCE ||--o{ PROVIDER : ""
|
||||
CONDITION_OCCURRENCE ||--o{ VISIT_OCCURRENCE : ""
|
||||
CONDITION_OCCURRENCE ||--o{ VISIT_DETAIL : ""
|
||||
DRUG_EXPOSURE ||--o{ PERSON : ""
|
||||
DRUG_EXPOSURE ||--o{ CONCEPT : ""
|
||||
DRUG_EXPOSURE ||--o{ PROVIDER : ""
|
||||
DRUG_EXPOSURE ||--o{ VISIT_OCCURRENCE : ""
|
||||
DRUG_EXPOSURE ||--o{ VISIT_DETAIL : ""
|
||||
PROCEDURE_OCCURRENCE ||--o{ PERSON : ""
|
||||
PROCEDURE_OCCURRENCE ||--o{ CONCEPT : ""
|
||||
PROCEDURE_OCCURRENCE ||--o{ PROVIDER : ""
|
||||
PROCEDURE_OCCURRENCE ||--o{ VISIT_OCCURRENCE : ""
|
||||
PROCEDURE_OCCURRENCE ||--o{ VISIT_DETAIL : ""
|
||||
DEVICE_EXPOSURE ||--o{ PERSON : ""
|
||||
DEVICE_EXPOSURE ||--o{ CONCEPT : ""
|
||||
DEVICE_EXPOSURE ||--o{ PROVIDER : ""
|
||||
DEVICE_EXPOSURE ||--o{ VISIT_OCCURRENCE : ""
|
||||
DEVICE_EXPOSURE ||--o{ VISIT_DETAIL : ""
|
||||
MEASUREMENT ||--o{ PERSON : ""
|
||||
MEASUREMENT ||--o{ CONCEPT : ""
|
||||
MEASUREMENT ||--o{ PROVIDER : ""
|
||||
MEASUREMENT ||--o{ VISIT_OCCURRENCE : ""
|
||||
MEASUREMENT ||--o{ VISIT_DETAIL : ""
|
||||
OBSERVATION ||--o{ PERSON : ""
|
||||
OBSERVATION ||--o{ CONCEPT : ""
|
||||
OBSERVATION ||--o{ PROVIDER : ""
|
||||
OBSERVATION ||--o{ VISIT_OCCURRENCE : ""
|
||||
OBSERVATION ||--o{ VISIT_DETAIL : ""
|
||||
DEATH ||--o{ PERSON : ""
|
||||
DEATH ||--o{ CONCEPT : ""
|
||||
NOTE ||--o{ PERSON : ""
|
||||
NOTE ||--o{ CONCEPT : ""
|
||||
NOTE ||--o{ PROVIDER : ""
|
||||
NOTE ||--o{ VISIT_OCCURRENCE : ""
|
||||
NOTE ||--o{ VISIT_DETAIL : ""
|
||||
NOTE_NLP ||--o{ CONCEPT : ""
|
||||
SPECIMEN ||--o{ PERSON : ""
|
||||
SPECIMEN ||--o{ CONCEPT : ""
|
||||
FACT_RELATIONSHIP ||--o{ CONCEPT : ""
|
||||
LOCATION ||--o{ CONCEPT : ""
|
||||
CARE_SITE ||--o{ CONCEPT : ""
|
||||
CARE_SITE ||--o{ LOCATION : ""
|
||||
PROVIDER ||--o{ CONCEPT : ""
|
||||
PROVIDER ||--o{ CARE_SITE : ""
|
||||
PAYER_PLAN_PERIOD ||--o{ PERSON : ""
|
||||
PAYER_PLAN_PERIOD ||--o{ CONCEPT : ""
|
||||
COST ||--o{ DOMAIN : ""
|
||||
COST ||--o{ CONCEPT : ""
|
||||
DRUG_ERA ||--o{ PERSON : ""
|
||||
DRUG_ERA ||--o{ CONCEPT : ""
|
||||
DOSE_ERA ||--o{ PERSON : ""
|
||||
DOSE_ERA ||--o{ CONCEPT : ""
|
||||
CONDITION_ERA ||--o{ PERSON : ""
|
||||
CONDITION_ERA ||--o{ CONCEPT : ""
|
||||
EPISODE ||--o{ PERSON : ""
|
||||
EPISODE ||--o{ CONCEPT : ""
|
||||
EPISODE_EVENT ||--o{ EPISODE : ""
|
||||
EPISODE_EVENT ||--o{ CONCEPT : ""
|
||||
METADATA ||--o{ CONCEPT : ""
|
||||
CDM_SOURCE ||--o{ CONCEPT : ""
|
||||
CONCEPT ||--o{ DOMAIN : ""
|
||||
CONCEPT ||--o{ VOCABULARY : ""
|
||||
CONCEPT ||--o{ CONCEPT_CLASS : ""
|
||||
VOCABULARY ||--o{ CONCEPT : ""
|
||||
DOMAIN ||--o{ CONCEPT : ""
|
||||
CONCEPT_CLASS ||--o{ CONCEPT : ""
|
||||
CONCEPT_RELATIONSHIP ||--o{ CONCEPT : ""
|
||||
CONCEPT_RELATIONSHIP ||--o{ RELATIONSHIP : ""
|
||||
RELATIONSHIP ||--o{ CONCEPT : ""
|
||||
CONCEPT_SYNONYM ||--o{ CONCEPT : ""
|
||||
CONCEPT_ANCESTOR ||--o{ CONCEPT : ""
|
||||
SOURCE_TO_CONCEPT_MAP ||--o{ CONCEPT : ""
|
||||
SOURCE_TO_CONCEPT_MAP ||--o{ VOCABULARY : ""
|
||||
DRUG_STRENGTH ||--o{ CONCEPT : ""
|
||||
COHORT_DEFINITION ||--o{ CONCEPT : ""
|
|
@ -1087,7 +1087,7 @@ $(document).ready(function () {
|
|||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="left">5</td>
|
||||
<td align="left">Concept Relationships define direct relationships between Concepts. Indirect relationships through 3rd Concepts are not captured in this table. However, the <a href="https://github.com/OHDSI/CommonDataModel/wiki/CONCEPT_ANCESTOR">CONCEPT_ANCESTOR</a> table does this for hierachical relationships over several “generations” of direct relationships.</td>
|
||||
<td align="left">Concept Relationships define direct relationships between Concepts. Indirect relationships through 3rd Concepts are not captured in this table. However, the <a href="https://github.com/OHDSI/CommonDataModel/wiki/CONCEPT_ANCESTOR">CONCEPT_ANCESTOR</a> table does this for hierarchical relationships over several “generations” of direct relationships.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -5203,7 +5203,7 @@ Person, 2, Person, 1, child of
|
|||
<td align="left">payer_concept_id</td>
|
||||
<td align="left">Yes</td>
|
||||
<td align="left">integer</td>
|
||||
<td align="left">A foreign key that refers to a standard Payer concept identifier in the Standarized Vocabularies</td>
|
||||
<td align="left">A foreign key that refers to a standard Payer concept identifier in the Standardized Vocabularies</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="left">payer_source_value</td>
|
||||
|
|
|
@ -1000,7 +1000,7 @@ $(document).ready(function () {
|
|||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="left">5</td>
|
||||
<td align="left">Concept Relationships define direct relationships between Concepts. Indirect relationships through 3rd Concepts are not captured in this table. However, the <a href="https://github.com/OHDSI/CommonDataModel/wiki/CONCEPT_ANCESTOR">CONCEPT_ANCESTOR</a> table does this for hierachical relationships over several “generations” of direct relationships.</td>
|
||||
<td align="left">Concept Relationships define direct relationships between Concepts. Indirect relationships through 3rd Concepts are not captured in this table. However, the <a href="https://github.com/OHDSI/CommonDataModel/wiki/CONCEPT_ANCESTOR">CONCEPT_ANCESTOR</a> table does this for hierarchical relationships over several “generations” of direct relationships.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -1018,7 +1018,7 @@ NA
|
|||
observation_period_start_date
|
||||
</td>
|
||||
<td style="text-align:left;">
|
||||
Use this date to determine the start date of the period for which we can assume that all events for a Person are recorded and any absense of records indicates an absence of events.
|
||||
Use this date to determine the start date of the period for which we can assume that all events for a Person are recorded and any absence of records indicates an absence of events.
|
||||
</td>
|
||||
<td style="text-align:left;">
|
||||
It is often the case that the idea of observation periods does not exist in source data. In those cases the observation_period_start_date can be inferred as the earliest event date available for the Person. In US claims, the observation period can be considered as the time period the person is enrolled with an insurer. If a Person switches plans but stays with the same insurer, that change would be captured in payer_plan_period.
|
||||
|
@ -1050,7 +1050,7 @@ NA
|
|||
observation_period_end_date
|
||||
</td>
|
||||
<td style="text-align:left;">
|
||||
Use this date to determine the end date of the period for which we can assume that all events for a Person are recorded and any absense of records indicates an absence of events.
|
||||
Use this date to determine the end date of the period for which we can assume that all events for a Person are recorded and any absence of records indicates an absence of events.
|
||||
</td>
|
||||
<td style="text-align:left;">
|
||||
It is often the case that the idea of observation periods does not exist in source data. In those cases the observation_period_start_end_date can be inferred as the latest event date available for the Person. The event dates include insurance enrollment dates.
|
||||
|
@ -1667,7 +1667,7 @@ NA
|
|||
preceding_visit_occurrence_id
|
||||
</td>
|
||||
<td style="text-align:left;">
|
||||
Use this field to find the visit that occured for the person prior to the given visit. There could be a few days or a few years in between.
|
||||
Use this field to find the visit that occurred for the person prior to the given visit. There could be a few days or a few years in between.
|
||||
</td>
|
||||
<td style="text-align:left;">
|
||||
The preceding_visit_id can be used to link a visit immediately preceding the current visit. Note this is not symmetrical, and there is no such thing as a “following_visit_id”.
|
||||
|
@ -10200,7 +10200,7 @@ NA
|
|||
<p>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:</p>
|
||||
<p>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.</p>
|
||||
<p>For Procedure Drugs, usually the drug is administered on a single date (i.e., the administration date).</p>
|
||||
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. (ARENT WE REQUIRING TO USE DRUG_EXPOSURE_END_DATE NOW????)
|
||||
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. (AREN'T WE REQUIRING TO USE DRUG_EXPOSURE_END_DATE NOW????)
|
||||
</td>
|
||||
<td style="text-align:left;">
|
||||
datetime
|
||||
|
@ -20702,7 +20702,7 @@ NA
|
|||
payer_concept_id
|
||||
</td>
|
||||
<td style="text-align:left;">
|
||||
A foreign key that refers to a standard Payer concept identifier in the Standarized Vocabularies
|
||||
A foreign key that refers to a standard Payer concept identifier in the Standardized Vocabularies
|
||||
</td>
|
||||
<td style="text-align:left;">
|
||||
NA
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
# For a given cdmVersion, create all ddl sql files for every sql dialect
|
||||
# Results are written to inst/ddl/cdm_version/dialect.
|
||||
cdmVersion <- "5.4"
|
||||
cdmVersion <- "5.3"
|
||||
|
||||
supportedVersions <- CommonDataModel::listSupportedVersions()
|
||||
|
||||
for (cdmVersion in supportedVersions) {
|
||||
for (targetDialect in c("oracle", "postgresql", "pdw", "redshift", "impala", "netezza", "bigquery", "sql server", "spark", "snowflake", "synapse")) {
|
||||
for (targetDialect in CommonDataModel::listSupportedDialects()) {
|
||||
CommonDataModel::writeDdl(targetDialect = targetDialect,
|
||||
cdmVersion = cdmVersion)
|
||||
|
||||
|
|
|
@ -0,0 +1,63 @@
|
|||
|
||||
cdmVersion <- '5.4'
|
||||
cdmPart <- c('CDM','VOCAB', 'RESULTS')
|
||||
cdmTables <- NULL #c('PERSON', 'OBSERVATION_PERIOD', 'VISIT_OCCURRENCE', 'CONDITION_OCCURRENCE', 'CONCEPT')
|
||||
|
||||
cdmTableCsvLoc <- system.file(file.path("csv", paste0("OMOP_CDMv", cdmVersion, "_Table_Level.csv")), package = "CommonDataModel", mustWork = TRUE)
|
||||
cdmFieldCsvLoc <- system.file(file.path("csv", paste0("OMOP_CDMv", cdmVersion, "_Field_Level.csv")), package = "CommonDataModel", mustWork = TRUE)
|
||||
|
||||
tableSpecs <- read.csv(cdmTableCsvLoc, stringsAsFactors = FALSE)
|
||||
cdmSpecs <- read.csv(cdmFieldCsvLoc, stringsAsFactors = FALSE)
|
||||
|
||||
mermaidDdlLines <- c()
|
||||
mermaidFkLines <- c()
|
||||
for (i in 1:nrow(tableSpecs)) {
|
||||
table <- tableSpecs[i,]
|
||||
tableName <- table$cdmTableName
|
||||
if (!(table$schema %in% cdmPart)) {
|
||||
next
|
||||
}
|
||||
if (!is.null(cdmTables) && !(table$cdmTableName %in% cdmTables)) {
|
||||
next
|
||||
}
|
||||
mermaidDdlLines <- c(mermaidDdlLines,
|
||||
sprintf(' %s {', tableName))
|
||||
|
||||
fields <- subset(cdmSpecs, cdmTableName == tableName)
|
||||
for (j in 1:nrow(fields)) {
|
||||
field <- fields[j,]
|
||||
cdmFieldName <- field$cdmFieldName
|
||||
cdmDataType <- field$cdmDatatype
|
||||
if (startsWith(cdmDataType, 'varchar')) {
|
||||
cdmDataType <- 'varchar'
|
||||
}
|
||||
if (cdmFieldName == '"offset"') {
|
||||
cdmFieldName <- 'offset'
|
||||
}
|
||||
mermaidDdlLines <- c(mermaidDdlLines,
|
||||
sprintf(' %s %s', cdmFieldName, cdmDataType))
|
||||
|
||||
if (field$isForeignKey == 'Yes') {
|
||||
fkTable <- subset(tableSpecs, cdmTableName == field$fkTableName)
|
||||
if (!(fkTable$schema %in% cdmPart)) {
|
||||
next
|
||||
}
|
||||
if (!is.null(cdmTables) && !(fkTable$cdmTableName %in% cdmTables)) {
|
||||
next
|
||||
}
|
||||
|
||||
fkRelation <- sprintf(' %s ||--o{ %s : ""', tableName, field$fkTableName)
|
||||
if (fkRelation %in% mermaidFkLines) {
|
||||
next
|
||||
}
|
||||
mermaidFkLines <- c(mermaidFkLines,
|
||||
fkRelation)
|
||||
}
|
||||
}
|
||||
mermaidDdlLines <- c(mermaidDdlLines, ' }')
|
||||
}
|
||||
|
||||
mermaidString <- paste(c('erDiagram', mermaidDdlLines, mermaidFkLines), collapse = '\n')
|
||||
fileName <- sprintf('OMOP_CDMv%s_ER_Diagram.mmd', cdmVersion)
|
||||
write(mermaidString, file.path('extras', fileName))
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
|
||||
README
|
||||
------
|
||||
|
||||
v5.3 to v5.4 CDM conversion
|
||||
|
||||
NOTES
|
||||
-----
|
||||
|
||||
The *_v53_to_v54_migration.sql scripts are SQL scripts that migrate a v5.3 CDM to a v5.4 CDM.
|
||||
The changes implemented are found here: http://ohdsi.github.io/CommonDataModel/cdm54Changes.html.
|
||||
Please replace @cdmDatabaseSchema with your schema name.
|
||||
Links to database documentation are included in each script to facilitate debugging.
|
|
@ -0,0 +1,188 @@
|
|||
-- http://ohdsi.github.io/CommonDataModel/cdm54Changes.html
|
||||
-- BigQuery SQL references:
|
||||
-- https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#creating_a_new_table_from_an_existing_table
|
||||
-- https://cloud.google.com/bigquery/docs/manually-changing-schemas
|
||||
-- https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#alter_column_set_data_type_statement
|
||||
-- https://cloud.google.com/bigquery/docs/managing-tables#renaming-table
|
||||
--
|
||||
|
||||
-- VISIT_OCCURRENCE
|
||||
-- admitting_source_concept_id -> admitted_from_concept_id
|
||||
-- admitting_source_value -> admitted_from_source_value
|
||||
-- discharge_to_concept_id -> discharged_to_concept_id
|
||||
-- discharge_to_source_value -> discharged_to_source_value
|
||||
|
||||
alter table @cdmDatabaseSchema.visit_occurrence rename to visit_occurrence_old;
|
||||
create table @cdmDatabaseSchema.visit_occurrence
|
||||
as
|
||||
select * EXCEPT(admitting_source_concept_id,admitting_source_value,discharge_to_concept_id,discharge_to_source_value),
|
||||
admitting_source_concept_id as admitted_from_concept_id,
|
||||
admitting_source_value as admitted_from_source_value,
|
||||
discharge_to_concept_id as discharged_to_concept_id,
|
||||
discharge_to_source_value as discharged_to_source_value
|
||||
from visit_occurrence_old;
|
||||
|
||||
--
|
||||
-- VISIT_DETAIL
|
||||
-- admitting_source_concept_id -> admitted_from_concept_id
|
||||
-- admitting_source_value -> admitted_from_source_value
|
||||
-- discharge_to_concept_id -> discharged_to_concept_id
|
||||
-- discharge_to_source_value -> discharged_to_source_value
|
||||
-- visit_detail_parent_id -> parent_visit_detail_id
|
||||
|
||||
alter table @cdmDatabaseSchema.visit_detail rename to visit_detail_old;
|
||||
create table @cdmDatabaseSchema.visit_occurrence
|
||||
as
|
||||
select * EXCEPT(admitting_source_concept_id,admitting_source_value,discharge_to_concept_id,discharge_to_source_value,visit_detail_parent_id),
|
||||
admitting_source_concept_id as admitted_from_concept_id,
|
||||
admitting_source_value as admitted_from_source_value,
|
||||
discharge_to_concept_id as discharged_to_concept_id,
|
||||
discharge_to_source_value as discharged_to_source_value,
|
||||
visit_detail_parent_id as parent_visit_detail_id
|
||||
from visit_detail_old;
|
||||
|
||||
-- PROCEDURE_OCCURRENCE
|
||||
-- + Procedure_end_date
|
||||
-- + Procedure_end_datetime
|
||||
|
||||
alter table @cdmDatabaseSchema.procedure_occurrence add column procedure_end_date date;
|
||||
alter table @cdmDatabaseSchema.procedure_occurrence add column procedure_end_datetime datetime;
|
||||
|
||||
-- DEVICE_EXPOSURE
|
||||
-- Unique_device_id -> Changed to varchar(255) (already a STRING on bigquery)
|
||||
-- + Production_id
|
||||
-- + Unit_concept_id
|
||||
-- + Unit_source_value
|
||||
-- + Unit_source_concept_id
|
||||
|
||||
alter table @cdmDatabaseSchema.device_exposure add column production_id int64;
|
||||
alter table @cdmDatabaseSchema.device_exposure add column unit_concept_id int64;
|
||||
alter table @cdmDatabaseSchema.device_exposure add column unit_source_value string;
|
||||
alter table @cdmDatabaseSchema.device_exposure add column unit_source_concept_id int64;
|
||||
|
||||
-- MEASUREMENT
|
||||
-- + Unit_source_concept_id
|
||||
-- + Measurement_event_id
|
||||
-- + Meas_event_field_concept_id
|
||||
|
||||
alter table @cdmDatabaseSchema.measurement add column unit_source_concept_id int64;
|
||||
alter table @cdmDatabaseSchema.measurement add column measurement_event_id int64;
|
||||
alter table @cdmDatabaseSchema.measurement add column meas_event_field_concept_id int64;
|
||||
|
||||
-- OBSERVATION
|
||||
-- + Value_source_value
|
||||
-- + Observation_event_id
|
||||
-- + Obs_event_field_concept_id
|
||||
|
||||
alter table @cdmDatabaseSchema.observation add column value_source_value string;
|
||||
alter table @cdmDatabaseSchema.observation add column observation_event_id int64;
|
||||
alter table @cdmDatabaseSchema.observation add column obs_event_field_concept_id int64;
|
||||
|
||||
-- NOTE
|
||||
-- + Note_event_id
|
||||
-- + Note_event_field_concept_id
|
||||
|
||||
alter table @cdmDatabaseSchema.note add column note_event_id int64;
|
||||
alter table @cdmDatabaseSchema.note add column note_event_field_concept_id int64;
|
||||
|
||||
-- LOCATION
|
||||
-- + Country_concept_id
|
||||
-- + Country_source_value
|
||||
-- + Latitude
|
||||
-- + Longitude
|
||||
|
||||
alter table @cdmDatabaseSchema.location add column country_concept_id int64;
|
||||
alter table @cdmDatabaseSchema.location add column country_source_value string;
|
||||
alter table @cdmDatabaseSchema.location add column latitude float64;
|
||||
alter table @cdmDatabaseSchema.location add column longitude float64;
|
||||
|
||||
-- EPISODE
|
||||
create table @cdmDatabaseSchema.episode (
|
||||
episode_id INT64 not null,
|
||||
person_id INT64 not null,
|
||||
episode_concept_id INT64 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 INT64,
|
||||
episode_number INT64,
|
||||
episode_object_concept_id INT64 not null,
|
||||
episode_type_concept_id INT64 not null,
|
||||
episode_source_value STRING,
|
||||
episode_source_concept_id INT64 );
|
||||
|
||||
-- EPISODE_EVENT
|
||||
CREATE TABLE @cdmDatabaseSchema.EPISODE_EVENT (
|
||||
episode_id int64 NOT NULL,
|
||||
event_id int64 NOT NULL,
|
||||
episode_event_field_concept_id int64 NOT NULL );
|
||||
|
||||
|
||||
-- METADATA
|
||||
-- + Metadata_id
|
||||
-- + Value_as_number
|
||||
|
||||
alter table @cdmDatabaseSchema.metadata add column metadata_id int64;
|
||||
alter table @cdmDatabaseSchema.metadata add column value_as_number float64;
|
||||
|
||||
-- CDM_SOURCE
|
||||
-- Cdm_source_name -> Mandatory field
|
||||
-- Cdm_source_abbreviation -> Mandatory field
|
||||
-- Cdm_holder -> Mandatory field
|
||||
-- Source_release_date -> Mandatory field
|
||||
-- Cdm_release_date -> Mandatory field
|
||||
-- + Cdm_version_concept_id
|
||||
|
||||
alter table @cdmDatabaseSchema.cdm_source rename to cdm_source_v53;
|
||||
|
||||
CREATE TABLE @cdmDatabaseSchema.cdm_source (
|
||||
cdm_source_name string NOT NULL,
|
||||
cdm_source_abbreviation string NOT NULL,
|
||||
cdm_holder string NOT NULL,
|
||||
source_description string NULL,
|
||||
source_documentation_reference string NULL,
|
||||
cdm_etl_reference string NULL,
|
||||
source_release_date datetime NOT NULL,
|
||||
cdm_release_date datetime NOT NULL,
|
||||
cdm_version string NULL,
|
||||
cdm_version_concept_id int64 NOT NULL,
|
||||
vocabulary_version string NOT NULL );
|
||||
|
||||
insert into @cdmDatabaseSchema.cdm_source
|
||||
select cdm_source_name,cdm_source_abbreviation,cdm_holder,
|
||||
source_description,source_documentation_reference,cdm_etl_reference,
|
||||
source_release_date,cdm_release_date,'5.4',
|
||||
756265,vocabulary_version
|
||||
from @cdmDatabaseSchema.cdm_source_v53;
|
||||
|
||||
|
||||
-- VOCABULARY
|
||||
-- Vocabulary_reference -> Non-mandatory field
|
||||
-- Vocabulary_version -> Non-mandatory field
|
||||
alter table @cdmDatabaseSchema.vocabulary rename to vocabulary_v53;
|
||||
|
||||
CREATE TABLE @cdmDatabaseSchema.vocabulary (
|
||||
vocabulary_id string NOT NULL,
|
||||
vocabulary_name string NOT NULL,
|
||||
vocabulary_reference string NULL,
|
||||
vocabulary_version string NULL,
|
||||
vocabulary_concept_id int64 NOT NULL );
|
||||
|
||||
insert into @cdmDatabaseSchema.vocabulary
|
||||
select vocabulary_id,vocabulary_name,vocabulary_reference,
|
||||
vocabulary_version, vocabulary_concept_id
|
||||
from @cdmDatabaseSchema.vocabulary_v53;
|
||||
|
||||
|
||||
-- ATTRIBUTE_DEFINITION
|
||||
drop table @cdmDatabaseSchema.attribute_definition;
|
||||
|
||||
-- COHORT
|
||||
CREATE TABLE @cdmDatabaseSchema.cohort (
|
||||
cohort_definition_id int64 NOT NULL,
|
||||
subject_id int64 NOT NULL,
|
||||
cohort_start_date datetime NOT NULL,
|
||||
cohort_end_date datetime NOT NULL );
|
||||
|
||||
|
|
@ -0,0 +1,176 @@
|
|||
-- http://ohdsi.github.io/CommonDataModel/cdm54Changes.html
|
||||
-- Impala SQL references:
|
||||
-- https://docs.cloudera.com/documentation/enterprise/6/6.3/topics/impala_alter_table.html
|
||||
--
|
||||
-- VISIT_OCCURRENCE
|
||||
-- admitting_source_concept_id -> admitted_from_concept_id
|
||||
-- admitting_source_value -> admitted_from_source_value
|
||||
-- discharge_to_concept_id -> discharged_to_concept_id
|
||||
-- discharge_to_source_value -> discharged_to_source_value
|
||||
|
||||
alter table @cdmDatabaseSchema.visit_occurrence change admitting_source_concept_id admitted_from_concept_id int;
|
||||
alter table @cdmDatabaseSchema.visit_occurrence change admitting_source_value admitted_from_source_value int;
|
||||
alter table @cdmDatabaseSchema.visit_occurrence change discharge_to_concept_id discharged_to_concept_id int;
|
||||
alter table @cdmDatabaseSchema.visit_occurrence change discharge_to_source_value discharged_to_source_value int;
|
||||
|
||||
--
|
||||
-- VISIT_DETAIL
|
||||
-- admitting_source_concept_id -> admitted_from_concept_id
|
||||
-- admitting_source_value -> admitted_from_source_value
|
||||
-- discharge_to_concept_id -> discharged_to_concept_id
|
||||
-- discharge_to_source_value -> discharged_to_source_value
|
||||
-- visit_detail_parent_id -> parent_visit_detail_id
|
||||
|
||||
alter table @cdmDatabaseSchema.visit_detail change admitting_source_concept_id admitted_from_concept_id int;
|
||||
alter table @cdmDatabaseSchema.visit_detail change admitting_source_value admitted_from_source_value int;
|
||||
alter table @cdmDatabaseSchema.visit_detail change discharge_to_concept_id discharged_to_concept_id int;
|
||||
alter table @cdmDatabaseSchema.visit_detail change discharge_to_source_value discharged_to_source_value int;
|
||||
alter table @cdmDatabaseSchema.visit_detail change visit_detail_parent_id parent_visit_detail_id int;
|
||||
|
||||
-- PROCEDURE_OCCURRENCE
|
||||
-- + Procedure_end_date
|
||||
-- + Procedure_end_datetime
|
||||
|
||||
alter table @cdmDatabaseSchema.procedure_occurrence add columns (procedure_end_date timestamp);
|
||||
alter table @cdmDatabaseSchema.procedure_occurrence add columns (procedure_end_datetime timestamp);
|
||||
|
||||
-- DEVICE_EXPOSURE
|
||||
-- Unique_device_id -> Changed to varchar(255)
|
||||
-- + Production_id
|
||||
-- + Unit_concept_id
|
||||
-- + Unit_source_value
|
||||
-- + Unit_source_concept_id
|
||||
|
||||
alter table @cdmDatabaseSchema.device_exposure change unique_device_id unique_device_id varchar(300);
|
||||
alter table @cdmDatabaseSchema.device_exposure add columns (production_id int);
|
||||
alter table @cdmDatabaseSchema.device_exposure add columns (unit_concept_id int);
|
||||
alter table @cdmDatabaseSchema.device_exposure add columns (unit_source_value int);
|
||||
alter table @cdmDatabaseSchema.device_exposure add columns (unit_source_concept_id int);
|
||||
|
||||
-- MEASUREMENT
|
||||
-- + Unit_source_concept_id
|
||||
-- + Measurement_event_id
|
||||
-- + Meas_event_field_concept_id
|
||||
|
||||
alter table @cdmDatabaseSchema.measurement add columns (unit_source_concept_id int);
|
||||
alter table @cdmDatabaseSchema.measurement add columns (measurement_event_id int);
|
||||
alter table @cdmDatabaseSchema.measurement add columns (meas_event_field_concept_id int);
|
||||
|
||||
-- OBSERVATION
|
||||
-- + Value_source_value
|
||||
-- + Observation_event_id
|
||||
-- + Obs_event_field_concept_id
|
||||
|
||||
alter table @cdmDatabaseSchema.observation add columns (value_source_value varchar(50));
|
||||
alter table @cdmDatabaseSchema.observation add columns (observation_event_id int);
|
||||
alter table @cdmDatabaseSchema.observation add columns (obs_event_field_concept_id int);
|
||||
|
||||
-- NOTE
|
||||
-- + Note_event_id
|
||||
-- + Note_event_field_concept_id
|
||||
|
||||
alter table @cdmDatabaseSchema.note add columns (note_event_id int);
|
||||
alter table @cdmDatabaseSchema.note add columns (note_event_field_concept_id int);
|
||||
|
||||
-- LOCATION
|
||||
-- + Country_concept_id
|
||||
-- + Country_source_value
|
||||
-- + Latitude
|
||||
-- + Longitude
|
||||
|
||||
alter table @cdmDatabaseSchema.location add columns (country_concept_id int);
|
||||
alter table @cdmDatabaseSchema.location add columns (country_source_value varchar(80));
|
||||
alter table @cdmDatabaseSchema.location add columns (latitude float);
|
||||
alter table @cdmDatabaseSchema.location add columns (longitude float);
|
||||
|
||||
-- EPISODE
|
||||
CREATE TABLE @cdmDatabaseSchema.EPISODE (
|
||||
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 int,
|
||||
episode_number int,
|
||||
episode_object_concept_id int,
|
||||
episode_type_concept_id int,
|
||||
episode_source_value varchar(50),
|
||||
episode_source_concept_id int );
|
||||
|
||||
-- EPISODE_EVENT
|
||||
CREATE TABLE @cdmDatabaseSchema.EPISODE_EVENT (
|
||||
episode_id int,
|
||||
event_id int,
|
||||
episode_event_field_concept_id int );
|
||||
|
||||
|
||||
-- METADATA
|
||||
-- + Metadata_id
|
||||
-- + Value_as_number
|
||||
|
||||
alter table @cdmDatabaseSchema.metadata add columns (metadata_id int);
|
||||
alter table @cdmDatabaseSchema.metadata add columns (value_as_number float);
|
||||
|
||||
-- CDM_SOURCE
|
||||
-- Cdm_source_name -> Mandatory field
|
||||
-- Cdm_source_abbreviation -> Mandatory field
|
||||
-- Cdm_holder -> Mandatory field
|
||||
-- Source_release_date -> Mandatory field
|
||||
-- Cdm_release_date -> Mandatory field
|
||||
-- + Cdm_version_concept_id
|
||||
|
||||
alter table @cdmDatabaseSchema.cdm_source rename to cdm_source_v53;
|
||||
|
||||
CREATE TABLE @cdmDatabaseSchema.cdm_source (
|
||||
cdm_source_name varchar(255),
|
||||
cdm_source_abbreviation varchar(25),
|
||||
cdm_holder varchar(255),
|
||||
source_description varchar(max),
|
||||
source_documentation_reference varchar(255),
|
||||
cdm_etl_reference varchar(255),
|
||||
source_release_date timestamp,
|
||||
cdm_release_date timestamp,
|
||||
cdm_version varchar(10),
|
||||
cdm_version_concept_id int,
|
||||
vocabulary_version varchar(20));
|
||||
|
||||
insert into @cdmDatabaseSchema.cdm_source
|
||||
select cdm_source_name,cdm_source_abbreviation,cdm_holder,
|
||||
source_description,source_documentation_reference,cdm_etl_reference,
|
||||
source_release_date,cdm_release_date,'5.4',
|
||||
756265,vocabulary_version
|
||||
from @cdmDatabaseSchema.cdm_source_v53;
|
||||
|
||||
|
||||
-- VOCABULARY
|
||||
-- Vocabulary_reference -> Non-mandatory field
|
||||
-- Vocabulary_version -> Non-mandatory field
|
||||
|
||||
alter table @cdmDatabaseSchema.vocabulary rename to vocabulary_v53;
|
||||
|
||||
CREATE TABLE @cdmDatabaseSchema.vocabulary (
|
||||
vocabulary_id varchar(20),
|
||||
vocabulary_name varchar(255),
|
||||
vocabulary_reference varchar(255),
|
||||
vocabulary_version varchar(255),
|
||||
vocabulary_concept_id int );
|
||||
|
||||
insert into @cdmDatabaseSchema.vocabulary
|
||||
select vocabulary_id,vocabulary_name,vocabulary_reference,
|
||||
vocabulary_version, vocabulary_concept_id
|
||||
from @cdmDatabaseSchema.vocabulary_v53;
|
||||
|
||||
|
||||
-- ATTRIBUTE_DEFINITION
|
||||
drop table @cdmDatabaseSchema.attribute_definition;
|
||||
|
||||
-- COHORT
|
||||
CREATE TABLE @cdmDatabaseSchema.cohort (
|
||||
cohort_definition_id int,
|
||||
subject_id int,
|
||||
cohort_start_date timestamp,
|
||||
cohort_end_date timestamp );
|
||||
|
||||
|
|
@ -0,0 +1,176 @@
|
|||
-- http://ohdsi.github.io/CommonDataModel/cdm54Changes.html
|
||||
-- Netezza SQL references:
|
||||
-- https://www.ibm.com/docs/en/psfa/7.2.1?topic=reference-alter-table
|
||||
-- https://www.ibm.com/docs/en/psfa/7.2.1?topic=tables-add-drop-column
|
||||
--
|
||||
-- VISIT_OCCURRENCE
|
||||
-- admitting_source_concept_id -> admitted_from_concept_id
|
||||
-- admitting_source_value -> admitted_from_source_value
|
||||
-- discharge_to_concept_id -> discharged_to_concept_id
|
||||
-- discharge_to_source_value -> discharged_to_source_value
|
||||
|
||||
alter table @cdmDatabaseSchema.visit_occurrence rename column admitting_source_concept_id to admitted_from_concept_id;
|
||||
alter table @cdmDatabaseSchema.visit_occurrence rename column admitting_source_value to admitted_from_source_value;
|
||||
alter table @cdmDatabaseSchema.visit_occurrence rename column discharge_to_concept_id to discharged_to_concept_id;
|
||||
alter table @cdmDatabaseSchema.visit_occurrence rename column discharge_to_source_value to discharged_to_source_value;
|
||||
|
||||
--
|
||||
-- VISIT_DETAIL
|
||||
-- admitting_source_concept_id -> admitted_from_concept_id
|
||||
-- admitting_source_value -> admitted_from_source_value
|
||||
-- discharge_to_concept_id -> discharged_to_concept_id
|
||||
-- discharge_to_source_value -> discharged_to_source_value
|
||||
-- visit_detail_parent_id -> parent_visit_detail_id
|
||||
|
||||
alter table @cdmDatabaseSchema.visit_detail rename column admitting_source_concept_id to admitted_from_concept_id;
|
||||
alter table @cdmDatabaseSchema.visit_detail rename column admitting_source_value to admitted_from_source_value;
|
||||
alter table @cdmDatabaseSchema.visit_detail rename column discharge_to_concept_id to discharged_to_concept_id;
|
||||
alter table @cdmDatabaseSchema.visit_detail rename column discharge_to_source_value to discharged_to_source_value;
|
||||
alter table @cdmDatabaseSchema.visit_detail rename column visit_detail_parent_id to parent_visit_detail_id;
|
||||
|
||||
-- PROCEDURE_OCCURRENCE
|
||||
-- + Procedure_end_date
|
||||
-- + Procedure_end_datetime
|
||||
|
||||
alter table @cdmDatabaseSchema.procedure_occurrence add column procedure_end_date timestamp null;
|
||||
alter table @cdmDatabaseSchema.procedure_occurrence add column procedure_end_datetime timestamp null;
|
||||
|
||||
-- DEVICE_EXPOSURE
|
||||
-- Unique_device_id -> Changed to varchar(255)
|
||||
-- + Production_id
|
||||
-- + Unit_concept_id
|
||||
-- + Unit_source_value
|
||||
-- + Unit_source_concept_id
|
||||
|
||||
alter table @cdmDatabaseSchema.device_exposure modify column (unique_device_id varchar(300);
|
||||
alter table @cdmDatabaseSchema.device_exposure add column production_id integer null;
|
||||
alter table @cdmDatabaseSchema.device_exposure add column unit_concept_id integer null;
|
||||
alter table @cdmDatabaseSchema.device_exposure add column unit_source_value varchar(50) null;
|
||||
alter table @cdmDatabaseSchema.device_exposure add column unit_source_concept_id integer null;
|
||||
|
||||
-- MEASUREMENT
|
||||
-- + Unit_source_concept_id
|
||||
-- + Measurement_event_id
|
||||
-- + Meas_event_field_concept_id
|
||||
|
||||
alter table @cdmDatabaseSchema.measurement add column unit_source_concept_id integer default null;
|
||||
alter table @cdmDatabaseSchema.measurement add column measurement_event_id bigint null;
|
||||
alter table @cdmDatabaseSchema.measurement add column meas_event_field_concept_id integer null;
|
||||
|
||||
-- OBSERVATION
|
||||
-- + Value_source_value
|
||||
-- + Observation_event_id
|
||||
-- + Obs_event_field_concept_id
|
||||
|
||||
alter table @cdmDatabaseSchema.observation add column value_source_value varchar(50) null;
|
||||
alter table @cdmDatabaseSchema.observation add column observation_event_id bigint null;
|
||||
alter table @cdmDatabaseSchema.observation add column obs_event_field_concept_id integer null;
|
||||
|
||||
-- NOTE
|
||||
-- + Note_event_id
|
||||
-- + Note_event_field_concept_id
|
||||
|
||||
alter table @cdmDatabaseSchema.note add column note_event_id bigint null;
|
||||
alter table @cdmDatabaseSchema.note add column note_event_field_concept_id integer null;
|
||||
|
||||
-- LOCATION
|
||||
-- + Country_concept_id
|
||||
-- + Country_source_value
|
||||
-- + Latitude
|
||||
-- + Longitude
|
||||
|
||||
alter table @cdmDatabaseSchema.location add column country_concept_id integer null;
|
||||
alter table @cdmDatabaseSchema.location add column country_source_value varchar(80) null;
|
||||
alter table @cdmDatabaseSchema.location add column latitude float null;
|
||||
alter table @cdmDatabaseSchema.location add column longitude float null;
|
||||
|
||||
-- EPISODE
|
||||
CREATE TABLE @cdmDatabaseSchema.EPISODE (
|
||||
episode_id bigint NOT NULL,
|
||||
person_id bigint NOT NULL,
|
||||
episode_concept_id integer NOT NULL,
|
||||
episode_start_date timestamp NOT NULL,
|
||||
episode_start_datetime TIMESTAMP NULL,
|
||||
episode_end_date timestamp NULL,
|
||||
episode_end_datetime TIMESTAMP NULL,
|
||||
episode_parent_id bigint NULL,
|
||||
episode_number integer NULL,
|
||||
episode_object_concept_id integer NOT NULL,
|
||||
episode_type_concept_id integer NOT NULL,
|
||||
episode_source_value varchar(50) NULL,
|
||||
episode_source_concept_id integer NULL );
|
||||
|
||||
-- EPISODE_EVENT
|
||||
CREATE TABLE @cdmDatabaseSchema.EPISODE_EVENT (
|
||||
episode_id bigint NOT NULL,
|
||||
event_id bigint NOT NULL,
|
||||
episode_event_field_concept_id integer NOT NULL );
|
||||
|
||||
|
||||
-- METADATA
|
||||
-- + Metadata_id
|
||||
-- + Value_as_number
|
||||
|
||||
alter table @cdmDatabaseSchema.metadata add column metadata_id integer null;
|
||||
alter table @cdmDatabaseSchema.metadata add column value_as_number float null;
|
||||
|
||||
-- CDM_SOURCE
|
||||
-- Cdm_source_name -> Mandatory field
|
||||
-- Cdm_source_abbreviation -> Mandatory field
|
||||
-- Cdm_holder -> Mandatory field
|
||||
-- Source_release_date -> Mandatory field
|
||||
-- Cdm_release_date -> Mandatory field
|
||||
-- + Cdm_version_concept_id
|
||||
|
||||
alter table @cdmDatabaseSchema.cdm_source rename to cdm_source_v53;
|
||||
|
||||
CREATE TABLE @cdmDatabaseSchema.cdm_source (
|
||||
cdm_source_name varchar(255) NOT NULL,
|
||||
cdm_source_abbreviation varchar(25) NOT NULL,
|
||||
cdm_holder varchar(255) NOT NULL,
|
||||
source_description varchar(1000) NULL,
|
||||
source_documentation_reference varchar(255) NULL,
|
||||
cdm_etl_reference varchar(255) NULL,
|
||||
source_release_date timestamp NOT NULL,
|
||||
cdm_release_date timestamp NOT NULL,
|
||||
cdm_version varchar(10) NULL,
|
||||
cdm_version_concept_id integer NOT NULL,
|
||||
vocabulary_version varchar(20) NOT NULL );
|
||||
|
||||
insert into @cdmDatabaseSchema.cdm_source
|
||||
select cdm_source_name,cdm_source_abbreviation,cdm_holder,
|
||||
source_description,source_documentation_reference,cdm_etl_reference,
|
||||
source_release_date,cdm_release_date,'5.4',
|
||||
756265,vocabulary_version
|
||||
from @cdmDatabaseSchema.cdm_source_v53;
|
||||
|
||||
|
||||
-- VOCABULARY
|
||||
-- Vocabulary_reference -> Non-mandatory field
|
||||
-- Vocabulary_version -> Non-mandatory field
|
||||
alter table @cdmDatabaseSchema.vocabulary rename to vocabulary_v53;
|
||||
|
||||
CREATE TABLE @cdmDatabaseSchema.vocabulary (
|
||||
vocabulary_id varchar(20) NOT NULL,
|
||||
vocabulary_name varchar(255) NOT NULL,
|
||||
vocabulary_reference varchar(255) NULL,
|
||||
vocabulary_version varchar(255) NULL,
|
||||
vocabulary_concept_id integer NOT NULL );
|
||||
|
||||
insert into @cdmDatabaseSchema.vocabulary
|
||||
select vocabulary_id,vocabulary_name,vocabulary_reference,
|
||||
vocabulary_version, vocabulary_concept_id
|
||||
from @cdmDatabaseSchema.vocabulary_v53;
|
||||
|
||||
|
||||
-- ATTRIBUTE_DEFINITION
|
||||
drop table @cdmDatabaseSchema.attribute_definition;
|
||||
|
||||
-- COHORT
|
||||
CREATE TABLE @cdmDatabaseSchema.cohort (
|
||||
cohort_definition_id integer NOT NULL,
|
||||
subject_id integer NOT NULL,
|
||||
cohort_start_date timestamp NOT NULL,
|
||||
cohort_end_date timestamp NOT NULL );
|
||||
|
||||
|
|
@ -0,0 +1,179 @@
|
|||
-- http://ohdsi.github.io/CommonDataModel/cdm54Changes.html
|
||||
-- Oracle SQL references:
|
||||
-- https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/ALTER-TABLE.html#GUID-552E7373-BF93-477D-9DA3-B2C9386F2877
|
||||
-- https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/Data-Types.html#GUID-0DC7FFAA-F03F-4448-8487-F2592496A510
|
||||
-- https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/RENAME.html#GUID-573347CE-3EB8-42E5-B4D5-EF71CA06FAFC
|
||||
--
|
||||
-- VISIT_OCCURRENCE
|
||||
-- admitting_source_concept_id -> admitted_from_concept_id
|
||||
-- admitting_source_value -> admitted_from_source_value
|
||||
-- discharge_to_concept_id -> discharged_to_concept_id
|
||||
-- discharge_to_source_value -> discharged_to_source_value
|
||||
|
||||
alter table @cdmDatabaseSchema.visit_occurrence rename column admitting_source_concept_id to admitted_from_concept_id;
|
||||
alter table @cdmDatabaseSchema.visit_occurrence rename column admitting_source_value to admitted_from_source_value;
|
||||
alter table @cdmDatabaseSchema.visit_occurrence rename column discharge_to_concept_id to discharged_to_concept_id;
|
||||
alter table @cdmDatabaseSchema.visit_occurrence rename column discharge_to_source_value to discharged_to_source_value;
|
||||
|
||||
--
|
||||
-- VISIT_DETAIL
|
||||
-- admitting_source_concept_id -> admitted_from_concept_id
|
||||
-- admitting_source_value -> admitted_from_source_value
|
||||
-- discharge_to_concept_id -> discharged_to_concept_id
|
||||
-- discharge_to_source_value -> discharged_to_source_value
|
||||
-- visit_detail_parent_id -> parent_visit_detail_id
|
||||
|
||||
alter table @cdmDatabaseSchema.visit_detail rename column admitting_source_concept_id to admitted_from_concept_id;
|
||||
alter table @cdmDatabaseSchema.visit_detail rename column admitting_source_value to admitted_from_source_value;
|
||||
alter table @cdmDatabaseSchema.visit_detail rename column discharge_to_concept_id to discharged_to_concept_id;
|
||||
alter table @cdmDatabaseSchema.visit_detail rename column discharge_to_source_value to discharged_to_source_value;
|
||||
alter table @cdmDatabaseSchema.visit_detail rename column visit_detail_parent_id to parent_visit_detail_id;
|
||||
|
||||
-- PROCEDURE_OCCURRENCE
|
||||
-- + Procedure_end_date
|
||||
-- + Procedure_end_datetime
|
||||
|
||||
alter table @cdmDatabaseSchema.procedure_occurrence add (procedure_end_date date default null);
|
||||
alter table @cdmDatabaseSchema.procedure_occurrence add (procedure_end_datetime timestamp default null);
|
||||
|
||||
-- DEVICE_EXPOSURE
|
||||
-- Unique_device_id -> Changed to varchar(255)
|
||||
-- + Production_id
|
||||
-- + Unit_concept_id
|
||||
-- + Unit_source_value
|
||||
-- + Unit_source_concept_id
|
||||
|
||||
alter table @cdmDatabaseSchema.device_exposure modify (unique_device_id varchar2(300));
|
||||
alter table @cdmDatabaseSchema.device_exposure add (production_id number default null);
|
||||
alter table @cdmDatabaseSchema.device_exposure add (unit_concept_id number default null);
|
||||
alter table @cdmDatabaseSchema.device_exposure add (unit_source_value varchar2(50) default null);
|
||||
alter table @cdmDatabaseSchema.device_exposure add (unit_source_concept_id number default null);
|
||||
|
||||
-- MEASUREMENT
|
||||
-- + Unit_source_concept_id
|
||||
-- + Measurement_event_id
|
||||
-- + Meas_event_field_concept_id
|
||||
|
||||
alter table @cdmDatabaseSchema.measurement add (unit_source_concept_id number default null);
|
||||
alter table @cdmDatabaseSchema.measurement add (measurement_event_id number default null);
|
||||
alter table @cdmDatabaseSchema.measurement add (meas_event_field_concept_id number default null);
|
||||
|
||||
-- OBSERVATION
|
||||
-- + Value_source_value
|
||||
-- + Observation_event_id
|
||||
-- + Obs_event_field_concept_id
|
||||
|
||||
alter table @cdmDatabaseSchema.observation add (value_source_value varchar2(50) default null);
|
||||
alter table @cdmDatabaseSchema.observation add (observation_event_id number default null);
|
||||
alter table @cdmDatabaseSchema.observation add (obs_event_field_concept_id number default null);
|
||||
|
||||
-- NOTE
|
||||
-- + Note_event_id
|
||||
-- + Note_event_field_concept_id
|
||||
|
||||
alter table @cdmDatabaseSchema.note add (note_event_id number default null);
|
||||
alter table @cdmDatabaseSchema.note add (note_event_field_concept_id number default null);
|
||||
|
||||
-- LOCATION
|
||||
-- + Country_concept_id
|
||||
-- + Country_source_value
|
||||
-- + Latitude
|
||||
-- + Longitude
|
||||
|
||||
alter table @cdmDatabaseSchema.location add (country_concept_id number default null);
|
||||
alter table @cdmDatabaseSchema.location add (country_source_value varchar2(80) default null);
|
||||
alter table @cdmDatabaseSchema.location add (latitude float default null);
|
||||
alter table @cdmDatabaseSchema.location add (longitude float default null);
|
||||
|
||||
-- EPISODE
|
||||
CREATE TABLE @cdmDatabaseSchema.EPISODE (
|
||||
episode_id number NOT NULL,
|
||||
person_id number NOT NULL,
|
||||
episode_concept_id number 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 NULL,
|
||||
episode_number number NULL,
|
||||
episode_object_concept_id number NOT NULL,
|
||||
episode_type_concept_id number NOT NULL,
|
||||
episode_source_value varchar2(50) NULL,
|
||||
episode_source_concept_id number NULL );
|
||||
|
||||
-- EPISODE_EVENT
|
||||
CREATE TABLE @cdmDatabaseSchema.EPISODE_EVENT (
|
||||
episode_id number NOT NULL,
|
||||
event_id number NOT NULL,
|
||||
episode_event_field_concept_id number NOT NULL );
|
||||
|
||||
|
||||
-- METADATA
|
||||
-- + Metadata_id
|
||||
-- + Value_as_number
|
||||
|
||||
alter table @cdmDatabaseSchema.metadata add (metadata_id number default null);
|
||||
alter table @cdmDatabaseSchema.metadata add (value_as_number float default null);
|
||||
|
||||
-- CDM_SOURCE
|
||||
-- Cdm_source_name -> Mandatory field
|
||||
-- Cdm_source_abbreviation -> Mandatory field
|
||||
-- Cdm_holder -> Mandatory field
|
||||
-- Source_release_date -> Mandatory field
|
||||
-- Cdm_release_date -> Mandatory field
|
||||
-- + Cdm_version_concept_id
|
||||
|
||||
rename @cdmDatabaseSchema.cdm_source to cdm_source_v53;
|
||||
|
||||
CREATE TABLE @cdmDatabaseSchema.cdm_source (
|
||||
cdm_source_name varchar2(255) NOT NULL,
|
||||
cdm_source_abbreviation varchar2(25) NOT NULL,
|
||||
cdm_holder varchar2(255) NOT NULL,
|
||||
-- 32767 bytes if MAX_STRING_SIZE = EXTENDED
|
||||
-- 4000 bytes if MAX_STRING_SIZE = STANDARD
|
||||
source_description varchar2(32767) NULL,
|
||||
source_documentation_reference varchar2(255) NULL,
|
||||
cdm_etl_reference varchar2(255) NULL,
|
||||
source_release_date date NOT NULL,
|
||||
cdm_release_date date NOT NULL,
|
||||
cdm_version varchar2(10) NULL,
|
||||
cdm_version_concept_id number NOT NULL,
|
||||
vocabulary_version varchar2(20) NOT NULL );
|
||||
|
||||
insert into @cdmDatabaseSchema.cdm_source
|
||||
select cdm_source_name,cdm_source_abbreviation,cdm_holder,
|
||||
source_description,source_documentation_reference,cdm_etl_reference,
|
||||
source_release_date,cdm_release_date,'5.4',
|
||||
756265,vocabulary_version
|
||||
from @cdmDatabaseSchema.cdm_source_v53;
|
||||
|
||||
|
||||
-- VOCABULARY
|
||||
-- Vocabulary_reference -> Non-mandatory field
|
||||
-- Vocabulary_version -> Non-mandatory field
|
||||
rename @cdmDatabaseSchema.vocabulary to vocabulary_v53;
|
||||
|
||||
CREATE TABLE @cdmDatabaseSchema.vocabulary (
|
||||
vocabulary_id varchar2(20) NOT NULL,
|
||||
vocabulary_name varchar2(255) NOT NULL,
|
||||
vocabulary_reference varchar2(255) NULL,
|
||||
vocabulary_version varchar2(255) NULL,
|
||||
vocabulary_concept_id number NOT NULL );
|
||||
|
||||
insert into @cdmDatabaseSchema.vocabulary
|
||||
select vocabulary_id,vocabulary_name,vocabulary_reference,
|
||||
vocabulary_version, vocabulary_concept_id
|
||||
from @cdmDatabaseSchema.vocabulary_v53;
|
||||
|
||||
|
||||
-- ATTRIBUTE_DEFINITION
|
||||
drop table @cdmDatabaseSchema.attribute_definition;
|
||||
|
||||
-- COHORT
|
||||
CREATE TABLE @cdmDatabaseSchema.cohort (
|
||||
cohort_definition_id number NOT NULL,
|
||||
subject_id number NOT NULL,
|
||||
cohort_start_date date NOT NULL,
|
||||
cohort_end_date date NOT NULL );
|
||||
|
||||
|
|
@ -0,0 +1,175 @@
|
|||
-- http://ohdsi.github.io/CommonDataModel/cdm54Changes.html
|
||||
-- PostgreSQL SQL references:
|
||||
-- https://www.postgresql.org/docs/current/sql-altertable.html
|
||||
--
|
||||
-- VISIT_OCCURRENCE
|
||||
-- admitting_source_concept_id -> admitted_from_concept_id
|
||||
-- admitting_source_value -> admitted_from_source_value
|
||||
-- discharge_to_concept_id -> discharged_to_concept_id
|
||||
-- discharge_to_source_value -> discharged_to_source_value
|
||||
|
||||
alter table @cdmDatabaseSchema.visit_occurrence rename column admitting_source_concept_id to admitted_from_concept_id;
|
||||
alter table @cdmDatabaseSchema.visit_occurrence rename column admitting_source_value to admitted_from_source_value;
|
||||
alter table @cdmDatabaseSchema.visit_occurrence rename column discharge_to_concept_id to discharged_to_concept_id;
|
||||
alter table @cdmDatabaseSchema.visit_occurrence rename column discharge_to_source_value to discharged_to_source_value;
|
||||
|
||||
--
|
||||
-- VISIT_DETAIL
|
||||
-- admitting_source_concept_id -> admitted_from_concept_id
|
||||
-- admitting_source_value -> admitted_from_source_value
|
||||
-- discharge_to_concept_id -> discharged_to_concept_id
|
||||
-- discharge_to_source_value -> discharged_to_source_value
|
||||
-- visit_detail_parent_id -> parent_visit_detail_id
|
||||
|
||||
alter table @cdmDatabaseSchema.visit_detail rename column admitting_source_concept_id to admitted_from_concept_id;
|
||||
alter table @cdmDatabaseSchema.visit_detail rename column admitting_source_value to admitted_from_source_value;
|
||||
alter table @cdmDatabaseSchema.visit_detail rename column discharge_to_concept_id to discharged_to_concept_id;
|
||||
alter table @cdmDatabaseSchema.visit_detail rename column discharge_to_source_value to discharged_to_source_value;
|
||||
alter table @cdmDatabaseSchema.visit_detail rename column visit_detail_parent_id to parent_visit_detail_id;
|
||||
|
||||
-- PROCEDURE_OCCURRENCE
|
||||
-- + Procedure_end_date
|
||||
-- + Procedure_end_datetime
|
||||
|
||||
alter table @cdmDatabaseSchema.procedure_occurrence add column procedure_end_date date default null;
|
||||
alter table @cdmDatabaseSchema.procedure_occurrence add column procedure_end_datetime timestamp default null;
|
||||
|
||||
-- DEVICE_EXPOSURE
|
||||
-- Unique_device_id -> Changed to varchar(255)
|
||||
-- + Production_id
|
||||
-- + Unit_concept_id
|
||||
-- + Unit_source_value
|
||||
-- + Unit_source_concept_id
|
||||
|
||||
alter table @cdmDatabaseSchema.device_exposure alter column unique_device_id type varchar(300);
|
||||
alter table @cdmDatabaseSchema.device_exposure add column production_id integer default null;
|
||||
alter table @cdmDatabaseSchema.device_exposure add column unit_concept_id integer default null;
|
||||
alter table @cdmDatabaseSchema.device_exposure add column unit_source_value varchar(50) default null;
|
||||
alter table @cdmDatabaseSchema.device_exposure add column unit_source_concept_id integer default null;
|
||||
|
||||
-- MEASUREMENT
|
||||
-- + Unit_source_concept_id
|
||||
-- + Measurement_event_id
|
||||
-- + Meas_event_field_concept_id
|
||||
|
||||
alter table @cdmDatabaseSchema.measurement add column unit_source_concept_id integer default null;
|
||||
alter table @cdmDatabaseSchema.measurement add column measurement_event_id bigint default null;
|
||||
alter table @cdmDatabaseSchema.measurement add column meas_event_field_concept_id integer default null;
|
||||
|
||||
-- OBSERVATION
|
||||
-- + Value_source_value
|
||||
-- + Observation_event_id
|
||||
-- + Obs_event_field_concept_id
|
||||
|
||||
alter table @cdmDatabaseSchema.observation add column value_source_value varchar(50) default null;
|
||||
alter table @cdmDatabaseSchema.observation add column observation_event_id bigint default null;
|
||||
alter table @cdmDatabaseSchema.observation add column obs_event_field_concept_id integer default null;
|
||||
|
||||
-- NOTE
|
||||
-- + Note_event_id
|
||||
-- + Note_event_field_concept_id
|
||||
|
||||
alter table @cdmDatabaseSchema.note add column note_event_id bigint default null;
|
||||
alter table @cdmDatabaseSchema.note add column note_event_field_concept_id integer default null;
|
||||
|
||||
-- LOCATION
|
||||
-- + Country_concept_id
|
||||
-- + Country_source_value
|
||||
-- + Latitude
|
||||
-- + Longitude
|
||||
|
||||
alter table @cdmDatabaseSchema.location add column country_concept_id integer default null;
|
||||
alter table @cdmDatabaseSchema.location add column country_source_value varchar(80) default null;
|
||||
alter table @cdmDatabaseSchema.location add column latitude numeric default null;
|
||||
alter table @cdmDatabaseSchema.location add column longitude numeric default null;
|
||||
|
||||
-- EPISODE
|
||||
CREATE TABLE @cdmDatabaseSchema.EPISODE (
|
||||
episode_id bigint NOT NULL,
|
||||
person_id bigint 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_number integer NULL,
|
||||
episode_object_concept_id integer NOT NULL,
|
||||
episode_type_concept_id integer NOT NULL,
|
||||
episode_source_value varchar(50) NULL,
|
||||
episode_source_concept_id integer NULL );
|
||||
|
||||
-- EPISODE_EVENT
|
||||
CREATE TABLE @cdmDatabaseSchema.EPISODE_EVENT (
|
||||
episode_id bigint NOT NULL,
|
||||
event_id bigint NOT NULL,
|
||||
episode_event_field_concept_id integer NOT NULL );
|
||||
|
||||
|
||||
-- METADATA
|
||||
-- + Metadata_id
|
||||
-- + Value_as_number
|
||||
|
||||
alter table @cdmDatabaseSchema.metadata add column metadata_id integer default null;
|
||||
alter table @cdmDatabaseSchema.metadata add column value_as_number numeric default null;
|
||||
|
||||
-- CDM_SOURCE
|
||||
-- Cdm_source_name -> Mandatory field
|
||||
-- Cdm_source_abbreviation -> Mandatory field
|
||||
-- Cdm_holder -> Mandatory field
|
||||
-- Source_release_date -> Mandatory field
|
||||
-- Cdm_release_date -> Mandatory field
|
||||
-- + Cdm_version_concept_id
|
||||
|
||||
alter table @cdmDatabaseSchema.cdm_source rename to cdm_source_v53;
|
||||
|
||||
CREATE TABLE @cdmDatabaseSchema.cdm_source (
|
||||
cdm_source_name varchar(255) NOT NULL,
|
||||
cdm_source_abbreviation varchar(25) NOT NULL,
|
||||
cdm_holder varchar(255) NOT NULL,
|
||||
source_description text NULL,
|
||||
source_documentation_reference varchar(255) NULL,
|
||||
cdm_etl_reference varchar(255) NULL,
|
||||
source_release_date date NOT NULL,
|
||||
cdm_release_date date NOT NULL,
|
||||
cdm_version varchar(10) NULL,
|
||||
cdm_version_concept_id integer NOT NULL,
|
||||
vocabulary_version varchar(20) NOT NULL );
|
||||
|
||||
insert into @cdmDatabaseSchema.cdm_source
|
||||
select cdm_source_name,cdm_source_abbreviation,cdm_holder,
|
||||
source_description,source_documentation_reference,cdm_etl_reference,
|
||||
source_release_date,cdm_release_date,'5.4',
|
||||
756265,vocabulary_version
|
||||
from @cdmDatabaseSchema.cdm_source_v53;
|
||||
|
||||
|
||||
-- VOCABULARY
|
||||
-- Vocabulary_reference -> Non-mandatory field
|
||||
-- Vocabulary_version -> Non-mandatory field
|
||||
alter table @cdmDatabaseSchema.vocabulary rename to vocabulary_v53;
|
||||
|
||||
CREATE TABLE @cdmDatabaseSchema.vocabulary (
|
||||
vocabulary_id varchar(20) NOT NULL,
|
||||
vocabulary_name varchar(255) NOT NULL,
|
||||
vocabulary_reference varchar(255) NULL,
|
||||
vocabulary_version varchar(255) NULL,
|
||||
vocabulary_concept_id integer NOT NULL );
|
||||
|
||||
insert into @cdmDatabaseSchema.vocabulary
|
||||
select vocabulary_id,vocabulary_name,vocabulary_reference,
|
||||
vocabulary_version, vocabulary_concept_id
|
||||
from @cdmDatabaseSchema.vocabulary_v53;
|
||||
|
||||
|
||||
-- ATTRIBUTE_DEFINITION
|
||||
drop table @cdmDatabaseSchema.attribute_definition;
|
||||
|
||||
-- COHORT
|
||||
CREATE TABLE @cdmDatabaseSchema.cohort (
|
||||
cohort_definition_id integer NOT NULL,
|
||||
subject_id integer NOT NULL,
|
||||
cohort_start_date date NOT NULL,
|
||||
cohort_end_date date NOT NULL );
|
||||
|
||||
|
|
@ -0,0 +1,176 @@
|
|||
-- http://ohdsi.github.io/CommonDataModel/cdm54Changes.html
|
||||
-- Redshift SQL references:
|
||||
-- https://docs.aws.amazon.com/redshift/latest/dg/r_ALTER_TABLE_examples_basic.html
|
||||
-- https://docs.aws.amazon.com/redshift/latest/dg/r_ALTER_TABLE_COL_ex-add-drop.html
|
||||
--
|
||||
-- VISIT_OCCURRENCE
|
||||
-- admitting_source_concept_id -> admitted_from_concept_id
|
||||
-- admitting_source_value -> admitted_from_source_value
|
||||
-- discharge_to_concept_id -> discharged_to_concept_id
|
||||
-- discharge_to_source_value -> discharged_to_source_value
|
||||
|
||||
alter table @cdmDatabaseSchema.visit_occurrence rename column admitting_source_concept_id to admitted_from_concept_id;
|
||||
alter table @cdmDatabaseSchema.visit_occurrence rename column admitting_source_value to admitted_from_source_value;
|
||||
alter table @cdmDatabaseSchema.visit_occurrence rename column discharge_to_concept_id to discharged_to_concept_id;
|
||||
alter table @cdmDatabaseSchema.visit_occurrence rename column discharge_to_source_value to discharged_to_source_value;
|
||||
|
||||
--
|
||||
-- VISIT_DETAIL
|
||||
-- admitting_source_concept_id -> admitted_from_concept_id
|
||||
-- admitting_source_value -> admitted_from_source_value
|
||||
-- discharge_to_concept_id -> discharged_to_concept_id
|
||||
-- discharge_to_source_value -> discharged_to_source_value
|
||||
-- visit_detail_parent_id -> parent_visit_detail_id
|
||||
|
||||
alter table @cdmDatabaseSchema.visit_detail rename column admitting_source_concept_id to admitted_from_concept_id;
|
||||
alter table @cdmDatabaseSchema.visit_detail rename column admitting_source_value to admitted_from_source_value;
|
||||
alter table @cdmDatabaseSchema.visit_detail rename column discharge_to_concept_id to discharged_to_concept_id;
|
||||
alter table @cdmDatabaseSchema.visit_detail rename column discharge_to_source_value to discharged_to_source_value;
|
||||
alter table @cdmDatabaseSchema.visit_detail rename column visit_detail_parent_id to parent_visit_detail_id;
|
||||
|
||||
-- PROCEDURE_OCCURRENCE
|
||||
-- + Procedure_end_date
|
||||
-- + Procedure_end_datetime
|
||||
|
||||
alter table @cdmDatabaseSchema.procedure_occurrence add column procedure_end_date date default null;
|
||||
alter table @cdmDatabaseSchema.procedure_occurrence add column procedure_end_datetime timestamp default null;
|
||||
|
||||
-- DEVICE_EXPOSURE
|
||||
-- Unique_device_id -> Changed to varchar(255)
|
||||
-- + Production_id
|
||||
-- + Unit_concept_id
|
||||
-- + Unit_source_value
|
||||
-- + Unit_source_concept_id
|
||||
|
||||
alter table @cdmDatabaseSchema.device_exposure alter column unique_device_id varchar(300);
|
||||
alter table @cdmDatabaseSchema.device_exposure add column production_id integer default null;
|
||||
alter table @cdmDatabaseSchema.device_exposure add column unit_concept_id integer default null;
|
||||
alter table @cdmDatabaseSchema.device_exposure add column unit_source_value varchar(50) default null;
|
||||
alter table @cdmDatabaseSchema.device_exposure add column unit_source_concept_id integer default null;
|
||||
|
||||
-- MEASUREMENT
|
||||
-- + Unit_source_concept_id
|
||||
-- + Measurement_event_id
|
||||
-- + Meas_event_field_concept_id
|
||||
|
||||
alter table @cdmDatabaseSchema.measurement add column unit_source_concept_id integer default null;
|
||||
alter table @cdmDatabaseSchema.measurement add column measurement_event_id bigint default null;
|
||||
alter table @cdmDatabaseSchema.measurement add column meas_event_field_concept_id integer default null;
|
||||
|
||||
-- OBSERVATION
|
||||
-- + Value_source_value
|
||||
-- + Observation_event_id
|
||||
-- + Obs_event_field_concept_id
|
||||
|
||||
alter table @cdmDatabaseSchema.observation add column value_source_value varchar(50) default null;
|
||||
alter table @cdmDatabaseSchema.observation add column observation_event_id bigint default null;
|
||||
alter table @cdmDatabaseSchema.observation add column obs_event_field_concept_id integer default null;
|
||||
|
||||
-- NOTE
|
||||
-- + Note_event_id
|
||||
-- + Note_event_field_concept_id
|
||||
|
||||
alter table @cdmDatabaseSchema.note add column note_event_id bigint default null;
|
||||
alter table @cdmDatabaseSchema.note add column note_event_field_concept_id integer default null;
|
||||
|
||||
-- LOCATION
|
||||
-- + Country_concept_id
|
||||
-- + Country_source_value
|
||||
-- + Latitude
|
||||
-- + Longitude
|
||||
|
||||
alter table @cdmDatabaseSchema.location add column country_concept_id integer default null;
|
||||
alter table @cdmDatabaseSchema.location add column country_source_value varchar(80) default null;
|
||||
alter table @cdmDatabaseSchema.location add column latitude float default null;
|
||||
alter table @cdmDatabaseSchema.location add column longitude float default null;
|
||||
|
||||
-- EPISODE
|
||||
CREATE TABLE @cdmDatabaseSchema.EPISODE (
|
||||
episode_id bigint NOT NULL,
|
||||
person_id bigint 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_number integer NULL,
|
||||
episode_object_concept_id integer NOT NULL,
|
||||
episode_type_concept_id integer NOT NULL,
|
||||
episode_source_value varchar(50) NULL,
|
||||
episode_source_concept_id integer NULL );
|
||||
|
||||
-- EPISODE_EVENT
|
||||
CREATE TABLE @cdmDatabaseSchema.EPISODE_EVENT (
|
||||
episode_id bigint NOT NULL,
|
||||
event_id bigint NOT NULL,
|
||||
episode_event_field_concept_id integer NOT NULL );
|
||||
|
||||
|
||||
-- METADATA
|
||||
-- + Metadata_id
|
||||
-- + Value_as_number
|
||||
|
||||
alter table @cdmDatabaseSchema.metadata add column metadata_id integer default null;
|
||||
alter table @cdmDatabaseSchema.metadata add column value_as_number float default null;
|
||||
|
||||
-- CDM_SOURCE
|
||||
-- Cdm_source_name -> Mandatory field
|
||||
-- Cdm_source_abbreviation -> Mandatory field
|
||||
-- Cdm_holder -> Mandatory field
|
||||
-- Source_release_date -> Mandatory field
|
||||
-- Cdm_release_date -> Mandatory field
|
||||
-- + Cdm_version_concept_id
|
||||
|
||||
alter table @cdmDatabaseSchema.cdm_source rename to cdm_source_v53;
|
||||
|
||||
CREATE TABLE @cdmDatabaseSchema.cdm_source (
|
||||
cdm_source_name varchar(255) NOT NULL,
|
||||
cdm_source_abbreviation varchar(25) NOT NULL,
|
||||
cdm_holder varchar(255) NOT NULL,
|
||||
source_description varchar(MAX) NULL,
|
||||
source_documentation_reference varchar(255) NULL,
|
||||
cdm_etl_reference varchar(255) NULL,
|
||||
source_release_date date NOT NULL,
|
||||
cdm_release_date date NOT NULL,
|
||||
cdm_version varchar(10) NULL,
|
||||
cdm_version_concept_id integer NOT NULL,
|
||||
vocabulary_version varchar(20) NOT NULL );
|
||||
|
||||
insert into @cdmDatabaseSchema.cdm_source
|
||||
select cdm_source_name,cdm_source_abbreviation,cdm_holder,
|
||||
source_description,source_documentation_reference,cdm_etl_reference,
|
||||
source_release_date,cdm_release_date,'5.4',
|
||||
756265,vocabulary_version
|
||||
from @cdmDatabaseSchema.cdm_source_v53;
|
||||
|
||||
|
||||
-- VOCABULARY
|
||||
-- Vocabulary_reference -> Non-mandatory field
|
||||
-- Vocabulary_version -> Non-mandatory field
|
||||
alter table @cdmDatabaseSchema.vocabulary rename to vocabulary_v53;
|
||||
|
||||
CREATE TABLE @cdmDatabaseSchema.vocabulary (
|
||||
vocabulary_id varchar(20) NOT NULL,
|
||||
vocabulary_name varchar(255) NOT NULL,
|
||||
vocabulary_reference varchar(255) NULL,
|
||||
vocabulary_version varchar(255) NULL,
|
||||
vocabulary_concept_id integer NOT NULL );
|
||||
|
||||
insert into @cdmDatabaseSchema.vocabulary
|
||||
select vocabulary_id,vocabulary_name,vocabulary_reference,
|
||||
vocabulary_version, vocabulary_concept_id
|
||||
from @cdmDatabaseSchema.vocabulary_v53;
|
||||
|
||||
|
||||
-- ATTRIBUTE_DEFINITION
|
||||
drop table @cdmDatabaseSchema.attribute_definition;
|
||||
|
||||
-- COHORT
|
||||
CREATE TABLE @cdmDatabaseSchema.cohort (
|
||||
cohort_definition_id integer NOT NULL,
|
||||
subject_id integer NOT NULL,
|
||||
cohort_start_date date NOT NULL,
|
||||
cohort_end_date date NOT NULL );
|
||||
|
||||
|
|
@ -0,0 +1,179 @@
|
|||
-- http://ohdsi.github.io/CommonDataModel/cdm54Changes.html
|
||||
-- SQL SERVER SQL References:
|
||||
-- https://docs.microsoft.com/en-us/sql/relational-databases/tables/rename-columns-database-engine?view=sql-server-ver15
|
||||
-- https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-rename-transact-sql?view=sql-server-ver15
|
||||
-- https://docs.microsoft.com/en-us/sql/relational-databases/tables/add-columns-to-a-table-database-engine?view=sql-server-ver15
|
||||
-- https://docs.microsoft.com/en-us/sql/relational-databases/tables/modify-columns-database-engine?view=sql-server-ver15
|
||||
-- https://docs.microsoft.com/en-us/sql/t-sql/data-types/data-types-transact-sql?view=sql-server-ver15
|
||||
--
|
||||
-- VISIT_OCCURRENCE
|
||||
-- admitting_source_concept_id -> admitted_from_concept_id
|
||||
-- admitting_source_value -> admitted_from_source_value
|
||||
-- discharge_to_concept_id -> discharged_to_concept_id
|
||||
-- discharge_to_source_value -> discharged_to_source_value
|
||||
|
||||
EXEC sp_rename '@cdmDatabaseSchema.visit_occurrence.admitting_source_concept_id', 'admitted_from_concept_id', 'COLUMN';
|
||||
EXEC sp_rename '@cdmDatabaseSchema.visit_occurrence.admitting_source_value', 'admitted_from_source_value', 'COLUMN';
|
||||
EXEC sp_rename '@cdmDatabaseSchema.visit_occurrence.discharge_to_concept_id', 'discharged_to_concept_id', 'COLUMN';
|
||||
EXEC sp_rename '@cdmDatabaseSchema.visit_occurrence.discharge_to_source_value', 'discharged_to_source_value', 'COLUMN';
|
||||
|
||||
--
|
||||
-- VISIT_DETAIL
|
||||
-- admitting_source_concept_id -> admitted_from_concept_id
|
||||
-- admitting_source_value -> admitted_from_source_value
|
||||
-- discharge_to_concept_id -> discharged_to_concept_id
|
||||
-- discharge_to_source_value -> discharged_to_source_value
|
||||
-- visit_detail_parent_id -> parent_visit_detail_id
|
||||
|
||||
EXEC sp_rename '@cdmDatabaseSchema.visit_detail.admitting_source_concept_id', 'admitted_from_concept_id', 'COLUMN';
|
||||
EXEC sp_rename '@cdmDatabaseSchema.visit_detail.admitting_source_value', 'admitted_from_source_value', 'COLUMN';
|
||||
EXEC sp_rename '@cdmDatabaseSchema.visit_detail.discharge_to_concept_id', 'discharged_to_concept_id', 'COLUMN';
|
||||
EXEC sp_rename '@cdmDatabaseSchema.visit_detail.discharge_to_source_value', 'discharged_to_source_value', 'COLUMN';
|
||||
EXEC sp_rename '@cdmDatabaseSchema.visit_detail.visit_detail_parent_id', 'parent_visit_detail_id', 'COLUMN';
|
||||
|
||||
-- PROCEDURE_OCCURRENCE
|
||||
-- + Procedure_end_date
|
||||
-- + Procedure_end_datetime
|
||||
|
||||
alter table @cdmDatabaseSchema.procedure_occurrence add procedure_end_date date null;
|
||||
alter table @cdmDatabaseSchema.procedure_occurrence add procedure_end_datetime datetime null;
|
||||
|
||||
-- DEVICE_EXPOSURE
|
||||
-- Unique_device_id -> Changed to varchar(255)
|
||||
-- + Production_id
|
||||
-- + Unit_concept_id
|
||||
-- + Unit_source_value
|
||||
-- + Unit_source_concept_id
|
||||
|
||||
alter table @cdmDatabaseSchema.device_exposure alter column unique_device_id varchar(300);
|
||||
alter table @cdmDatabaseSchema.device_exposure add production_id int null;
|
||||
alter table @cdmDatabaseSchema.device_exposure add unit_concept_id int null;
|
||||
alter table @cdmDatabaseSchema.device_exposure add unit_source_value varchar(50) null;
|
||||
alter table @cdmDatabaseSchema.device_exposure add unit_source_concept_id int null;
|
||||
|
||||
-- MEASUREMENT
|
||||
-- + Unit_source_concept_id
|
||||
-- + Measurement_event_id
|
||||
-- + Meas_event_field_concept_id
|
||||
|
||||
alter table @cdmDatabaseSchema.measurement add unit_source_concept_id int null;
|
||||
alter table @cdmDatabaseSchema.measurement add measurement_event_id bigint null;
|
||||
alter table @cdmDatabaseSchema.measurement add meas_event_field_concept_id int null;
|
||||
|
||||
-- OBSERVATION
|
||||
-- + Value_source_value
|
||||
-- + Observation_event_id
|
||||
-- + Obs_event_field_concept_id
|
||||
|
||||
alter table @cdmDatabaseSchema.observation add value_source_value varchar(50) null;
|
||||
alter table @cdmDatabaseSchema.observation add observation_event_id bigint null;
|
||||
alter table @cdmDatabaseSchema.observation add obs_event_field_concept_id int null;
|
||||
|
||||
-- NOTE
|
||||
-- + Note_event_id
|
||||
-- + Note_event_field_concept_id
|
||||
|
||||
alter table @cdmDatabaseSchema.note add note_event_id bigint null;
|
||||
alter table @cdmDatabaseSchema.note add note_event_field_concept_id int null;
|
||||
|
||||
-- LOCATION
|
||||
-- + Country_concept_id
|
||||
-- + Country_source_value
|
||||
-- + Latitude
|
||||
-- + Longitude
|
||||
|
||||
alter table @cdmDatabaseSchema.location add country_concept_id int null;
|
||||
alter table @cdmDatabaseSchema.location add country_source_value varchar(80) null;
|
||||
alter table @cdmDatabaseSchema.location add latitude numeric null;
|
||||
alter table @cdmDatabaseSchema.location add longitude numeric null;
|
||||
|
||||
-- EPISODE
|
||||
CREATE TABLE @cdmDatabaseSchema.EPISODE (
|
||||
episode_id bigint NOT NULL,
|
||||
person_id bigint NOT NULL,
|
||||
episode_concept_id int 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_number int NULL,
|
||||
episode_object_concept_id int NOT NULL,
|
||||
episode_type_concept_id int NOT NULL,
|
||||
episode_source_value varchar(50) NULL,
|
||||
episode_source_concept_id int NULL );
|
||||
|
||||
-- EPISODE_EVENT
|
||||
CREATE TABLE @cdmDatabaseSchema.EPISODE_EVENT (
|
||||
episode_id bigint NOT NULL,
|
||||
event_id bigint NOT NULL,
|
||||
episode_event_field_concept_id int NOT NULL );
|
||||
|
||||
|
||||
-- METADATA
|
||||
-- + Metadata_id
|
||||
-- + Value_as_number
|
||||
|
||||
alter table @cdmDatabaseSchema.metadata add metadata_id int null;
|
||||
alter table @cdmDatabaseSchema.metadata add value_as_number numeric null;
|
||||
|
||||
-- CDM_SOURCE
|
||||
-- Cdm_source_name -> Mandatory field
|
||||
-- Cdm_source_abbreviation -> Mandatory field
|
||||
-- Cdm_holder -> Mandatory field
|
||||
-- Source_release_date -> Mandatory field
|
||||
-- Cdm_release_date -> Mandatory field
|
||||
-- + Cdm_version_concept_id
|
||||
|
||||
EXEC sp_rename '@cdmDatabaseSchema.cdm_source', 'cdm_source_v53';
|
||||
|
||||
CREATE TABLE @cdmDatabaseSchema.cdm_source (
|
||||
cdm_source_name varchar(255) NOT NULL,
|
||||
cdm_source_abbreviation varchar(25) NOT NULL,
|
||||
cdm_holder varchar(255) NOT NULL,
|
||||
source_description varchar(MAX) NULL,
|
||||
source_documentation_reference varchar(255) NULL,
|
||||
cdm_etl_reference varchar(255) NULL,
|
||||
source_release_date date NOT NULL,
|
||||
cdm_release_date date NOT NULL,
|
||||
cdm_version varchar(10) NULL,
|
||||
cdm_version_concept_id int NOT NULL,
|
||||
vocabulary_version varchar(20) NOT NULL );
|
||||
|
||||
insert into @cdmDatabaseSchema.cdm_source
|
||||
select cdm_source_name,cdm_source_abbreviation,cdm_holder,
|
||||
source_description,source_documentation_reference,cdm_etl_reference,
|
||||
source_release_date,cdm_release_date,'5.4',
|
||||
756265,vocabulary_version
|
||||
from @cdmDatabaseSchema.cdm_source_v53;
|
||||
|
||||
|
||||
-- VOCABULARY
|
||||
-- Vocabulary_reference -> Non-mandatory field
|
||||
-- Vocabulary_version -> Non-mandatory field
|
||||
EXEC sp_rename '@cdmDatabaseSchema.vocabulary', 'vocabulary_v53';
|
||||
|
||||
CREATE TABLE @cdmDatabaseSchema.vocabulary (
|
||||
vocabulary_id varchar(20) NOT NULL,
|
||||
vocabulary_name varchar(255) NOT NULL,
|
||||
vocabulary_reference varchar(255) NULL,
|
||||
vocabulary_version varchar(255) NULL,
|
||||
vocabulary_concept_id int NOT NULL );
|
||||
|
||||
insert into @cdmDatabaseSchema.vocabulary
|
||||
select vocabulary_id,vocabulary_name,vocabulary_reference,
|
||||
vocabulary_version, vocabulary_concept_id
|
||||
from @cdmDatabaseSchema.vocabulary_v53;
|
||||
|
||||
|
||||
-- ATTRIBUTE_DEFINITION
|
||||
drop table @cdmDatabaseSchema.attribute_definition;
|
||||
|
||||
-- COHORT
|
||||
CREATE TABLE @cdmDatabaseSchema.cohort (
|
||||
cohort_definition_id int NOT NULL,
|
||||
subject_id int NOT NULL,
|
||||
cohort_start_date date NOT NULL,
|
||||
cohort_end_date date NOT NULL );
|
||||
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
with cdm_v540 as (
|
||||
select *
|
||||
from information_schema.columns
|
||||
where table_schema = 'cdm_v540' --> ENTER YOUR V5.4 CDM HERE
|
||||
and table_name not in ('cohort','cohort_attribute','cohort_definition')
|
||||
), cdm_v601 as (
|
||||
select *
|
||||
from information_schema.columns
|
||||
where table_schema = 'cdm_v601' --> ENTER YOUR V6.0 CDM HERE
|
||||
and table_name not in ('cohort','cohort_attribute','cohort_definition')
|
||||
)
|
||||
select a.table_name,
|
||||
a.column_name,
|
||||
a.is_nullable v54_nullable,
|
||||
b.is_nullable v60_nullable,
|
||||
a.data_type v54_datatype,
|
||||
b.data_type v60_datatype
|
||||
from cdm_v540 a
|
||||
join cdm_v601 b
|
||||
on a.table_name = b.table_name
|
||||
and a.column_name = b.column_name
|
||||
and (a.is_nullable != b.is_nullable or a.data_type != b.data_type)
|
||||
order by 1,2;
|
|
@ -0,0 +1,45 @@
|
|||
--
|
||||
-- RETRIEVE TABLE AND COLUMN NAMES FOR V5.4 AND V6.0 CDMS.
|
||||
-- SUPPLY THE NAME OF EACH SCHEMA WHERE INDICATED.
|
||||
-- THE "STATUS" COLUMN:
|
||||
-- "IN BOTH": INDICATES COLUMN IS IN BOTH 5.4 AND 6.0
|
||||
-- "MISSING FROM v6.0.1": INDICATES COLUMN IS IN BOTH 5.4 BUT NOT 6.0 AND NEEDS TO BE ADDED OR RENAMED
|
||||
-- "MISSING FROM v5.4.0": INDICATES COLUMN IS IN BOTH 6.0 BUT NOT 5.4 AND NEED TO BE DROPPED OR RENAMED
|
||||
|
||||
with cdm_v540 as (
|
||||
select *
|
||||
from information_schema.columns
|
||||
where table_schema = 'cdm_v540' --> YOUR V5.4 CDM SCHEMA NAME HERE
|
||||
and table_name not in ('_version','cohort','cohort_attribute','cohort_definition')
|
||||
), cdm_v601 as (
|
||||
select *
|
||||
from information_schema.columns
|
||||
where table_schema = 'cdm_v601' --> YOUR V6.0 CDM SCHEMA NAME HERE
|
||||
and table_name not in ('_version','cohort','cohort_attribute','cohort_definition')
|
||||
)
|
||||
select a.table_name,
|
||||
a.column_name,
|
||||
'IN BOTH' status
|
||||
from cdm_v540 a
|
||||
join cdm_v601 b
|
||||
on a.table_name = b.table_name
|
||||
and a.column_name = b.column_name
|
||||
union all
|
||||
select a.table_name,
|
||||
a.column_name,
|
||||
'MISSING FROM v6.0.1' status
|
||||
from cdm_v540 a
|
||||
left join cdm_v601 b
|
||||
on a.table_name = b.table_name
|
||||
and a.column_name = b.column_name
|
||||
where b.column_name is null
|
||||
union all
|
||||
select b.table_name,
|
||||
b.column_name,
|
||||
'MISSING FROM v5.4.0' status
|
||||
from cdm_v540 a
|
||||
right join cdm_v601 b
|
||||
on a.table_name = b.table_name
|
||||
and a.column_name = b.column_name
|
||||
where a.column_name is null
|
||||
order by 1,3;
|
|
@ -0,0 +1,182 @@
|
|||
table_name | column_name | v54_nullable | v60_nullable | v54_datatype | v60_datatype
|
||||
----------------------+--------------------------------+--------------+--------------+-----------------------------+----------------------------
|
||||
care_site | care_site_id | YES | NO | bigint | bigint
|
||||
care_site | place_of_service_concept_id | YES | NO | integer | integer
|
||||
cdm_source | cdm_holder | NO | YES | character varying | character varying
|
||||
cdm_source | cdm_release_date | NO | YES | date | date
|
||||
cdm_source | cdm_source_abbreviation | NO | YES | character varying | character varying
|
||||
cdm_source | source_release_date | NO | YES | date | date
|
||||
cdm_source | vocabulary_version | NO | YES | character varying | character varying
|
||||
concept | concept_class_id | YES | NO | character varying | character varying
|
||||
concept | concept_code | YES | NO | character varying | character varying
|
||||
concept | concept_id | YES | NO | integer | integer
|
||||
concept | concept_name | YES | NO | character varying | character varying
|
||||
concept | domain_id | YES | NO | character varying | character varying
|
||||
concept | valid_end_date | YES | NO | date | date
|
||||
concept | valid_start_date | YES | NO | date | date
|
||||
concept | vocabulary_id | YES | NO | character varying | character varying
|
||||
concept_ancestor | ancestor_concept_id | YES | NO | integer | integer
|
||||
concept_ancestor | descendant_concept_id | YES | NO | integer | integer
|
||||
concept_ancestor | max_levels_of_separation | YES | NO | integer | integer
|
||||
concept_ancestor | min_levels_of_separation | YES | NO | integer | integer
|
||||
concept_class | concept_class_concept_id | YES | NO | integer | integer
|
||||
concept_class | concept_class_id | YES | NO | character varying | character varying
|
||||
concept_class | concept_class_name | YES | NO | character varying | character varying
|
||||
concept_relationship | concept_id_1 | YES | NO | integer | integer
|
||||
concept_relationship | concept_id_2 | YES | NO | integer | integer
|
||||
concept_relationship | relationship_id | YES | NO | character varying | character varying
|
||||
concept_relationship | valid_end_date | YES | NO | date | date
|
||||
concept_relationship | valid_start_date | YES | NO | date | date
|
||||
concept_synonym | concept_id | YES | NO | integer | integer
|
||||
concept_synonym | concept_synonym_name | YES | NO | character varying | character varying
|
||||
concept_synonym | language_concept_id | YES | NO | integer | integer
|
||||
condition_era | condition_concept_id | YES | NO | integer | integer
|
||||
condition_era | condition_era_id | YES | NO | bigint | bigint
|
||||
condition_era | person_id | YES | NO | bigint | bigint
|
||||
condition_occurrence | condition_concept_id | YES | NO | integer | integer
|
||||
condition_occurrence | condition_occurrence_id | YES | NO | bigint | bigint
|
||||
condition_occurrence | condition_source_concept_id | YES | NO | integer | integer
|
||||
condition_occurrence | condition_start_date | YES | NO | date | date
|
||||
condition_occurrence | condition_status_concept_id | YES | NO | integer | integer
|
||||
condition_occurrence | condition_type_concept_id | YES | NO | integer | integer
|
||||
condition_occurrence | person_id | YES | NO | bigint | bigint
|
||||
cost | cost_event_id | YES | NO | bigint | bigint
|
||||
cost | cost_id | YES | NO | bigint | bigint
|
||||
cost | payer_plan_period_id | YES | YES | integer | bigint
|
||||
device_exposure | device_concept_id | YES | NO | integer | integer
|
||||
device_exposure | device_exposure_id | YES | NO | bigint | bigint
|
||||
device_exposure | device_exposure_start_date | YES | NO | date | date
|
||||
device_exposure | device_source_concept_id | YES | NO | integer | integer
|
||||
device_exposure | device_type_concept_id | YES | NO | integer | integer
|
||||
device_exposure | person_id | YES | NO | bigint | bigint
|
||||
domain | domain_concept_id | YES | NO | integer | integer
|
||||
domain | domain_id | YES | NO | character varying | character varying
|
||||
domain | domain_name | YES | NO | character varying | character varying
|
||||
dose_era | dose_era_id | YES | NO | bigint | bigint
|
||||
dose_era | dose_value | YES | NO | double precision | double precision
|
||||
dose_era | drug_concept_id | YES | NO | integer | integer
|
||||
dose_era | person_id | YES | NO | bigint | bigint
|
||||
dose_era | unit_concept_id | YES | NO | integer | integer
|
||||
drug_era | drug_concept_id | YES | NO | integer | integer
|
||||
drug_era | drug_era_id | YES | NO | bigint | bigint
|
||||
drug_era | person_id | YES | NO | bigint | bigint
|
||||
drug_exposure | drug_concept_id | YES | NO | integer | integer
|
||||
drug_exposure | drug_exposure_end_date | YES | NO | date | date
|
||||
drug_exposure | drug_exposure_id | YES | NO | bigint | bigint
|
||||
drug_exposure | drug_exposure_start_date | YES | NO | date | date
|
||||
drug_exposure | drug_source_concept_id | YES | NO | integer | integer
|
||||
drug_exposure | drug_type_concept_id | YES | NO | integer | integer
|
||||
drug_exposure | person_id | YES | NO | bigint | bigint
|
||||
drug_strength | drug_concept_id | YES | NO | integer | integer
|
||||
drug_strength | ingredient_concept_id | YES | NO | integer | integer
|
||||
drug_strength | valid_end_date | YES | NO | date | date
|
||||
drug_strength | valid_start_date | YES | NO | date | date
|
||||
fact_relationship | domain_concept_id_1 | YES | NO | integer | integer
|
||||
fact_relationship | domain_concept_id_2 | YES | NO | integer | integer
|
||||
fact_relationship | fact_id_1 | YES | NO | bigint | bigint
|
||||
fact_relationship | fact_id_2 | YES | NO | bigint | bigint
|
||||
fact_relationship | relationship_concept_id | YES | NO | integer | integer
|
||||
location | location_id | YES | NO | bigint | bigint
|
||||
measurement | measurement_concept_id | YES | NO | integer | integer
|
||||
measurement | measurement_date | YES | NO | date | date
|
||||
measurement | measurement_id | YES | NO | bigint | bigint
|
||||
measurement | measurement_source_concept_id | YES | NO | integer | integer
|
||||
measurement | measurement_time | YES | YES | timestamp without time zone | character varying
|
||||
measurement | measurement_type_concept_id | YES | NO | integer | integer
|
||||
measurement | person_id | YES | NO | bigint | bigint
|
||||
metadata | metadata_concept_id | YES | NO | integer | integer
|
||||
metadata | metadata_type_concept_id | YES | NO | integer | integer
|
||||
metadata | name | YES | NO | character varying | character varying
|
||||
note | encoding_concept_id | YES | NO | integer | integer
|
||||
note | language_concept_id | YES | NO | integer | integer
|
||||
note | note_class_concept_id | YES | NO | integer | integer
|
||||
note | note_date | YES | NO | date | date
|
||||
note | note_id | YES | NO | bigint | integer
|
||||
note | note_text | YES | NO | character varying | character varying
|
||||
note | note_type_concept_id | YES | NO | integer | integer
|
||||
note | person_id | YES | NO | bigint | bigint
|
||||
note | provider_id | YES | YES | integer | bigint
|
||||
note_nlp | lexical_variant | YES | NO | character varying | character varying
|
||||
note_nlp | nlp_date | YES | NO | date | date
|
||||
note_nlp | note_id | YES | NO | bigint | integer
|
||||
note_nlp | note_nlp_id | YES | NO | bigint | bigint
|
||||
observation | observation_concept_id | YES | NO | integer | integer
|
||||
observation | observation_datetime | YES | NO | timestamp without time zone | timestamp without time zone
|
||||
observation | observation_id | YES | NO | bigint | bigint
|
||||
observation | observation_source_concept_id | YES | NO | integer | integer
|
||||
observation | observation_type_concept_id | YES | NO | integer | integer
|
||||
observation | person_id | YES | NO | bigint | bigint
|
||||
observation_period | observation_period_end_date | YES | NO | date | date
|
||||
observation_period | observation_period_id | YES | NO | bigint | bigint
|
||||
observation_period | observation_period_start_date | YES | NO | date | date
|
||||
observation_period | period_type_concept_id | YES | NO | integer | integer
|
||||
observation_period | person_id | YES | NO | bigint | bigint
|
||||
payer_plan_period | payer_concept_id | YES | NO | integer | integer
|
||||
payer_plan_period | payer_plan_period_end_date | YES | NO | date | date
|
||||
payer_plan_period | payer_plan_period_id | YES | NO | integer | bigint
|
||||
payer_plan_period | payer_plan_period_start_date | YES | NO | date | date
|
||||
payer_plan_period | payer_source_concept_id | YES | NO | integer | integer
|
||||
payer_plan_period | person_id | YES | NO | integer | bigint
|
||||
payer_plan_period | plan_concept_id | YES | NO | integer | integer
|
||||
payer_plan_period | plan_source_concept_id | YES | NO | integer | integer
|
||||
payer_plan_period | sponsor_concept_id | YES | NO | integer | integer
|
||||
person | ethnicity_concept_id | YES | NO | integer | integer
|
||||
person | ethnicity_source_concept_id | YES | NO | integer | integer
|
||||
person | gender_concept_id | YES | NO | integer | integer
|
||||
person | gender_source_concept_id | YES | NO | integer | integer
|
||||
person | person_id | YES | NO | bigint | bigint
|
||||
person | race_concept_id | YES | NO | integer | integer
|
||||
person | race_source_concept_id | YES | NO | integer | integer
|
||||
person | year_of_birth | YES | NO | integer | integer
|
||||
procedure_occurrence | person_id | YES | NO | bigint | bigint
|
||||
procedure_occurrence | procedure_concept_id | YES | NO | integer | integer
|
||||
procedure_occurrence | procedure_datetime | YES | NO | timestamp without time zone | timestamp without time zone
|
||||
procedure_occurrence | procedure_occurrence_id | YES | NO | bigint | bigint
|
||||
procedure_occurrence | procedure_source_concept_id | YES | NO | integer | integer
|
||||
procedure_occurrence | procedure_type_concept_id | YES | NO | integer | integer
|
||||
provider | gender_concept_id | YES | NO | integer | integer
|
||||
provider | gender_source_concept_id | YES | NO | integer | integer
|
||||
provider | provider_id | YES | NO | bigint | bigint
|
||||
provider | specialty_concept_id | YES | NO | integer | integer
|
||||
provider | specialty_source_concept_id | YES | NO | integer | integer
|
||||
provider | year_of_birth | YES | YES | bigint | integer
|
||||
relationship | defines_ancestry | YES | NO | character varying | character varying
|
||||
relationship | is_hierarchical | YES | NO | character varying | character varying
|
||||
relationship | relationship_concept_id | YES | NO | integer | integer
|
||||
relationship | relationship_id | YES | NO | character varying | character varying
|
||||
relationship | relationship_name | YES | NO | character varying | character varying
|
||||
relationship | reverse_relationship_id | YES | NO | character varying | character varying
|
||||
source_to_concept_map | source_code | YES | NO | character varying | character varying
|
||||
source_to_concept_map | source_concept_id | YES | NO | integer | integer
|
||||
source_to_concept_map | source_vocabulary_id | YES | NO | character varying | character varying
|
||||
source_to_concept_map | target_concept_id | YES | NO | integer | integer
|
||||
source_to_concept_map | target_vocabulary_id | YES | NO | character varying | character varying
|
||||
source_to_concept_map | valid_end_date | YES | NO | date | date
|
||||
source_to_concept_map | valid_start_date | YES | NO | date | date
|
||||
specimen | person_id | YES | NO | bigint | bigint
|
||||
specimen | specimen_concept_id | YES | NO | integer | integer
|
||||
specimen | specimen_date | YES | NO | date | date
|
||||
specimen | specimen_id | YES | NO | bigint | bigint
|
||||
specimen | specimen_type_concept_id | YES | NO | integer | integer
|
||||
visit_detail | admitted_from_concept_id | YES | YES | integer | character varying
|
||||
visit_detail | admitted_from_source_value | YES | NO | character varying | integer
|
||||
visit_detail | care_site_id | YES | YES | integer | bigint
|
||||
visit_detail | person_id | YES | NO | bigint | bigint
|
||||
visit_detail | preceding_visit_detail_id | YES | YES | integer | bigint
|
||||
visit_detail | provider_id | YES | YES | integer | bigint
|
||||
visit_detail | visit_detail_concept_id | YES | NO | integer | integer
|
||||
visit_detail | visit_detail_end_date | YES | NO | date | date
|
||||
visit_detail | visit_detail_id | YES | NO | bigint | bigint
|
||||
visit_detail | visit_detail_source_concept_id | YES | NO | integer | integer
|
||||
visit_detail | visit_detail_start_date | YES | NO | date | date
|
||||
visit_detail | visit_detail_type_concept_id | YES | NO | integer | integer
|
||||
visit_detail | visit_occurrence_id | YES | NO | bigint | bigint
|
||||
visit_occurrence | admitted_from_concept_id | YES | NO | integer | integer
|
||||
visit_occurrence | person_id | YES | NO | bigint | bigint
|
||||
visit_occurrence | visit_concept_id | YES | NO | integer | integer
|
||||
visit_occurrence | visit_end_datetime | YES | NO | timestamp without time zone | timestamp without time zone
|
||||
visit_occurrence | visit_occurrence_id | YES | NO | bigint | bigint
|
||||
visit_occurrence | visit_source_concept_id | YES | NO | integer | integer
|
||||
visit_occurrence | visit_start_datetime | YES | NO | timestamp without time zone | timestamp without time zone
|
||||
visit_occurrence | visit_type_concept_id | YES | NO | integer | integer
|
||||
vocabulary | vocabulary_reference | YES | NO | character varying | character varying
|
|
@ -0,0 +1,481 @@
|
|||
|
||||
table_name | column_name | status
|
||||
----------------------+--------------------------------+--------------------
|
||||
care_site | care_site_id | IN BOTH
|
||||
care_site | place_of_service_concept_id | IN BOTH
|
||||
care_site | location_id | IN BOTH
|
||||
care_site | care_site_name | IN BOTH
|
||||
care_site | care_site_source_value | IN BOTH
|
||||
care_site | place_of_service_source_value | IN BOTH
|
||||
cdm_source | cdm_source_name | IN BOTH
|
||||
cdm_source | cdm_source_abbreviation | IN BOTH
|
||||
cdm_source | cdm_holder | IN BOTH
|
||||
cdm_source | source_description | IN BOTH
|
||||
cdm_source | source_documentation_reference | IN BOTH
|
||||
cdm_source | cdm_etl_reference | IN BOTH
|
||||
cdm_source | source_release_date | IN BOTH
|
||||
cdm_source | cdm_release_date | IN BOTH
|
||||
cdm_source | cdm_version | IN BOTH
|
||||
cdm_source | vocabulary_version | IN BOTH
|
||||
cdm_source | cdm_version_concept_id | MISSING FROM v6.0.1
|
||||
concept | concept_id | IN BOTH
|
||||
concept | valid_start_date | IN BOTH
|
||||
concept | valid_end_date | IN BOTH
|
||||
concept | concept_name | IN BOTH
|
||||
concept | domain_id | IN BOTH
|
||||
concept | vocabulary_id | IN BOTH
|
||||
concept | concept_class_id | IN BOTH
|
||||
concept | standard_concept | IN BOTH
|
||||
concept | concept_code | IN BOTH
|
||||
concept | invalid_reason | IN BOTH
|
||||
concept_ancestor | ancestor_concept_id | IN BOTH
|
||||
concept_ancestor | descendant_concept_id | IN BOTH
|
||||
concept_ancestor | min_levels_of_separation | IN BOTH
|
||||
concept_ancestor | max_levels_of_separation | IN BOTH
|
||||
concept_class | concept_class_concept_id | IN BOTH
|
||||
concept_class | concept_class_id | IN BOTH
|
||||
concept_class | concept_class_name | IN BOTH
|
||||
concept_relationship | concept_id_1 | IN BOTH
|
||||
concept_relationship | concept_id_2 | IN BOTH
|
||||
concept_relationship | valid_start_date | IN BOTH
|
||||
concept_relationship | valid_end_date | IN BOTH
|
||||
concept_relationship | relationship_id | IN BOTH
|
||||
concept_relationship | invalid_reason | IN BOTH
|
||||
concept_synonym | concept_id | IN BOTH
|
||||
concept_synonym | language_concept_id | IN BOTH
|
||||
concept_synonym | concept_synonym_name | IN BOTH
|
||||
condition_era | condition_era_id | IN BOTH
|
||||
condition_era | person_id | IN BOTH
|
||||
condition_era | condition_concept_id | IN BOTH
|
||||
condition_era | condition_occurrence_count | IN BOTH
|
||||
condition_era | condition_era_start_datetime | MISSING FROM v5.4.0
|
||||
condition_era | condition_era_end_datetime | MISSING FROM v5.4.0
|
||||
condition_era | condition_era_start_date | MISSING FROM v6.0.1
|
||||
condition_era | condition_era_end_date | MISSING FROM v6.0.1
|
||||
condition_occurrence | condition_occurrence_id | IN BOTH
|
||||
condition_occurrence | person_id | IN BOTH
|
||||
condition_occurrence | condition_concept_id | IN BOTH
|
||||
condition_occurrence | condition_start_date | IN BOTH
|
||||
condition_occurrence | condition_start_datetime | IN BOTH
|
||||
condition_occurrence | condition_end_date | IN BOTH
|
||||
condition_occurrence | condition_end_datetime | IN BOTH
|
||||
condition_occurrence | condition_type_concept_id | IN BOTH
|
||||
condition_occurrence | provider_id | IN BOTH
|
||||
condition_occurrence | visit_occurrence_id | IN BOTH
|
||||
condition_occurrence | visit_detail_id | IN BOTH
|
||||
condition_occurrence | condition_source_concept_id | IN BOTH
|
||||
condition_occurrence | condition_status_concept_id | IN BOTH
|
||||
condition_occurrence | stop_reason | IN BOTH
|
||||
condition_occurrence | condition_source_value | IN BOTH
|
||||
condition_occurrence | condition_status_source_value | IN BOTH
|
||||
cost | cost_id | IN BOTH
|
||||
cost | cost_event_id | IN BOTH
|
||||
cost | cost_type_concept_id | IN BOTH
|
||||
cost | currency_concept_id | IN BOTH
|
||||
cost | payer_plan_period_id | IN BOTH
|
||||
cost | revenue_code_concept_id | IN BOTH
|
||||
cost | drg_concept_id | IN BOTH
|
||||
cost | drg_source_value | IN BOTH
|
||||
cost | person_id | MISSING FROM v5.4.0
|
||||
cost | cost_event_field_concept_id | MISSING FROM v5.4.0
|
||||
cost | cost_concept_id | MISSING FROM v5.4.0
|
||||
cost | cost_source_concept_id | MISSING FROM v5.4.0
|
||||
cost | cost_source_value | MISSING FROM v5.4.0
|
||||
cost | cost | MISSING FROM v5.4.0
|
||||
cost | incurred_date | MISSING FROM v5.4.0
|
||||
cost | billed_date | MISSING FROM v5.4.0
|
||||
cost | paid_date | MISSING FROM v5.4.0
|
||||
cost | revenue_code_source_value | MISSING FROM v5.4.0
|
||||
cost | total_charge | MISSING FROM v6.0.1
|
||||
cost | total_cost | MISSING FROM v6.0.1
|
||||
cost | total_paid | MISSING FROM v6.0.1
|
||||
cost | paid_by_payer | MISSING FROM v6.0.1
|
||||
cost | paid_by_patient | MISSING FROM v6.0.1
|
||||
cost | paid_patient_copay | MISSING FROM v6.0.1
|
||||
cost | paid_patient_coinsurance | MISSING FROM v6.0.1
|
||||
cost | paid_patient_deductible | MISSING FROM v6.0.1
|
||||
cost | paid_by_primary | MISSING FROM v6.0.1
|
||||
cost | paid_ingredient_cost | MISSING FROM v6.0.1
|
||||
cost | paid_dispensing_fee | MISSING FROM v6.0.1
|
||||
cost | amount_allowed | MISSING FROM v6.0.1
|
||||
cost | cost_domain_id | MISSING FROM v6.0.1
|
||||
cost | reveue_code_source_value | MISSING FROM v6.0.1
|
||||
death | person_id | MISSING FROM v6.0.1
|
||||
death | death_date | MISSING FROM v6.0.1
|
||||
death | death_datetime | MISSING FROM v6.0.1
|
||||
death | death_type_concept_id | MISSING FROM v6.0.1
|
||||
death | cause_concept_id | MISSING FROM v6.0.1
|
||||
death | cause_source_concept_id | MISSING FROM v6.0.1
|
||||
death | cause_source_value | MISSING FROM v6.0.1
|
||||
device_exposure | device_exposure_id | IN BOTH
|
||||
device_exposure | person_id | IN BOTH
|
||||
device_exposure | device_concept_id | IN BOTH
|
||||
device_exposure | device_exposure_start_date | IN BOTH
|
||||
device_exposure | device_exposure_start_datetime | IN BOTH
|
||||
device_exposure | device_exposure_end_date | IN BOTH
|
||||
device_exposure | device_exposure_end_datetime | IN BOTH
|
||||
device_exposure | device_type_concept_id | IN BOTH
|
||||
device_exposure | quantity | IN BOTH
|
||||
device_exposure | provider_id | IN BOTH
|
||||
device_exposure | visit_occurrence_id | IN BOTH
|
||||
device_exposure | visit_detail_id | IN BOTH
|
||||
device_exposure | device_source_concept_id | IN BOTH
|
||||
device_exposure | device_source_value | IN BOTH
|
||||
device_exposure | unique_device_id | IN BOTH
|
||||
device_exposure | production_id | MISSING FROM v6.0.1
|
||||
device_exposure | unit_concept_id | MISSING FROM v6.0.1
|
||||
device_exposure | unit_source_value | MISSING FROM v6.0.1
|
||||
device_exposure | unit_source_concept_id | MISSING FROM v6.0.1
|
||||
domain | domain_concept_id | IN BOTH
|
||||
domain | domain_id | IN BOTH
|
||||
domain | domain_name | IN BOTH
|
||||
dose_era | dose_era_id | IN BOTH
|
||||
dose_era | person_id | IN BOTH
|
||||
dose_era | drug_concept_id | IN BOTH
|
||||
dose_era | unit_concept_id | IN BOTH
|
||||
dose_era | dose_value | IN BOTH
|
||||
dose_era | dose_era_start_datetime | MISSING FROM v5.4.0
|
||||
dose_era | dose_era_end_datetime | MISSING FROM v5.4.0
|
||||
dose_era | dose_era_start_date | MISSING FROM v6.0.1
|
||||
dose_era | dose_era_end_date | MISSING FROM v6.0.1
|
||||
drug_era | drug_era_id | IN BOTH
|
||||
drug_era | person_id | IN BOTH
|
||||
drug_era | drug_concept_id | IN BOTH
|
||||
drug_era | drug_exposure_count | IN BOTH
|
||||
drug_era | gap_days | IN BOTH
|
||||
drug_era | drug_era_start_datetime | MISSING FROM v5.4.0
|
||||
drug_era | drug_era_end_datetime | MISSING FROM v5.4.0
|
||||
drug_era | drug_era_start_date | MISSING FROM v6.0.1
|
||||
drug_era | drug_era_end_date | MISSING FROM v6.0.1
|
||||
drug_exposure | drug_exposure_id | IN BOTH
|
||||
drug_exposure | person_id | IN BOTH
|
||||
drug_exposure | drug_concept_id | IN BOTH
|
||||
drug_exposure | drug_exposure_start_date | IN BOTH
|
||||
drug_exposure | drug_exposure_start_datetime | IN BOTH
|
||||
drug_exposure | drug_exposure_end_date | IN BOTH
|
||||
drug_exposure | drug_exposure_end_datetime | IN BOTH
|
||||
drug_exposure | verbatim_end_date | IN BOTH
|
||||
drug_exposure | drug_type_concept_id | IN BOTH
|
||||
drug_exposure | refills | IN BOTH
|
||||
drug_exposure | quantity | IN BOTH
|
||||
drug_exposure | days_supply | IN BOTH
|
||||
drug_exposure | route_concept_id | IN BOTH
|
||||
drug_exposure | provider_id | IN BOTH
|
||||
drug_exposure | visit_occurrence_id | IN BOTH
|
||||
drug_exposure | visit_detail_id | IN BOTH
|
||||
drug_exposure | drug_source_concept_id | IN BOTH
|
||||
drug_exposure | stop_reason | IN BOTH
|
||||
drug_exposure | sig | IN BOTH
|
||||
drug_exposure | lot_number | IN BOTH
|
||||
drug_exposure | drug_source_value | IN BOTH
|
||||
drug_exposure | route_source_value | IN BOTH
|
||||
drug_exposure | dose_unit_source_value | IN BOTH
|
||||
drug_strength | drug_concept_id | IN BOTH
|
||||
drug_strength | ingredient_concept_id | IN BOTH
|
||||
drug_strength | amount_value | IN BOTH
|
||||
drug_strength | amount_unit_concept_id | IN BOTH
|
||||
drug_strength | numerator_value | IN BOTH
|
||||
drug_strength | numerator_unit_concept_id | IN BOTH
|
||||
drug_strength | denominator_value | IN BOTH
|
||||
drug_strength | denominator_unit_concept_id | IN BOTH
|
||||
drug_strength | box_size | IN BOTH
|
||||
drug_strength | valid_start_date | IN BOTH
|
||||
drug_strength | valid_end_date | IN BOTH
|
||||
drug_strength | invalid_reason | IN BOTH
|
||||
episode | episode_id | MISSING FROM v6.0.1
|
||||
episode | person_id | MISSING FROM v6.0.1
|
||||
episode | episode_concept_id | MISSING FROM v6.0.1
|
||||
episode | episode_start_date | MISSING FROM v6.0.1
|
||||
episode | episode_start_datetime | MISSING FROM v6.0.1
|
||||
episode | episode_end_date | MISSING FROM v6.0.1
|
||||
episode | episode_end_datetime | MISSING FROM v6.0.1
|
||||
episode | episode_parent_id | MISSING FROM v6.0.1
|
||||
episode | episode_number | MISSING FROM v6.0.1
|
||||
episode | episode_object_concept_id | MISSING FROM v6.0.1
|
||||
episode | episode_type_concept_id | MISSING FROM v6.0.1
|
||||
episode | episode_source_value | MISSING FROM v6.0.1
|
||||
episode | episode_source_concept_id | MISSING FROM v6.0.1
|
||||
episode_event | episode_id | MISSING FROM v6.0.1
|
||||
episode_event | event_id | MISSING FROM v6.0.1
|
||||
episode_event | episode_event_field_concept_id | MISSING FROM v6.0.1
|
||||
fact_relationship | domain_concept_id_1 | IN BOTH
|
||||
fact_relationship | fact_id_1 | IN BOTH
|
||||
fact_relationship | domain_concept_id_2 | IN BOTH
|
||||
fact_relationship | fact_id_2 | IN BOTH
|
||||
fact_relationship | relationship_concept_id | IN BOTH
|
||||
location | location_id | IN BOTH
|
||||
location | address_1 | IN BOTH
|
||||
location | address_2 | IN BOTH
|
||||
location | city | IN BOTH
|
||||
location | state | IN BOTH
|
||||
location | zip | IN BOTH
|
||||
location | county | IN BOTH
|
||||
location | location_source_value | IN BOTH
|
||||
location | latitude | IN BOTH
|
||||
location | longitude | IN BOTH
|
||||
location | country_concept_id | MISSING FROM v6.0.1
|
||||
location | country_source_value | MISSING FROM v6.0.1
|
||||
location_history | location_id | MISSING FROM v5.4.0
|
||||
location_history | relationship_type_concept_id | MISSING FROM v5.4.0
|
||||
location_history | domain_id | MISSING FROM v5.4.0
|
||||
location_history | entity_id | MISSING FROM v5.4.0
|
||||
location_history | start_date | MISSING FROM v5.4.0
|
||||
location_history | end_date | MISSING FROM v5.4.0
|
||||
measurement | measurement_id | IN BOTH
|
||||
measurement | person_id | IN BOTH
|
||||
measurement | measurement_concept_id | IN BOTH
|
||||
measurement | measurement_date | IN BOTH
|
||||
measurement | measurement_datetime | IN BOTH
|
||||
measurement | measurement_time | IN BOTH
|
||||
measurement | measurement_type_concept_id | IN BOTH
|
||||
measurement | operator_concept_id | IN BOTH
|
||||
measurement | value_as_number | IN BOTH
|
||||
measurement | value_as_concept_id | IN BOTH
|
||||
measurement | unit_concept_id | IN BOTH
|
||||
measurement | range_low | IN BOTH
|
||||
measurement | range_high | IN BOTH
|
||||
measurement | provider_id | IN BOTH
|
||||
measurement | visit_occurrence_id | IN BOTH
|
||||
measurement | visit_detail_id | IN BOTH
|
||||
measurement | measurement_source_concept_id | IN BOTH
|
||||
measurement | measurement_source_value | IN BOTH
|
||||
measurement | unit_source_value | IN BOTH
|
||||
measurement | value_source_value | IN BOTH
|
||||
measurement | unit_source_id | MISSING FROM v6.0.1
|
||||
measurement | measurement_event_id | MISSING FROM v6.0.1
|
||||
measurement | meas_event_field_concept_id | MISSING FROM v6.0.1
|
||||
metadata | metadata_concept_id | IN BOTH
|
||||
metadata | metadata_type_concept_id | IN BOTH
|
||||
metadata | value_as_concept_id | IN BOTH
|
||||
metadata | metadata_date | IN BOTH
|
||||
metadata | metadata_datetime | IN BOTH
|
||||
metadata | name | IN BOTH
|
||||
metadata | value_as_string | IN BOTH
|
||||
metadata | metadata_id | MISSING FROM v6.0.1
|
||||
metadata | value_as_number | MISSING FROM v6.0.1
|
||||
note | note_id | IN BOTH
|
||||
note | person_id | IN BOTH
|
||||
note | note_date | IN BOTH
|
||||
note | note_datetime | IN BOTH
|
||||
note | note_type_concept_id | IN BOTH
|
||||
note | note_class_concept_id | IN BOTH
|
||||
note | encoding_concept_id | IN BOTH
|
||||
note | language_concept_id | IN BOTH
|
||||
note | provider_id | IN BOTH
|
||||
note | visit_occurrence_id | IN BOTH
|
||||
note | visit_detail_id | IN BOTH
|
||||
note | note_title | IN BOTH
|
||||
note | note_text | IN BOTH
|
||||
note | note_source_value | IN BOTH
|
||||
note | note_event_id | IN BOTH
|
||||
note | note_event_field_concept_id | IN BOTH
|
||||
note_nlp | note_nlp_id | IN BOTH
|
||||
note_nlp | note_id | IN BOTH
|
||||
note_nlp | section_concept_id | IN BOTH
|
||||
note_nlp | note_nlp_concept_id | IN BOTH
|
||||
note_nlp | note_nlp_source_concept_id | IN BOTH
|
||||
note_nlp | nlp_date | IN BOTH
|
||||
note_nlp | nlp_datetime | IN BOTH
|
||||
note_nlp | snippet | IN BOTH
|
||||
note_nlp | offset | IN BOTH
|
||||
note_nlp | lexical_variant | IN BOTH
|
||||
note_nlp | nlp_system | IN BOTH
|
||||
note_nlp | term_exists | IN BOTH
|
||||
note_nlp | term_temporal | IN BOTH
|
||||
note_nlp | term_modifiers | IN BOTH
|
||||
observation | observation_id | IN BOTH
|
||||
observation | person_id | IN BOTH
|
||||
observation | observation_concept_id | IN BOTH
|
||||
observation | observation_date | IN BOTH
|
||||
observation | observation_datetime | IN BOTH
|
||||
observation | observation_type_concept_id | IN BOTH
|
||||
observation | value_as_number | IN BOTH
|
||||
observation | value_as_concept_id | IN BOTH
|
||||
observation | qualifier_concept_id | IN BOTH
|
||||
observation | unit_concept_id | IN BOTH
|
||||
observation | provider_id | IN BOTH
|
||||
observation | visit_occurrence_id | IN BOTH
|
||||
observation | visit_detail_id | IN BOTH
|
||||
observation | observation_source_concept_id | IN BOTH
|
||||
observation | value_as_string | IN BOTH
|
||||
observation | observation_source_value | IN BOTH
|
||||
observation | unit_source_value | IN BOTH
|
||||
observation | qualifier_source_value | IN BOTH
|
||||
observation | observation_event_id | IN BOTH
|
||||
observation | obs_event_field_concept_id | IN BOTH
|
||||
observation | value_as_datetime | MISSING FROM v5.4.0
|
||||
observation | value_source_value | MISSING FROM v6.0.1
|
||||
observation_period | observation_period_id | IN BOTH
|
||||
observation_period | person_id | IN BOTH
|
||||
observation_period | observation_period_start_date | IN BOTH
|
||||
observation_period | observation_period_end_date | IN BOTH
|
||||
observation_period | period_type_concept_id | IN BOTH
|
||||
payer_plan_period | payer_plan_period_id | IN BOTH
|
||||
payer_plan_period | person_id | IN BOTH
|
||||
payer_plan_period | payer_plan_period_start_date | IN BOTH
|
||||
payer_plan_period | payer_plan_period_end_date | IN BOTH
|
||||
payer_plan_period | payer_concept_id | IN BOTH
|
||||
payer_plan_period | payer_source_concept_id | IN BOTH
|
||||
payer_plan_period | plan_concept_id | IN BOTH
|
||||
payer_plan_period | plan_source_concept_id | IN BOTH
|
||||
payer_plan_period | sponsor_concept_id | IN BOTH
|
||||
payer_plan_period | sponsor_source_concept_id | IN BOTH
|
||||
payer_plan_period | stop_reason_concept_id | IN BOTH
|
||||
payer_plan_period | stop_reason_source_concept_id | IN BOTH
|
||||
payer_plan_period | payer_source_value | IN BOTH
|
||||
payer_plan_period | plan_source_value | IN BOTH
|
||||
payer_plan_period | sponsor_source_value | IN BOTH
|
||||
payer_plan_period | family_source_value | IN BOTH
|
||||
payer_plan_period | stop_reason_source_value | IN BOTH
|
||||
payer_plan_period | contract_person_id | MISSING FROM v5.4.0
|
||||
payer_plan_period | contract_concept_id | MISSING FROM v5.4.0
|
||||
payer_plan_period | contract_source_value | MISSING FROM v5.4.0
|
||||
payer_plan_period | contract_source_concept_id | MISSING FROM v5.4.0
|
||||
person | person_id | IN BOTH
|
||||
person | gender_concept_id | IN BOTH
|
||||
person | year_of_birth | IN BOTH
|
||||
person | month_of_birth | IN BOTH
|
||||
person | day_of_birth | IN BOTH
|
||||
person | birth_datetime | IN BOTH
|
||||
person | race_concept_id | IN BOTH
|
||||
person | ethnicity_concept_id | IN BOTH
|
||||
person | location_id | IN BOTH
|
||||
person | provider_id | IN BOTH
|
||||
person | care_site_id | IN BOTH
|
||||
person | gender_source_concept_id | IN BOTH
|
||||
person | race_source_concept_id | IN BOTH
|
||||
person | ethnicity_source_concept_id | IN BOTH
|
||||
person | person_source_value | IN BOTH
|
||||
person | gender_source_value | IN BOTH
|
||||
person | race_source_value | IN BOTH
|
||||
person | ethnicity_source_value | IN BOTH
|
||||
person | death_datetime | MISSING FROM v5.4.0
|
||||
procedure_occurrence | procedure_occurrence_id | IN BOTH
|
||||
procedure_occurrence | person_id | IN BOTH
|
||||
procedure_occurrence | procedure_concept_id | IN BOTH
|
||||
procedure_occurrence | procedure_date | IN BOTH
|
||||
procedure_occurrence | procedure_datetime | IN BOTH
|
||||
procedure_occurrence | procedure_type_concept_id | IN BOTH
|
||||
procedure_occurrence | modifier_concept_id | IN BOTH
|
||||
procedure_occurrence | quantity | IN BOTH
|
||||
procedure_occurrence | provider_id | IN BOTH
|
||||
procedure_occurrence | visit_occurrence_id | IN BOTH
|
||||
procedure_occurrence | visit_detail_id | IN BOTH
|
||||
procedure_occurrence | procedure_source_concept_id | IN BOTH
|
||||
procedure_occurrence | procedure_source_value | IN BOTH
|
||||
procedure_occurrence | modifier_source_value | IN BOTH
|
||||
procedure_occurrence | procedure_end_date | MISSING FROM v6.0.1
|
||||
procedure_occurrence | procedure_end_datetime | MISSING FROM v6.0.1
|
||||
provider | provider_id | IN BOTH
|
||||
provider | specialty_concept_id | IN BOTH
|
||||
provider | care_site_id | IN BOTH
|
||||
provider | year_of_birth | IN BOTH
|
||||
provider | gender_concept_id | IN BOTH
|
||||
provider | specialty_source_concept_id | IN BOTH
|
||||
provider | gender_source_concept_id | IN BOTH
|
||||
provider | provider_name | IN BOTH
|
||||
provider | npi | IN BOTH
|
||||
provider | dea | IN BOTH
|
||||
provider | provider_source_value | IN BOTH
|
||||
provider | specialty_source_value | IN BOTH
|
||||
provider | gender_source_value | IN BOTH
|
||||
relationship | relationship_concept_id | IN BOTH
|
||||
relationship | relationship_id | IN BOTH
|
||||
relationship | relationship_name | IN BOTH
|
||||
relationship | is_hierarchical | IN BOTH
|
||||
relationship | defines_ancestry | IN BOTH
|
||||
relationship | reverse_relationship_id | IN BOTH
|
||||
source_to_concept_map | source_concept_id | IN BOTH
|
||||
source_to_concept_map | target_concept_id | IN BOTH
|
||||
source_to_concept_map | valid_start_date | IN BOTH
|
||||
source_to_concept_map | valid_end_date | IN BOTH
|
||||
source_to_concept_map | source_code | IN BOTH
|
||||
source_to_concept_map | source_vocabulary_id | IN BOTH
|
||||
source_to_concept_map | source_code_description | IN BOTH
|
||||
source_to_concept_map | target_vocabulary_id | IN BOTH
|
||||
source_to_concept_map | invalid_reason | IN BOTH
|
||||
specimen | specimen_id | IN BOTH
|
||||
specimen | person_id | IN BOTH
|
||||
specimen | specimen_concept_id | IN BOTH
|
||||
specimen | specimen_type_concept_id | IN BOTH
|
||||
specimen | specimen_date | IN BOTH
|
||||
specimen | specimen_datetime | IN BOTH
|
||||
specimen | quantity | IN BOTH
|
||||
specimen | unit_concept_id | IN BOTH
|
||||
specimen | anatomic_site_concept_id | IN BOTH
|
||||
specimen | disease_status_concept_id | IN BOTH
|
||||
specimen | specimen_source_id | IN BOTH
|
||||
specimen | specimen_source_value | IN BOTH
|
||||
specimen | unit_source_value | IN BOTH
|
||||
specimen | anatomic_site_source_value | IN BOTH
|
||||
specimen | disease_status_source_value | IN BOTH
|
||||
survey_conduct | survey_conduct_id | MISSING FROM v5.4.0
|
||||
survey_conduct | person_id | MISSING FROM v5.4.0
|
||||
survey_conduct | survey_concept_id | MISSING FROM v5.4.0
|
||||
survey_conduct | survey_start_date | MISSING FROM v5.4.0
|
||||
survey_conduct | survey_start_datetime | MISSING FROM v5.4.0
|
||||
survey_conduct | survey_end_date | MISSING FROM v5.4.0
|
||||
survey_conduct | survey_end_datetime | MISSING FROM v5.4.0
|
||||
survey_conduct | provider_id | MISSING FROM v5.4.0
|
||||
survey_conduct | assisted_concept_id | MISSING FROM v5.4.0
|
||||
survey_conduct | respondent_type_concept_id | MISSING FROM v5.4.0
|
||||
survey_conduct | timing_concept_id | MISSING FROM v5.4.0
|
||||
survey_conduct | collection_method_concept_id | MISSING FROM v5.4.0
|
||||
survey_conduct | assisted_source_value | MISSING FROM v5.4.0
|
||||
survey_conduct | respondent_type_source_value | MISSING FROM v5.4.0
|
||||
survey_conduct | timing_source_value | MISSING FROM v5.4.0
|
||||
survey_conduct | collection_method_source_value | MISSING FROM v5.4.0
|
||||
survey_conduct | survey_source_value | MISSING FROM v5.4.0
|
||||
survey_conduct | survey_source_concept_id | MISSING FROM v5.4.0
|
||||
survey_conduct | survey_source_identifier | MISSING FROM v5.4.0
|
||||
survey_conduct | validated_survey_concept_id | MISSING FROM v5.4.0
|
||||
survey_conduct | validated_survey_source_value | MISSING FROM v5.4.0
|
||||
survey_conduct | survey_version_number | MISSING FROM v5.4.0
|
||||
survey_conduct | visit_occurrence_id | MISSING FROM v5.4.0
|
||||
survey_conduct | response_visit_occurrence_id | MISSING FROM v5.4.0
|
||||
visit_detail | visit_detail_id | IN BOTH
|
||||
visit_detail | person_id | IN BOTH
|
||||
visit_detail | visit_detail_concept_id | IN BOTH
|
||||
visit_detail | visit_detail_start_date | IN BOTH
|
||||
visit_detail | visit_detail_start_datetime | IN BOTH
|
||||
visit_detail | visit_detail_end_date | IN BOTH
|
||||
visit_detail | visit_detail_end_datetime | IN BOTH
|
||||
visit_detail | visit_detail_type_concept_id | IN BOTH
|
||||
visit_detail | provider_id | IN BOTH
|
||||
visit_detail | care_site_id | IN BOTH
|
||||
visit_detail | preceding_visit_detail_id | IN BOTH
|
||||
visit_detail | visit_detail_source_concept_id | IN BOTH
|
||||
visit_detail | visit_occurrence_id | IN BOTH
|
||||
visit_detail | visit_detail_source_value | IN BOTH
|
||||
visit_detail | admitted_from_concept_id | IN BOTH
|
||||
visit_detail | admitted_from_source_value | IN BOTH
|
||||
visit_detail | discharge_to_source_value | MISSING FROM v5.4.0
|
||||
visit_detail | discharge_to_concept_id | MISSING FROM v5.4.0
|
||||
visit_detail | visit_detail_parent_id | MISSING FROM v5.4.0
|
||||
visit_detail | discharged_to_concept_id | MISSING FROM v6.0.1
|
||||
visit_detail | discharged_to_source_value | MISSING FROM v6.0.1
|
||||
visit_detail | parent_visit_detail_id | MISSING FROM v6.0.1
|
||||
visit_occurrence | visit_occurrence_id | IN BOTH
|
||||
visit_occurrence | person_id | IN BOTH
|
||||
visit_occurrence | visit_concept_id | IN BOTH
|
||||
visit_occurrence | visit_start_date | IN BOTH
|
||||
visit_occurrence | visit_start_datetime | IN BOTH
|
||||
visit_occurrence | visit_end_date | IN BOTH
|
||||
visit_occurrence | visit_end_datetime | IN BOTH
|
||||
visit_occurrence | visit_type_concept_id | IN BOTH
|
||||
visit_occurrence | provider_id | IN BOTH
|
||||
visit_occurrence | care_site_id | IN BOTH
|
||||
visit_occurrence | visit_source_concept_id | IN BOTH
|
||||
visit_occurrence | preceding_visit_occurrence_id | IN BOTH
|
||||
visit_occurrence | visit_source_value | IN BOTH
|
||||
visit_occurrence | admitted_from_concept_id | IN BOTH
|
||||
visit_occurrence | admitted_from_source_value | IN BOTH
|
||||
visit_occurrence | discharge_to_concept_id | MISSING FROM v5.4.0
|
||||
visit_occurrence | discharge_to_source_value | MISSING FROM v5.4.0
|
||||
visit_occurrence | discharged_to_concept_id | MISSING FROM v6.0.1
|
||||
visit_occurrence | discharged_to_source_value | MISSING FROM v6.0.1
|
||||
vocabulary | vocabulary_id | IN BOTH
|
||||
vocabulary | vocabulary_name | IN BOTH
|
||||
vocabulary | vocabulary_reference | IN BOTH
|
||||
vocabulary | vocabulary_version | IN BOTH
|
||||
vocabulary | vocabulary_concept_id | IN BOTH
|
|
@ -0,0 +1,134 @@
|
|||
|
||||
-- DEATH
|
||||
CREATE TABLE DEATH ( person_id integer NOT NULL,
|
||||
death_date date NOT NULL,
|
||||
death_datetime TIMESTAMP NULL,
|
||||
death_type_concept_id integer NULL,
|
||||
cause_concept_id integer NULL,
|
||||
cause_source_value varchar(50) NULL,
|
||||
cause_source_concept_id integer NULL )
|
||||
DISTKEY(person_id);
|
||||
|
||||
-- EPISODE
|
||||
CREATE TABLE EPISODE (episode_id bigint NOT NULL,
|
||||
person_id bigint 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_number integer NULL,
|
||||
episode_object_concept_id integer NOT NULL,
|
||||
episode_type_concept_id integer NOT NULL,
|
||||
episode_source_value varchar(50) NULL,
|
||||
episode_source_concept_id integer NULL )
|
||||
DISTKEY(person_id);
|
||||
|
||||
-- EPISODE_EVENT
|
||||
CREATE TABLE EPISODE_EVENT (episode_id bigint NOT NULL,
|
||||
event_id bigint NOT NULL,
|
||||
episode_event_field_concept_id integer NOT NULL )
|
||||
DISTSTYLE ALL;
|
||||
|
||||
-- PERSON
|
||||
alter table person drop column death_datetime;
|
||||
|
||||
|
||||
-- VISIT_OCCURRENCE
|
||||
alter table visit_occurrence rename column discharge_to_concept_id to discharged_to_concept_id;
|
||||
alter table visit_occurrence rename column discharge_to_source_value to discharged_to_source_value;
|
||||
|
||||
|
||||
-- VISIT_DETAIL
|
||||
alter table visit_detail rename column discharge_to_concept_id to discharged_to_concept_id;
|
||||
alter table visit_detail rename column discharge_to_source_value to discharged_to_source_value;
|
||||
alter table visit_detail rename column visit_detail_parent_id to parent_visit_detail_id;
|
||||
|
||||
-- PROCEDURE_OCCURRENCE
|
||||
alter table procedure_occurrence add column procedure_end_date date;
|
||||
alter table procedure_occurrence add column procedure_end_datetime timestamp;
|
||||
|
||||
|
||||
-- DEVICE_EXPOSURE
|
||||
alter table device_exposure add column production_id varchar(255);
|
||||
alter table device_exposure add column unit_concept_id integer;
|
||||
alter table device_exposure add column unit_source_value varchar(50);
|
||||
alter table device_exposure add column unit_source_concept_id integer;
|
||||
|
||||
|
||||
-- MEASUREMENT
|
||||
alter table measurement add column unit_source_id integer;
|
||||
alter table measurement add column measurement_event_id bigint;
|
||||
alter table measurement add column meas_event_field_concept_id integer;
|
||||
|
||||
|
||||
-- OBSERVATION
|
||||
alter table observation add column value_source_value varchar(50);
|
||||
alter table observation drop column value_as_datetime;
|
||||
|
||||
-- LOCATION
|
||||
alter location add column country_concept_id integer;
|
||||
alter location add column country_source_value varchar(80);
|
||||
|
||||
|
||||
-- PAYER_PLAN_PERIOD
|
||||
alter table payer_plan_period drop column contract_person_id;
|
||||
alter table payer_plan_period drop column contract_concept_id;
|
||||
alter table payer_plan_period drop column contract_source_value;
|
||||
alter table payer_plan_period drop column contract_source_concept_id;
|
||||
|
||||
-- COST
|
||||
alter table cost drop column person_id;
|
||||
alter table cost drop column cost_event_field_concept_id;
|
||||
alter table cost drop column cost_concept_id;
|
||||
alter table cost drop column cost_source_concept_id;
|
||||
alter table cost drop column cost_source_value;
|
||||
alter table cost drop column cost;
|
||||
alter table cost drop column incurred_date;
|
||||
alter table cost drop column billed_date;
|
||||
alter table cost drop column paid_date;
|
||||
alter table cost drop column revenue_code_source_value;
|
||||
alter cost add column total_charge float;
|
||||
alter cost add column total_cost float;
|
||||
alter cost add column total_paid float;
|
||||
alter cost add column paid_by_payer float;
|
||||
alter cost add column paid_by_patient float;
|
||||
alter cost add column paid_by_primary float;
|
||||
alter cost add column paid_patient_copay float;
|
||||
alter cost add column paid_patient_coinsurance float;
|
||||
alter cost add column paid_patient_deductible float;
|
||||
alter cost add column paid_ingredient_cost float;
|
||||
alter cost add column paid_dispensing_fee float;
|
||||
alter cost add column amount_allowed float;
|
||||
alter cost add column cost_domain_id varchar(20);
|
||||
alter cost add column revenue_code_source_value varchar(50);
|
||||
|
||||
|
||||
-- DRUG_ERA
|
||||
alter table drug_era rename column drug_era_start_datetime to drug_era_start_date;
|
||||
alter table drug_era rename column drug_era_end_datetime to drug_era_end_date;
|
||||
alter table drug_era alter column drug_era_start_date date;
|
||||
alter table drug_era alter column drug_era_end_date date;
|
||||
|
||||
|
||||
-- DOSE_ERA
|
||||
alter table dose_era rename column dose_era_start_datetime to dose_era_start_date;
|
||||
alter table dose_era rename column dose_era_end_datetime to dose_era_end_date;
|
||||
alter table dose_era alter column dose_era_start_date date;
|
||||
alter table dose_era alter column dose_era_end_date date;
|
||||
|
||||
-- CONDITION_ERA
|
||||
alter table condition_era rename column condition_era_start_datetime to condition_era_start_date;
|
||||
alter table condition_era rename column condition_era_end_datetime to condition_era_end_date;
|
||||
alter table condition_era alter column condition_era_start_date date;
|
||||
alter table condition_era alter column condition_era_end_date date;
|
||||
|
||||
|
||||
-- METADATA
|
||||
alter table metadata add column metadata_id integer;
|
||||
alter table metadata add column value_as_number float;
|
||||
|
||||
|
||||
-- CDM_SOURCE
|
||||
alter table cdm_source add column cdm_version_concept_id integer;
|
|
@ -10,7 +10,7 @@ episode,episode_parent_id,No,bigint,Use this field to find the Episode that subs
|
|||
episode,episode_number,No,integer,"For sequences of episodes, this is used to indicate the order the episodes occurred. For example, lines of treatment could be indicated here. ",Please see [article] for the details of how to count episodes.,No,No,,,,
|
||||
episode,episode_object_concept_id,Yes,integer,"A Standard Concept representing the disease phase, outcome, or other abstraction of which the episode consists. For example, if the episode_concept_id is [treatment regimen](https://athena.ohdsi.org/search-terms/terms/32531) then the episode_object_concept_id should contain the chemotherapy regimen concept, like [Afatinib monotherapy](https://athena.ohdsi.org/search-terms/terms/35804392). ",Episode entries from the 'Disease Episode' concept class should have an episode_object_concept_id that comes from the Condition domain. Episode entries from the 'Treatment Episode' concept class should have an episode_object_concept_id that scome from the 'Procedure' domain or 'Regimen' concept class.,No,Yes,concept,concept_id,"Procedure, Regimen",
|
||||
episode,episode_type_concept_id,Yes,integer,"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.",Choose the episode_type_concept_id that best represents the provenance of the record. [Accepted Concepts](https://athena.ohdsi.org/search-terms/terms?domain=Type+Concept&standardConcept=Standard&page=1&pageSize=15&query=).,No,Yes,concept,concept_id,Type Concept,
|
||||
episode,episode_source_value,No,varchar(50),The source code for the Episdoe as it appears in the source data. This code is mapped to a Standard Condition Concept in the Standardized Vocabularies and the original code is stored here for reference.,,No,No,,,,
|
||||
episode,episode_source_value,No,varchar(50),The source code for the Episode as it appears in the source data. This code is mapped to a Standard Condition Concept in the Standardized Vocabularies and the original code is stored here for reference.,,No,No,,,,
|
||||
episode,episode_source_concept_id,No,integer,A foreign key to a Episode Concept that refers to the code used in the source.,Given that the Episodes are user-defined it is unlikely that there will be a Source Concept available. If that is the case then set this field to zero. ,No,Yes,concept,concept_id,,
|
||||
episode_event,episode_id,Yes,bigint,Use this field to link the episode_event record to its episode.,Put the episode_id that subsumes the episode_event record here.,No,Yes,episode,episode_id,,
|
||||
episode_event,event_id,Yes,bigint,"This field is the primary key of the linked record in the database. For example, if the Episode Event is a Condition Occurrence, then the condition_occurrence_id of the linked record goes in this field. ",Put the primary key of the linked record here. ,No,No,,,,
|
||||
|
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,85 +1,84 @@
|
|||
cdmTableName,schema,isRequired,conceptPrefix,measurePersonCompleteness,measurePersonCompletenessThreshold,validation,tableDescription,userGuidance,etlConventions
|
||||
person,CDM,Yes,NA,No,NA,NA,"This table serves as the central identity management for all Persons in the database. It contains records that uniquely identify each person or patient, and some demographic information.",All records in this table are independent Persons.,"All Persons in a database needs one record in this table, unless they fail data quality requirements specified in the ETL. Persons with no Events should have a record nonetheless. If more than one data source contributes Events to the database, Persons must be reconciled, if possible, across the sources to create one single record per Person. The content of the BIRTH_DATETIME must be equivalent to the content of BIRTH_DAY, BIRTH_MONTH and BIRTH_YEAR."
|
||||
observation_period,CDM,Yes,NA,Yes,0,NA,"This table contains records which define spans of time during which two conditions are expected to hold: (i) Clinical Events that happened to the Person are recorded in the Event tables, and (ii) absense of records indicate such Events did not occur during this span of time.","For each Person, one or more OBSERVATION_PERIOD records may be present, but they will not overlap or be back to back to each other. Events may exist outside all of the time spans of the OBSERVATION_PERIOD records for a patient, however, absence of an Event outside these time spans cannot be construed as evidence of absence of an Event. Incidence or prevalence rates should only be calculated for the time of active OBSERVATION_PERIOD records. When constructing cohorts, outside Events can be used for inclusion criteria definition, but without any guarantee for the performance of these criteria. Also, OBSERVATION_PERIOD records can be as short as a single day, greatly disturbing the denominator of any rate calculation as part of cohort characterizations. To avoid that, apply minimal observation time as a requirement for any cohort definition.","Each Person needs to have at least one OBSERVATION_PERIOD record, which should represent time intervals with a high capture rate of Clinical Events. Some source data have very similar concepts, such as enrollment periods in insurance claims data. In other source data such as most EHR systems these time spans need to be inferred under a set of assumptions. It is the discretion of the ETL developer to define these assumptions. In many ETL solutions the start date of the first occurrence or the first high quality occurrence of a Clinical Event (Condition, Drug, Procedure, Device, Measurement, Visit) is defined as the start of the OBSERVATION_PERIOD record, and the end date of the last occurrence of last high quality occurrence of a Clinical Event, or the end of the database period becomes the end of the OBSERVATOIN_PERIOD for each Person. If a Person only has a single Clinical Event the OBSERVATION_PERIOD record can be as short as one day. Depending on these definitions it is possible that Clinical Events fall outside the time spans defined by OBSERVATION_PERIOD records. Family history or history of Clinical Events generally are not used to generate OBSERVATION_PERIOD records around the time they are referring to. Any two overlapping or adjacent OBSERVATION_PERIOD records have to be merged into one."
|
||||
visit_occurrence,CDM,No,VISIT_,Yes,0,NA,"This table contains Events where Persons engage with the healthcare system for a duration of time. They are often also called ""Encounters"". Visits are defined by a configuration of circumstances under which they occur, such as (i) whether the patient comes to a healthcare institution, the other way around, or the interaction is remote, (ii) whether and what kind of trained medical staff is delivering the service during the Visit, and (iii) whether the Visit is transient or for a longer period involving a stay in bed.","The configuration defining the Visit are described by Concepts in the Visit Domain, which form a hierarchical structure, but rolling up to generally familiar Visits adopted in most healthcare systems worldwide:
|
||||
|
||||
- [Inpatient Visit](https://athena.ohdsi.org/search-terms/terms/9201): Person visiting hospital, at a Care Site, in bed, for duration of more than one day, with physicians and other Providers permanently available to deliver service around the clock
|
||||
- [Emergency Room Visit](https://athena.ohdsi.org/search-terms/terms/9203): Person visiting dedicated healthcare institution for treating emergencies, at a Care Site, within one day, with physicians and Providers permanently available to deliver service around the clock
|
||||
- [Emergency Room and Inpatient Visit](https://athena.ohdsi.org/search-terms/terms/262): Person visiting ER followed by a subsequent Inpatient Visit, where Emergency department is part of hospital, and transition from the ER to other hospital departments is undefined
|
||||
- [Non-hospital institution Visit](https://athena.ohdsi.org/search-terms/terms/42898160): Person visiting dedicated institution for reasons of poor health, at a Care Site, long-term or permanently, with no physician but possibly other Providers permanently available to deliver service around the clock
|
||||
- [Outpatient Visit](https://athena.ohdsi.org/search-terms/terms/9202): Person visiting dedicated ambulatory healthcare institution, at a Care Site, within one day, without bed, with physicians or medical Providers delivering service during Visit
|
||||
- [Home Visit](https://athena.ohdsi.org/search-terms/terms/581476): Provider visiting Person, without a Care Site, within one day, delivering service
|
||||
- [Telehealth Visit](https://athena.ohdsi.org/search-terms/terms/5083): Patient engages with Provider through communication media
|
||||
- [Pharmacy Visit](https://athena.ohdsi.org/search-terms/terms/581458): Person visiting pharmacy for dispensing of Drug, at a Care Site, within one day
|
||||
- [Laboratory Visit](https://athena.ohdsi.org/search-terms/terms/32036): Patient visiting dedicated institution, at a Care Site, within one day, for the purpose of a Measurement.
|
||||
- [Ambulance Visit](https://athena.ohdsi.org/search-terms/terms/581478): Person using transportation service for the purpose of initiating one of the other Visits, without a Care Site, within one day, potentially with Providers accompanying the Visit and delivering service
|
||||
- [Case Management Visit](https://athena.ohdsi.org/search-terms/terms/38004193): Person interacting with healthcare system, without a Care Site, within a day, with no Providers involved, for administrative purposes
|
||||
|
||||
The Visit duration, or 'length of stay', is defined as VISIT_END_DATE - VISIT_START_DATE. For all Visits this is <1 day, except Inpatient Visits and Non-hospital institution Visits. The CDM also contains the VISIT_DETAIL table where additional information about the Visit is stored, for example, transfers between units during an inpatient Visit.","Visits can be derived easily if the source data contain coding systems for Place of Service or Procedures, like CPT codes for well visits. In those cases, the codes can be looked up and mapped to a Standard Visit Concept. Otherwise, Visit Concepts have to be identified in the ETL process. This table will contain concepts in the Visit domain. These concepts are arranged in a hierarchical structure to facilitate cohort definitions by rolling up to generally familiar Visits adopted in most healthcare systems worldwide. Visits can be adjacent to each other, i.e. the end date of one can be identical with the start date of the other. As a consequence, more than one-day Visits or their descendants can be recorded for the same day. Multi-day visits must not overlap, i.e. share days other than start and end days. It is often the case that some logic should be written for how to define visits and how to assign Visit_Concept_Id. For example, in US claims outpatient visits that appear to occur within the time period of an inpatient visit can be rolled into one with the same Visit_Occurrence_Id. In EHR data inpatient visits that are within one day of each other may be strung together to create one visit. It will all depend on the source data and how encounter records should be translated to visit occurrences. Providers can be associated with a Visit through the PROVIDER_ID field, or indirectly through PROCEDURE_OCCURRENCE records linked both to the VISIT and PROVIDER tables."
|
||||
visit_detail,CDM,No,VISIT_DETAIL_,Yes,0,NA,The VISIT_DETAIL table is an optional table used to represents details of each record in the parent VISIT_OCCURRENCE table. A good example of this would be the movement between units in a hospital during an inpatient stay or claim lines associated with a one insurance claim. For every record in the VISIT_OCCURRENCE table there may be 0 or more records in the VISIT_DETAIL table with a 1:n relationship where n may be 0. The VISIT_DETAIL table is structurally very similar to VISIT_OCCURRENCE table and belongs to the visit domain.,"The configuration defining the Visit Detail is described by Concepts in the Visit Domain, which form a hierarchical structure. The Visit Detail record will have an associated to the Visit Occurrence record in two ways: <br> 1. The Visit Detail record will have the VISIT_OCCURRENCE_ID it is associated to 2. The VISIT_DETAIL_CONCEPT_ID will be a descendant of the VISIT_CONCEPT_ID for the Visit.","It is not mandatory that the VISIT_DETAIL table be filled in, but if you find that the logic to create VISIT_OCCURRENCE records includes the roll-up of multiple smaller records to create one picture of a Visit then it is a good idea to use VISIT_DETAIL. In EHR data, for example, a Person may be in the hospital but instead of one over-arching Visit their encounters are recorded as times they interacted with a health care provider. A Person in the hospital interacts with multiple providers multiple times a day so the encounters must be strung together using some heuristic (defined by the ETL) to identify the entire Visit. In this case the encounters would be considered Visit Details and the entire Visit would be the Visit Occurrence. In this example it is also possible to use the Vocabulary to distinguish Visit Details from a Visit Occurrence by setting the VISIT_CONCEPT_ID to [9201](https://athena.ohdsi.org/search-terms/terms/9201) and the VISIT_DETAIL_CONCEPT_IDs either to 9201 or its children to indicate where the patient was in the hospital at the time of care."
|
||||
condition_occurrence,CDM,No,CONDITION_,Yes,0,NA,"This table contains records of Events of a Person suggesting the presence of a disease or medical condition stated as a diagnosis, a sign, or a symptom, which is either observed by a Provider or reported by the patient.","Conditions are defined by Concepts from the Condition domain, which form a complex hierarchy. As a result, the same Person with the same disease may have multiple Condition records, which belong to the same hierarchical family. Most Condition records are mapped from diagnostic codes, but recorded signs, symptoms and summary descriptions also contribute to this table. Rule out diagnoses should not be recorded in this table, but in reality their negating nature is not always captured in the source data, and other precautions must be taken when when identifying Persons who should suffer from the recorded Condition. Record all conditions as they exist in the source data. Any decisions about diagnosis/phenotype definitions would be done through cohort specifications. These cohorts can be housed in the [COHORT](https://ohdsi.github.io/CommonDataModel/cdm531.html#payer_plan_period) table. Conditions span a time interval from start to end, but are typically recorded as single snapshot records with no end date. The reason is twofold: (i) At the time of the recording the duration is not known and later not recorded, and (ii) the Persons typically cease interacting with the healthcare system when they feel better, which leads to incomplete capture of resolved Conditions. The [CONDITION_ERA](https://ohdsi.github.io/CommonDataModel/cdm531.html#condition_era) table addresses this issue. Family history and past diagnoses ('history of') are not recorded in this table. Instead, they are listed in the [OBSERVATION](https://ohdsi.github.io/CommonDataModel/cdm531.html#observation) table. Codes written in the process of establishing the diagnosis, such as 'question of' of and 'rule out', should not represented here. Instead, they should be recorded in the [OBSERVATION](https://ohdsi.github.io/CommonDataModel/cdm531.html#observation) table, if they are used for analyses. However, this information is not always available.",Source codes and source text fields mapped to Standard Concepts of the Condition Domain have to be recorded here.
|
||||
drug_exposure,CDM,No,DRUG_,Yes,0,NA,"This table captures records about the exposure to a Drug ingested or otherwise introduced into the body. A Drug is a biochemical substance formulated in such a way that when administered to a Person it will exert a certain biochemical effect on the metabolism. Drugs include prescription and over-the-counter medicines, vaccines, and large-molecule biologic therapies. Radiological devices ingested or applied locally do not count as Drugs.","The purpose of records in this table is to indicate an exposure to a certain drug as best as possible. In this context a drug is defined as an active ingredient. Drug Exposures are defined by Concepts from the Drug domain, which form a complex hierarchy. As a result, one DRUG_SOURCE_CONCEPT_ID may map to multiple standard concept ids if it is a combination product. Records in this table represent prescriptions written, prescriptions dispensed, and drugs administered by a provider to name a few. The DRUG_TYPE_CONCEPT_ID can be used to find and filter on these types. This table includes additional information about the drug products, the quantity given, and route of administration.",Information about quantity and dose is provided in a variety of different ways and it is important for the ETL to provide as much information as possible from the data. Depending on the provenance of the data fields may be captured differently i.e. quantity for drugs administered may have a separate meaning from quantity for prescriptions dispensed. If a patient has multiple records on the same day for the same drug or procedures the ETL should not de-dupe them unless there is probable reason to believe the item is a true data duplicate. Take note on how to handle refills for prescriptions written.
|
||||
procedure_occurrence,CDM,No,PROCEDURE_,Yes,0,NA,"This table contains records of activities or processes ordered by, or carried out by, a healthcare provider on the patient with a diagnostic or therapeutic purpose.","Lab tests are not a procedure, if something is observed with an expected resulting amount and unit then it should be a measurement. Phlebotomy is a procedure but so trivial that it tends to be rarely captured. It can be assumed that there is a phlebotomy procedure associated with many lab tests, therefore it is unnecessary to add them as separate procedures. If the user finds the same procedure over concurrent days, it is assumed those records are part of a procedure lasting more than a day. This logic is in lieu of the procedure_end_date, which will be added in a future version of the CDM.","If a procedure lasts more than 24 hours, then it should be recorded as a separate record for each day the procedure occurred, this logic is in lieu of the PROCEDURE_END_DATE, which will be added in a future version of the CDM. When dealing with duplicate records, the ETL must determine whether to sum them up into one record or keep them separate. Things to consider are: - Same Procedure - Same PROCEDURE_DATETIME - Same Visit Occurrence or Visit Detail - Same Provider - Same Modifier for Procedures. Source codes and source text fields mapped to Standard Concepts of the Procedure Domain have to be recorded here."
|
||||
device_exposure,CDM,No,DEVICE_,Yes,0,NA,"The Device domain captures information about a person's exposure to a foreign physical object or instrument which is used for diagnostic or therapeutic purposes through a mechanism beyond chemical action. Devices include implantable objects (e.g. pacemakers, stents, artificial joints), medical equipment and supplies (e.g. bandages, crutches, syringes), other instruments used in medical procedures (e.g. sutures, defibrillators) and material used in clinical care (e.g. adhesives, body material, dental material, surgical material).","The distinction between Devices or supplies and Procedures are sometimes blurry, but the former are physical objects while the latter are actions, often to apply a Device or supply.",Source codes and source text fields mapped to Standard Concepts of the Device Domain have to be recorded here.
|
||||
measurement,CDM,No,MEASUREMENT_,Yes,0,NA,"The MEASUREMENT table contains records of Measurements, i.e. structured values (numerical or categorical) obtained through systematic and standardized examination or testing of a Person or Person's sample. The MEASUREMENT table contains both orders and results of such Measurements as laboratory tests, vital signs, quantitative findings from pathology reports, etc. Measurements are stored as attribute value pairs, with the attribute as the Measurement Concept and the value representing the result. The value can be a Concept (stored in VALUE_AS_CONCEPT), or a numerical value (VALUE_AS_NUMBER) with a Unit (UNIT_CONCEPT_ID). The Procedure for obtaining the sample is housed in the PROCEDURE_OCCURRENCE table, though it is unnecessary to create a PROCEDURE_OCCURRENCE record for each measurement if one does not exist in the source data. Measurements differ from Observations in that they require a standardized test or some other activity to generate a quantitative or qualitative result. If there is no result, it is assumed that the lab test was conducted but the result was not captured.","Measurements are predominately lab tests with a few exceptions, like blood pressure or function tests. Results are given in the form of a value and unit combination. When investigating measurements, look for operator_concept_ids (<, >, etc.).","Only records where the source value maps to a Concept in the measurement domain should be included in this table. Even though each Measurement always has a result, the fields VALUE_AS_NUMBER and VALUE_AS_CONCEPT_ID are not mandatory as often the result is not given in the source data. When the result is not known, the Measurement record represents just the fact that the corresponding Measurement was carried out, which in itself is already useful information for some use cases. For some Measurement Concepts, the result is included in the test. For example, ICD10 CONCEPT_ID [45548980](https://athena.ohdsi.org/search-terms/terms/45548980) 'Abnormal level of unspecified serum enzyme' indicates a Measurement and the result (abnormal). In those situations, the CONCEPT_RELATIONSHIP table in addition to the 'Maps to' record contains a second record with the relationship_id set to 'Maps to value'. In this example, the 'Maps to' relationship directs to [4046263](https://athena.ohdsi.org/search-terms/terms/4046263) 'Enzyme measurement' as well as a 'Maps to value' record to [4135493](https://athena.ohdsi.org/search-terms/terms/4135493) 'Abnormal'."
|
||||
observation,CDM,No,OBSERVATION_,Yes,0,NA,"The OBSERVATION table captures clinical facts about a Person obtained in the context of examination, questioning or a procedure. Any data that cannot be represented by any other domains, such as social and lifestyle facts, medical history, family history, etc. are recorded here.","Observations differ from Measurements in that they do not require a standardized test or some other activity to generate clinical fact. Typical observations are medical history, family history, the stated need for certain treatment, social circumstances, lifestyle choices, healthcare utilization patterns, etc. If the generation clinical facts requires a standardized testing such as lab testing or imaging and leads to a standardized result, the data item is recorded in the MEASUREMENT table. If the clinical fact observed determines a sign, symptom, diagnosis of a disease or other medical condition, it is recorded in the CONDITION_OCCURRENCE table. Valid Observation Concepts are not enforced to be from any domain though they still should be Standard Concepts.","Records whose Source Values map to any domain besides Condition, Procedure, Drug, Measurement or Device should be stored in the Observation table. Observations can be stored as attribute value pairs, with the attribute as the Observation Concept and the value representing the clinical fact. This fact can be a Concept (stored in VALUE_AS_CONCEPT), a numerical value (VALUE_AS_NUMBER), a verbatim string (VALUE_AS_STRING), or a datetime (VALUE_AS_DATETIME). Even though Observations do not have an explicit result, the clinical fact can be stated separately from the type of Observation in the VALUE_AS_* fields. It is recommended for Observations that are suggestive statements of positive assertion should have a value of 'Yes' (concept_id=4188539), recorded, even though the null value is the equivalent."
|
||||
death,CDM,No,NA,No,NA,NA,"The death domain contains the clinical event for how and when a Person dies. A person can have up to one record if the source system contains evidence about the Death, such as: Condition in an administrative claim, status of enrollment into a health plan, or explicit record in EHR data.",NA,NA
|
||||
note,CDM,No,NA,Yes,0,NA,"The NOTE table captures unstructured information that was recorded by a provider about a patient in free text (in ASCII, or preferably in UTF8 format) notes on a given date. The type of note_text is CLOB or varchar(MAX) depending on RDBMS.",NA,"HL7/LOINC CDO is a standard for consistent naming of documents to support a range of use cases: retrieval, organization, display, and exchange. It guides the creation of LOINC codes for clinical notes. CDO annotates each document with 5 dimensions:
|
||||
|
||||
- **Kind of Document**: Characterizes the general structure of the document at a macro level (e.g. Anesthesia Consent)
|
||||
- **Type of Service**: Characterizes the kind of service or activity (e.g. evaluations, consultations, and summaries). The notion of time sequence, e.g., at the beginning (admission) at the end (discharge) is subsumed in this axis. Example: Discharge Teaching.
|
||||
- **Setting**: Setting is an extension of CMS's definitions (e.g. Inpatient, Outpatient)
|
||||
- **Subject Matter Domain (SMD)**: Characterizes the subject matter domain of a note (e.g. Anesthesiology)
|
||||
- **Role**: Characterizes the training or professional level of the author of the document, but does not break down to specialty or subspecialty (e.g. Physician)
|
||||
Each combination of these 5 dimensions rolls up to a unique LOINC code.
|
||||
|
||||
According to CDO requirements, only 2 of the 5 dimensions are required to properly annotate a document; Kind of Document and any one of the other 4 dimensions.
|
||||
However, not all the permutations of the CDO dimensions will necessarily yield an existing LOINC code. Each of these dimensions are contained in the OMOP Vocabulary under the domain of 'Meas Value' with each dimension represented as a Concept Class."
|
||||
note_nlp,CDM,No,NA,No,NA,NA,The NOTE_NLP table encodes all output of NLP on clinical notes. Each row represents a single extracted term from a note.,NA,NA
|
||||
specimen,CDM,No,SPECIMEN_,Yes,0,NA,The specimen domain contains the records identifying biological samples from a person.,NA,"Anatomic site is coded at the most specific level of granularity possible, such that higher level classifications can be derived using the Standardized Vocabularies."
|
||||
fact_relationship,CDM,No,NA,No,NA,NA,"The FACT_RELATIONSHIP table contains records about the relationships between facts stored as records in any table of the CDM. Relationships can be defined between facts from the same domain, or different domains. Examples of Fact Relationships include: [Person relationships](https://athena.ohdsi.org/search-terms/terms?domain=Relationship&standardConcept=Standard&page=2&pageSize=15&query=) (parent-child), care site relationships (hierarchical organizational structure of facilities within a health system), indication relationship (between drug exposures and associated conditions), usage relationships (of devices during the course of an associated procedure), or facts derived from one another (measurements derived from an associated specimen).",NA,"All relationships are directional, and each relationship is represented twice symmetrically within the FACT_RELATIONSHIP table. For example, two persons if person_id = 1 is the mother of person_id = 2 two records are in the FACT_RELATIONSHIP table (all strings in fact concept_id records in the Concept table:
|
||||
- Person, 1, Person, 2, parent of
|
||||
- Person, 2, Person, 1, child of"
|
||||
location,CDM,No,NA,No,NA,NA,The LOCATION table represents a generic way to capture physical location or address information of Persons and Care Sites.,NA,"Each address or Location is unique and is present only once in the table. Locations do not contain names, such as the name of a hospital. In order to construct a full address that can be used in the postal service, the address information from the Location needs to be combined with information from the Care Site."
|
||||
care_site,CDM,No,NA,No,NA,NA,"The CARE_SITE table contains a list of uniquely identified institutional (physical or organizational) units where healthcare delivery is practiced (offices, wards, hospitals, clinics, etc.).",NA,"Care site is a unique combination of location_id and place_of_service_source_value. Care site does not take into account the provider (human) information such a specialty. Many source data do not make a distinction between individual and institutional providers. The CARE_SITE table contains the institutional providers. If the source, instead of uniquely identifying individual Care Sites, only provides limited information such as Place of Service, generic or ""pooled"" Care Site records are listed in the CARE_SITE table. There can be hierarchical and business relationships between Care Sites. For example, wards can belong to clinics or departments, which can in turn belong to hospitals, which in turn can belong to hospital systems, which in turn can belong to HMOs.The relationships between Care Sites are defined in the FACT_RELATIONSHIP table."
|
||||
provider,CDM,No,NA,No,NA,NA,"The PROVIDER table contains a list of uniquely identified healthcare providers. These are individuals providing hands-on healthcare to patients, such as physicians, nurses, midwives, physical therapists etc.","Many sources do not make a distinction between individual and institutional providers. The PROVIDER table contains the individual providers. If the source, instead of uniquely identifying individual providers, only provides limited information such as specialty, generic or 'pooled' Provider records are listed in the PROVIDER table.",NA
|
||||
payer_plan_period,CDM,No,NA,Yes,0,NA,"The PAYER_PLAN_PERIOD table captures details of the period of time that a Person is continuously enrolled under a specific health Plan benefit structure from a given Payer. Each Person receiving healthcare is typically covered by a health benefit plan, which pays for (fully or partially), or directly provides, the care. These benefit plans are provided by payers, such as health insurances or state or government agencies. In each plan the details of the health benefits are defined for the Person or her family, and the health benefit Plan might change over time typically with increasing utilization (reaching certain cost thresholds such as deductibles), plan availability and purchasing choices of the Person. The unique combinations of Payer organizations, health benefit Plans and time periods in which they are valid for a Person are recorded in this table.","A Person can have multiple, overlapping, Payer_Plan_Periods in this table. For example, medical and drug coverage in the US can be represented by two Payer_Plan_Periods. The details of the benefit structure of the Plan is rarely known, the idea is just to identify that the Plans are different.",NA
|
||||
cost,CDM,No,NA,No,NA,NA,"The COST table captures records containing the cost of any medical event recorded in one of the OMOP clinical event tables such as DRUG_EXPOSURE, PROCEDURE_OCCURRENCE, VISIT_OCCURRENCE, VISIT_DETAIL, DEVICE_OCCURRENCE, OBSERVATION or MEASUREMENT.
|
||||
|
||||
Each record in the cost table account for the amount of money transacted for the clinical event. So, the COST table may be used to represent both receivables (charges) and payments (paid), each transaction type represented by its COST_CONCEPT_ID. The COST_TYPE_CONCEPT_ID field will use concepts in the Standardized Vocabularies to designate the source (provenance) of the cost data. A reference to the health plan information in the PAYER_PLAN_PERIOD table is stored in the record for information used for the adjudication system to determine the persons benefit for the clinical event.","When dealing with summary costs, the cost of the goods or services the provider provides is often not known directly, but derived from the hospital charges multiplied by an average cost-to-charge ratio.","One cost record is generated for each response by a payer. In a claims databases, the payment and payment terms reported by the payer for the goods or services billed will generate one cost record. If the source data has payment information for more than one payer (i.e. primary insurance and secondary insurance payment for one entity), then a cost record is created for each reporting payer. Therefore, it is possible for one procedure to have multiple cost records for each payer, but typically it contains one or no record per entity. Payer reimbursement cost records will be identified by using the PAYER_PLAN_ID field. Drug costs are composed of ingredient cost (the amount charged by the wholesale distributor or manufacturer), the dispensing fee (the amount charged by the pharmacy and the sales tax)."
|
||||
drug_era,CDM,No,NA,Yes,0,NA,"A Drug Era is defined as a span of time when the Person is assumed to be exposed to a particular active ingredient. A Drug Era is not the same as a Drug Exposure: Exposures are individual records corresponding to the source when Drug was delivered to the Person, while successive periods of Drug Exposures are combined under certain rules to produce continuous Drug Eras.",NA,The SQL script for generating DRUG_ERA records can be found [here](https://ohdsi.github.io/CommonDataModel/sqlScripts.html#drug_eras).
|
||||
dose_era,CDM,No,NA,Yes,0,NA,A Dose Era is defined as a span of time when the Person is assumed to be exposed to a constant dose of a specific active ingredient.,NA,"Dose Eras will be derived from records in the DRUG_EXPOSURE table and the Dose information from the DRUG_STRENGTH table using a standardized algorithm. Dose Form information is not taken into account. So, if the patient changes between different formulations, or different manufacturers with the same formulation, the Dose Era is still spanning the entire time of exposure to the Ingredient."
|
||||
condition_era,CDM,No,NA,Yes,0,NA,"A Condition Era is defined as a span of time when the Person is assumed to have a given condition. Similar to Drug Eras, Condition Eras are chronological periods of Condition Occurrence. Combining individual Condition Occurrences into a single Condition Era serves two purposes:
|
||||
|
||||
- It allows aggregation of chronic conditions that require frequent ongoing care, instead of treating each Condition Occurrence as an independent event.
|
||||
- It allows aggregation of multiple, closely timed doctor visits for the same Condition to avoid double-counting the Condition Occurrences.
|
||||
For example, consider a Person who visits her Primary Care Physician (PCP) and who is referred to a specialist. At a later time, the Person visits the specialist, who confirms the PCP's original diagnosis and provides the appropriate treatment to resolve the condition. These two independent doctor visits should be aggregated into one Condition Era.",NA,"Each Condition Era corresponds to one or many Condition Occurrence records that form a continuous interval.
|
||||
The condition_concept_id field contains Concepts that are identical to those of the CONDITION_OCCURRENCE table records that make up the Condition Era. In contrast to Drug Eras, Condition Eras are not aggregated to contain Conditions of different hierarchical layers. The SQl Script for generating CONDITION_ERA records can be found [here](https://ohdsi.github.io/CommonDataModel/sqlScripts.html#condition_eras)
|
||||
The Condition Era Start Date is the start date of the first Condition Occurrence.
|
||||
The Condition Era End Date is the end date of the last Condition Occurrence. Condition Eras are built with a Persistence Window of 30 days, meaning, if no occurrence of the same condition_concept_id happens within 30 days of any one occurrence, it will be considered the condition_era_end_date."
|
||||
metadata,CDM,No,NA,No,NA,NA,The METADATA table contains metadata information about a dataset that has been transformed to the OMOP Common Data Model.,NA,NA
|
||||
cdm_source,CDM,No,NA,No,NA,NA,The CDM_SOURCE table contains detail about the source database and the process used to transform the data into the OMOP Common Data Model.,NA,NA
|
||||
concept,VOCAB,No,NA,No,NA,NA,"The Standardized Vocabularies contains records, or Concepts, that uniquely identify each fundamental unit of meaning used to express clinical information in all domain tables of the CDM. Concepts are derived from vocabularies, which represent clinical information across a domain (e.g. conditions, drugs, procedures) through the use of codes and associated descriptions. Some Concepts are designated Standard Concepts, meaning these Concepts can be used as normative expressions of a clinical entity within the OMOP Common Data Model and within standardized analytics. Each Standard Concept belongs to one domain, which defines the location where the Concept would be expected to occur within data tables of the CDM.
|
||||
|
||||
Concepts can represent broad categories (like 'Cardiovascular disease'), detailed clinical elements ('Myocardial infarction of the anterolateral wall') or modifying characteristics and attributes that define Concepts at various levels of detail (severity of a disease, associated morphology, etc.).
|
||||
|
||||
Records in the Standardized Vocabularies tables are derived from national or international vocabularies such as SNOMED-CT, RxNorm, and LOINC, or custom Concepts defined to cover various aspects of observational data analysis.",NA,NA
|
||||
vocabulary,VOCAB,No,NA,No,NA,NA,The VOCABULARY table includes a list of the Vocabularies collected from various sources or created de novo by the OMOP community. This reference table is populated with a single record for each Vocabulary source and includes a descriptive name and other associated attributes for the Vocabulary.,NA,NA
|
||||
domain,VOCAB,No,NA,No,NA,NA,"The DOMAIN table includes a list of OMOP-defined Domains the Concepts of the Standardized Vocabularies can belong to. A Domain defines the set of allowable Concepts for the standardized fields in the CDM tables. For example, the ""Condition"" Domain contains Concepts that describe a condition of a patient, and these Concepts can only be stored in the condition_concept_id field of the CONDITION_OCCURRENCE and CONDITION_ERA tables. This reference table is populated with a single record for each Domain and includes a descriptive name for the Domain.",NA,NA
|
||||
concept_class,VOCAB,No,NA,No,NA,NA,"The CONCEPT_CLASS table is a reference table, which includes a list of the classifications used to differentiate Concepts within a given Vocabulary. This reference table is populated with a single record for each Concept Class.",NA,NA
|
||||
concept_relationship,VOCAB,No,NA,No,NA,NA,The CONCEPT_RELATIONSHIP table contains records that define direct relationships between any two Concepts and the nature or type of the relationship. Each type of a relationship is defined in the RELATIONSHIP table.,NA,NA
|
||||
relationship,VOCAB,No,NA,No,NA,NA,The RELATIONSHIP table provides a reference list of all types of relationships that can be used to associate any two concepts in the CONCEPT_RELATIONSHP table.,NA,NA
|
||||
concept_synonym,VOCAB,No,NA,No,NA,NA,The CONCEPT_SYNONYM table is used to store alternate names and descriptions for Concepts.,NA,NA
|
||||
concept_ancestor,VOCAB,No,NA,No,NA,NA,"The CONCEPT_ANCESTOR table is designed to simplify observational analysis by providing the complete hierarchical relationships between Concepts. Only direct parent-child relationships between Concepts are stored in the CONCEPT_RELATIONSHIP table. To determine higher level ancestry connections, all individual direct relationships would have to be navigated at analysis time. The CONCEPT_ANCESTOR table includes records for all parent-child relationships, as well as grandparent-grandchild relationships and those of any other level of lineage. Using the CONCEPT_ANCESTOR table allows for querying for all descendants of a hierarchical concept. For example, drug ingredients and drug products are all descendants of a drug class ancestor.
|
||||
|
||||
This table is entirely derived from the CONCEPT, CONCEPT_RELATIONSHIP and RELATIONSHIP tables.",NA,NA
|
||||
source_to_concept_map,VOCAB,No,NA,No,NA,NA,"The source to concept map table is a legacy data structure within the OMOP Common Data Model, recommended for use in ETL processes to maintain local source codes which are not available as Concepts in the Standardized Vocabularies, and to establish mappings for each source code into a Standard Concept as target_concept_ids that can be used to populate the Common Data Model tables. The SOURCE_TO_CONCEPT_MAP table is no longer populated with content within the Standardized Vocabularies published to the OMOP community.",NA,NA
|
||||
drug_strength,VOCAB,No,NA,No,NA,NA,The DRUG_STRENGTH table contains structured content about the amount or concentration and associated units of a specific ingredient contained within a particular drug product. This table is supplemental information to support standardized analysis of drug utilization.,NA,NA
|
||||
cohort_definition,VOCAB,No,NA,No,NA,NA,"The COHORT_DEFINITION table contains records defining a Cohort derived from the data through the associated description and syntax and upon instantiation (execution of the algorithm) placed into the COHORT table. Cohorts are a set of subjects that satisfy a given combination of inclusion criteria for a duration of time. The COHORT_DEFINITION table provides a standardized structure for maintaining the rules governing the inclusion of a subject into a cohort, and can store operational programming code to instantiate the cohort within the OMOP Common Data Model.",NA,NA
|
||||
attribute_definition,VOCAB,No,NA,No,NA,NA,"The ATTRIBUTE_DEFINITION table contains records to define each attribute
|
||||
through an associated description and syntax. Attributes are derived elements
|
||||
that can be selected or calculated for a subject within a cohort. The
|
||||
ATTRIBUTE_DEFINITION table provides a standardized structure for
|
||||
maintaining the rules governing the calculation of covariates for a subject in a
|
||||
cohort, and can store operational programming code to instantiate the
|
||||
attributes for a given cohort within the OMOP Common Data Model.",NA,NA
|
||||
cdmTableName,schema,isRequired,conceptPrefix,measurePersonCompleteness,measurePersonCompletenessThreshold,validation,tableDescription,userGuidance,etlConventions
|
||||
person,CDM,Yes,NA,No,NA,NA,"This table serves as the central identity management for all Persons in the database. It contains records that uniquely identify each person or patient, and some demographic information.",All records in this table are independent Persons.,"All Persons in a database needs one record in this table, unless they fail data quality requirements specified in the ETL. Persons with no Events should have a record nonetheless. If more than one data source contributes Events to the database, Persons must be reconciled, if possible, across the sources to create one single record per Person. The content of the BIRTH_DATETIME must be equivalent to the content of BIRTH_DAY, BIRTH_MONTH and BIRTH_YEAR.<br><br>For detailed conventions for how to populate this table, please refer to the [THEMIS repository](https://ohdsi.github.io/Themis/person.html)."
|
||||
observation_period,CDM,Yes,NA,Yes,0,NA,"This table contains records which define spans of time during which two conditions are expected to hold: (i) Clinical Events that happened to the Person are recorded in the Event tables, and (ii) absence of records indicate such Events did not occur during this span of time.","For each Person, one or more OBSERVATION_PERIOD records may be present, but they will not overlap or be back to back to each other. Events may exist outside all of the time spans of the OBSERVATION_PERIOD records for a patient, however, absence of an Event outside these time spans cannot be construed as evidence of absence of an Event. Incidence or prevalence rates should only be calculated for the time of active OBSERVATION_PERIOD records. When constructing cohorts, outside Events can be used for inclusion criteria definition, but without any guarantee for the performance of these criteria. Also, OBSERVATION_PERIOD records can be as short as a single day, greatly disturbing the denominator of any rate calculation as part of cohort characterizations. To avoid that, apply minimal observation time as a requirement for any cohort definition.","Each Person needs to have at least one OBSERVATION_PERIOD record, which should represent time intervals with a high capture rate of Clinical Events. Some source data have very similar concepts, such as enrollment periods in insurance claims data. In other source data such as most EHR systems these time spans need to be inferred under a set of assumptions. It is the discretion of the ETL developer to define these assumptions. In many ETL solutions the start date of the first occurrence or the first high quality occurrence of a Clinical Event (Condition, Drug, Procedure, Device, Measurement, Visit) is defined as the start of the OBSERVATION_PERIOD record, and the end date of the last occurrence of last high quality occurrence of a Clinical Event, or the end of the database period becomes the end of the OBSERVATOIN_PERIOD for each Person. If a Person only has a single Clinical Event the OBSERVATION_PERIOD record can be as short as one day. Depending on these definitions it is possible that Clinical Events fall outside the time spans defined by OBSERVATION_PERIOD records. Family history or history of Clinical Events generally are not used to generate OBSERVATION_PERIOD records around the time they are referring to. Any two overlapping or adjacent OBSERVATION_PERIOD records have to be merged into one."
|
||||
visit_occurrence,CDM,No,VISIT_,Yes,0,NA,"This table contains Events where Persons engage with the healthcare system for a duration of time. They are often also called ""Encounters"". Visits are defined by a configuration of circumstances under which they occur, such as (i) whether the patient comes to a healthcare institution, the other way around, or the interaction is remote, (ii) whether and what kind of trained medical staff is delivering the service during the Visit, and (iii) whether the Visit is transient or for a longer period involving a stay in bed.","The configuration defining the Visit are described by Concepts in the Visit Domain, which form a hierarchical structure, but rolling up to generally familiar Visits adopted in most healthcare systems worldwide:
|
||||
|
||||
- [Inpatient Visit](https://athena.ohdsi.org/search-terms/terms/9201): Person visiting hospital, at a Care Site, in bed, for duration of more than one day, with physicians and other Providers permanently available to deliver service around the clock
|
||||
- [Emergency Room Visit](https://athena.ohdsi.org/search-terms/terms/9203): Person visiting dedicated healthcare institution for treating emergencies, at a Care Site, within one day, with physicians and Providers permanently available to deliver service around the clock
|
||||
- [Emergency Room and Inpatient Visit](https://athena.ohdsi.org/search-terms/terms/262): Person visiting ER followed by a subsequent Inpatient Visit, where Emergency department is part of hospital, and transition from the ER to other hospital departments is undefined
|
||||
- [Non-hospital institution Visit](https://athena.ohdsi.org/search-terms/terms/42898160): Person visiting dedicated institution for reasons of poor health, at a Care Site, long-term or permanently, with no physician but possibly other Providers permanently available to deliver service around the clock
|
||||
- [Outpatient Visit](https://athena.ohdsi.org/search-terms/terms/9202): Person visiting dedicated ambulatory healthcare institution, at a Care Site, within one day, without bed, with physicians or medical Providers delivering service during Visit
|
||||
- [Home Visit](https://athena.ohdsi.org/search-terms/terms/581476): Provider visiting Person, without a Care Site, within one day, delivering service
|
||||
- [Telehealth Visit](https://athena.ohdsi.org/search-terms/terms/5083): Patient engages with Provider through communication media
|
||||
- [Pharmacy Visit](https://athena.ohdsi.org/search-terms/terms/581458): Person visiting pharmacy for dispensing of Drug, at a Care Site, within one day
|
||||
- [Laboratory Visit](https://athena.ohdsi.org/search-terms/terms/32036): Patient visiting dedicated institution, at a Care Site, within one day, for the purpose of a Measurement.
|
||||
- [Ambulance Visit](https://athena.ohdsi.org/search-terms/terms/581478): Person using transportation service for the purpose of initiating one of the other Visits, without a Care Site, within one day, potentially with Providers accompanying the Visit and delivering service
|
||||
- [Case Management Visit](https://athena.ohdsi.org/search-terms/terms/38004193): Person interacting with healthcare system, without a Care Site, within a day, with no Providers involved, for administrative purposes
|
||||
|
||||
The Visit duration, or 'length of stay', is defined as VISIT_END_DATE - VISIT_START_DATE. For all Visits this is <1 day, except Inpatient Visits and Non-hospital institution Visits. The CDM also contains the VISIT_DETAIL table where additional information about the Visit is stored, for example, transfers between units during an inpatient Visit.","Visits can be derived easily if the source data contain coding systems for Place of Service or Procedures, like CPT codes for well visits. In those cases, the codes can be looked up and mapped to a Standard Visit Concept. Otherwise, Visit Concepts have to be identified in the ETL process. This table will contain concepts in the Visit domain. These concepts are arranged in a hierarchical structure to facilitate cohort definitions by rolling up to generally familiar Visits adopted in most healthcare systems worldwide. Visits can be adjacent to each other, i.e. the end date of one can be identical with the start date of the other. As a consequence, more than one-day Visits or their descendants can be recorded for the same day. Multi-day visits must not overlap, i.e. share days other than start and end days. It is often the case that some logic should be written for how to define visits and how to assign Visit_Concept_Id. For example, in US claims outpatient visits that appear to occur within the time period of an inpatient visit can be rolled into one with the same Visit_Occurrence_Id. In EHR data inpatient visits that are within one day of each other may be strung together to create one visit. It will all depend on the source data and how encounter records should be translated to visit occurrences. Providers can be associated with a Visit through the PROVIDER_ID field, or indirectly through PROCEDURE_OCCURRENCE records linked both to the VISIT and PROVIDER tables."
|
||||
visit_detail,CDM,No,VISIT_DETAIL_,Yes,0,NA,The VISIT_DETAIL table is an optional table used to represents details of each record in the parent VISIT_OCCURRENCE table. A good example of this would be the movement between units in a hospital during an inpatient stay or claim lines associated with a one insurance claim. For every record in the VISIT_OCCURRENCE table there may be 0 or more records in the VISIT_DETAIL table with a 1:n relationship where n may be 0. The VISIT_DETAIL table is structurally very similar to VISIT_OCCURRENCE table and belongs to the visit domain.,"The configuration defining the Visit Detail is described by Concepts in the Visit Domain, which form a hierarchical structure. The Visit Detail record will have an associated to the Visit Occurrence record in two ways: <br> 1. The Visit Detail record will have the VISIT_OCCURRENCE_ID it is associated to 2. The VISIT_DETAIL_CONCEPT_ID will be a descendant of the VISIT_CONCEPT_ID for the Visit.","It is not mandatory that the VISIT_DETAIL table be filled in, but if you find that the logic to create VISIT_OCCURRENCE records includes the roll-up of multiple smaller records to create one picture of a Visit then it is a good idea to use VISIT_DETAIL. In EHR data, for example, a Person may be in the hospital but instead of one over-arching Visit their encounters are recorded as times they interacted with a health care provider. A Person in the hospital interacts with multiple providers multiple times a day so the encounters must be strung together using some heuristic (defined by the ETL) to identify the entire Visit. In this case the encounters would be considered Visit Details and the entire Visit would be the Visit Occurrence. In this example it is also possible to use the Vocabulary to distinguish Visit Details from a Visit Occurrence by setting the VISIT_CONCEPT_ID to [9201](https://athena.ohdsi.org/search-terms/terms/9201) and the VISIT_DETAIL_CONCEPT_IDs either to 9201 or its children to indicate where the patient was in the hospital at the time of care."
|
||||
condition_occurrence,CDM,No,CONDITION_,Yes,0,NA,"This table contains records of Events of a Person suggesting the presence of a disease or medical condition stated as a diagnosis, a sign, or a symptom, which is either observed by a Provider or reported by the patient.","Conditions are defined by Concepts from the Condition domain, which form a complex hierarchy. As a result, the same Person with the same disease may have multiple Condition records, which belong to the same hierarchical family. Most Condition records are mapped from diagnostic codes, but recorded signs, symptoms and summary descriptions also contribute to this table. Rule out diagnoses should not be recorded in this table, but in reality their negating nature is not always captured in the source data, and other precautions must be taken when when identifying Persons who should suffer from the recorded Condition. Record all conditions as they exist in the source data. Any decisions about diagnosis/phenotype definitions would be done through cohort specifications. These cohorts can be housed in the [COHORT](https://ohdsi.github.io/CommonDataModel/cdm531.html#payer_plan_period) table. Conditions span a time interval from start to end, but are typically recorded as single snapshot records with no end date. The reason is twofold: (i) At the time of the recording the duration is not known and later not recorded, and (ii) the Persons typically cease interacting with the healthcare system when they feel better, which leads to incomplete capture of resolved Conditions. The [CONDITION_ERA](https://ohdsi.github.io/CommonDataModel/cdm531.html#condition_era) table addresses this issue. Family history and past diagnoses ('history of') are not recorded in this table. Instead, they are listed in the [OBSERVATION](https://ohdsi.github.io/CommonDataModel/cdm531.html#observation) table. Codes written in the process of establishing the diagnosis, such as 'question of' of and 'rule out', should not represented here. Instead, they should be recorded in the [OBSERVATION](https://ohdsi.github.io/CommonDataModel/cdm531.html#observation) table, if they are used for analyses. However, this information is not always available.",Source codes and source text fields mapped to Standard Concepts of the Condition Domain have to be recorded here.
|
||||
drug_exposure,CDM,No,DRUG_,Yes,0,NA,"This table captures records about the exposure to a Drug ingested or otherwise introduced into the body. A Drug is a biochemical substance formulated in such a way that when administered to a Person it will exert a certain biochemical effect on the metabolism. Drugs include prescription and over-the-counter medicines, vaccines, and large-molecule biologic therapies. Radiological devices ingested or applied locally do not count as Drugs.","The purpose of records in this table is to indicate an exposure to a certain drug as best as possible. In this context a drug is defined as an active ingredient. Drug Exposures are defined by Concepts from the Drug domain, which form a complex hierarchy. As a result, one DRUG_SOURCE_CONCEPT_ID may map to multiple standard concept ids if it is a combination product. Records in this table represent prescriptions written, prescriptions dispensed, and drugs administered by a provider to name a few. The DRUG_TYPE_CONCEPT_ID can be used to find and filter on these types. This table includes additional information about the drug products, the quantity given, and route of administration.","Information about quantity and dose is provided in a variety of different ways and it is important for the ETL to provide as much information as possible from the data. Depending on the provenance of the data fields may be captured differently i.e. quantity for drugs administered may have a separate meaning from quantity for prescriptions dispensed. If a patient has multiple records on the same day for the same drug or procedures the ETL should not de-dupe them unless there is probable reason to believe the item is a true data duplicate. Take note on how to handle refills for prescriptions written.<br><br>For detailed conventions on how to populate this table, please refer to the [THEMIS repository](https://ohdsi.github.io/Themis/drug_exposure.html)."
|
||||
procedure_occurrence,CDM,No,PROCEDURE_,Yes,0,NA,"This table contains records of activities or processes ordered by, or carried out by, a healthcare provider on the patient with a diagnostic or therapeutic purpose.","Lab tests are not a procedure, if something is observed with an expected resulting amount and unit then it should be a measurement. Phlebotomy is a procedure but so trivial that it tends to be rarely captured. It can be assumed that there is a phlebotomy procedure associated with many lab tests, therefore it is unnecessary to add them as separate procedures. If the user finds the same procedure over concurrent days, it is assumed those records are part of a procedure lasting more than a day. This logic is in lieu of the procedure_end_date, which will be added in a future version of the CDM.","If a procedure lasts more than 24 hours, then it should be recorded as a separate record for each day the procedure occurred, this logic is in lieu of the PROCEDURE_END_DATE, which will be added in a future version of the CDM. When dealing with duplicate records, the ETL must determine whether to sum them up into one record or keep them separate. Things to consider are: - Same Procedure - Same PROCEDURE_DATETIME - Same Visit Occurrence or Visit Detail - Same Provider - Same Modifier for Procedures. Source codes and source text fields mapped to Standard Concepts of the Procedure Domain have to be recorded here."
|
||||
device_exposure,CDM,No,DEVICE_,Yes,0,NA,"The Device domain captures information about a person's exposure to a foreign physical object or instrument which is used for diagnostic or therapeutic purposes through a mechanism beyond chemical action. Devices include implantable objects (e.g. pacemakers, stents, artificial joints), medical equipment and supplies (e.g. bandages, crutches, syringes), other instruments used in medical procedures (e.g. sutures, defibrillators) and material used in clinical care (e.g. adhesives, body material, dental material, surgical material).","The distinction between Devices or supplies and Procedures are sometimes blurry, but the former are physical objects while the latter are actions, often to apply a Device or supply.",Source codes and source text fields mapped to Standard Concepts of the Device Domain have to be recorded here.
|
||||
measurement,CDM,No,MEASUREMENT_,Yes,0,NA,"The MEASUREMENT table contains records of Measurements, i.e. structured values (numerical or categorical) obtained through systematic and standardized examination or testing of a Person or Person's sample. The MEASUREMENT table contains both orders and results of such Measurements as laboratory tests, vital signs, quantitative findings from pathology reports, etc. Measurements are stored as attribute value pairs, with the attribute as the Measurement Concept and the value representing the result. The value can be a Concept (stored in VALUE_AS_CONCEPT), or a numerical value (VALUE_AS_NUMBER) with a Unit (UNIT_CONCEPT_ID). The Procedure for obtaining the sample is housed in the PROCEDURE_OCCURRENCE table, though it is unnecessary to create a PROCEDURE_OCCURRENCE record for each measurement if one does not exist in the source data. Measurements differ from Observations in that they require a standardized test or some other activity to generate a quantitative or qualitative result. If there is no result, it is assumed that the lab test was conducted but the result was not captured.","Measurements are predominately lab tests with a few exceptions, like blood pressure or function tests. Results are given in the form of a value and unit combination. When investigating measurements, look for operator_concept_ids (<, >, etc.).","Only records where the source value maps to a Concept in the measurement domain should be included in this table. Even though each Measurement always has a result, the fields VALUE_AS_NUMBER and VALUE_AS_CONCEPT_ID are not mandatory as often the result is not given in the source data. When the result is not known, the Measurement record represents just the fact that the corresponding Measurement was carried out, which in itself is already useful information for some use cases. For some Measurement Concepts, the result is included in the test. For example, ICD10 CONCEPT_ID [45548980](https://athena.ohdsi.org/search-terms/terms/45548980) 'Abnormal level of unspecified serum enzyme' indicates a Measurement and the result (abnormal). In those situations, the CONCEPT_RELATIONSHIP table in addition to the 'Maps to' record contains a second record with the relationship_id set to 'Maps to value'. In this example, the 'Maps to' relationship directs to [4046263](https://athena.ohdsi.org/search-terms/terms/4046263) 'Enzyme measurement' as well as a 'Maps to value' record to [4135493](https://athena.ohdsi.org/search-terms/terms/4135493) 'Abnormal'."
|
||||
observation,CDM,No,OBSERVATION_,Yes,0,NA,"The OBSERVATION table captures clinical facts about a Person obtained in the context of examination, questioning or a procedure. Any data that cannot be represented by any other domains, such as social and lifestyle facts, medical history, family history, etc. are recorded here.","Observations differ from Measurements in that they do not require a standardized test or some other activity to generate clinical fact. Typical observations are medical history, family history, the stated need for certain treatment, social circumstances, lifestyle choices, healthcare utilization patterns, etc. If the generation clinical facts requires a standardized testing such as lab testing or imaging and leads to a standardized result, the data item is recorded in the MEASUREMENT table. If the clinical fact observed determines a sign, symptom, diagnosis of a disease or other medical condition, it is recorded in the CONDITION_OCCURRENCE table. Valid Observation Concepts are not enforced to be from any domain but they must not belong to the Condition, Procedure, Drug, Device, Specimen, or Measurement domains and they must be Standard Concepts. <br><br>The observation table usually records the date or datetime of when the observation was obtained, not the date of the observation starting. For example, if the patient reports that they had a heart attack when they were 50, the observation date or datetime is the date of the report, the heart attack observation can have a value_as_concept which captures how long ago the observation applied to the patient.","Records whose Source Values map to any domain besides Condition, Procedure, Drug, Specimen, Measurement or Device should be stored in the Observation table. Observations can be stored as attribute value pairs, with the attribute as the Observation Concept and the value representing the clinical fact. This fact can be a Concept (stored in VALUE_AS_CONCEPT), a numerical value (VALUE_AS_NUMBER) or a verbatim string (VALUE_AS_STRING). Even though Observations do not have an explicit result, the clinical fact can be stated separately from the type of Observation in the VALUE_AS_* fields. It is recommended for Observations that are suggestive statements of positive assertion should have a value of 'Yes' (concept_id=4188539), recorded, even though the null value is the equivalent."
|
||||
death,CDM,No,NA,No,NA,NA,"The death domain contains the clinical event for how and when a Person dies. A person can have up to one record if the source system contains evidence about the Death, such as: Condition in an administrative claim, status of enrollment into a health plan, or explicit record in EHR data.",NA,"For specific conventions on how to populate this table, please refer to the [THEMIS repository](https://ohdsi.github.io/Themis/death.html)."
|
||||
note,CDM,No,NA,Yes,0,NA,"The NOTE table captures unstructured information that was recorded by a provider about a patient in free text (in ASCII, or preferably in UTF8 format) notes on a given date. The type of note_text is CLOB or varchar(MAX) depending on RDBMS.",NA,"HL7/LOINC CDO is a standard for consistent naming of documents to support a range of use cases: retrieval, organization, display, and exchange. It guides the creation of LOINC codes for clinical notes. CDO annotates each document with 5 dimensions:
|
||||
|
||||
- **Kind of Document**: Characterizes the general structure of the document at a macro level (e.g. Anesthesia Consent)
|
||||
- **Type of Service**: Characterizes the kind of service or activity (e.g. evaluations, consultations, and summaries). The notion of time sequence, e.g., at the beginning (admission) at the end (discharge) is subsumed in this axis. Example: Discharge Teaching.
|
||||
- **Setting**: Setting is an extension of CMS's definitions (e.g. Inpatient, Outpatient)
|
||||
- **Subject Matter Domain (SMD)**: Characterizes the subject matter domain of a note (e.g. Anesthesiology)
|
||||
- **Role**: Characterizes the training or professional level of the author of the document, but does not break down to specialty or subspecialty (e.g. Physician)
|
||||
Each combination of these 5 dimensions rolls up to a unique LOINC code.
|
||||
|
||||
According to CDO requirements, only 2 of the 5 dimensions are required to properly annotate a document; Kind of Document and any one of the other 4 dimensions.
|
||||
However, not all the permutations of the CDO dimensions will necessarily yield an existing LOINC code. Each of these dimensions are contained in the OMOP Vocabulary under the domain of 'Meas Value' with each dimension represented as a Concept Class."
|
||||
note_nlp,CDM,No,NA,No,NA,NA,The NOTE_NLP table encodes all output of NLP on clinical notes. Each row represents a single extracted term from a note.,NA,NA
|
||||
specimen,CDM,No,SPECIMEN_,Yes,0,NA,The specimen domain contains the records identifying biological samples from a person.,NA,"Anatomic site is coded at the most specific level of granularity possible, such that higher level classifications can be derived using the Standardized Vocabularies."
|
||||
fact_relationship,CDM,No,NA,No,NA,NA,"The FACT_RELATIONSHIP table contains records about the relationships between facts stored as records in any table of the CDM. Relationships can be defined between facts from the same domain, or different domains. Examples of Fact Relationships include: [Person relationships](https://athena.ohdsi.org/search-terms/terms?domain=Relationship&standardConcept=Standard&page=2&pageSize=15&query=) (parent-child), care site relationships (hierarchical organizational structure of facilities within a health system), indication relationship (between drug exposures and associated conditions), usage relationships (of devices during the course of an associated procedure), or facts derived from one another (measurements derived from an associated specimen).",NA,"All relationships are directional, and each relationship is represented twice symmetrically within the FACT_RELATIONSHIP table. For example, two persons if person_id = 1 is the mother of person_id = 2 two records are in the FACT_RELATIONSHIP table (all strings in fact concept_id records in the Concept table:
|
||||
- Person, 1, Person, 2, parent of
|
||||
- Person, 2, Person, 1, child of"
|
||||
location,CDM,No,NA,No,NA,NA,The LOCATION table represents a generic way to capture physical location or address information of Persons and Care Sites.,NA,"Each address or Location is unique and is present only once in the table. Locations do not contain names, such as the name of a hospital. In order to construct a full address that can be used in the postal service, the address information from the Location needs to be combined with information from the Care Site."
|
||||
care_site,CDM,No,NA,No,NA,NA,"The CARE_SITE table contains a list of uniquely identified institutional (physical or organizational) units where healthcare delivery is practiced (offices, wards, hospitals, clinics, etc.).",NA,"Care site is a unique combination of location_id and nature of the site - the latter could be the place of service, name, or another characteristic in your source data. Care site does not take into account the provider (human) information such a specialty. Many source data do not make a distinction between individual and institutional providers. The CARE_SITE table contains the institutional providers. If the source, instead of uniquely identifying individual Care Sites, only provides limited information such as Place of Service, generic or ""pooled"" Care Site records are listed in the CARE_SITE table. There can be hierarchical and business relationships between Care Sites. For example, wards can belong to clinics or departments, which can in turn belong to hospitals, which in turn can belong to hospital systems, which in turn can belong to HMOs.The relationships between Care Sites are defined in the FACT_RELATIONSHIP table.<br><br>For additional detailed conventions on how to populate this table, please refer to [THEMIS repository](https://ohdsi.github.io/Themis/care_site.html)."
|
||||
provider,CDM,No,NA,No,NA,NA,"The PROVIDER table contains a list of uniquely identified healthcare providers; duplication is not allowed. These are individuals providing hands-on healthcare to patients, such as physicians, nurses, midwives, physical therapists etc.","Many sources do not make a distinction between individual and institutional providers. The PROVIDER table contains the individual providers. If the source only provides limited information such as specialty instead of uniquely identifying individual providers, generic or 'pooled' Provider records are listed in the PROVIDER table.",NA
|
||||
payer_plan_period,CDM,No,NA,Yes,0,NA,"The PAYER_PLAN_PERIOD table captures details of the period of time that a Person is continuously enrolled under a specific health Plan benefit structure from a given Payer. Each Person receiving healthcare is typically covered by a health benefit plan, which pays for (fully or partially), or directly provides, the care. These benefit plans are provided by payers, such as health insurances or state or government agencies. In each plan the details of the health benefits are defined for the Person or her family, and the health benefit Plan might change over time typically with increasing utilization (reaching certain cost thresholds such as deductibles), plan availability and purchasing choices of the Person. The unique combinations of Payer organizations, health benefit Plans and time periods in which they are valid for a Person are recorded in this table.","A Person can have multiple, overlapping, Payer_Plan_Periods in this table. For example, medical and drug coverage in the US can be represented by two Payer_Plan_Periods. The details of the benefit structure of the Plan is rarely known, the idea is just to identify that the Plans are different.",NA
|
||||
cost,CDM,No,NA,No,NA,NA,"The COST table captures records containing the cost of any medical event recorded in one of the OMOP clinical event tables such as DRUG_EXPOSURE, PROCEDURE_OCCURRENCE, VISIT_OCCURRENCE, VISIT_DETAIL, DEVICE_OCCURRENCE, OBSERVATION or MEASUREMENT.
|
||||
|
||||
Each record in the cost table account for the amount of money transacted for the clinical event. So, the COST table may be used to represent both receivables (charges) and payments (paid), each transaction type represented by its COST_CONCEPT_ID. The COST_TYPE_CONCEPT_ID field will use concepts in the Standardized Vocabularies to designate the source (provenance) of the cost data. A reference to the health plan information in the PAYER_PLAN_PERIOD table is stored in the record for information used for the adjudication system to determine the persons benefit for the clinical event.","When dealing with summary costs, the cost of the goods or services the provider provides is often not known directly, but derived from the hospital charges multiplied by an average cost-to-charge ratio.","One cost record is generated for each response by a payer. In a claims databases, the payment and payment terms reported by the payer for the goods or services billed will generate one cost record. If the source data has payment information for more than one payer (i.e. primary insurance and secondary insurance payment for one entity), then a cost record is created for each reporting payer. Therefore, it is possible for one procedure to have multiple cost records for each payer, but typically it contains one or no record per entity. Payer reimbursement cost records will be identified by using the PAYER_PLAN_ID field. Drug costs are composed of ingredient cost (the amount charged by the wholesale distributor or manufacturer), the dispensing fee (the amount charged by the pharmacy and the sales tax)."
|
||||
drug_era,CDM,No,NA,Yes,0,NA,"A Drug Era is defined as a span of time when the Person is assumed to be exposed to a particular active ingredient. A Drug Era is not the same as a Drug Exposure: Exposures are individual records corresponding to the source when Drug was delivered to the Person, while successive periods of Drug Exposures are combined under certain rules to produce continuous Drug Eras. Every record in the DRUG_EXPOSURE table should be part of a drug era based on the dates of exposure. ",NA,The SQL script for generating DRUG_ERA records can be found [here](https://ohdsi.github.io/CommonDataModel/sqlScripts.html#drug_eras).
|
||||
dose_era,CDM,No,NA,Yes,0,NA,A Dose Era is defined as a span of time when the Person is assumed to be exposed to a constant dose of a specific active ingredient.,NA,"Dose Eras will be derived from records in the DRUG_EXPOSURE table and the Dose information from the DRUG_STRENGTH table using a standardized algorithm. Dose Form information is not taken into account. So, if the patient changes between different formulations, or different manufacturers with the same formulation, the Dose Era is still spanning the entire time of exposure to the Ingredient."
|
||||
condition_era,CDM,No,NA,Yes,0,NA,"A Condition Era is defined as a span of time when the Person is assumed to have a given condition. Similar to Drug Eras, Condition Eras are chronological periods of Condition Occurrence and every Condition Occurrence record should be part of a Condition Era. Combining individual Condition Occurrences into a single Condition Era serves two purposes:
|
||||
|
||||
- It allows aggregation of chronic conditions that require frequent ongoing care, instead of treating each Condition Occurrence as an independent event.
|
||||
- It allows aggregation of multiple, closely timed doctor visits for the same Condition to avoid double-counting the Condition Occurrences.
|
||||
For example, consider a Person who visits her Primary Care Physician (PCP) and who is referred to a specialist. At a later time, the Person visits the specialist, who confirms the PCP's original diagnosis and provides the appropriate treatment to resolve the condition. These two independent doctor visits should be aggregated into one Condition Era.",NA,"Each Condition Era corresponds to one or many Condition Occurrence records that form a continuous interval.
|
||||
The condition_concept_id field contains Concepts that are identical to those of the CONDITION_OCCURRENCE table records that make up the Condition Era. In contrast to Drug Eras, Condition Eras are not aggregated to contain Conditions of different hierarchical layers. The SQl Script for generating CONDITION_ERA records can be found [here](https://ohdsi.github.io/CommonDataModel/sqlScripts.html#condition_eras)
|
||||
The Condition Era Start Date is the start date of the first Condition Occurrence.
|
||||
The Condition Era End Date is the end date of the last Condition Occurrence. Condition Eras are built with a Persistence Window of 30 days, meaning, if no occurrence of the same condition_concept_id happens within 30 days of any one occurrence, it will be considered the condition_era_end_date."
|
||||
metadata,CDM,No,NA,No,NA,NA,The METADATA table contains metadata information about a dataset that has been transformed to the OMOP Common Data Model.,NA,NA
|
||||
cdm_source,CDM,No,NA,No,NA,NA,The CDM_SOURCE table contains detail about the source database and the process used to transform the data into the OMOP Common Data Model.,NA,NA
|
||||
concept,VOCAB,No,NA,No,NA,NA,"The Standardized Vocabularies contains records, or Concepts, that uniquely identify each fundamental unit of meaning used to express clinical information in all domain tables of the CDM. Concepts are derived from vocabularies, which represent clinical information across a domain (e.g. conditions, drugs, procedures) through the use of codes and associated descriptions. Some Concepts are designated Standard Concepts, meaning these Concepts can be used as normative expressions of a clinical entity within the OMOP Common Data Model and standardized analytics. Each Standard Concept belongs to one Domain, which defines the location where the Concept would be expected to occur within the data tables of the CDM. Concepts can represent broad categories ('Cardiovascular disease'), detailed clinical elements ('Myocardial infarction of the anterolateral wall'), or modifying characteristics and attributes that define Concepts at various levels of detail (severity of a disease, associated morphology, etc.). Records in the Standardized Vocabularies tables are derived from national or international vocabularies such as SNOMED-CT, RxNorm, and LOINC, or custom OMOP Concepts defined to cover various aspects of observational data analysis.
|
||||
","The primary purpose of the CONCEPT table is to provide a standardized representation of medical Concepts, allowing for consistent querying and analysis across the healthcare databases.
|
||||
Users can join the CONCEPT table with other tables in the CDM to enrich clinical data with standardized Concept information or use the CONCEPT table as a reference for mapping clinical data from source terminologies to Standard Concepts.",NA
|
||||
vocabulary,VOCAB,No,NA,No,NA,NA,The VOCABULARY table includes a list of the Vocabularies integrated from various sources or created de novo in OMOP CDM. This reference table contains a single record for each Vocabulary and includes a descriptive name and other associated attributes for the Vocabulary.,"The primary purpose of the VOCABULARY table is to provide explicit information about specific vocabulary versions and the references to the sources from which they are asserted. Users can identify the version of a particular vocabulary used in the database, enabling consistency and reproducibility in data analysis. Besides, users can check the vocabulary release version in their CDM which refers to the vocabulary_id = 'None'.",NA
|
||||
domain,VOCAB,No,NA,No,NA,NA,"The DOMAIN table includes a list of OMOP-defined Domains to which the Concepts of the Standardized Vocabularies can belong. A Domain represents a clinical definition whereby we assign matching Concepts for the standardized fields in the CDM tables. For example, the Condition Domain contains Concepts that describe a patient condition, and these Concepts can only be used in the condition_concept_id field of the CONDITION_OCCURRENCE and CONDITION_ERA tables. This reference table is populated with a single record for each Domain, including a Domain ID and a descriptive name for every Domain.","Users can leverage the DOMAIN table to explore the full spectrum of health-related data Domains available in the Standardized Vocabularies. Also, the information in the DOMAIN table may be used as a reference for mapping source data to OMOP domains, facilitating data harmonization and interoperability.",NA
|
||||
concept_class,VOCAB,No,NA,No,NA,NA,"The CONCEPT_CLASS table includes semantic categories that reference the source structure of each Vocabulary. Concept Classes represent so-called horizontal (e.g. MedDRA, RxNorm) or vertical levels (e.g. SNOMED) of the vocabulary structure. Vocabularies without any Concept Classes, such as HCPCS, use the vocabulary_id as the Concept Class. This reference table is populated with a single record for each Concept Class, which includes a Concept Class ID and a fully specified Concept Class name.
|
||||
",Users can utilize the CONCEPT_CLASS table to explore the different classes or categories of concepts within the OHDSI vocabularies.,NA
|
||||
concept_relationship,VOCAB,No,NA,No,NA,NA,"The CONCEPT_RELATIONSHIP table contains records that define relationships between any two Concepts and the nature or type of the relationship. This table captures various types of relationships, including hierarchical, associative, and other semantic connections, enabling comprehensive analysis and interpretation of clinical concepts. Every kind of relationship is defined in the RELATIONSHIP table.","The CONCEPT_RELATIONSHIP table can be used to explore hierarchical or attribute relationships between concepts to understand the hierarchical structure of clinical concepts and uncover implicit connections and associations within healthcare data. For example, users can utilize mapping relationships ('Maps to') to harmonize data from different sources and terminologies, enabling interoperability and data integration across disparate datasets.",NA
|
||||
relationship,VOCAB,No,NA,No,NA,NA,The RELATIONSHIP table provides a reference list of all types of relationships that can be used to associate any two concepts in the CONCEPT_RELATIONSHP table.,NA,NA
|
||||
concept_synonym,VOCAB,No,NA,No,NA,NA,The CONCEPT_SYNONYM table is used to store alternate names and descriptions for Concepts.,NA,NA
|
||||
concept_ancestor,VOCAB,No,NA,No,NA,NA,"The CONCEPT_ANCESTOR table is designed to simplify observational analysis by providing the complete hierarchical relationships between Concepts. Only direct parent-child relationships between Concepts are stored in the CONCEPT_RELATIONSHIP table. To determine higher level ancestry connections, all individual direct relationships would have to be navigated at analysis time. The CONCEPT_ANCESTOR table includes records for all parent-child relationships, as well as grandparent-grandchild relationships and those of any other level of lineage. Using the CONCEPT_ANCESTOR table allows for querying for all descendants of a hierarchical concept. For example, drug ingredients and drug products are all descendants of a drug class ancestor.
|
||||
|
||||
This table is entirely derived from the CONCEPT, CONCEPT_RELATIONSHIP and RELATIONSHIP tables.",NA,NA
|
||||
source_to_concept_map,VOCAB,No,NA,No,NA,NA,"The source to concept map table is a legacy data structure within the OMOP Common Data Model, recommended for use in ETL processes to maintain local source codes which are not available as Concepts in the Standardized Vocabularies, and to establish mappings for each source code into a Standard Concept as target_concept_ids that can be used to populate the Common Data Model tables. The SOURCE_TO_CONCEPT_MAP table is no longer populated with content within the Standardized Vocabularies published to the OMOP community.",NA,NA
|
||||
drug_strength,VOCAB,No,NA,No,NA,NA,The DRUG_STRENGTH table contains structured content about the amount or concentration and associated units of a specific ingredient contained within a particular drug product. This table is supplemental information to support standardized analysis of drug utilization.,NA,NA
|
||||
cohort_definition,VOCAB,No,NA,No,NA,NA,"The COHORT_DEFINITION table contains records defining a Cohort derived from the data through the associated description and syntax and upon instantiation (execution of the algorithm) placed into the COHORT table. Cohorts are a set of subjects that satisfy a given combination of inclusion criteria for a duration of time. The COHORT_DEFINITION table provides a standardized structure for maintaining the rules governing the inclusion of a subject into a cohort, and can store operational programming code to instantiate the cohort within the OMOP Common Data Model.",NA,NA
|
||||
attribute_definition,VOCAB,No,NA,No,NA,NA,"The ATTRIBUTE_DEFINITION table contains records to define each attribute
|
||||
through an associated description and syntax. Attributes are derived elements
|
||||
that can be selected or calculated for a subject within a cohort. The
|
||||
ATTRIBUTE_DEFINITION table provides a standardized structure for
|
||||
maintaining the rules governing the calculation of covariates for a subject in a
|
||||
cohort, and can store operational programming code to instantiate the
|
||||
attributes for a given cohort within the OMOP Common Data Model.",NA,NA
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,6 @@
|
|||
cdmTableName,schema,isRequired,conceptPrefix,measurePersonCompleteness,measurePersonCompletenessThreshold,validation,tableDescription,userGuidance,etlConventions
|
||||
person,CDM,Yes,NA,No,NA,NA,"This table serves as the central identity management for all Persons in the database. It contains records that uniquely identify each person or patient, and some demographic information.",All records in this table are independent Persons.,"All Persons in a database needs one record in this table, unless they fail data quality requirements specified in the ETL. Persons with no Events should have a record nonetheless. If more than one data source contributes Events to the database, Persons must be reconciled, if possible, across the sources to create one single record per Person. The content of the BIRTH_DATETIME must be equivalent to the content of BIRTH_DAY, BIRTH_MONTH and BIRTH_YEAR."
|
||||
observation_period,CDM,Yes,NA,Yes,0,NA,"This table contains records which define spans of time during which two conditions are expected to hold: (i) Clinical Events that happened to the Person are recorded in the Event tables, and (ii) absense of records indicate such Events did not occur during this span of time.","For each Person, one or more OBSERVATION_PERIOD records may be present, but they will not overlap or be back to back to each other. Events may exist outside all of the time spans of the OBSERVATION_PERIOD records for a patient, however, absence of an Event outside these time spans cannot be construed as evidence of absence of an Event. Incidence or prevalence rates should only be calculated for the time of active OBSERVATION_PERIOD records. When constructing cohorts, outside Events can be used for inclusion criteria definition, but without any guarantee for the performance of these criteria. Also, OBSERVATION_PERIOD records can be as short as a single day, greatly disturbing the denominator of any rate calculation as part of cohort characterizations. To avoid that, apply minimal observation time as a requirement for any cohort definition.","Each Person needs to have at least one OBSERVATION_PERIOD record, which should represent time intervals with a high capture rate of Clinical Events. Some source data have very similar concepts, such as enrollment periods in insurance claims data. In other source data such as most EHR systems these time spans need to be inferred under a set of assumptions. It is the discretion of the ETL developer to define these assumptions. In many ETL solutions the start date of the first occurrence or the first high quality occurrence of a Clinical Event (Condition, Drug, Procedure, Device, Measurement, Visit) is defined as the start of the OBSERVATION_PERIOD record, and the end date of the last occurrence of last high quality occurrence of a Clinical Event, or the end of the database period becomes the end of the OBSERVATOIN_PERIOD for each Person. If a Person only has a single Clinical Event the OBSERVATION_PERIOD record can be as short as one day. Depending on these definitions it is possible that Clinical Events fall outside the time spans defined by OBSERVATION_PERIOD records. Family history or history of Clinical Events generally are not used to generate OBSERVATION_PERIOD records around the time they are referring to. Any two overlapping or adjacent OBSERVATION_PERIOD records have to be merged into one."
|
||||
person,CDM,Yes,NA,No,NA,NA,"This table serves as the central identity management for all Persons in the database. It contains records that uniquely identify each person or patient, and some demographic information.",All records in this table are independent Persons.,"All Persons in a database needs one record in this table, unless they fail data quality requirements specified in the ETL. Persons with no Events should have a record nonetheless. If more than one data source contributes Events to the database, Persons must be reconciled, if possible, across the sources to create one single record per Person. The content of the BIRTH_DATETIME must be equivalent to the content of BIRTH_DAY, BIRTH_MONTH and BIRTH_YEAR.<br><br>For detailed conventions for how to populate this table, please refer to the [THEMIS repository](https://ohdsi.github.io/Themis/person.html)."
|
||||
observation_period,CDM,Yes,NA,Yes,0,NA,"This table contains records which define spans of time during which two conditions are expected to hold: (i) Clinical Events that happened to the Person are recorded in the Event tables, and (ii) absence of records indicate such Events did not occur during this span of time.","For each Person, one or more OBSERVATION_PERIOD records may be present, but they will not overlap or be back to back to each other. Events may exist outside all of the time spans of the OBSERVATION_PERIOD records for a patient, however, absence of an Event outside these time spans cannot be construed as evidence of absence of an Event. Incidence or prevalence rates should only be calculated for the time of active OBSERVATION_PERIOD records. When constructing cohorts, outside Events can be used for inclusion criteria definition, but without any guarantee for the performance of these criteria. Also, OBSERVATION_PERIOD records can be as short as a single day, greatly disturbing the denominator of any rate calculation as part of cohort characterizations. To avoid that, apply minimal observation time as a requirement for any cohort definition.","Each Person needs to have at least one OBSERVATION_PERIOD record, which should represent time intervals with a high capture rate of Clinical Events. Some source data have very similar concepts, such as enrollment periods in insurance claims data. In other source data such as most EHR systems these time spans need to be inferred under a set of assumptions. It is the discretion of the ETL developer to define these assumptions. In many ETL solutions the start date of the first occurrence or the first high quality occurrence of a Clinical Event (Condition, Drug, Procedure, Device, Measurement, Visit) is defined as the start of the OBSERVATION_PERIOD record, and the end date of the last occurrence of last high quality occurrence of a Clinical Event, or the end of the database period becomes the end of the OBSERVATION_PERIOD for each Person. If a Person only has a single Clinical Event the OBSERVATION_PERIOD record can be as short as one day. Depending on these definitions it is possible that Clinical Events fall outside the time spans defined by OBSERVATION_PERIOD records. Family history or history of Clinical Events generally are not used to generate OBSERVATION_PERIOD records around the time they are referring to. Any two overlapping or adjacent OBSERVATION_PERIOD records have to be merged into one."
|
||||
visit_occurrence,CDM,No,VISIT_,Yes,0,NA,"This table contains Events where Persons engage with the healthcare system for a duration of time. They are often also called ""Encounters"". Visits are defined by a configuration of circumstances under which they occur, such as (i) whether the patient comes to a healthcare institution, the other way around, or the interaction is remote, (ii) whether and what kind of trained medical staff is delivering the service during the Visit, and (iii) whether the Visit is transient or for a longer period involving a stay in bed.","The configuration defining the Visit are described by Concepts in the Visit Domain, which form a hierarchical structure, but rolling up to generally familiar Visits adopted in most healthcare systems worldwide:
|
||||
|
||||
- [Inpatient Visit](https://athena.ohdsi.org/search-terms/terms/9201): Person visiting hospital, at a Care Site, in bed, for duration of more than one day, with physicians and other Providers permanently available to deliver service around the clock
|
||||
|
@ -17,13 +17,21 @@ visit_occurrence,CDM,No,VISIT_,Yes,0,NA,"This table contains Events where Person
|
|||
|
||||
The Visit duration, or 'length of stay', is defined as VISIT_END_DATE - VISIT_START_DATE. For all Visits this is <1 day, except Inpatient Visits and Non-hospital institution Visits. The CDM also contains the VISIT_DETAIL table where additional information about the Visit is stored, for example, transfers between units during an inpatient Visit.","Visits can be derived easily if the source data contain coding systems for Place of Service or Procedures, like CPT codes for well visits. In those cases, the codes can be looked up and mapped to a Standard Visit Concept. Otherwise, Visit Concepts have to be identified in the ETL process. This table will contain concepts in the Visit domain. These concepts are arranged in a hierarchical structure to facilitate cohort definitions by rolling up to generally familiar Visits adopted in most healthcare systems worldwide. Visits can be adjacent to each other, i.e. the end date of one can be identical with the start date of the other. As a consequence, more than one-day Visits or their descendants can be recorded for the same day. Multi-day visits must not overlap, i.e. share days other than start and end days. It is often the case that some logic should be written for how to define visits and how to assign Visit_Concept_Id. For example, in US claims outpatient visits that appear to occur within the time period of an inpatient visit can be rolled into one with the same Visit_Occurrence_Id. In EHR data inpatient visits that are within one day of each other may be strung together to create one visit. It will all depend on the source data and how encounter records should be translated to visit occurrences. Providers can be associated with a Visit through the PROVIDER_ID field, or indirectly through PROCEDURE_OCCURRENCE records linked both to the VISIT and PROVIDER tables."
|
||||
visit_detail,CDM,No,VISIT_DETAIL_,Yes,0,NA,The VISIT_DETAIL table is an optional table used to represents details of each record in the parent VISIT_OCCURRENCE table. A good example of this would be the movement between units in a hospital during an inpatient stay or claim lines associated with a one insurance claim. For every record in the VISIT_OCCURRENCE table there may be 0 or more records in the VISIT_DETAIL table with a 1:n relationship where n may be 0. The VISIT_DETAIL table is structurally very similar to VISIT_OCCURRENCE table and belongs to the visit domain.,"The configuration defining the Visit Detail is described by Concepts in the Visit Domain, which form a hierarchical structure. The Visit Detail record will have an associated to the Visit Occurrence record in two ways: <br> 1. The Visit Detail record will have the VISIT_OCCURRENCE_ID it is associated to 2. The VISIT_DETAIL_CONCEPT_ID will be a descendant of the VISIT_CONCEPT_ID for the Visit.","It is not mandatory that the VISIT_DETAIL table be filled in, but if you find that the logic to create VISIT_OCCURRENCE records includes the roll-up of multiple smaller records to create one picture of a Visit then it is a good idea to use VISIT_DETAIL. In EHR data, for example, a Person may be in the hospital but instead of one over-arching Visit their encounters are recorded as times they interacted with a health care provider. A Person in the hospital interacts with multiple providers multiple times a day so the encounters must be strung together using some heuristic (defined by the ETL) to identify the entire Visit. In this case the encounters would be considered Visit Details and the entire Visit would be the Visit Occurrence. In this example it is also possible to use the Vocabulary to distinguish Visit Details from a Visit Occurrence by setting the VISIT_CONCEPT_ID to [9201](https://athena.ohdsi.org/search-terms/terms/9201) and the VISIT_DETAIL_CONCEPT_IDs either to 9201 or its children to indicate where the patient was in the hospital at the time of care."
|
||||
condition_occurrence,CDM,No,CONDITION_,Yes,0,NA,"This table contains records of Events of a Person suggesting the presence of a disease or medical condition stated as a diagnosis, a sign, or a symptom, which is either observed by a Provider or reported by the patient.","Conditions are defined by Concepts from the Condition domain, which form a complex hierarchy. As a result, the same Person with the same disease may have multiple Condition records, which belong to the same hierarchical family. Most Condition records are mapped from diagnostic codes, but recorded signs, symptoms and summary descriptions also contribute to this table. Rule out diagnoses should not be recorded in this table, but in reality their negating nature is not always captured in the source data, and other precautions must be taken when when identifying Persons who should suffer from the recorded Condition. Record all conditions as they exist in the source data. Any decisions about diagnosis/phenotype definitions would be done through cohort specifications. These cohorts can be housed in the [COHORT](https://ohdsi.github.io/CommonDataModel/cdm531.html#payer_plan_period) table. Conditions span a time interval from start to end, but are typically recorded as single snapshot records with no end date. The reason is twofold: (i) At the time of the recording the duration is not known and later not recorded, and (ii) the Persons typically cease interacting with the healthcare system when they feel better, which leads to incomplete capture of resolved Conditions. The [CONDITION_ERA](https://ohdsi.github.io/CommonDataModel/cdm531.html#condition_era) table addresses this issue. Family history and past diagnoses ('history of') are not recorded in this table. Instead, they are listed in the [OBSERVATION](https://ohdsi.github.io/CommonDataModel/cdm531.html#observation) table. Codes written in the process of establishing the diagnosis, such as 'question of' of and 'rule out', should not represented here. Instead, they should be recorded in the [OBSERVATION](https://ohdsi.github.io/CommonDataModel/cdm531.html#observation) table, if they are used for analyses. However, this information is not always available.",Source codes and source text fields mapped to Standard Concepts of the Condition Domain have to be recorded here.
|
||||
drug_exposure,CDM,No,DRUG_,Yes,0,NA,"This table captures records about the exposure to a Drug ingested or otherwise introduced into the body. A Drug is a biochemical substance formulated in such a way that when administered to a Person it will exert a certain biochemical effect on the metabolism. Drugs include prescription and over-the-counter medicines, vaccines, and large-molecule biologic therapies. Radiological devices ingested or applied locally do not count as Drugs.","The purpose of records in this table is to indicate an exposure to a certain drug as best as possible. In this context a drug is defined as an active ingredient. Drug Exposures are defined by Concepts from the Drug domain, which form a complex hierarchy. As a result, one DRUG_SOURCE_CONCEPT_ID may map to multiple standard concept ids if it is a combination product. Records in this table represent prescriptions written, prescriptions dispensed, and drugs administered by a provider to name a few. The DRUG_TYPE_CONCEPT_ID can be used to find and filter on these types. This table includes additional information about the drug products, the quantity given, and route of administration.",Information about quantity and dose is provided in a variety of different ways and it is important for the ETL to provide as much information as possible from the data. Depending on the provenance of the data fields may be captured differently i.e. quantity for drugs administered may have a separate meaning from quantity for prescriptions dispensed. If a patient has multiple records on the same day for the same drug or procedures the ETL should not de-dupe them unless there is probable reason to believe the item is a true data duplicate. Take note on how to handle refills for prescriptions written.
|
||||
procedure_occurrence,CDM,No,PROCEDURE_,Yes,0,NA,"This table contains records of activities or processes ordered by, or carried out by, a healthcare provider on the patient with a diagnostic or therapeutic purpose.","Lab tests are not a procedure, if something is observed with an expected resulting amount and unit then it should be a measurement. Phlebotomy is a procedure but so trivial that it tends to be rarely captured. It can be assumed that there is a phlebotomy procedure associated with many lab tests, therefore it is unnecessary to add them as separate procedures. If the user finds the same procedure over concurrent days, it is assumed those records are part of a procedure lasting more than a day. This logic is in lieu of the procedure_end_date, which will be added in a future version of the CDM.","When dealing with duplicate records, the ETL must determine whether to sum them up into one record or keep them separate. Things to consider are: - Same Procedure - Same PROCEDURE_DATETIME - Same Visit Occurrence or Visit Detail - Same Provider - Same Modifier for Procedures. Source codes and source text fields mapped to Standard Concepts of the Procedure Domain have to be recorded here."
|
||||
condition_occurrence,CDM,No,CONDITION_,Yes,0,NA,"This table contains records of Events of a Person suggesting the presence of a disease or medical condition stated as a diagnosis, a sign, or a symptom, which is either observed by a Provider or reported by the patient.","Conditions are defined by Concepts from the Condition domain, which form a complex hierarchy. As a result, the same Person with the same disease may have multiple Condition records, which belong to the same hierarchical family. Most Condition records are mapped from diagnostic codes, but recorded signs, symptoms and summary descriptions also contribute to this table. Rule out diagnoses should not be recorded in this table, but in reality their negating nature is not always captured in the source data, and other precautions must be taken when when identifying Persons who should suffer from the recorded Condition. Record all conditions as they exist in the source data. Any decisions about diagnosis/phenotype definitions would be done through cohort specifications. These cohorts can be housed in the [COHORT](https://ohdsi.github.io/CommonDataModel/cdm54.html#payer_plan_period) table. Conditions span a time interval from start to end, but are typically recorded as single snapshot records with no end date. The reason is twofold: (i) At the time of the recording the duration is not known and later not recorded, and (ii) the Persons typically cease interacting with the healthcare system when they feel better, which leads to incomplete capture of resolved Conditions. The [CONDITION_ERA](https://ohdsi.github.io/CommonDataModel/cdm54.html#condition_era) table addresses this issue. Family history and past diagnoses ('history of') are not recorded in this table. Instead, they are listed in the [OBSERVATION](https://ohdsi.github.io/CommonDataModel/cdm54.html#observation) table. Codes written in the process of establishing the diagnosis, such as 'question of' of and 'rule out', should not represented here. Instead, they should be recorded in the [OBSERVATION](https://ohdsi.github.io/CommonDataModel/cdm54.html#observation) table, if they are used for analyses. However, this information is not always available.",Source codes and source text fields mapped to Standard Concepts of the Condition Domain have to be recorded here.
|
||||
drug_exposure,CDM,No,DRUG_,Yes,0,NA,"This table captures records about the exposure to a Drug ingested or otherwise introduced into the body. A Drug is a biochemical substance formulated in such a way that when administered to a Person it will exert a certain biochemical effect on the metabolism. Drugs include prescription and over-the-counter medicines, vaccines, and large-molecule biologic therapies. Radiological devices ingested or applied locally do not count as Drugs.","The purpose of records in this table is to indicate an exposure to a certain drug as best as possible. In this context a drug is defined as an active ingredient. Drug Exposures are defined by Concepts from the Drug domain, which form a complex hierarchy. As a result, one DRUG_SOURCE_CONCEPT_ID may map to multiple standard concept ids if it is a combination product. Records in this table represent prescriptions written, prescriptions dispensed, and drugs administered by a provider to name a few. The DRUG_TYPE_CONCEPT_ID can be used to find and filter on these types. This table includes additional information about the drug products, the quantity given, and route of administration.","Information about quantity and dose is provided in a variety of different ways and it is important for the ETL to provide as much information as possible from the data. Depending on the provenance of the data fields may be captured differently i.e. quantity for drugs administered may have a separate meaning from quantity for prescriptions dispensed. If a patient has multiple records on the same day for the same drug or procedures the ETL should not de-dupe them unless there is probable reason to believe the item is a true data duplicate. Take note on how to handle refills for prescriptions written.<br><br>For detailed conventions on how to populate this table, please refer to the [THEMIS repository](https://ohdsi.github.io/Themis/drug_exposure.html)."
|
||||
procedure_occurrence,CDM,No,PROCEDURE_,Yes,0,NA,"This table contains records of activities or processes ordered by, or carried out by, a healthcare provider on the patient with a diagnostic or therapeutic purpose.","Lab tests are not a procedure, if something is observed with an expected resulting amount and unit then it should be a measurement. Phlebotomy is a procedure but so trivial that it tends to be rarely captured. It can be assumed that there is a phlebotomy procedure associated with many lab tests, therefore it is unnecessary to add them as separate procedures.","When dealing with duplicate records, the ETL must determine whether to sum them up into one record or keep them separate. Things to consider are:
|
||||
|
||||
- Same Procedure
|
||||
- Same procedure_datetime
|
||||
- Same Visit Occurrence or Visit Detail
|
||||
- Same Provider
|
||||
- Same Modifier for Procedures.
|
||||
|
||||
Source codes and source text fields mapped to Standard Concepts of the Procedure Domain have to be recorded here."
|
||||
device_exposure,CDM,No,DEVICE_,Yes,0,NA,"The Device domain captures information about a person's exposure to a foreign physical object or instrument which is used for diagnostic or therapeutic purposes through a mechanism beyond chemical action. Devices include implantable objects (e.g. pacemakers, stents, artificial joints), medical equipment and supplies (e.g. bandages, crutches, syringes), other instruments used in medical procedures (e.g. sutures, defibrillators) and material used in clinical care (e.g. adhesives, body material, dental material, surgical material).","The distinction between Devices or supplies and Procedures are sometimes blurry, but the former are physical objects while the latter are actions, often to apply a Device or supply.",Source codes and source text fields mapped to Standard Concepts of the Device Domain have to be recorded here.
|
||||
measurement,CDM,No,MEASUREMENT_,Yes,0,NA,"The MEASUREMENT table contains records of Measurements, i.e. structured values (numerical or categorical) obtained through systematic and standardized examination or testing of a Person or Person's sample. The MEASUREMENT table contains both orders and results of such Measurements as laboratory tests, vital signs, quantitative findings from pathology reports, etc. Measurements are stored as attribute value pairs, with the attribute as the Measurement Concept and the value representing the result. The value can be a Concept (stored in VALUE_AS_CONCEPT), or a numerical value (VALUE_AS_NUMBER) with a Unit (UNIT_CONCEPT_ID). The Procedure for obtaining the sample is housed in the PROCEDURE_OCCURRENCE table, though it is unnecessary to create a PROCEDURE_OCCURRENCE record for each measurement if one does not exist in the source data. Measurements differ from Observations in that they require a standardized test or some other activity to generate a quantitative or qualitative result. If there is no result, it is assumed that the lab test was conducted but the result was not captured.","Measurements are predominately lab tests with a few exceptions, like blood pressure or function tests. Results are given in the form of a value and unit combination. When investigating measurements, look for operator_concept_ids (<, >, etc.).","Only records where the source value maps to a Concept in the measurement domain should be included in this table. Even though each Measurement always has a result, the fields VALUE_AS_NUMBER and VALUE_AS_CONCEPT_ID are not mandatory as often the result is not given in the source data. When the result is not known, the Measurement record represents just the fact that the corresponding Measurement was carried out, which in itself is already useful information for some use cases. For some Measurement Concepts, the result is included in the test. For example, ICD10 CONCEPT_ID [45548980](https://athena.ohdsi.org/search-terms/terms/45548980) 'Abnormal level of unspecified serum enzyme' indicates a Measurement and the result (abnormal). In those situations, the CONCEPT_RELATIONSHIP table in addition to the 'Maps to' record contains a second record with the relationship_id set to 'Maps to value'. In this example, the 'Maps to' relationship directs to [4046263](https://athena.ohdsi.org/search-terms/terms/4046263) 'Enzyme measurement' as well as a 'Maps to value' record to [4135493](https://athena.ohdsi.org/search-terms/terms/4135493) 'Abnormal'."
|
||||
observation,CDM,No,OBSERVATION_,Yes,0,NA,"The OBSERVATION table captures clinical facts about a Person obtained in the context of examination, questioning or a procedure. Any data that cannot be represented by any other domains, such as social and lifestyle facts, medical history, family history, etc. are recorded here.","Observations differ from Measurements in that they do not require a standardized test or some other activity to generate clinical fact. Typical observations are medical history, family history, the stated need for certain treatment, social circumstances, lifestyle choices, healthcare utilization patterns, etc. If the generation clinical facts requires a standardized testing such as lab testing or imaging and leads to a standardized result, the data item is recorded in the MEASUREMENT table. If the clinical fact observed determines a sign, symptom, diagnosis of a disease or other medical condition, it is recorded in the CONDITION_OCCURRENCE table. Valid Observation Concepts are not enforced to be from any domain though they still should be Standard Concepts.","Records whose Source Values map to any domain besides Condition, Procedure, Drug, Measurement or Device should be stored in the Observation table. Observations can be stored as attribute value pairs, with the attribute as the Observation Concept and the value representing the clinical fact. This fact can be a Concept (stored in VALUE_AS_CONCEPT), a numerical value (VALUE_AS_NUMBER), a verbatim string (VALUE_AS_STRING), or a datetime (VALUE_AS_DATETIME). Even though Observations do not have an explicit result, the clinical fact can be stated separately from the type of Observation in the VALUE_AS_* fields. It is recommended for Observations that are suggestive statements of positive assertion should have a value of 'Yes' (concept_id=4188539), recorded, even though the null value is the equivalent."
|
||||
death,CDM,No,NA,No,NA,NA,"The death domain contains the clinical event for how and when a Person dies. A person can have up to one record if the source system contains evidence about the Death, such as: Condition in an administrative claim, status of enrollment into a health plan, or explicit record in EHR data.",NA,NA
|
||||
observation,CDM,No,OBSERVATION_,Yes,0,NA,"The OBSERVATION table captures clinical facts about a Person obtained in the context of examination, questioning or a procedure. Any data that cannot be represented by any other domains, such as social and lifestyle facts, medical history, family history, etc. are recorded here.","Observations differ from Measurements in that they do not require a standardized test or some other activity to generate clinical fact. Typical observations are medical history, family history, the stated need for certain treatment, social circumstances, lifestyle choices, healthcare utilization patterns, etc. If the generation clinical facts requires a standardized testing such as lab testing or imaging and leads to a standardized result, the data item is recorded in the MEASUREMENT table. If the clinical fact observed determines a sign, symptom, diagnosis of a disease or other medical condition, it is recorded in the CONDITION_OCCURRENCE table. Valid Observation Concepts are not enforced to be from any domain but they must not belong to the Condition, Procedure, Drug, Device, Specimen, or Measurement domains and they must be Standard Concepts. <br><br>The observation table usually records the date or datetime of when the observation was obtained, not the date of the observation starting. For example, if the patient reports that they had a heart attack when they were 50, the observation date or datetime is the date of the report, the heart attack observation can have a value_as_concept which captures how long ago the observation applied to the patient.","Records whose Source Values map to any domain besides Condition, Procedure, Drug, Specimen, Measurement or Device should be stored in the Observation table. Observations can be stored as attribute value pairs, with the attribute as the Observation Concept and the value representing the clinical fact. This fact can be a Concept (stored in VALUE_AS_CONCEPT), a numerical value (VALUE_AS_NUMBER) or a verbatim string (VALUE_AS_STRING). Even though Observations do not have an explicit result, the clinical fact can be stated separately from the type of Observation in the VALUE_AS_* fields. It is recommended for Observations that are suggestive statements of positive assertion should have a value of 'Yes' (concept_id=4188539), recorded, even though the null value is the equivalent."
|
||||
death,CDM,No,NA,No,NA,NA,"The death domain contains the clinical event for how and when a Person dies. A person can have up to one record if the source system contains evidence about the Death, such as: Condition in an administrative claim, status of enrollment into a health plan, or explicit record in EHR data.",NA,"For specific conventions on how to populate this table, please refer to the [THEMIS repository](https://ohdsi.github.io/Themis/death.html)."
|
||||
note,CDM,No,NA,Yes,0,NA,"The NOTE table captures unstructured information that was recorded by a provider about a patient in free text (in ASCII, or preferably in UTF8 format) notes on a given date. The type of note_text is CLOB or varchar(MAX) depending on RDBMS.",NA,"HL7/LOINC CDO is a standard for consistent naming of documents to support a range of use cases: retrieval, organization, display, and exchange. It guides the creation of LOINC codes for clinical notes. CDO annotates each document with 5 dimensions:
|
||||
|
||||
- **Kind of Document**: Characterizes the general structure of the document at a macro level (e.g. Anesthesia Consent)
|
||||
|
@ -41,15 +49,15 @@ fact_relationship,CDM,No,NA,No,NA,NA,"The FACT_RELATIONSHIP table contains recor
|
|||
- Person, 1, Person, 2, parent of
|
||||
- Person, 2, Person, 1, child of"
|
||||
location,CDM,No,NA,No,NA,NA,The LOCATION table represents a generic way to capture physical location or address information of Persons and Care Sites.,"The current iteration of the LOCATION table is US centric. Until a major release to correct this, certain fields can be used to represent different international values. <br><br> - STATE can also be used for province or district<br>- ZIP is also the postal code or postcode <br>- COUNTY can also be used to represent region","Each address or Location is unique and is present only once in the table. Locations do not contain names, such as the name of a hospital. In order to construct a full address that can be used in the postal service, the address information from the Location needs to be combined with information from the Care Site."
|
||||
care_site,CDM,No,NA,No,NA,NA,"The CARE_SITE table contains a list of uniquely identified institutional (physical or organizational) units where healthcare delivery is practiced (offices, wards, hospitals, clinics, etc.).",NA,"Care site is a unique combination of location_id and place_of_service_source_value. Care site does not take into account the provider (human) information such a specialty. Many source data do not make a distinction between individual and institutional providers. The CARE_SITE table contains the institutional providers. If the source, instead of uniquely identifying individual Care Sites, only provides limited information such as Place of Service, generic or ""pooled"" Care Site records are listed in the CARE_SITE table. There can be hierarchical and business relationships between Care Sites. For example, wards can belong to clinics or departments, which can in turn belong to hospitals, which in turn can belong to hospital systems, which in turn can belong to HMOs.The relationships between Care Sites are defined in the FACT_RELATIONSHIP table."
|
||||
provider,CDM,No,NA,No,NA,NA,"The PROVIDER table contains a list of uniquely identified healthcare providers. These are individuals providing hands-on healthcare to patients, such as physicians, nurses, midwives, physical therapists etc.","Many sources do not make a distinction between individual and institutional providers. The PROVIDER table contains the individual providers. If the source, instead of uniquely identifying individual providers, only provides limited information such as specialty, generic or 'pooled' Provider records are listed in the PROVIDER table.",NA
|
||||
care_site,CDM,No,NA,No,NA,NA,"The CARE_SITE table contains a list of uniquely identified institutional (physical or organizational) units where healthcare delivery is practiced (offices, wards, hospitals, clinics, etc.).",NA,"Care site is a unique combination of location_id and nature of the site - the latter could be the place of service, name, or another characteristic in your source data. Care site does not take into account the provider (human) information such a specialty. Many source data do not make a distinction between individual and institutional providers. The CARE_SITE table contains the institutional providers. If the source, instead of uniquely identifying individual Care Sites, only provides limited information such as Place of Service, generic or ""pooled"" Care Site records are listed in the CARE_SITE table. There can be hierarchical and business relationships between Care Sites. For example, wards can belong to clinics or departments, which can in turn belong to hospitals, which in turn can belong to hospital systems, which in turn can belong to HMOs.The relationships between Care Sites are defined in the FACT_RELATIONSHIP table.<br><br>For additional detailed conventions on how to populate this table, please refer to [THEMIS repository](https://ohdsi.github.io/Themis/care_site.html)."
|
||||
provider,CDM,No,NA,No,NA,NA,"The PROVIDER table contains a list of uniquely identified healthcare providers; duplication is not allowed. These are individuals providing hands-on healthcare to patients, such as physicians, nurses, midwives, physical therapists etc.","Many sources do not make a distinction between individual and institutional providers. The PROVIDER table contains the individual providers. If the source only provides limited information such as specialty instead of uniquely identifying individual providers, generic or 'pooled' Provider records are listed in the PROVIDER table.",NA
|
||||
payer_plan_period,CDM,No,NA,Yes,0,NA,"The PAYER_PLAN_PERIOD table captures details of the period of time that a Person is continuously enrolled under a specific health Plan benefit structure from a given Payer. Each Person receiving healthcare is typically covered by a health benefit plan, which pays for (fully or partially), or directly provides, the care. These benefit plans are provided by payers, such as health insurances or state or government agencies. In each plan the details of the health benefits are defined for the Person or her family, and the health benefit Plan might change over time typically with increasing utilization (reaching certain cost thresholds such as deductibles), plan availability and purchasing choices of the Person. The unique combinations of Payer organizations, health benefit Plans and time periods in which they are valid for a Person are recorded in this table.","A Person can have multiple, overlapping, Payer_Plan_Periods in this table. For example, medical and drug coverage in the US can be represented by two Payer_Plan_Periods. The details of the benefit structure of the Plan is rarely known, the idea is just to identify that the Plans are different.",NA
|
||||
cost,CDM,No,NA,No,NA,NA,"The COST table captures records containing the cost of any medical event recorded in one of the OMOP clinical event tables such as DRUG_EXPOSURE, PROCEDURE_OCCURRENCE, VISIT_OCCURRENCE, VISIT_DETAIL, DEVICE_OCCURRENCE, OBSERVATION or MEASUREMENT.
|
||||
|
||||
Each record in the cost table account for the amount of money transacted for the clinical event. So, the COST table may be used to represent both receivables (charges) and payments (paid), each transaction type represented by its COST_CONCEPT_ID. The COST_TYPE_CONCEPT_ID field will use concepts in the Standardized Vocabularies to designate the source (provenance) of the cost data. A reference to the health plan information in the PAYER_PLAN_PERIOD table is stored in the record for information used for the adjudication system to determine the persons benefit for the clinical event.","When dealing with summary costs, the cost of the goods or services the provider provides is often not known directly, but derived from the hospital charges multiplied by an average cost-to-charge ratio.","One cost record is generated for each response by a payer. In a claims databases, the payment and payment terms reported by the payer for the goods or services billed will generate one cost record. If the source data has payment information for more than one payer (i.e. primary insurance and secondary insurance payment for one entity), then a cost record is created for each reporting payer. Therefore, it is possible for one procedure to have multiple cost records for each payer, but typically it contains one or no record per entity. Payer reimbursement cost records will be identified by using the PAYER_PLAN_ID field. Drug costs are composed of ingredient cost (the amount charged by the wholesale distributor or manufacturer), the dispensing fee (the amount charged by the pharmacy and the sales tax)."
|
||||
drug_era,CDM,No,NA,Yes,0,NA,"A Drug Era is defined as a span of time when the Person is assumed to be exposed to a particular active ingredient. A Drug Era is not the same as a Drug Exposure: Exposures are individual records corresponding to the source when Drug was delivered to the Person, while successive periods of Drug Exposures are combined under certain rules to produce continuous Drug Eras.",NA,The SQL script for generating DRUG_ERA records can be found [here](https://ohdsi.github.io/CommonDataModel/sqlScripts.html#drug_eras).
|
||||
drug_era,CDM,No,NA,Yes,0,NA,"A Drug Era is defined as a span of time when the Person is assumed to be exposed to a particular active ingredient. A Drug Era is not the same as a Drug Exposure: Exposures are individual records corresponding to the source when Drug was delivered to the Person, while successive periods of Drug Exposures are combined under certain rules to produce continuous Drug Eras. Every record in the DRUG_EXPOSURE table should be part of a drug era based on the dates of exposure. ",NA,The SQL script for generating DRUG_ERA records can be found [here](https://ohdsi.github.io/CommonDataModel/sqlScripts.html#drug_eras).
|
||||
dose_era,CDM,No,NA,Yes,0,NA,A Dose Era is defined as a span of time when the Person is assumed to be exposed to a constant dose of a specific active ingredient.,NA,"Dose Eras will be derived from records in the DRUG_EXPOSURE table and the Dose information from the DRUG_STRENGTH table using a standardized algorithm. Dose Form information is not taken into account. So, if the patient changes between different formulations, or different manufacturers with the same formulation, the Dose Era is still spanning the entire time of exposure to the Ingredient."
|
||||
condition_era,CDM,No,NA,Yes,0,NA,"A Condition Era is defined as a span of time when the Person is assumed to have a given condition. Similar to Drug Eras, Condition Eras are chronological periods of Condition Occurrence. Combining individual Condition Occurrences into a single Condition Era serves two purposes:
|
||||
condition_era,CDM,No,NA,Yes,0,NA,"A Condition Era is defined as a span of time when the Person is assumed to have a given condition. Similar to Drug Eras, Condition Eras are chronological periods of Condition Occurrence and every Condition Occurrence record should be part of a Condition Era. Combining individual Condition Occurrences into a single Condition Era serves two purposes:
|
||||
|
||||
- It allows aggregation of chronic conditions that require frequent ongoing care, instead of treating each Condition Occurrence as an independent event.
|
||||
- It allows aggregation of multiple, closely timed doctor visits for the same Condition to avoid double-counting the Condition Occurrences.
|
||||
|
@ -61,21 +69,16 @@ episode,CDM,No,NA,No,NA,NA,"The EPISODE table aggregates lower-level clinical ev
|
|||
episode_event,CDM,No,NA,No,NA,NA,"The EPISODE_EVENT table connects qualifying clinical events (such as CONDITION_OCCURRENCE, DRUG_EXPOSURE, PROCEDURE_OCCURRENCE, MEASUREMENT) to the appropriate EPISODE entry. For example, linking the precise location of the metastasis (cancer modifier in MEASUREMENT) to the disease episode.",This connecting table is used instead of the FACT_RELATIONSHIP table for linking low-level events to abstracted Episodes.,"Some episodes may not have links to any underlying clinical events. For such episodes, the EPISODE_EVENT table is not populated."
|
||||
metadata,CDM,No,NA,No,NA,NA,The METADATA table contains metadata information about a dataset that has been transformed to the OMOP Common Data Model.,NA,NA
|
||||
cdm_source,CDM,No,NA,No,NA,NA,The CDM_SOURCE table contains detail about the source database and the process used to transform the data into the OMOP Common Data Model.,NA,NA
|
||||
concept,VOCAB,No,NA,No,NA,NA,"The Standardized Vocabularies contains records, or Concepts, that uniquely identify each fundamental unit of meaning used to express clinical information in all domain tables of the CDM. Concepts are derived from vocabularies, which represent clinical information across a domain (e.g. conditions, drugs, procedures) through the use of codes and associated descriptions. Some Concepts are designated Standard Concepts, meaning these Concepts can be used as normative expressions of a clinical entity within the OMOP Common Data Model and within standardized analytics. Each Standard Concept belongs to one domain, which defines the location where the Concept would be expected to occur within data tables of the CDM.
|
||||
|
||||
Concepts can represent broad categories (like 'Cardiovascular disease'), detailed clinical elements ('Myocardial infarction of the anterolateral wall') or modifying characteristics and attributes that define Concepts at various levels of detail (severity of a disease, associated morphology, etc.).
|
||||
|
||||
Records in the Standardized Vocabularies tables are derived from national or international vocabularies such as SNOMED-CT, RxNorm, and LOINC, or custom Concepts defined to cover various aspects of observational data analysis.",NA,NA
|
||||
vocabulary,VOCAB,No,NA,No,NA,NA,The VOCABULARY table includes a list of the Vocabularies collected from various sources or created de novo by the OMOP community. This reference table is populated with a single record for each Vocabulary source and includes a descriptive name and other associated attributes for the Vocabulary.,NA,NA
|
||||
domain,VOCAB,No,NA,No,NA,NA,"The DOMAIN table includes a list of OMOP-defined Domains the Concepts of the Standardized Vocabularies can belong to. A Domain defines the set of allowable Concepts for the standardized fields in the CDM tables. For example, the ""Condition"" Domain contains Concepts that describe a condition of a patient, and these Concepts can only be stored in the condition_concept_id field of the CONDITION_OCCURRENCE and CONDITION_ERA tables. This reference table is populated with a single record for each Domain and includes a descriptive name for the Domain.",NA,NA
|
||||
concept_class,VOCAB,No,NA,No,NA,NA,"The CONCEPT_CLASS table is a reference table, which includes a list of the classifications used to differentiate Concepts within a given Vocabulary. This reference table is populated with a single record for each Concept Class.",NA,NA
|
||||
concept_relationship,VOCAB,No,NA,No,NA,NA,The CONCEPT_RELATIONSHIP table contains records that define direct relationships between any two Concepts and the nature or type of the relationship. Each type of a relationship is defined in the RELATIONSHIP table.,NA,NA
|
||||
relationship,VOCAB,No,NA,No,NA,NA,The RELATIONSHIP table provides a reference list of all types of relationships that can be used to associate any two concepts in the CONCEPT_RELATIONSHP table.,NA,NA
|
||||
concept_synonym,VOCAB,No,NA,No,NA,NA,The CONCEPT_SYNONYM table is used to store alternate names and descriptions for Concepts.,NA,NA
|
||||
concept_ancestor,VOCAB,No,NA,No,NA,NA,"The CONCEPT_ANCESTOR table is designed to simplify observational analysis by providing the complete hierarchical relationships between Concepts. Only direct parent-child relationships between Concepts are stored in the CONCEPT_RELATIONSHIP table. To determine higher level ancestry connections, all individual direct relationships would have to be navigated at analysis time. The CONCEPT_ANCESTOR table includes records for all parent-child relationships, as well as grandparent-grandchild relationships and those of any other level of lineage. Using the CONCEPT_ANCESTOR table allows for querying for all descendants of a hierarchical concept. For example, drug ingredients and drug products are all descendants of a drug class ancestor.
|
||||
|
||||
This table is entirely derived from the CONCEPT, CONCEPT_RELATIONSHIP and RELATIONSHIP tables.",NA,NA
|
||||
source_to_concept_map,VOCAB,No,NA,No,NA,NA,"The source to concept map table is a legacy data structure within the OMOP Common Data Model, recommended for use in ETL processes to maintain local source codes which are not available as Concepts in the Standardized Vocabularies, and to establish mappings for each source code into a Standard Concept as target_concept_ids that can be used to populate the Common Data Model tables. The SOURCE_TO_CONCEPT_MAP table is no longer populated with content within the Standardized Vocabularies published to the OMOP community.",NA,NA
|
||||
concept,VOCAB,No,NA,No,NA,NA,"The Standardized Vocabularies contains records, or Concepts, that uniquely identify each fundamental unit of meaning used to express clinical information in all domain tables of the CDM. Concepts are derived from vocabularies, which represent clinical information across a domain (e.g. conditions, drugs, procedures) through the use of codes and associated descriptions. Some Concepts are designated Standard Concepts, meaning these Concepts can be used as normative expressions of a clinical entity within the OMOP Common Data Model and standardized analytics. Each Standard Concept belongs to one Domain, which defines the location where the Concept would be expected to occur within the data tables of the CDM. Concepts can represent broad categories ('Cardiovascular disease'), detailed clinical elements ('Myocardial infarction of the anterolateral wall'), or modifying characteristics and attributes that define Concepts at various levels of detail (severity of a disease, associated morphology, etc.). Records in the Standardized Vocabularies tables are derived from national or international vocabularies such as SNOMED-CT, RxNorm, and LOINC, or custom OMOP Concepts defined to cover various aspects of observational data analysis.","The primary purpose of the CONCEPT table is to provide a standardized representation of medical Concepts, allowing for consistent querying and analysis across the healthcare databases. Users can join the CONCEPT table with other tables in the CDM to enrich clinical data with standardized Concept information or use the CONCEPT table as a reference for mapping clinical data from source terminologies to Standard Concepts.",NA
|
||||
vocabulary,VOCAB,No,NA,No,NA,NA,The VOCABULARY table includes a list of the Vocabularies integrated from various sources or created de novo in OMOP CDM. This reference table contains a single record for each Vocabulary and includes a descriptive name and other associated attributes for the Vocabulary.,"The primary purpose of the VOCABULARY table is to provide explicit information about specific vocabulary versions and the references to the sources from which they are asserted. Users can identify the version of a particular vocabulary used in the database, enabling consistency and reproducibility in data analysis. Besides, users can check the vocabulary release version in their CDM which refers to the vocabulary_id = 'None'.",NA
|
||||
domain,VOCAB,No,NA,No,NA,NA,"The DOMAIN table includes a list of OMOP-defined Domains to which the Concepts of the Standardized Vocabularies can belong. A Domain represents a clinical definition whereby we assign matching Concepts for the standardized fields in the CDM tables. For example, the Condition Domain contains Concepts that describe a patient condition, and these Concepts can only be used in the condition_concept_id field of the CONDITION_OCCURRENCE and CONDITION_ERA tables. This reference table is populated with a single record for each Domain, including a Domain ID and a descriptive name for every Domain.","Users can leverage the DOMAIN table to explore the full spectrum of health-related data Domains available in the Standardized Vocabularies. Also, the information in the DOMAIN table may be used as a reference for mapping source data to OMOP domains, facilitating data harmonization and interoperability.",NA
|
||||
concept_class,VOCAB,No,NA,No,NA,NA,"The CONCEPT_CLASS table includes semantic categories that reference the source structure of each Vocabulary. Concept Classes represent so-called horizontal (e.g. MedDRA, RxNorm) or vertical levels (e.g. SNOMED) of the vocabulary structure. Vocabularies without any Concept Classes, such as HCPCS, use the vocabulary_id as the Concept Class. This reference table is populated with a single record for each Concept Class, which includes a Concept Class ID and a fully specified Concept Class name.
|
||||
",Users can utilize the CONCEPT_CLASS table to explore the different classes or categories of concepts within the OHDSI vocabularies.,NA
|
||||
concept_relationship,VOCAB,No,NA,No,NA,NA,"The CONCEPT_RELATIONSHIP table contains records that define relationships between any two Concepts and the nature or type of the relationship. This table captures various types of relationships, including hierarchical, associative, and other semantic connections, enabling comprehensive analysis and interpretation of clinical concepts. Every kind of relationship is defined in the RELATIONSHIP table.","The CONCEPT_RELATIONSHIP table can be used to explore hierarchical or attribute relationships between concepts to understand the hierarchical structure of clinical concepts and uncover implicit connections and associations within healthcare data. For example, users can utilize mapping relationships ('Maps to') to harmonize data from different sources and terminologies, enabling interoperability and data integration across disparate datasets.",NA
|
||||
relationship,VOCAB,No,NA,No,NA,NA,"The RELATIONSHIP table provides a reference list of all types of relationships that can be used to associate any two Concepts in the CONCEPT_RELATIONSHIP table, the respective reverse relationships, and their hierarchical characteristics. Note, that Concepts representing relationships between the clinical facts, used for filling in the FACT_RELATIONSHIP table are stored in the CONCEPT table and belong to the Relationship Domain.","Users can leverage the RELATIONSHIP table to explore the full list of direct and reverse relationships within the OMOP vocabulary system. Also, users can get insight into how these relationships can be used in ETL, cohort creation, and other tasks according to their ancestral characteristics.",NA
|
||||
concept_synonym,VOCAB,No,NA,No,NA,NA,"The CONCEPT_SYNONYM table captures alternative terms, synonyms, and translations of Concept Name into various languages linked to specific concepts, providing users with a comprehensive view of how Concepts may be expressed or referenced.","Users can leverage the CONCEPT_SYNONYM table to expand search capabilities and improve query accuracy by incorporating synonymous terms into data analysis and retrieval processes. Also, users can enhance their mapping efforts between local terminologies and standardized concepts by identifying synonymous terms associated with concepts in the CONCEPT_SYNONYM table.",NA
|
||||
concept_ancestor,VOCAB,No,NA,No,NA,NA,"The CONCEPT_ANCESTOR table is designed to simplify observational analysis by providing the complete hierarchical relationships between Concepts. Only direct parent-child relationships between Concepts are stored in the CONCEPT_RELATIONSHIP table. To determine higher-level ancestry connections, all individual direct relationships would have to be navigated at analysis time. The CONCEPT_ANCESTOR table includes records for all parent-child relationships, as well as grandparent-grandchild relationships and those of any other level of lineage for Standard or Classification concepts. Using the CONCEPT_ANCESTOR table allows for querying for all descendants of a hierarchical concept, and the other way around. For example, drug ingredients and drug products, beneath them in the hierarchy, are all descendants of a drug class ancestor. This table is entirely derived from the CONCEPT, CONCEPT_RELATIONSHIP, and RELATIONSHIP tables.","The CONCEPT_ANCESTOR table can be used to explore the hierarchical relationships captured in the table to gain insights into the hierarchical structure of clinical concepts. Understanding the hierarchical relationships of concepts can facilitate accurate interpretation and analysis of healthcare data. Also, by incorporating hierarchical relationships from the CONCEPT_ANCESTOR table, users can create cohorts containing related concepts within a hierarchical structure, enabling more comprehensive cohort definitions.",NA
|
||||
source_to_concept_map,VOCAB,No,NA,No,NA,NA,"The source to concept map table is recommended for use in ETL processes to maintain local source codes which are not available as Concepts in the Standardized Vocabularies, and to establish mappings for each source code into a Standard Concept as target_concept_ids that can be used to populate the Common Data Model tables. The SOURCE_TO_CONCEPT_MAP table is no longer populated with content within the Standardized Vocabularies published to the OMOP community. **There are OHDSI tools to help you populate this table; [Usagi](https://github.com/OHDSI/Usagi) and [Perseus](https://github.com/ohdsi/Perseus). You can read more about OMOP vocabulary mapping in [The Book of OHDSI Chapter 6.3](https://ohdsi.github.io/TheBookOfOhdsi/ExtractTransformLoad.html#step-2-create-the-code-mappings).**",NA,NA
|
||||
drug_strength,VOCAB,No,NA,No,NA,NA,The DRUG_STRENGTH table contains structured content about the amount or concentration and associated units of a specific ingredient contained within a particular drug product. This table is supplemental information to support standardized analysis of drug utilization.,NA,NA
|
||||
cohort,RESULTS,No,NA,No,NA,NA,The COHORT table contains records of subjects that satisfy a given set of criteria for a duration of time. The definition of the cohort is contained within the COHORT_DEFINITION table. It is listed as part of the RESULTS schema because it is a table that users of the database as well as tools such as ATLAS need to be able to write to. The CDM and Vocabulary tables are all read-only so it is suggested that the COHORT and COHORT_DEFINTION tables are kept in a separate schema to alleviate confusion.,NA,"Cohorts typically include patients diagnosed with a specific condition, patients exposed to a particular drug, but can also be Providers who have performed a specific Procedure. Cohort records must have a Start Date and an End Date, but the End Date may be set to Start Date or could have an applied censor date using the Observation Period Start Date. Cohort records must contain a Subject Id, which can refer to the Person, Provider, Visit record or Care Site though they are most often Person Ids. The Cohort Definition will define the type of subject through the subject concept id. A subject can belong (or not belong) to a cohort at any moment in time. A subject can only have one record in the cohort table for any moment of time, i.e. it is not possible for a person to contain multiple records indicating cohort membership that are overlapping in time"
|
||||
cohort_definition,RESULTS,No,NA,No,NA,NA,"The COHORT_DEFINITION table contains records defining a Cohort derived from the data through the associated description and syntax and upon instantiation (execution of the algorithm) placed into the COHORT table. Cohorts are a set of subjects that satisfy a given combination of inclusion criteria for a duration of time. The COHORT_DEFINITION table provides a standardized structure for maintaining the rules governing the inclusion of a subject into a cohort, and can store operational programming code to instantiate the cohort within the OMOP Common Data Model.",NA,NA
|
||||
cohort,RESULTS,No,NA,No,NA,NA,"The subject of a cohort can have multiple, discrete records in the cohort table per cohort_definition_id, subject_id, and non-overlapping time periods. The definition of the cohort is contained within the COHORT_DEFINITION table. It is listed as part of the RESULTS schema because it is a table that users of the database as well as tools such as ATLAS need to be able to write to. The CDM and Vocabulary tables are all read-only so it is suggested that the COHORT and COHORT_DEFINTION tables are kept in a separate schema to alleviate confusion.",NA,"Cohorts typically include patients diagnosed with a specific condition, patients exposed to a particular drug, but can also be Providers who have performed a specific Procedure. Cohort records must have a Start Date and an End Date, but the End Date may be set to Start Date or could have an applied censor date using the Observation Period Start Date. Cohort records must contain a Subject Id, which can refer to the Person, Provider, Visit record or Care Site though they are most often Person Ids. The Cohort Definition will define the type of subject through the subject concept id. A subject can belong (or not belong) to a cohort at any moment in time. A subject can only have one record in the cohort table for any moment of time, i.e. it is not possible for a person to contain multiple records indicating cohort membership that are overlapping in time"
|
||||
cohort_definition,RESULTS,No,NA,No,NA,NA,"The COHORT_DEFINITION table contains records defining a Cohort derived from the data through the associated description and syntax and upon instantiation (execution of the algorithm) placed into the COHORT table. Cohorts are a set of subjects that satisfy a given combination of inclusion criteria for a duration of time. The COHORT_DEFINITION table provides a standardized structure for maintaining the rules governing the inclusion of a subject into a cohort, and can store operational programming code to instantiate the cohort within the OMOP Common Data Model.",NA,NA
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,6 @@
|
|||
cdmTableName,schema,isRequired,conceptPrefix,measurePersonCompleteness,measurePersonCompletenessThreshold,validation,tableDescription,userGuidance,etlConventions
|
||||
person,CDM,Yes,NA,No,NA,NA,"This table serves as the central identity management for all Persons in the database. It contains records that uniquely identify each person or patient, and some demographic information.",All records in this table are independent Persons.,"All Persons in a database needs one record in this table, unless they fail data quality requirements specified in the ETL. Persons with no Events should have a record nonetheless. If more than one data source contributes Events to the database, Persons must be reconciled, if possible, across the sources to create one single record per Person. The BIRTH_DATETIME must be equivalent to the content of BIRTH_DAY, BIRTH_MONTH and BIRTH_YEAR. There is a helpful rule listed in table below for how to derive BIRTH_DATETIME if it is not available in the source. **New to CDM v6.0** The person's death date is now stored in this table instead of the separate DEATH table. In the case that multiple dates of death are given in the source data the ETL should make a choice as to which death date to put in the PERSON table. Any additional dates can be stored in the OBSERVATION table using the concept [4265167](https://athena.ohdsi.org/search-terms/terms/4265167) which stands for 'Date of death' . Similarly, the cause of death is stored in the CONDITION_OCCURRENCE table using the CONDITION_STATUS_CONCEPT_ID [32891](https://athena.ohdsi.org/search-terms/terms/32891) for 'Cause of death'."
|
||||
observation_period,CDM,Yes,NA,Yes,0,NA,"This table contains records which define spans of time during which two conditions are expected to hold: (i) Clinical Events that happened to the Person are recorded in the Event tables, and (ii) absense of records indicate such Events did not occur during this span of time.","For each Person, one or more OBSERVATION_PERIOD records may be present, but they will not overlap or be back to back to each other. Events may exist outside all of the time spans of the OBSERVATION_PERIOD records for a patient, however, absence of an Event outside these time spans cannot be construed as evidence of absence of an Event. Incidence or prevalence rates should only be calculated for the time of active OBSERVATION_PERIOD records. When constructing cohorts, outside Events can be used for inclusion criteria definition, but without any guarantee for the performance of these criteria. Also, OBSERVATION_PERIOD records can be as short as a single day, greatly disturbing the denominator of any rate calculation as part of cohort characterizations. To avoid that, apply minimal observation time as a requirement for any cohort definition.","Each Person needs to have at least one OBSERVATION_PERIOD record, which should represent time intervals with a high capture rate of Clinical Events. Some source data have very similar concepts, such as enrollment periods in insurance claims data. In other source data such as most EHR systems these time spans need to be inferred under a set of assumptions. It is the discretion of the ETL developer to define these assumptions. In many ETL solutions the start date of the first occurrence or the first high quality occurrence of a Clinical Event (Condition, Drug, Procedure, Device, Measurement, Visit) is defined as the start of the OBSERVATION_PERIOD record, and the end date of the last occurrence of last high quality occurrence of a Clinical Event, or the end of the database period becomes the end of the OBSERVATOIN_PERIOD for each Person. If a Person only has a single Clinical Event the OBSERVATION_PERIOD record can be as short as one day. Depending on these definitions it is possible that Clinical Events fall outside the time spans defined by OBSERVATION_PERIOD records. Family history or history of Clinical Events generally are not used to generate OBSERVATION_PERIOD records around the time they are referring to. Any two overlapping or adjacent OBSERVATION_PERIOD records have to be merged into one."
|
||||
observation_period,CDM,Yes,NA,Yes,0,NA,"This table contains records which define spans of time during which two conditions are expected to hold: (i) Clinical Events that happened to the Person are recorded in the Event tables, and (ii) absence of records indicate such Events did not occur during this span of time.","For each Person, one or more OBSERVATION_PERIOD records may be present, but they will not overlap or be back to back to each other. Events may exist outside all of the time spans of the OBSERVATION_PERIOD records for a patient, however, absence of an Event outside these time spans cannot be construed as evidence of absence of an Event. Incidence or prevalence rates should only be calculated for the time of active OBSERVATION_PERIOD records. When constructing cohorts, outside Events can be used for inclusion criteria definition, but without any guarantee for the performance of these criteria. Also, OBSERVATION_PERIOD records can be as short as a single day, greatly disturbing the denominator of any rate calculation as part of cohort characterizations. To avoid that, apply minimal observation time as a requirement for any cohort definition.","Each Person needs to have at least one OBSERVATION_PERIOD record, which should represent time intervals with a high capture rate of Clinical Events. Some source data have very similar concepts, such as enrollment periods in insurance claims data. In other source data such as most EHR systems these time spans need to be inferred under a set of assumptions. It is the discretion of the ETL developer to define these assumptions. In many ETL solutions the start date of the first occurrence or the first high quality occurrence of a Clinical Event (Condition, Drug, Procedure, Device, Measurement, Visit) is defined as the start of the OBSERVATION_PERIOD record, and the end date of the last occurrence of last high quality occurrence of a Clinical Event, or the end of the database period becomes the end of the OBSERVATION_PERIOD for each Person. If a Person only has a single Clinical Event the OBSERVATION_PERIOD record can be as short as one day. Depending on these definitions it is possible that Clinical Events fall outside the time spans defined by OBSERVATION_PERIOD records. Family history or history of Clinical Events generally are not used to generate OBSERVATION_PERIOD records around the time they are referring to. Any two overlapping or adjacent OBSERVATION_PERIOD records have to be merged into one."
|
||||
visit_occurrence,CDM,No,VISIT_,Yes,0,NA,"This table contains Events where Persons engage with the healthcare system for a duration of time. They are often also called ""Encounters"". Visits are defined by a configuration of circumstances under which they occur, such as (i) whether the patient comes to a healthcare institution, the other way around, or the interaction is remote, (ii) whether and what kind of trained medical staff is delivering the service during the Visit, and (iii) whether the Visit is transient or for a longer period involving a stay in bed.","The configuration defining the Visit are described by Concepts in the Visit Domain, which form a hierarchical structure, but rolling up to generally familiar Visits adopted in most healthcare systems worldwide:
|
||||
|
||||
- [Inpatient Visit](https://athena.ohdsi.org/search-terms/terms/9201): Person visiting hospital, at a Care Site, in bed, for duration of more than one day, with physicians and other Providers permanently available to deliver service around the clock
|
||||
|
@ -17,7 +17,7 @@ visit_occurrence,CDM,No,VISIT_,Yes,0,NA,"This table contains Events where Person
|
|||
|
||||
The Visit duration, or 'length of stay', is defined as VISIT_END_DATE - VISIT_START_DATE. For all Visits this is <1 day, except Inpatient Visits and Non-hospital institution Visits. The CDM also contains the VISIT_DETAIL table where additional information about the Visit is stored, for example, transfers between units during an inpatient Visit.","Visits can be derived easily if the source data contain coding systems for Place of Service or Procedures, like CPT codes for well visits. In those cases, the codes can be looked up and mapped to a Standard Visit Concept. Otherwise, Visit Concepts have to be identified in the ETL process. This table will contain concepts in the Visit domain. These concepts are arranged in a hierarchical structure to facilitate cohort definitions by rolling up to generally familiar Visits adopted in most healthcare systems worldwide. Visits can be adjacent to each other, i.e. the end date of one can be identical with the start date of the other. As a consequence, more than one-day Visits or their descendants can be recorded for the same day. Multi-day visits must not overlap, i.e. share days other than start and end days. It is often the case that some logic should be written for how to define visits and how to assign Visit_Concept_Id. For example, in US claims outpatient visits that appear to occur within the time period of an inpatient visit can be rolled into one with the same Visit_Occurrence_Id. In EHR data inpatient visits that are within one day of each other may be strung together to create one visit. It will all depend on the source data and how encounter records should be translated to visit occurrences. Providers can be associated with a Visit through the PROVIDER_ID field, or indirectly through PROCEDURE_OCCURRENCE records linked both to the VISIT and PROVIDER tables."
|
||||
visit_detail,CDM,No,VISIT_DETAIL_,Yes,0,NA,The VISIT_DETAIL table is an optional table used to represents details of each record in the parent VISIT_OCCURRENCE table. A good example of this would be the movement between units in a hospital during an inpatient stay or claim lines associated with a one insurance claim. For every record in the VISIT_OCCURRENCE table there may be 0 or more records in the VISIT_DETAIL table with a 1:n relationship where n may be 0. The VISIT_DETAIL table is structurally very similar to VISIT_OCCURRENCE table and belongs to the visit domain.,"The configuration defining the Visit Detail is described by Concepts in the Visit Domain, which form a hierarchical structure. The Visit Detail record will have an associated to the Visit Occurrence record in two ways: <br> 1. The Visit Detail record will have the VISIT_OCCURRENCE_ID it is associated to 2. The VISIT_DETAIL_CONCEPT_ID will be a descendant of the VISIT_CONCEPT_ID for the Visit.","It is not mandatory that the VISIT_DETAIL table be filled in, but if you find that the logic to create VISIT_OCCURRENCE records includes the roll-up of multiple smaller records to create one picture of a Visit then it is a good idea to use VISIT_DETAIL. In EHR data, for example, a Person may be in the hospital but instead of one over-arching Visit their encounters are recorded as times they interacted with a health care provider. A Person in the hospital interacts with multiple providers multiple times a day so the encounters must be strung together using some heuristic (defined by the ETL) to identify the entire Visit. In this case the encounters would be considered Visit Details and the entire Visit would be the Visit Occurrence. In this example it is also possible to use the Vocabulary to distinguish Visit Details from a Visit Occurrence by setting the VISIT_CONCEPT_ID to [9201](https://athena.ohdsi.org/search-terms/terms/9201) and the VISIT_DETAIL_CONCEPT_IDs either to 9201 or its children to indicate where the patient was in the hospital at the time of care."
|
||||
condition_occurrence,CDM,No,CONDITION_,Yes,0,NA,"This table contains records of Events of a Person suggesting the presence of a disease or medical condition stated as a diagnosis, a sign, or a symptom, which is either observed by a Provider or reported by the patient.","Conditions are defined by Concepts from the Condition domain, which form a complex hierarchy. As a result, the same Person with the same disease may have multiple Condition records, which belong to the same hierarchical family. Most Condition records are mapped from diagnostic codes, but recorded signs, symptoms and summary descriptions also contribute to this table. Rule out diagnoses should not be recorded in this table, but in reality their negating nature is not always captured in the source data, and other precautions must be taken when when identifying Persons who should suffer from the recorded Condition. Record all conditions as they exist in the source data. Any decisions about diagnosis/phenotype definitions would be done through cohort specifications. These cohorts can be housed in the [COHORT](https://ohdsi.github.io/CommonDataModel/cdm531.html#payer_plan_period) table. Conditions span a time interval from start to end, but are typically recorded as single snapshot records with no end date. The reason is twofold: (i) At the time of the recording the duration is not known and later not recorded, and (ii) the Persons typically cease interacting with the healthcare system when they feel better, which leads to incomplete capture of resolved Conditions. The [CONDITION_ERA](https://ohdsi.github.io/CommonDataModel/cdm531.html#condition_era) table addresses this issue. Family history and past diagnoses ('history of') are not recorded in this table. Instead, they are listed in the [OBSERVATION](https://ohdsi.github.io/CommonDataModel/cdm531.html#observation) table. Codes written in the process of establishing the diagnosis, such as 'question of' of and 'rule out', should not represented here. Instead, they should be recorded in the [OBSERVATION](https://ohdsi.github.io/CommonDataModel/cdm531.html#observation) table, if they are used for analyses. However, this information is not always available.",Source codes and source text fields mapped to Standard Concepts of the Condition Domain have to be recorded here.
|
||||
condition_occurrence,CDM,No,CONDITION_,Yes,0,NA,"This table contains records of Events of a Person suggesting the presence of a disease or medical condition stated as a diagnosis, a sign, or a symptom, which is either observed by a Provider or reported by the patient.","Conditions are defined by Concepts from the Condition domain, which form a complex hierarchy. As a result, the same Person with the same disease may have multiple Condition records, which belong to the same hierarchical family. Most Condition records are mapped from diagnostic codes, but recorded signs, symptoms and summary descriptions also contribute to this table. Rule out diagnoses should not be recorded in this table, but in reality their negating nature is not always captured in the source data, and other precautions must be taken when when identifying Persons who should suffer from the recorded Condition. Record all conditions as they exist in the source data. Any decisions about diagnosis/phenotype definitions would be done through cohort specifications. These cohorts can be housed in the [COHORT](https://ohdsi.github.io/CommonDataModel/cdm60.html#payer_plan_period) table. Conditions span a time interval from start to end, but are typically recorded as single snapshot records with no end date. The reason is twofold: (i) At the time of the recording the duration is not known and later not recorded, and (ii) the Persons typically cease interacting with the healthcare system when they feel better, which leads to incomplete capture of resolved Conditions. The [CONDITION_ERA](https://ohdsi.github.io/CommonDataModel/cdm60.html#condition_era) table addresses this issue. Family history and past diagnoses ('history of') are not recorded in this table. Instead, they are listed in the [OBSERVATION](https://ohdsi.github.io/CommonDataModel/cdm60.html#observation) table. Codes written in the process of establishing the diagnosis, such as 'question of' of and 'rule out', should not represented here. Instead, they should be recorded in the [OBSERVATION](https://ohdsi.github.io/CommonDataModel/cdm60.html#observation) table, if they are used for analyses. However, this information is not always available.",Source codes and source text fields mapped to Standard Concepts of the Condition Domain have to be recorded here.
|
||||
drug_exposure,CDM,No,DRUG_,Yes,0,NA,"This table captures records about the exposure to a Drug ingested or otherwise introduced into the body. A Drug is a biochemical substance formulated in such a way that when administered to a Person it will exert a certain biochemical effect on the metabolism. Drugs include prescription and over-the-counter medicines, vaccines, and large-molecule biologic therapies. Radiological devices ingested or applied locally do not count as Drugs.","The purpose of records in this table is to indicate an exposure to a certain drug as best as possible. In this context a drug is defined as an active ingredient. Drug Exposures are defined by Concepts from the Drug domain, which form a complex hierarchy. As a result, one DRUG_SOURCE_CONCEPT_ID may map to multiple standard concept ids if it is a combination product. Records in this table represent prescriptions written, prescriptions dispensed, and drugs administered by a provider to name a few. The DRUG_TYPE_CONCEPT_ID can be used to find and filter on these types. This table includes additional information about the drug products, the quantity given, and route of administration.",Information about quantity and dose is provided in a variety of different ways and it is important for the ETL to provide as much information as possible from the data. Depending on the provenance of the data fields may be captured differently i.e. quantity for drugs administered may have a separate meaning from quantity for prescriptions dispensed. If a patient has multiple records on the same day for the same drug or procedures the ETL should not de-dupe them unless there is probable reason to believe the item is a true data duplicate. Take note on how to handle refills for prescriptions written.
|
||||
procedure_occurrence,CDM,No,PROCEDURE_,Yes,0,NA,"This table contains records of activities or processes ordered by, or carried out by, a healthcare provider on the patient with a diagnostic or therapeutic purpose.","Lab tests are not a procedure, if something is observed with an expected resulting amount and unit then it should be a measurement. Phlebotomy is a procedure but so trivial that it tends to be rarely captured. It can be assumed that there is a phlebotomy procedure associated with many lab tests, therefore it is unnecessary to add them as separate procedures. If the user finds the same procedure over concurrent days, it is assumed those records are part of a procedure lasting more than a day. This logic is in lieu of the procedure_end_date, which will be added in a future version of the CDM.","If a procedure lasts more than a day, then it should be recorded as a separate record for each day the procedure occurred, this logic is in lieu of the PROCEDURE_END_DATE, which will be added in a future version of the CDM. When dealing with duplicate records, the ETL must determine whether to sum them up into one record or keep them separate. Things to consider are: - Same Procedure - Same PROCEDURE_DATETIME - Same Visit Occurrence or Visit Detail - Same Provider - Same Modifier for Procedures. Source codes and source text fields mapped to Standard Concepts of the Procedure Domain have to be recorded here."
|
||||
device_exposure,CDM,No,DEVICE_,Yes,0,NA,"The Device domain captures information about a person's exposure to a foreign physical object or instrument which is used for diagnostic or therapeutic purposes through a mechanism beyond chemical action. Devices include implantable objects (e.g. pacemakers, stents, artificial joints), medical equipment and supplies (e.g. bandages, crutches, syringes), other instruments used in medical procedures (e.g. sutures, defibrillators) and material used in clinical care (e.g. adhesives, body material, dental material, surgical material).","The distinction between Devices or supplies and Procedures are sometimes blurry, but the former are physical objects while the latter are actions, often to apply a Device or supply.",Source codes and source text fields mapped to Standard Concepts of the Device Domain have to be recorded here.
|
||||
|
@ -69,11 +69,9 @@ vocabulary,VOCAB,No,NA,No,NA,NA,The VOCABULARY table includes a list of the Voca
|
|||
domain,VOCAB,No,NA,No,NA,NA,"The DOMAIN table includes a list of OMOP-defined Domains the Concepts of the Standardized Vocabularies can belong to. A Domain defines the set of allowable Concepts for the standardized fields in the CDM tables. For example, the ""Condition"" Domain contains Concepts that describe a condition of a patient, and these Concepts can only be stored in the condition_concept_id field of the CONDITION_OCCURRENCE and CONDITION_ERA tables. This reference table is populated with a single record for each Domain and includes a descriptive name for the Domain.",NA,NA
|
||||
concept_class,VOCAB,No,NA,No,NA,NA,"The CONCEPT_CLASS table is a reference table, which includes a list of the classifications used to differentiate Concepts within a given Vocabulary. This reference table is populated with a single record for each Concept Class.",NA,NA
|
||||
concept_relationship,VOCAB,No,NA,No,NA,NA,The CONCEPT_RELATIONSHIP table contains records that define direct relationships between any two Concepts and the nature or type of the relationship. Each type of a relationship is defined in the RELATIONSHIP table.,NA,NA
|
||||
relationship,VOCAB,No,NA,No,NA,NA,The RELATIONSHIP table provides a reference list of all types of relationships that can be used to associate any two concepts in the CONCEPT_RELATIONSHP table.,NA,NA
|
||||
concept_synonym,VOCAB,No,NA,No,NA,NA,The CONCEPT_SYNONYM table is used to store alternate names and descriptions for Concepts.,NA,NA
|
||||
concept_ancestor,VOCAB,No,NA,No,NA,NA,"The CONCEPT_ANCESTOR table is designed to simplify observational analysis by providing the complete hierarchical relationships between Concepts. Only direct parent-child relationships between Concepts are stored in the CONCEPT_RELATIONSHIP table. To determine higher level ancestry connections, all individual direct relationships would have to be navigated at analysis time. The CONCEPT_ANCESTOR table includes records for all parent-child relationships, as well as grandparent-grandchild relationships and those of any other level of lineage. Using the CONCEPT_ANCESTOR table allows for querying for all descendants of a hierarchical concept. For example, drug ingredients and drug products are all descendants of a drug class ancestor.
|
||||
|
||||
This table is entirely derived from the CONCEPT, CONCEPT_RELATIONSHIP and RELATIONSHIP tables.",NA,NA
|
||||
relationship,VOCAB,No,NA,No,NA,NA,"The RELATIONSHIP table provides a reference list of all types of relationships that can be used to associate any two Concepts in the CONCEPT_RELATIONSHIP table, the respective reverse relationships, and their hierarchical characteristics. Note, that Concepts representing relationships between the clinical facts, used for filling in the FACT_RELATIONSHIP table are stored in the CONCEPT table and belong to the Relationship Domain.","Users can leverage the RELATIONSHIP table to explore the full list of direct and reverse relationships within the OMOP vocabulary system. Also, users can get insight into how these relationships can be used in ETL, cohort creation, and other tasks according to their ancestral characteristics.",NA
|
||||
concept_synonym,VOCAB,No,NA,No,NA,NA,"The CONCEPT_SYNONYM table captures alternative terms, synonyms, and translations of Concept Name into various languages linked to specific concepts, providing users with a comprehensive view of how Concepts may be expressed or referenced.","Users can leverage the CONCEPT_SYNONYM table to expand search capabilities and improve query accuracy by incorporating synonymous terms into data analysis and retrieval processes. Also, users can enhance their mapping efforts between local terminologies and standardized concepts by identifying synonymous terms associated with concepts in the CONCEPT_SYNONYM table.",NA
|
||||
concept_ancestor,VOCAB,No,NA,No,NA,NA,"The CONCEPT_ANCESTOR table is designed to simplify observational analysis by providing the complete hierarchical relationships between Concepts. Only direct parent-child relationships between Concepts are stored in the CONCEPT_RELATIONSHIP table. To determine higher-level ancestry connections, all individual direct relationships would have to be navigated at analysis time. The CONCEPT_ANCESTOR table includes records for all parent-child relationships, as well as grandparent-grandchild relationships and those of any other level of lineage for Standard or Classification concepts. Using the CONCEPT_ANCESTOR table allows for querying for all descendants of a hierarchical concept, and the other way around. For example, drug ingredients and drug products, beneath them in the hierarchy, are all descendants of a drug class ancestor. This table is entirely derived from the CONCEPT, CONCEPT_RELATIONSHIP, and RELATIONSHIP tables.","The CONCEPT_ANCESTOR table can be used to explore the hierarchical relationships captured in the table to gain insights into the hierarchical structure of clinical concepts. Understanding the hierarchical relationships of concepts can facilitate accurate interpretation and analysis of healthcare data. Also, by incorporating hierarchical relationships from the CONCEPT_ANCESTOR table, users can create cohorts containing related concepts within a hierarchical structure, enabling more comprehensive cohort definitions.",NA
|
||||
source_to_concept_map,VOCAB,No,NA,No,NA,NA,"The source to concept map table is a legacy data structure within the OMOP Common Data Model, recommended for use in ETL processes to maintain local source codes which are not available as Concepts in the Standardized Vocabularies, and to establish mappings for each source code into a Standard Concept as target_concept_ids that can be used to populate the Common Data Model tables. The SOURCE_TO_CONCEPT_MAP table is no longer populated with content within the Standardized Vocabularies published to the OMOP community.",NA,NA
|
||||
drug_strength,VOCAB,No,NA,No,NA,NA,The DRUG_STRENGTH table contains structured content about the amount or concentration and associated units of a specific ingredient contained within a particular drug product. This table is supplemental information to support standardized analysis of drug utilization.,NA,NA
|
||||
cohort,RESULTS,No,NA,No,NA,NA,The COHORT table contains records of subjects that satisfy a given set of criteria for a duration of time. The definition of the cohort is contained within the COHORT_DEFINITION table. It is listed as part of the RESULTS schema because it is a table that users of the database as well as tools such as ATLAS need to be able to write to. The CDM and Vocabulary tables are all read-only so it is suggested that the COHORT and COHORT_DEFINTION tables are kept in a separate schema to alleviate confusion.,NA,"Cohorts typically include patients diagnosed with a specific condition, patients exposed to a particular drug, but can also be Providers who have performed a specific Procedure. Cohort records must have a Start Date and an End Date, but the End Date may be set to Start Date or could have an applied censor date using the Observation Period Start Date. Cohort records must contain a Subject Id, which can refer to the Person, Provider, Visit record or Care Site though they are most often Person Ids. The Cohort Definition will define the type of subject through the subject concept id. A subject can belong (or not belong) to a cohort at any moment in time. A subject can only have one record in the cohort table for any moment of time, i.e. it is not possible for a person to contain multiple records indicating cohort membership that are overlapping in time"
|
||||
|
|
|
|
@ -215,7 +215,7 @@ create table @cdmDatabaseSchema.note_nlp (
|
|||
note_id INT64 not null,
|
||||
section_concept_id INT64,
|
||||
snippet STRING,
|
||||
"offset" STRING,
|
||||
`offset` STRING,
|
||||
lexical_variant STRING not null,
|
||||
note_nlp_concept_id INT64,
|
||||
note_nlp_source_concept_id INT64,
|
||||
|
|
|
@ -1,158 +1,158 @@
|
|||
--postgresql CDM Foreign Key Constraints for OMOP Common Data Model 5.3
|
||||
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_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);
|
||||
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_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);
|
||||
|
|
|
@ -1,27 +1,27 @@
|
|||
--postgresql CDM Primary Key Constraints for OMOP Common Data Model 5.3
|
||||
ALTER TABLE @cdmDatabaseSchema.person ADD CONSTRAINT xpk_person PRIMARY KEY (person_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.observation_period ADD CONSTRAINT xpk_observation_period PRIMARY KEY (observation_period_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.visit_occurrence ADD CONSTRAINT xpk_visit_occurrence PRIMARY KEY (visit_occurrence_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.visit_detail ADD CONSTRAINT xpk_visit_detail PRIMARY KEY (visit_detail_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.condition_occurrence ADD CONSTRAINT xpk_condition_occurrence PRIMARY KEY (condition_occurrence_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.drug_exposure ADD CONSTRAINT xpk_drug_exposure PRIMARY KEY (drug_exposure_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.procedure_occurrence ADD CONSTRAINT xpk_procedure_occurrence PRIMARY KEY (procedure_occurrence_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.device_exposure ADD CONSTRAINT xpk_device_exposure PRIMARY KEY (device_exposure_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.measurement ADD CONSTRAINT xpk_measurement PRIMARY KEY (measurement_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.observation ADD CONSTRAINT xpk_observation PRIMARY KEY (observation_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.note ADD CONSTRAINT xpk_note PRIMARY KEY (note_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.note_nlp ADD CONSTRAINT xpk_note_nlp PRIMARY KEY (note_nlp_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.specimen ADD CONSTRAINT xpk_specimen PRIMARY KEY (specimen_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.location ADD CONSTRAINT xpk_location PRIMARY KEY (location_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.care_site ADD CONSTRAINT xpk_care_site PRIMARY KEY (care_site_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.provider ADD CONSTRAINT xpk_provider PRIMARY KEY (provider_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.payer_plan_period ADD CONSTRAINT xpk_payer_plan_period PRIMARY KEY (payer_plan_period_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.cost ADD CONSTRAINT xpk_cost PRIMARY KEY (cost_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.drug_era ADD CONSTRAINT xpk_drug_era PRIMARY KEY (drug_era_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.dose_era ADD CONSTRAINT xpk_dose_era PRIMARY KEY (dose_era_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.condition_era ADD CONSTRAINT xpk_condition_era PRIMARY KEY (condition_era_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.concept ADD CONSTRAINT xpk_concept PRIMARY KEY (concept_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.vocabulary ADD CONSTRAINT xpk_vocabulary PRIMARY KEY (vocabulary_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.domain ADD CONSTRAINT xpk_domain PRIMARY KEY (domain_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.concept_class ADD CONSTRAINT xpk_concept_class PRIMARY KEY (concept_class_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.relationship ADD CONSTRAINT xpk_relationship PRIMARY KEY (relationship_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.person ADD CONSTRAINT xpk_person PRIMARY KEY (person_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.observation_period ADD CONSTRAINT xpk_observation_period PRIMARY KEY (observation_period_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.visit_occurrence ADD CONSTRAINT xpk_visit_occurrence PRIMARY KEY (visit_occurrence_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.visit_detail ADD CONSTRAINT xpk_visit_detail PRIMARY KEY (visit_detail_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.condition_occurrence ADD CONSTRAINT xpk_condition_occurrence PRIMARY KEY (condition_occurrence_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.drug_exposure ADD CONSTRAINT xpk_drug_exposure PRIMARY KEY (drug_exposure_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.procedure_occurrence ADD CONSTRAINT xpk_procedure_occurrence PRIMARY KEY (procedure_occurrence_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.device_exposure ADD CONSTRAINT xpk_device_exposure PRIMARY KEY (device_exposure_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.measurement ADD CONSTRAINT xpk_measurement PRIMARY KEY (measurement_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.observation ADD CONSTRAINT xpk_observation PRIMARY KEY (observation_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.note ADD CONSTRAINT xpk_note PRIMARY KEY (note_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.note_nlp ADD CONSTRAINT xpk_note_nlp PRIMARY KEY (note_nlp_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.specimen ADD CONSTRAINT xpk_specimen PRIMARY KEY (specimen_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.location ADD CONSTRAINT xpk_location PRIMARY KEY (location_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.care_site ADD CONSTRAINT xpk_care_site PRIMARY KEY (care_site_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.provider ADD CONSTRAINT xpk_provider PRIMARY KEY (provider_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.payer_plan_period ADD CONSTRAINT xpk_payer_plan_period PRIMARY KEY (payer_plan_period_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.cost ADD CONSTRAINT xpk_cost PRIMARY KEY (cost_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.drug_era ADD CONSTRAINT xpk_drug_era PRIMARY KEY (drug_era_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.dose_era ADD CONSTRAINT xpk_dose_era PRIMARY KEY (dose_era_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.condition_era ADD CONSTRAINT xpk_condition_era PRIMARY KEY (condition_era_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.concept ADD CONSTRAINT xpk_concept PRIMARY KEY (concept_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.vocabulary ADD CONSTRAINT xpk_vocabulary PRIMARY KEY (vocabulary_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.domain ADD CONSTRAINT xpk_domain PRIMARY KEY (domain_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.concept_class ADD CONSTRAINT xpk_concept_class PRIMARY KEY (concept_class_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.relationship ADD CONSTRAINT xpk_relationship PRIMARY KEY (relationship_id);
|
||||
|
|
|
@ -229,7 +229,7 @@ create table @cdmDatabaseSchema.note_nlp (
|
|||
note_id INT64 not null,
|
||||
section_concept_id INT64,
|
||||
snippet STRING,
|
||||
"offset" STRING,
|
||||
`offset` STRING,
|
||||
lexical_variant STRING not null,
|
||||
note_nlp_concept_id INT64,
|
||||
note_nlp_source_concept_id INT64,
|
||||
|
|
|
@ -1,177 +1,177 @@
|
|||
--postgresql CDM Foreign Key Constraints for OMOP Common Data Model 5.4
|
||||
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_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);
|
||||
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_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);
|
||||
|
|
|
@ -1,29 +1,29 @@
|
|||
--postgresql CDM Primary Key Constraints for OMOP Common Data Model 5.4
|
||||
ALTER TABLE @cdmDatabaseSchema.person ADD CONSTRAINT xpk_person PRIMARY KEY (person_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.observation_period ADD CONSTRAINT xpk_observation_period PRIMARY KEY (observation_period_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.visit_occurrence ADD CONSTRAINT xpk_visit_occurrence PRIMARY KEY (visit_occurrence_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.visit_detail ADD CONSTRAINT xpk_visit_detail PRIMARY KEY (visit_detail_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.condition_occurrence ADD CONSTRAINT xpk_condition_occurrence PRIMARY KEY (condition_occurrence_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.drug_exposure ADD CONSTRAINT xpk_drug_exposure PRIMARY KEY (drug_exposure_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.procedure_occurrence ADD CONSTRAINT xpk_procedure_occurrence PRIMARY KEY (procedure_occurrence_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.device_exposure ADD CONSTRAINT xpk_device_exposure PRIMARY KEY (device_exposure_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.measurement ADD CONSTRAINT xpk_measurement PRIMARY KEY (measurement_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.observation ADD CONSTRAINT xpk_observation PRIMARY KEY (observation_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.note ADD CONSTRAINT xpk_note PRIMARY KEY (note_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.note_nlp ADD CONSTRAINT xpk_note_nlp PRIMARY KEY (note_nlp_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.specimen ADD CONSTRAINT xpk_specimen PRIMARY KEY (specimen_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.location ADD CONSTRAINT xpk_location PRIMARY KEY (location_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.care_site ADD CONSTRAINT xpk_care_site PRIMARY KEY (care_site_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.provider ADD CONSTRAINT xpk_provider PRIMARY KEY (provider_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.payer_plan_period ADD CONSTRAINT xpk_payer_plan_period PRIMARY KEY (payer_plan_period_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.cost ADD CONSTRAINT xpk_cost PRIMARY KEY (cost_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.drug_era ADD CONSTRAINT xpk_drug_era PRIMARY KEY (drug_era_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.dose_era ADD CONSTRAINT xpk_dose_era PRIMARY KEY (dose_era_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.condition_era ADD CONSTRAINT xpk_condition_era PRIMARY KEY (condition_era_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.episode ADD CONSTRAINT xpk_episode PRIMARY KEY (episode_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.metadata ADD CONSTRAINT xpk_metadata PRIMARY KEY (metadata_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.concept ADD CONSTRAINT xpk_concept PRIMARY KEY (concept_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.vocabulary ADD CONSTRAINT xpk_vocabulary PRIMARY KEY (vocabulary_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.domain ADD CONSTRAINT xpk_domain PRIMARY KEY (domain_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.concept_class ADD CONSTRAINT xpk_concept_class PRIMARY KEY (concept_class_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.relationship ADD CONSTRAINT xpk_relationship PRIMARY KEY (relationship_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.person ADD CONSTRAINT xpk_person PRIMARY KEY (person_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.observation_period ADD CONSTRAINT xpk_observation_period PRIMARY KEY (observation_period_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.visit_occurrence ADD CONSTRAINT xpk_visit_occurrence PRIMARY KEY (visit_occurrence_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.visit_detail ADD CONSTRAINT xpk_visit_detail PRIMARY KEY (visit_detail_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.condition_occurrence ADD CONSTRAINT xpk_condition_occurrence PRIMARY KEY (condition_occurrence_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.drug_exposure ADD CONSTRAINT xpk_drug_exposure PRIMARY KEY (drug_exposure_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.procedure_occurrence ADD CONSTRAINT xpk_procedure_occurrence PRIMARY KEY (procedure_occurrence_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.device_exposure ADD CONSTRAINT xpk_device_exposure PRIMARY KEY (device_exposure_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.measurement ADD CONSTRAINT xpk_measurement PRIMARY KEY (measurement_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.observation ADD CONSTRAINT xpk_observation PRIMARY KEY (observation_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.note ADD CONSTRAINT xpk_note PRIMARY KEY (note_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.note_nlp ADD CONSTRAINT xpk_note_nlp PRIMARY KEY (note_nlp_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.specimen ADD CONSTRAINT xpk_specimen PRIMARY KEY (specimen_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.location ADD CONSTRAINT xpk_location PRIMARY KEY (location_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.care_site ADD CONSTRAINT xpk_care_site PRIMARY KEY (care_site_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.provider ADD CONSTRAINT xpk_provider PRIMARY KEY (provider_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.payer_plan_period ADD CONSTRAINT xpk_payer_plan_period PRIMARY KEY (payer_plan_period_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.cost ADD CONSTRAINT xpk_cost PRIMARY KEY (cost_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.drug_era ADD CONSTRAINT xpk_drug_era PRIMARY KEY (drug_era_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.dose_era ADD CONSTRAINT xpk_dose_era PRIMARY KEY (dose_era_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.condition_era ADD CONSTRAINT xpk_condition_era PRIMARY KEY (condition_era_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.episode ADD CONSTRAINT xpk_episode PRIMARY KEY (episode_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.metadata ADD CONSTRAINT xpk_metadata PRIMARY KEY (metadata_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.concept ADD CONSTRAINT xpk_concept PRIMARY KEY (concept_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.vocabulary ADD CONSTRAINT xpk_vocabulary PRIMARY KEY (vocabulary_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.domain ADD CONSTRAINT xpk_domain PRIMARY KEY (domain_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.concept_class ADD CONSTRAINT xpk_concept_class PRIMARY KEY (concept_class_id);
|
||||
ALTER TABLE @cdmDatabaseSchema.relationship ADD CONSTRAINT xpk_relationship PRIMARY KEY (relationship_id);
|
||||
|
|
|
@ -116,7 +116,7 @@ Standardized vocabularies
|
|||
|
||||
CREATE CLUSTERED INDEX idx_concept_concept_id ON @cdmDatabaseSchema.concept (concept_id ASC);
|
||||
CREATE INDEX idx_concept_code ON @cdmDatabaseSchema.concept (concept_code ASC);
|
||||
CREATE INDEX idx_concept_vocabluary_id ON @cdmDatabaseSchema.concept (vocabulary_id ASC);
|
||||
CREATE INDEX idx_concept_vocabulary_id ON @cdmDatabaseSchema.concept (vocabulary_id ASC);
|
||||
CREATE INDEX idx_concept_domain_id ON @cdmDatabaseSchema.concept (domain_id ASC);
|
||||
CREATE INDEX idx_concept_class_id ON @cdmDatabaseSchema.concept (concept_class_id ASC);
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ Standardized vocabularies
|
|||
|
||||
CREATE CLUSTERED INDEX idx_concept_concept_id ON @cdmDatabaseSchema.concept (concept_id ASC);
|
||||
CREATE INDEX idx_concept_code ON @cdmDatabaseSchema.concept (concept_code ASC);
|
||||
CREATE INDEX idx_concept_vocabluary_id ON @cdmDatabaseSchema.concept (vocabulary_id ASC);
|
||||
CREATE INDEX idx_concept_vocabulary_id ON @cdmDatabaseSchema.concept (vocabulary_id ASC);
|
||||
CREATE INDEX idx_concept_domain_id ON @cdmDatabaseSchema.concept (domain_id ASC);
|
||||
CREATE INDEX idx_concept_class_id ON @cdmDatabaseSchema.concept (concept_class_id ASC);
|
||||
|
||||
|
|
|
@ -110,7 +110,7 @@ Standardized vocabularies
|
|||
|
||||
CREATE CLUSTERED INDEX idx_concept_concept_id ON @cdmDatabaseSchema.concept (concept_id ASC);
|
||||
CREATE INDEX idx_concept_code ON @cdmDatabaseSchema.concept (concept_code ASC);
|
||||
CREATE INDEX idx_concept_vocabluary_id ON @cdmDatabaseSchema.concept (vocabulary_id ASC);
|
||||
CREATE INDEX idx_concept_vocabulary_id ON @cdmDatabaseSchema.concept (vocabulary_id ASC);
|
||||
CREATE INDEX idx_concept_domain_id ON @cdmDatabaseSchema.concept (domain_id ASC);
|
||||
CREATE INDEX idx_concept_class_id ON @cdmDatabaseSchema.concept (concept_class_id ASC);
|
||||
|
||||
|
|
|
@ -22,9 +22,9 @@ Subfolders will be created for each cdmVersion and targetDialect.}
|
|||
}
|
||||
\value{
|
||||
Writes DDL, ForeignKey, PrimaryKey and index SQL files for given cdmVersion
|
||||
and targetDialect to the 'ddl' folder in specifed output folder.
|
||||
and targetDialect to the 'ddl' folder in specified output folder.
|
||||
}
|
||||
\description{
|
||||
Writes DDL, ForeignKey, PrimaryKey and index SQL files for given cdmVersion
|
||||
and targetDialect to the 'ddl' folder in specifed output folder.
|
||||
and targetDialect to the 'ddl' folder in specified output folder.
|
||||
}
|
||||
|
|
|
@ -27,22 +27,22 @@ navbar:
|
|||
- text: "Conventions"
|
||||
icon: fa-list-alt
|
||||
menu:
|
||||
- text: "THEMIS Convention Library"
|
||||
href: https://ohdsi.github.io/Themis
|
||||
- text: "General Conventions"
|
||||
href: dataModelConventions.html
|
||||
- text: "Observation Periods for EHR Data"
|
||||
href: ehrObsPeriods.html
|
||||
- text: "Patient Privacy and OMOP"
|
||||
href: cdmPrivacy.html
|
||||
- text: "Custom Concepts"
|
||||
href: customConcepts.html
|
||||
- text: "CDM Versions"
|
||||
icon: fa-history
|
||||
menu:
|
||||
- text: "CDM v3.0"
|
||||
href: cdm30.html
|
||||
- text: "CDM v6.0"
|
||||
href: cdm60.html
|
||||
- text: "CDM v5.3"
|
||||
href: cdm53.html
|
||||
- text: "NEW CDM v5.4"
|
||||
- text: "CDM v5.4"
|
||||
menu:
|
||||
- text: "CDM v5.4"
|
||||
href: cdm54.html
|
||||
|
@ -50,17 +50,19 @@ navbar:
|
|||
href: cdm54Changes.html
|
||||
- text: "Entity Relationships"
|
||||
href: cdm54erd.html
|
||||
- text: "CDM Proposals"
|
||||
- text: "Detailed tooling support per CDM field"
|
||||
href: cdm54ToolingSupport.html
|
||||
- text: "CDM Additions"
|
||||
icon: fa-plus-square
|
||||
menu:
|
||||
- text: "Types of CDM Additions"
|
||||
href: typesOfAdditions.html
|
||||
- text: "How to Propose Changes to the CDM"
|
||||
href: cdmRequestProcess.html
|
||||
- text: "Under Review"
|
||||
href: https://github.com/OHDSI/CommonDataModel/issues?q=is%3Aopen+is%3Aissue+label%3AProposal
|
||||
- text: "Accepted"
|
||||
- text: "Accepted Changes"
|
||||
menu:
|
||||
- text: "Region_concept_id"
|
||||
href: https://github.com/OHDSI/CommonDataModel/issues/252
|
||||
- text: "CDM version in development"
|
||||
href: https://github.com/OHDSI/CommonDataModel/tree/develop
|
||||
- text: "How to"
|
||||
icon: fa-question
|
||||
menu:
|
||||
|
|
|
@ -19,14 +19,10 @@ library(stringr)
|
|||
|
||||
```
|
||||
|
||||
Below is the specification document for the OMOP Common Data Model, v5.3 (previously v5.3.1). 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.
|
||||
Below is the specification document for the OMOP Common Data Model, v5.3 (previously v5.3.1). 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). All tables should be instantiated in a CDM instance but do not need to be populated. Similarly, fields that are not required should exist in the CDM table but do not need to be populated. 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.
|
||||
|
||||
*__Special Note__ This documentation previously referenced v5.3.1. During the OHDSI/CommonDataModel Hack-A-Thon that occurred on August 18, 2021 the decision was made to align documentation with the minor releases. Hot fixes and minor.minor release can be found through the searching of tags.*
|
||||
|
||||
--after regeneration of DDLs
|
||||
link to csv of cdm
|
||||
link to pdf of cdm documentation
|
||||
link to forum on doc page
|
||||
|
||||
```{r docLoop53, echo=FALSE, results='asis'}
|
||||
tableSpecs <- read.csv("../inst/csv/OMOP_CDMv5.3_Table_Level.csv", stringsAsFactors = FALSE)
|
||||
|
|
|
@ -19,10 +19,11 @@ library(stringr)
|
|||
|
||||
```
|
||||
|
||||
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.
|
||||
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). All tables should be instantiated in a CDM instance but do not need to be populated. Similarly, fields that are not required should exist in the CDM table but do not need to be populated. 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 check `r emoji::emoji("heavy_check_mark")` indicates that the support level for the listed tool is in place, has been tested, and released. A warning sign `r emoji::emoji("exclamation")` indicates that the support level for the listed tool has been initiated but has not yet been tested and released.
|
||||
<br>
|
||||
|
||||
|
@ -31,7 +32,7 @@ The table below details which OHDSI tools support CDM v5.4. There are two levels
|
|||
|--|--|--|--|
|
||||
|**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 emoji::emoji("heavy_check_mark")`|`r emoji::emoji("heavy_check_mark")`
|
||||
|**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 emoji::emoji("heavy_check_mark")`| `r emoji::emoji("exclamation")`
|
||||
|**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 emoji::emoji("heavy_check_mark")`|`r emoji::emoji("exclamation")`
|
||||
|**Achilles**|This package can be downloaded from [https://github.com/OHDSI/Achilles](https://github.com/OHDSI/Achilles), performing a set of broad database characterizations against an OMOP CDM instance. |`r emoji::emoji("heavy_check_mark")`|`r emoji::emoji("exclamation")`
|
||||
|**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 emoji::emoji("heavy_check_mark")`|`r emoji::emoji("exclamation")`
|
||||
|**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 emoji::emoji("heavy_check_mark")`|`r emoji::emoji("exclamation")`
|
||||
|**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 emoji::emoji("heavy_check_mark")`|`r emoji::emoji("heavy_check_mark")`
|
||||
|
|
|
@ -90,6 +90,9 @@ Notation:
|
|||
## PAYER_PLAN_PERIOD
|
||||
- No change
|
||||
|
||||
## PROVIDER
|
||||
- No change
|
||||
|
||||
## COST
|
||||
- No change
|
||||
|
||||
|
|
|
@ -0,0 +1,110 @@
|
|||
---
|
||||
title: "**OMOP CDM v5.4 Detailed Tooling Support**"
|
||||
output:
|
||||
html_document:
|
||||
toc: TRUE
|
||||
toc_float: TRUE
|
||||
---
|
||||
|
||||
# Introduction
|
||||
This tables below contain an overview of which standard OHDSI tools make use of which OMOP CDM fields.
|
||||
The goal is to inform ETL developers, tooling developers and CDM extensions.
|
||||
|
||||
- For ETL developers it helps to have guidance on which fields to prioritise in the mapping. Most value will be gained from populating fields support across the OHDSI tooling.
|
||||
- For OHDSI tooling developers, this page provides insight in the gaps of support and can drive future development efforts.
|
||||
- For CDM extensions, it helps to known what it means for an OMOP CDM table/field to be part of the standard. In other words: what OHDSI tooling do we at least expect to support the new extensions?
|
||||
|
||||
Currently four OHDSI tools have been evaluated: DataQualityDashboard, Achilles, Atlas (Data Sources and Cohort creation) and Feature Extraction.
|
||||
|
||||
## Criteria
|
||||
Tool | Supports CDM Field if | Link to resource used
|
||||
--- | --- | ---
|
||||
DataQualityDashboard | Part of Field Level checks | https://github.com/OHDSI/DataQualityDashboard/blob/main/inst/csv/OMOP_CDMv5.4_Field_Level.csv
|
||||
Achilles | Covered by at least one Achilles analysis | https://github.com/OHDSI/Achilles/blob/main/inst/csv/achilles/achilles_analysis_details.csv
|
||||
Atlas Data Sources | A statistic based on the field is shown in a 'Data Sources' visualisation | https://atlas-demo.ohdsi.org/
|
||||
Atlas Cohort | Used in te Atlas User Interface for cohort definition criteria (directly, or via 'Add attribute') | https://atlas-demo.ohdsi.org/
|
||||
Feature Extraction | Used in one of the Feature Extraction analyses | https://github.com/OHDSI/FeatureExtraction/blob/main/inst/csv/
|
||||
|
||||
General criteria:
|
||||
- `r emoji::emoji("heavy_check_mark")` if the field essential for OMOP CDM definition (Primary Key, Foreign Key) e.g. person_id not explicitly used, but essential. (if the PK is marked as False, it typically means the whole table is not used in the tool e.g. `_source_value` fields that are used for traceability in ETL)
|
||||
- `r emoji::emoji("exclamation")` if field is used by the tool, but not in a meaningful way. e.g. `provider_id` in Achilles only checked for a valid foreign key to the provider table.
|
||||
|
||||
# Tooling Support for OMOP fields
|
||||
**Abbreviations** |
|
||||
--- | ---
|
||||
**PK** | Primary Key
|
||||
**SV** | Source Value (for data quality / etl validation)
|
||||
**BC** | Backwards Compatibility, to support CDM <v5.4
|
||||
**FC** | Forwards Compatibility, to easy support for CDM v6 in the future.
|
||||
|
||||
## Person
|
||||
cdmTableName | cdmFieldName | Special Fields | DQD (v1.0) | Achilles (v1.7) | Atlas Cohort (v2.10) | Atlas Cohort (v2.12) | Atlas Data Sources (v2.12) | Feature Extraction (v3.2) | Comment
|
||||
--- | --- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | ---
|
||||
PERSON | person_id | PK | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` |
|
||||
PERSON | gender_concept_id | | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` |
|
||||
PERSON | year_of_birth | | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` |
|
||||
PERSON | month_of_birth | | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` |
|
||||
PERSON | day_of_birth | | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` |
|
||||
PERSON | birth_datetime | FC | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` |
|
||||
PERSON | race_concept_id | | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` |
|
||||
PERSON | ethnicity_concept_id | | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` |
|
||||
PERSON | location_id | | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | Achilles only does FK check
|
||||
PERSON | provider_id | | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | Achilles only does FK check
|
||||
PERSON | care_site_id | | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | Achilles only does FK check
|
||||
PERSON | person_source_value | SV | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` |
|
||||
PERSON | gender_source_value | SV | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` |
|
||||
PERSON | gender_source_concept_id | | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` |
|
||||
PERSON | race_source_value | SV | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` |
|
||||
PERSON | race_source_concept_id | | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` |
|
||||
PERSON | ethnicity_source_value | SV | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` |
|
||||
PERSON | ethnicity_source_concept_id | | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` |
|
||||
|
||||
## Observation Period
|
||||
cdmTableName | cdmFieldName | Special Fields | DQD (v1.0) | Achilles (v1.7) | Atlas Cohort (v2.10) | Atlas Cohort (v2.12) | Atlas Data Sources (v2.12) | Feature Extraction (v3.2) | Comment
|
||||
--- | --- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | ---
|
||||
OBSERVATION_PERIOD | observation_period_id | PK | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` |
|
||||
OBSERVATION_PERIOD | person_id | Pid | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` |
|
||||
OBSERVATION_PERIOD | observation_period_start_date | | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` |
|
||||
OBSERVATION_PERIOD | observation_period_end_date | | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` |
|
||||
OBSERVATION_PERIOD | period_type_concept_id | | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` |
|
||||
|
||||
## Visit Occurrence
|
||||
cdmTableName | cdmFieldName | Special Fields | DQD (v1.0) | Achilles (v1.7) | Atlas Cohort (v2.10) | Atlas Cohort (v2.12) | Atlas Data Sources (v2.12) | Feature Extraction (v3.2) | Comment
|
||||
--- | --- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | ---
|
||||
VISIT_OCCURRENCE | visit_occurrence_id | PK | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` |
|
||||
VISIT_OCCURRENCE | person_id | Pid | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` |
|
||||
VISIT_OCCURRENCE | visit_concept_id | | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` |
|
||||
VISIT_OCCURRENCE | visit_source_concept_id | | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` |
|
||||
VISIT_OCCURRENCE | visit_source_value | SV | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` |
|
||||
VISIT_OCCURRENCE | visit_start_date | | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | Achilles check 1900
|
||||
VISIT_OCCURRENCE | visit_start_datetime | FC | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` |
|
||||
VISIT_OCCURRENCE | visit_end_date | | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("heavy_check_mark")` |
|
||||
VISIT_OCCURRENCE | visit_end_datetime | FC | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` |
|
||||
VISIT_OCCURRENCE | visit_type_concept_id | | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` |
|
||||
VISIT_OCCURRENCE | provider_id | | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | Atlas uses provider.specialty_concept_id
|
||||
VISIT_OCCURRENCE | care_site_id | | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | Achilles only does FK check, Atlas uses care_site.place_of_service_concept_id
|
||||
VISIT_OCCURRENCE | admitted_from_concept_id | | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` |
|
||||
VISIT_OCCURRENCE | admitted_from_source_value | SV | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | Achilles check 1900
|
||||
VISIT_OCCURRENCE | discharged_to_concept_id | | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` |
|
||||
VISIT_OCCURRENCE | discharged_to_source_value | SV | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | Achilles check 1900
|
||||
VISIT_OCCURRENCE | preceding_visit_occurrence_id | | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` |
|
||||
|
||||
## Episode
|
||||
cdmTableName | cdmFieldName | Special Fields | DQD (v1.0) | Achilles (v1.7) | Atlas Cohort (v2.10) | Atlas Cohort (v2.12) | Atlas Data Sources (v2.12) | Feature Extraction (v3.2) | Comment
|
||||
--- | --- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | ---
|
||||
EPISODE | episode_id | PK | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` |
|
||||
EPISODE | person_id | Pid | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` |
|
||||
EPISODE | episode_concept_id | | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` |
|
||||
EPISODE | episode_start_date | | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` |
|
||||
EPISODE | episode_start_datetime | FC | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` |
|
||||
EPISODE | episode_end_date | | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` |
|
||||
EPISODE | episode_end_datetime | FC | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` |
|
||||
EPISODE | episode_parent_id | | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` |
|
||||
EPISODE | episode_number | | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` |
|
||||
EPISODE | episode_object_concept_id | | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` |
|
||||
EPISODE | episode_type_concept_id | | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` |
|
||||
EPISODE | episode_source_value | SV | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` |
|
||||
EPISODE | episode_source_concept_id | | `r emoji::emoji("heavy_check_mark")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` | `r emoji::emoji("exclamation")` |
|
||||
|
||||
This was an effort by the CDM Working Group in 2022.
|
||||
*Credits: Clair Blacketer, Maxim Moinat, Nitin Park
|
|
@ -23,12 +23,8 @@ library(stringr)
|
|||
|
||||
Please be aware that v6.0 of the OMOP CDM is **not** fully supported by the OHDSI suite of tools and methods. The major difference in CDM v5.3 and CDM v6.0 involves switching the \*_datetime fields to mandatory rather than optional. This switch radically changes the assumptions related to exposure and outcome timing. Rather than move forward with v6.0, CDM v5.4 was designed with additions to the model that have been requested by the community while retaining the date structure of medical events in v5.3. Please see our the specifications for [CDM v5.4](http://ohdsi.github.io/CommonDataModel/cdm54.html) and detailed [changes from CDM v5.3](http://ohdsi.github.io/CommonDataModel/cdm54Changes.html). **For new collaborators to OHDSI, please transform your data to [CDM v5.4](https://github.com/OHDSI/CommonDataModel/releases/tag/v5.4.0) until such time that the v6 series of the CDM is ready for mainstream use.**
|
||||
|
||||
Below is the specification document for the OMOP Common Data Model, v6.0. 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.
|
||||
Below is the specification document for the OMOP Common Data Model, v6.0. 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). All tables should be instantiated in a CDM instance but do not need to be populated. Similarly, fields that are not required should exist in the CDM table but do not need to be populated. 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.
|
||||
|
||||
--after regeneration of DDLs
|
||||
link to csv of cdm
|
||||
link to pdf of cdm documentation
|
||||
link to forum on doc page
|
||||
|
||||
## **Changes in v6.0**
|
||||
|
||||
|
|
|
@ -0,0 +1,103 @@
|
|||
---
|
||||
title: "**Custom Concepts**"
|
||||
output: html_document
|
||||
---
|
||||
|
||||
*By Maxim Moinat and the Themis Working Group*
|
||||
|
||||
The Themis Working Group convened on October 6th and December 7th 2023 to discuss the creation this convention for creating custom concepts.
|
||||
|
||||
## Introduction
|
||||
|
||||
While the OMOP vocabularies are very comprehensive, it is not always possible to use concepts existing in the OMOP vocabularies. For example, when using a vocabulary that is only used in your institution or having custom defined variables. In these cases, custom concepts can be used. Custom concepts are concepts that are not part of the OMOP vocabularies, and are only used in your institution.
|
||||
There are two main reasons to define custom concepts in your local OMOP CDM vocabulary. The first is that they are available in your local Atlas instance, which has several use cases:
|
||||
|
||||
- When viewing a standard concept, you can see which custom concepts are mapped to it. This allows you to better understand what the standard concept represents in your institution.
|
||||
- You can search for a custom concept and find which standard concepts it is mapped to, to include in your standard concept set.
|
||||
- For studies only using your local data, you can define cohorts using custom concepts (through 'Add attribute'->'Add ... Source Concept').
|
||||
|
||||
The second reason is using the custom concepts in your ETL. By creating both the custom concept, and the 'Maps to' relationship (example below), we can use this in the same way as mapping other source vocabularies.
|
||||
|
||||
**Custom concepts are only defined locally. These cannot be used for network research. Therefore it remains very important to map to standard concepts.**
|
||||
|
||||
## Conventions
|
||||
|
||||
It is important to follow a set of conventions when creating custom concepts, to avoid negatively impacting network studies. The conventions are as follows:
|
||||
|
||||
- Custom concepts have a `concept_id` larger than 2,000,000,000. This is to avoid clashes with existing concepts.<sup>†</sup>
|
||||
- Custom concepts are always non-standard (`concept.standard_concept = NULL`).
|
||||
- Custom concepts can only be used in the `_source_concept_id` fields (e.g. `procedure_source_concept_id`)
|
||||
- If the field `_source_concept_id` does not exist, add a custom column to your table (e.g. a `drug_exposure.route_source_concept_id`)<sup>1</sup>. If there is a wide need in the community, a proposal can be submitted to the CDM Working Group to add these fields in a future OMOP CDM version.
|
||||
- Always add custom concepts to a new vocabulary specifically for your source (see example below). If you have a need to add concepts to an existing vocabulary, please contact the OHDSI Vocabulary Working Group.
|
||||
- Do NOT add custom concepts to the hierarchy of existing vocabularies (either in the `concept_ancestor` table or `subsumes`/`is a` relations in the `concept_relationship` table). This is to avoid descendant concepts to differ between sites.
|
||||
|
||||
In addition, it is recommended to follow these suggestions:
|
||||
|
||||
- For the `domain_id`, choose an appropriate existing value from the domain table ('Condition', 'Drug', 'Procedure', etc.). Note that this determines the target table the concept can be used in.
|
||||
- For the `concept_class_id`, it is not required to create new classes for your source vocabulary. To leave the class empty explicitly, use class 'Undefined'. It is also allowed to reuse existing concept classes (e.g. SNOMED's 'Clinical Finding' for conditions or RxNorm drug classes 'Ingredient', 'Clinical Drug', 'Branded Drug' etc.).
|
||||
- In the new vocabulary record, the `vocabulary_concept_id` can be set to 0, as this is often not used in the OMOP CDM.
|
||||
- Create mappings between custom concepts and standard concepts. This can be done by adding rows to the `concept_relationship` table, with the `Maps to` relation. The reverse relation, `Mapped from`, should also be added. This allows for easy navigation between custom and standard concepts<sup>2</sup>. The 'mapped to' concept should be a standard concept.
|
||||
- Officially, `concept_hierarchy` is only for standard concepts. However, if you local use case requires this (e.g. for selection of descendants of custom concepts), the custom concepts can be added into their own, isolated, hierarchy.
|
||||
|
||||
## Example
|
||||
|
||||
In this example, we will add one custom concept for the 'DHD Diagnose Thesaurus'. This is a Dutch vocabulary, which is not part of the OMOP vocabularies. We will add the concept 'diabetes mellitus type 1'. This concept has a mapping to the standard concept 'Diabetes mellitus type 1 (disorder)', concept_id 3341872.
|
||||
|
||||
After creating these records, we can use the custom concept in our ETL to populate the `condition_source_concept_id` field.
|
||||
|
||||
### Custom vocabulary
|
||||
|
||||
| Field | Value |
|
||||
|-------|-------|
|
||||
| vocabulary_id | DHD Diagnose Thesaurus |
|
||||
| vocabulary_name | Dutch Hospital Data Diagnosethesaurus |
|
||||
| vocabulary_reference | https://www.dhd.nl/producten-diensten/diagnosethesaurus/Paginas/diagnosethesaurus.asp |
|
||||
| vocabulary_version | 2023-04-20 |
|
||||
| vocabulary_concept_id | 0 |
|
||||
|
||||
### Custom concept
|
||||
|
||||
| Field | Value |
|
||||
|-------|-------|
|
||||
| concept_id | 2 000 000 001 |
|
||||
| concept_name | diabetes mellitus type 1 |
|
||||
| domain_id | Condition |
|
||||
| vocabulary_id | DHD Diagnose Thesaurus |
|
||||
| concept_class_id | Undefined |
|
||||
| standard_concept | `NULL` |
|
||||
| concept_code | 0000002630 |
|
||||
| valid_start_date | 2017-08-01 |
|
||||
| valid_end_date | 2099-12-31 |
|
||||
| invalid_reason | `NULL` |
|
||||
|
||||
### Mapping relationship
|
||||
|
||||
| Field | Value |
|
||||
|-------|-------|
|
||||
| concept_id_1 | 2 000 000 001 |
|
||||
| concept_id_2 | 3341872 |
|
||||
| relationship_id | Maps to |
|
||||
| valid_start_date | 2017-08-01 |
|
||||
| valid_end_date | 2099-12-31 |
|
||||
| invalid_reason | `NULL` |
|
||||
| Field | Value |
|
||||
|-------|-------|
|
||||
| concept_id_1 | 3341872 |
|
||||
| concept_id_2 | 2 000 000 001 |
|
||||
| relationship_id | Mapped from |
|
||||
| valid_start_date | 2017-08-01 |
|
||||
| valid_end_date | 2099-12-31 |
|
||||
| invalid_reason | `NULL` |
|
||||
|
||||
See the [Source To Standard query](https://ohdsi.github.io/CommonDataModel/sqlScripts.html#Source_to_Standard) to map a code in the source data to a standard concept.
|
||||
|
||||
## Getting your vocabulary into the OMOP vocabularies
|
||||
|
||||
If you think your custom concepts are useful for others, you can submit them to the OMOP vocabularies. This could be as a supported source vocabulary (like ICD) or a new vocabulary with standard concepts (like LOINC). This is a separate process from the conventions described above. Please see the [this support page](https://ohdsi.github.io/CommonDataModel/vocabRequest.html).
|
||||
|
||||
## References
|
||||
<sup>1</sup>[Melanie Philofsky; Implementing & adopting a customized OMOP Common Data Model; OHDSI Symposium 2021](https://www.ohdsi.org/2021-global-symposium-showcase-18/)
|
||||
|
||||
<sup>2</sup>[Melanie Philofsky; Mapping Custom Source Codes to Standard Concepts: A Comparison of Two Approaches; OHDSI Symposium 2020](https://www.ohdsi.org/wp-content/uploads/2020/10/Melanie-Philofsky-Philofsky-Mapping-Source-Codes-Poster.pdf)
|
||||
</br>
|
||||
<sup>†</sup>this is why custom concepts are sometimes referred to as "2B+" or "2billionaires".
|
|
@ -42,7 +42,7 @@ corresponding Concept reference data.
|
|||
- The concept_id of a Concept is persistent, i.e. stays the same for the same Concept between releases of
|
||||
the Standardized Vocabularies.
|
||||
- A descriptive name for each Concept is stored as the Concept Name as part of the CONCEPT table. Additional
|
||||
names and descriptions for the Concept are stored as Synonyms in the [CONCEPT_SYNONYM](https://ohdsi.github.io/CommonDataModel/cdm531.html#concept_synonym)
|
||||
names and descriptions for the Concept are stored as Synonyms in the [CONCEPT_SYNONYM](https://ohdsi.github.io/CommonDataModel/cdm54.html#concept_synonym)
|
||||
table.
|
||||
- Each Concept is assigned to a Domain. For Standard Concepts, there is always a single Domain. Source
|
||||
Concepts can be composite or coordinated entities, and therefore can belong to more than one Domain.
|
||||
|
@ -61,7 +61,7 @@ field and can be used to reference the source vocabulary.
|
|||
in all *_concept_id fields, whereas Classification Concepts (‘C’) should not appear in the CDM
|
||||
data, but participate in the construction of the CONCEPT_ANCESTOR table and can be used to
|
||||
identify Descendants that may appear in the data. See CONCEPT_ANCESTOR table. Non-standard
|
||||
Concepts can only appear in *_source_concept_id fields and are not used in [CONCEPT_ANCESTOR](https://ohdsi.github.io/CommonDataModel/cdm531.html#concept_ancestor)
|
||||
Concepts can only appear in *_source_concept_id fields and are not used in [CONCEPT_ANCESTOR](https://ohdsi.github.io/CommonDataModel/cdm54.html#concept_ancestor)
|
||||
table. Please refer to the Standardized Vocabularies specifications for details of the Standard Concept
|
||||
designation.
|
||||
- The lifespan of a Concept is recorded through its valid_start_date, valid_end_date and the invalid_
|
||||
|
@ -144,10 +144,10 @@ and the relationship_id replaced by the reverse_relationship_id from the RELATIO
|
|||
not necessary to query for the existence of a relationship both in the concept_id_1 and concept_id_2
|
||||
fields.
|
||||
- Concept Relationships define direct relationships between Concepts. Indirect relationships through 3rd
|
||||
Concepts are not captured in this table. However, the [CONCEPT_ANCESTOR](https://ohdsi.github.io/CommonDataModel/cdm531.html#concept_ancestor) table does this for
|
||||
hierachical relationships over several “generations” of direct relationships.
|
||||
Concepts are not captured in this table. However, the [CONCEPT_ANCESTOR](https://ohdsi.github.io/CommonDataModel/cdm54.html#concept_ancestor) table does this for
|
||||
hierarchical relationships over several “generations” of direct relationships.
|
||||
- In previous versions of the CDM, the relationship_id used to be a numerical identifier. See the
|
||||
[RELATIONSHIP](https://ohdsi.github.io/CommonDataModel/cdm531.html#relationship) table.
|
||||
[RELATIONSHIP](https://ohdsi.github.io/CommonDataModel/cdm54.html#relationship) table.
|
||||
|
||||
### Relationship Table
|
||||
- There is one record for each Relationship.
|
||||
|
@ -163,7 +163,7 @@ Relationship is provided in the reverse_relationship_id field.
|
|||
concept_id field. This is for purposes of creating a closed Information Model, where all entities in
|
||||
the OMOP CDM are covered by unique Concepts.
|
||||
- Hierarchical Relationships are used to build a hierarchical tree out of the Concepts, which is recorded in
|
||||
the [CONCEPT_ANCESTOR](https://ohdsi.github.io/CommonDataModel/cdm531.html#concept_ancestor) table. For example, “has_ingredient” is a Relationship between Concept
|
||||
the [CONCEPT_ANCESTOR](https://ohdsi.github.io/CommonDataModel/cdm54.html#concept_ancestor) table. For example, “has_ingredient” is a Relationship between Concept
|
||||
of the Concept Class ‘Clinical Drug’ and those of ‘Ingredient’, and all Ingredients can be classified as
|
||||
the “parental” hierarchical Concepts for the drug products they are part of. All ‘Is a’ Relationships are
|
||||
hierarchical.
|
||||
|
@ -172,19 +172,19 @@ from different Vocabulary sources.
|
|||
|
||||
### Concept Synonyms
|
||||
- The concept_synonym_name field contains a valid Synonym of a concept, including the description in
|
||||
the concept_name itself. I.e. each Concept has at least one Synonym in the [CONCEPT_SYNONYM](https://ohdsi.github.io/CommonDataModel/cdm531.html#concept_synonym)
|
||||
the concept_name itself. I.e. each Concept has at least one Synonym in the [CONCEPT_SYNONYM](https://ohdsi.github.io/CommonDataModel/cdm54.html#concept_synonym)
|
||||
table. As an example, for a SNOMED-CT Concept, if the fully specified name is stored as the
|
||||
concept_name of the [CONCEPT](https://ohdsi.github.io/CommonDataModel/cdm531.html#concept) table, then the Preferred Term and Synonyms associated with the Concept are stored in the [CONCEPT_SYNONYM](https://ohdsi.github.io/CommonDataModel/cdm531.html#concept_synonym) table.
|
||||
- Only Synonyms that are active and current are stored in the [CONCEPT_SYNONYM](https://ohdsi.github.io/CommonDataModel/cdm531.html#concept_synonym) table. Tracking
|
||||
concept_name of the [CONCEPT](https://ohdsi.github.io/CommonDataModel/cdm54.html#concept) table, then the Preferred Term and Synonyms associated with the Concept are stored in the [CONCEPT_SYNONYM](https://ohdsi.github.io/CommonDataModel/cdm54.html#concept_synonym) table.
|
||||
- Only Synonyms that are active and current are stored in the [CONCEPT_SYNONYM](https://ohdsi.github.io/CommonDataModel/cdm54.html#concept_synonym) table. Tracking
|
||||
synonym/description history and mapping of obsolete synonyms to current Concepts/Synonyms is out
|
||||
of scope for the Standard Vocabularies.
|
||||
- Currently, only English Synonyms are included.
|
||||
|
||||
### Concept Ancestor
|
||||
- Each concept is also recorded as an ancestor of itself.
|
||||
- Only valid and Standard Concepts participate in the [CONCEPT_ANCESTOR](https://ohdsi.github.io/CommonDataModel/cdm531.html#concept_ancestor) table. It is not possible
|
||||
- Only valid and Standard Concepts participate in the [CONCEPT_ANCESTOR](https://ohdsi.github.io/CommonDataModel/cdm54.html#concept_ancestor) table. It is not possible
|
||||
to find ancestors or descendants of deprecated or Source Concepts.
|
||||
- Usually, only Concepts of the same Domain are connected through records of the [CONCEPT_ANCESTOR](https://ohdsi.github.io/CommonDataModel/cdm531.html#concept_ancestor) table, but there might be exceptions.
|
||||
- Usually, only Concepts of the same Domain are connected through records of the [CONCEPT_ANCESTOR](https://ohdsi.github.io/CommonDataModel/cdm54.html#concept_ancestor) table, but there might be exceptions.
|
||||
|
||||
### Source to Concept Map
|
||||
- This table is no longer used to distribute mapping information between source codes and Standard
|
||||
|
|
19
rmd/faq.Rmd
19
rmd/faq.Rmd
|
@ -19,16 +19,17 @@ The [community forums](http://forums.ohdsi.org/) are also a great place to ask q
|
|||
|
||||
**3. Are any tables or fields optional?**
|
||||
|
||||
It is expected that all tables will be present in a CDM though it is not a requirement that they are all populated. The two mandatory tables are:
|
||||
It is expected that all tables will be present in a CDM though it is not a requirement that they are all populated. The three mandatory tables are:
|
||||
|
||||
* [Person](https://github.com/OHDSI/CommonDataModel/wiki/person): Contains records that uniquely identify each patient in the source data who is at-risk to have clinical observations recorded within the source systems.
|
||||
* [Observation_period](https://github.com/OHDSI/CommonDataModel/wiki/observation_period): Contains records which uniquely define the spans of time for which a Person is at-risk to have clinical events recorded within the source systems.
|
||||
* [Person](https://ohdsi.github.io/CommonDataModel/cdm54.html#person): Contains records that uniquely identify each patient in the source data who is at-risk to have clinical observations recorded within the source systems.
|
||||
* [Observation_period](https://ohdsi.github.io/CommonDataModel/cdm54.html#observation_period): Contains records which uniquely define the spans of time for which a Person is at-risk to have clinical events recorded within the source systems.
|
||||
* [CDM_Source](https://ohdsi.github.io/CommonDataModel/cdm54.html#cdm_source): Contains information on the CDM instance including the vocabulary version used, the date the native data were released and the date the CDM was released.
|
||||
|
||||
It is then up to you which tables to populate, though the core event tables are generally agreed upon to be [Condition_occurrence](https://github.com/OHDSI/CommonDataModel/wiki/CONDITION_OCCURRENCE), [Procedure_occurrence](https://github.com/OHDSI/CommonDataModel/wiki/PROCEDURE_OCCURRENCE), [Drug_exposure](https://github.com/OHDSI/CommonDataModel/wiki/DRUG_EXPOSURE), [Measurement](https://github.com/OHDSI/CommonDataModel/wiki/MEASUREMENT), and [Observation](https://github.com/OHDSI/CommonDataModel/wiki/OBSERVATION). Each table has certain required fields, a full list of which can be found on the Common Data Model [wiki page](https://github.com/OHDSI/CommonDataModel/wiki/).
|
||||
It is then up to you which tables to populate, though the core event tables are generally agreed upon to be [Condition_occurrence](https://ohdsi.github.io/CommonDataModel/cdm54.html#CONDITION_OCCURRENCE), [Procedure_occurrence](https://ohdsi.github.io/CommonDataModel/cdm54.html#PROCEDURE_OCCURRENCE), [Drug_exposure](https://ohdsi.github.io/CommonDataModel/cdm54.html#DRUG_EXPOSURE), [Measurement](https://ohdsi.github.io/CommonDataModel/cdm54.html#MEASUREMENT), and [Observation](https://ohdsi.github.io/CommonDataModel/cdm54.html#OBSERVATION). Each table has certain required fields, a full list of which can be found on the Common Data Model [wiki page](https://ohdsi.github.io/CommonDataModel/cdm54.html#).
|
||||
|
||||
**4. Does the data model include any derived information? Which tables or values are derived?**
|
||||
|
||||
The common data model stores verbatim data from the source across various clinical domains, such as records for conditions, drugs, procedures, and measurements. In addition, to assist the analyst, the common data model also provides some derived tables, based on commonly used analytic procedures. For example, the [Condition_era](https://github.com/OHDSI/CommonDataModel/wiki/CONDITION_ERA) table is derived from the [Condition_occurrence](https://github.com/OHDSI/CommonDataModel/wiki/CONDITION_OCCURENCE) table and both the [Drug_era](https://github.com/OHDSI/CommonDataModel/wiki/DRUG_ERA) and [Dose_era](https://github.com/OHDSI/CommonDataModel/wiki/DOSE_ERA) tables are derived from the [Drug_exposure](https://github.com/OHDSI/CommonDataModel/wiki/DRUG_EXPOSURE) table. An era is defined as a span of time when a patient is assumed to have a given condition or exposure to a particular active ingredient. Members of the community have written code to create these tables and it is out on the [github](https://github.com/OHDSI/CommonDataModel/tree/master/CodeExcerpts/DerivedTables) if you choose to use it in your CDM build. It is important to reinforce, the analyst has the opportunity, but not the obligation, to use any of the derived tables and all of the source data is still available for direct use if the analysis calls for different assumptions.
|
||||
The common data model stores verbatim data from the source across various clinical domains, such as records for conditions, drugs, procedures, and measurements. In addition, to assist the analyst, the common data model also provides some derived tables, based on commonly used analytic procedures. For example, the [Condition_era](https://ohdsi.github.io/CommonDataModel/cdm54.html#CONDITION_ERA) table is derived from the [Condition_occurrence](https://ohdsi.github.io/CommonDataModel/cdm54.html#CONDITION_OCCURENCE) table and both the [Drug_era](https://ohdsi.github.io/CommonDataModel/cdm54.html#DRUG_ERA) and [Dose_era](https://ohdsi.github.io/CommonDataModel/cdm54.html#DOSE_ERA) tables are derived from the [Drug_exposure](https://ohdsi.github.io/CommonDataModel/cdm54.html#DRUG_EXPOSURE) table. An era is defined as a span of time when a patient is assumed to have a given condition or exposure to a particular active ingredient. Members of the community have written code to create these tables and it is out on the [github](https://github.com/OHDSI/CommonDataModel/tree/master/CodeExcerpts/DerivedTables) if you choose to use it in your CDM build. It is important to reinforce, the analyst has the opportunity, but not the obligation, to use any of the derived tables and all of the source data is still available for direct use if the analysis calls for different assumptions.
|
||||
|
||||
**5. How is age captured in the model?**
|
||||
|
||||
|
@ -52,11 +53,11 @@ If someone in the community had a use case for time-varying location of residenc
|
|||
|
||||
**9. How does the model denote the time period during which a Person’s information is valid?**
|
||||
|
||||
The OMOP Common Data Model uses something called observation periods (stored in the [Observation_period](https://github.com/OHDSI/CommonDataModel/wiki/observation_period) table) as a way to define the time span during which a patient is at-risk to have a clinical event recorded. In administrative claims databases, for example, these observation periods are often analogous to the notion of ‘enrollment’.
|
||||
The OMOP Common Data Model uses something called observation periods (stored in the [Observation_period](https://ohdsi.github.io/CommonDataModel/cdm54.html#observation_period) table) as a way to define the time span during which a patient is at-risk to have a clinical event recorded. In administrative claims databases, for example, these observation periods are often analogous to the notion of ‘enrollment’.
|
||||
|
||||
**10. How does the model capture start and stop dates for insurance coverage? What if a person’s coverage changes?**
|
||||
|
||||
The [Payer_plan_period](https://github.com/OHDSI/CommonDataModel/wiki/payer_plan_period) table captures details of the period of time that a Person is continuously enrolled under a specific health Plan benefit structure from a given Payer. Payer plan periods, as opposed to observation periods, can overlap so as to denote the time when a Person is enrolled in multiple plans at the same time such as Medicare Part A and Medicare Part D.
|
||||
The [Payer_plan_period](https://ohdsi.github.io/CommonDataModel/cdm54.html#payer_plan_period) table captures details of the period of time that a Person is continuously enrolled under a specific health Plan benefit structure from a given Payer. Payer plan periods, as opposed to observation periods, can overlap so as to denote the time when a Person is enrolled in multiple plans at the same time such as Medicare Part A and Medicare Part D.
|
||||
|
||||
**11. What if I have EHR data? How would I create observation periods?**
|
||||
|
||||
|
@ -66,7 +67,7 @@ An observation period is considered as the time at which a patient is at-risk to
|
|||
|
||||
**12. Do I have to map my source codes to Standard Concepts myself? Are there vocabulary mappings that already exist for me to leverage?**
|
||||
|
||||
If your data use any of the 55 source vocabularies that are currently supported, the mappings have been done for you. The full list is available from the open-source [ATHENA](http://athena.ohdsi.org/search-terms/terms) tool under the download tab (see below). You can choose to download the ten [vocabulary tables](https://github.com/OHDSI/CommonDataModel/wiki/Standardized-Vocabularies) from there as well – you will need a copy in your environment if you plan on building a CDM.
|
||||
If your data use any of the 55 source vocabularies that are currently supported, the mappings have been done for you. The full list is available from the open-source [ATHENA](http://athena.ohdsi.org/search-terms/terms) tool under the download tab (see below). You can choose to download the ten [vocabulary tables](https://ohdsi.github.io/CommonDataModel/cdm54.html#Standardized-Vocabularies) from there as well – you will need a copy in your environment if you plan on building a CDM.
|
||||
|
||||

|
||||
|
||||
|
@ -74,7 +75,7 @@ The [ATHENA](http://athena.ohdsi.org/search-terms/terms) tool also allows you to
|
|||
|
||||
**13. If I want to apply the mappings myself, can I do so? Are they transparent to all users?**
|
||||
|
||||
Yes, all mappings are available in the [Concept_relationship](https://github.com/OHDSI/CommonDataModel/wiki/CONCEPT_RELATIONSHIP) table (which can be downloaded from [ATHENA](http://athena.ohdsi.org/search-terms/terms)). Each value in a supported source terminology is assigned a Concept_id (which is considered non-standard). Each Source_concept_id will have a mapping to a Standard_concept_id. For example:
|
||||
Yes, all mappings are available in the [Concept_relationship](https://ohdsi.github.io/CommonDataModel/cdm54.html#CONCEPT_RELATIONSHIP) table (which can be downloaded from [ATHENA](http://athena.ohdsi.org/search-terms/terms)). Each value in a supported source terminology is assigned a Concept_id (which is considered non-standard). Each Source_concept_id will have a mapping to a Standard_concept_id. For example:
|
||||
|
||||

|
||||
|
||||
|
|
|
@ -9,9 +9,11 @@ library(magrittr)
|
|||
library(toastui)
|
||||
```
|
||||
|
||||
The Observational Medical Outcomes Partnership (OMOP) Common Data Model (CDM) is an open community data standard, designed to standardize the structure and content of observational data and to enable efficient analyses that can produce reliable evidence. A central component of the OMOP CDM is the OHDSI standardized vocabularies. The OHDSI vocabularies allow organization and standardization of medical terms to be used across the various clinical domains of the OMOP common data model and enable standardized analytics that leverage the knowledge base when constructing exposure and outcome phenotypes and other features within characterization, population-level effect estimation, and patient-level prediction studies.
|
||||
The Observational Medical Outcomes Partnership (OMOP) Common Data Model (CDM) is an open community data standard, designed to standardize the structure and content of observational data and to enable efficient analyses that can produce reliable evidence.
|
||||
|
||||
This website is meant to serve as a resource describing the specification of the available versions of the Common Data Model. This includes the structure of the model itself and the agreed upon conventions for each table and field as decided by the OHDSI Community. The vocabulary tables are part of the model and, as such, are detailed here. To download the vocabulary itself, please visit [https://athena.ohdsi.org](https://athena.ohdsi.org). For more information about the OHDSI suite of tools designed to implement best practices in characterization, population-level effect estimation and patient-level prediction, please visit [https://ohdsi.github.io/Hades/](https://ohdsi.github.io/Hades/).
|
||||
This website is meant to serve as a resource describing the specification of the available versions of the Common Data Model. This includes the structure of the model itself and the agreed upon conventions for each table and field as decided by the OHDSI Community. A central component of the OMOP CDM is the OHDSI standardized vocabularies. The OHDSI vocabularies allow organization and standardization of medical terms to be used across the various clinical domains of the OMOP common data model and enable standardized analytics that leverage the knowledge base when constructing exposure and outcome phenotypes and other features within characterization, population-level effect estimation, and patient-level prediction studies. The vocabulary tables are part of the model and, as such, are detailed here. To download the vocabulary itself, please visit [https://athena.ohdsi.org](https://athena.ohdsi.org). For more information about the OHDSI suite of tools designed to implement best practices in characterization, population-level effect estimation and patient-level prediction, please visit [https://ohdsi.github.io/Hades/](https://ohdsi.github.io/Hades/).
|
||||
|
||||
If not otherwise specified, all OHDSI content is subject to the [Creative Commons CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/?ref=chooser-v1) license.
|
||||
|
||||
## The CDM Working Group
|
||||
|
||||
|
@ -52,20 +54,20 @@ The current CDM version is [CDM v5.4](http://ohdsi.github.io/CommonDataModel/cdm
|
|||
|
||||
### 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 check `r emo::ji("white heavy check mark")` indicates that the support level for the listed tool is in place, has been tested, and released. A warning sign `r emo::ji("warning")` indicates that the support level for the listed tool has been initiated but has not yet been tested and released.
|
||||
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 check `r emoji::emoji("heavy_check_mark")` indicates that the support level for the listed tool is in place, has been tested, and released. A warning sign `r emoji::emoji("exclamation")` 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("white heavy check mark")`|`r emo::ji("white heavy check mark")`
|
||||
|**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("white heavy check mark")`| `r emo::ji("warning")`
|
||||
|**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("white heavy check mark")`|`r emo::ji("warning")`
|
||||
|**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("white heavy check mark")`|`r emo::ji("warning")`
|
||||
|**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("white heavy check mark")`|`r emo::ji("warning")`
|
||||
|**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("white heavy check mark")`|`r emo::ji("white heavy check mark")`
|
||||
|**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("white heavy check mark")`|`r emo::ji("white heavy check mark")`*
|
||||
|**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("white heavy check mark")`|`r emo::ji("warning")`
|
||||
|**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 emoji::emoji("heavy_check_mark")`|`r emoji::emoji("heavy_check_mark")`
|
||||
|**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 emoji::emoji("heavy_check_mark")`| `r emoji::emoji("exclamation")`
|
||||
|**Achilles**|This package can be downloaded from [https://github.com/OHDSI/Achilles](https://github.com/OHDSI/Achilles), performing a set of broad database characterizations against an OMOP CDM instance. |`r emoji::emoji("heavy_check_mark")`|`r emoji::emoji("exclamation")`
|
||||
|**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 emoji::emoji("heavy_check_mark")`|`r emoji::emoji("exclamation")`
|
||||
|**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 emoji::emoji("heavy_check_mark")`|`r emoji::emoji("exclamation")`
|
||||
|**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 emoji::emoji("heavy_check_mark")`|`r emoji::emoji("heavy_check_mark")`
|
||||
|**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 emoji::emoji("heavy_check_mark")`|`r emoji::emoji("heavy_check_mark")`*
|
||||
|**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 emoji::emoji("heavy_check_mark")`|`r emoji::emoji("exclamation")`
|
||||
<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.
|
||||
|
||||
|
|
|
@ -1,48 +1,47 @@
|
|||
---
|
||||
title: "Indices, Primary Keys and Foreign Key Constraints"
|
||||
output:
|
||||
html_document:
|
||||
toc: true
|
||||
toc_depth: 5
|
||||
toc_float: true
|
||||
---
|
||||
|
||||
## Overview
|
||||
Database indices improve the performance of queries against a database by organizing the data in a way that increase query execution.
|
||||
|
||||
This article was written to provide guidance on the setting of indices, primary and foreign keys for data that has been transformed into the Observational Medical Outcome Partnership (OMOP) Common Data Model (CDM). The community that supports the design and development of the OHDSI/CommonDataModel Github repository is a diverse collaborative of healthcare and technical profesisonals whom have limited data base adminstrative (DBA) experience. As a result, the comments below should be interpreted as suggestions and recommendations to help increase performance. Your teams needs may call for a modified configuration.
|
||||
|
||||
## General Recommendations
|
||||
Should your database of choice support indexing, the OMOP CDM Working Group recommends
|
||||
|
||||
* Indexing on all columns containing an "_id" (e.g. condition_occurrence_id, drug_exposure_id, measurement_id, procedure_occurrence_id, etc.)
|
||||
* Indexing on primary and foreign keys
|
||||
|
||||
For all databases, regardless of custom indice support, primary and foreign keys should be set. This is a step towards ensuring data integrity. Information on what table level attributes should be set as primary and foreign keys can be found within the *_Field_Level.csv file(s) located in the [INST/CSV directory](https://github.com/OHDSI/CommonDataModel/tree/v5.4/inst/csv)
|
||||
|
||||
## Database support
|
||||
The OHDSI/CommonDataModel package leverages OHDSI/SQLRender and as a result is only capable of supporting sources that are supported by OHDSI/SQLRender. The following databases are currently supported.
|
||||
|
||||
### Microsoft SQL Server
|
||||
### Oracle
|
||||
### PostgreSQL
|
||||
|
||||
### Amazon Redshift
|
||||
On AWS Redshift it is important to ensure that your data is properly distributed and sorted across nodes. Compression on certain columns may also help. The designed DDL does set DISTKEYS in an effort to optimize performance. This configuration can be seen within the [Redshift-specific DDL](https://github.com/OHDSI/CommonDataModel/blob/v5.4/ddl/5.4/redshift/OMOPCDM_redshift_5.4_ddl.sql).
|
||||
|
||||
### Impala
|
||||
### IBM Netezza
|
||||
### Google BigQuery
|
||||
Google BigQuery does not require manual optimization and/or sizing. Google BigQuery does massive parallel full table scans and intensive caching, all under the hood.
|
||||
[Reference](https://forums.ohdsi.org/t/iso-best-practices-of-cdm-indexing/10939/2)
|
||||
|
||||
### Microsoft Parallel Data Warehouse (PDW)
|
||||
### SQLite
|
||||
|
||||
### Databricks
|
||||
This database type is not yet supported but is actively being worked on by a number of collaborators. For more informtion, please contact Ajit Londhe of Amgen.
|
||||
|
||||
## References
|
||||
|
||||
[ISO Best Practices of CDM Indexing](https://forums.ohdsi.org/t/iso-best-practices-of-cdm-indexing/10939/2)
|
||||
|
||||
---
|
||||
title: "Indices, Primary Keys and Foreign Key Constraints"
|
||||
output:
|
||||
html_document:
|
||||
toc: true
|
||||
toc_depth: 5
|
||||
toc_float: true
|
||||
---
|
||||
|
||||
## Overview
|
||||
Database indices improve the performance of queries against a database by organizing the data in a way that increase query execution.
|
||||
|
||||
This article was written to provide guidance on the setting of indices, primary and foreign keys for data that has been transformed into the Observational Medical Outcome Partnership (OMOP) Common Data Model (CDM). The community that supports the design and development of the OHDSI/CommonDataModel Github repository is a diverse collaborative of healthcare and technical profesisonals whom have limited data base administrative (DBA) experience. As a result, the comments below should be interpreted as suggestions and recommendations to help increase performance. Your teams needs may call for a modified configuration.
|
||||
|
||||
## General Recommendations
|
||||
Should your database of choice support indexing, the OMOP CDM Working Group recommends
|
||||
|
||||
* Indexing on all columns containing an "_id" (e.g. condition_occurrence_id, drug_exposure_id, measurement_id, procedure_occurrence_id, etc.)
|
||||
* Indexing on primary and foreign keys
|
||||
|
||||
For all databases, regardless of custom indice support, primary and foreign keys should be set. This is a step towards ensuring data integrity. Information on what table level attributes should be set as primary and foreign keys can be found within the *_Field_Level.csv file(s) located in the [INST/CSV directory](https://github.com/OHDSI/CommonDataModel/tree/v5.4/inst/csv)
|
||||
|
||||
## Database support
|
||||
The OHDSI/CommonDataModel package leverages OHDSI/SQLRender and as a result is only capable of supporting sources that are supported by OHDSI/SQLRender. The following databases are currently supported.
|
||||
|
||||
### Microsoft SQL Server
|
||||
### Oracle
|
||||
### PostgreSQL
|
||||
|
||||
### Amazon Redshift
|
||||
On AWS Redshift it is important to ensure that your data is properly distributed and sorted across nodes. Compression on certain columns may also help. The designed DDL does set DISTKEYS in an effort to optimize performance. This configuration can be seen within the [Redshift-specific DDL](https://github.com/OHDSI/CommonDataModel/blob/v5.4/ddl/5.4/redshift/OMOPCDM_redshift_5.4_ddl.sql).
|
||||
|
||||
### Impala
|
||||
### IBM Netezza
|
||||
### Google BigQuery
|
||||
Google BigQuery does not require manual optimization and/or sizing. Google BigQuery does massive parallel full table scans and intensive caching, all under the hood.
|
||||
[Reference](https://forums.ohdsi.org/t/iso-best-practices-of-cdm-indexing/10939/2)
|
||||
|
||||
### Microsoft Parallel Data Warehouse (PDW)
|
||||
### SQLite
|
||||
|
||||
### Databricks
|
||||
|
||||
## References
|
||||
|
||||
[ISO Best Practices of CDM Indexing](https://forums.ohdsi.org/t/iso-best-practices-of-cdm-indexing/10939/2)
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ These SQL scripts have been developed by the community to facilitate the Extract
|
|||
This script will create a large table containing all source codes and the Standard Concepts they map to. By creating this table ahead of time and referencing it during ETL, you can save processing time than if you were to map source codes on the fly. It is important to note that this script will show ALL mappings, not just those to Standard, Valid Concepts. Be sure to add a filter that will only grab the correct Standard, Valid codes.
|
||||
|
||||
```{sql eval=FALSE, echo=TRUE}
|
||||
SELECT c.concept_code AS SOURCE_CODE, c.concept_id AS SOURCE_CONCEPT_ID, c.concept_name AS SOURCE_CODE_DESCRIPTION, c.vocabulary_id AS SOURCE_VOCABULARY_ID, c.domain_id AS SOURCE_DOMAIN_ID, c.CONCEPT_CLASS_ID AS SOURCE_CONCEPT_CLASS_ID, c.VALID_START_DATE AS SOURCE_VALID_START_DATE, c.VALID_END_DATE AS SOURCE_VALID_END_DATE, c.INVALID_REASON AS SOURCE_INVALID_REASON, c1.concept_id AS TARGET_CONCEPT_ID, c1.concept_name AS TARGET_CONCEPT_NAME, c1.VOCABULARY_ID AS TARGET_VOCABUALRY_ID, c1.domain_id AS TARGET_DOMAIN_ID, c1.concept_class_id AS TARGET_CONCEPT_CLASS_ID, c1.INVALID_REASON AS TARGET_INVALID_REASON, c1.standard_concept AS TARGET_STANDARD_CONCEPT
|
||||
SELECT c.concept_code AS SOURCE_CODE, c.concept_id AS SOURCE_CONCEPT_ID, c.concept_name AS SOURCE_CODE_DESCRIPTION, c.vocabulary_id AS SOURCE_VOCABULARY_ID, c.domain_id AS SOURCE_DOMAIN_ID, c.CONCEPT_CLASS_ID AS SOURCE_CONCEPT_CLASS_ID, c.VALID_START_DATE AS SOURCE_VALID_START_DATE, c.VALID_END_DATE AS SOURCE_VALID_END_DATE, c.INVALID_REASON AS SOURCE_INVALID_REASON, c1.concept_id AS TARGET_CONCEPT_ID, c1.concept_name AS TARGET_CONCEPT_NAME, c1.VOCABULARY_ID AS TARGET_VOCABULARY_ID, c1.domain_id AS TARGET_DOMAIN_ID, c1.concept_class_id AS TARGET_CONCEPT_CLASS_ID, c1.INVALID_REASON AS TARGET_INVALID_REASON, c1.standard_concept AS TARGET_STANDARD_CONCEPT
|
||||
FROM CONCEPT C
|
||||
JOIN CONCEPT_RELATIONSHIP CR
|
||||
ON C.CONCEPT_ID = CR.CONCEPT_ID_1
|
||||
|
@ -475,7 +475,7 @@ WHERE vocabulary_id = 'None';
|
|||
|
||||
### Visit Concept Roll-up
|
||||
|
||||
The query below will utilize the Visit Concept hierarcy to find the highest-level ancestors. In the case that both the VISIT_OCCURRENCE and VISIT_DETAIL tables are populated, it is good practice (though not required) to use the highest-level ancestors as the VISIT_CONCEPT_IDs in the VISIT_OCCURRENCE table and their children as the VISIT_DETAIL_CONCEPT_IDs in the VISIT_DETAIL table. This relationship between the VISIT_OCCURRENCE and VISIT_DETAIL tables allow for standardized Visit logic to be written, building Visits from Visit Details. For more information on how this can be done, please see the [Optum Extended ETL documentation](https://ohdsi.github.io/ETL-LambdaBuilder/Optum%20Clinformatics/Optum_visit_occurrence.html).
|
||||
The query below will utilize the Visit Concept hierarchy to find the highest-level ancestors. In the case that both the VISIT_OCCURRENCE and VISIT_DETAIL tables are populated, it is good practice (though not required) to use the highest-level ancestors as the VISIT_CONCEPT_IDs in the VISIT_OCCURRENCE table and their children as the VISIT_DETAIL_CONCEPT_IDs in the VISIT_DETAIL table. This relationship between the VISIT_OCCURRENCE and VISIT_DETAIL tables allow for standardized Visit logic to be written, building Visits from Visit Details. For more information on how this can be done, please see the [Optum Extended ETL documentation](https://ohdsi.github.io/ETL-LambdaBuilder/Optum%20Clinformatics/Optum_visit_occurrence.html).
|
||||
|
||||
```{sql eval=FALSE, echo=TRUE}
|
||||
SELECT concept_id, concept_name
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
---
|
||||
title: '<div><img src="ohdsi40x40.png"></img> Types of OMOP CDM Additions </div>'
|
||||
output:
|
||||
html_document:
|
||||
toc: TRUE
|
||||
toc_float: TRUE
|
||||
---
|
||||
|
||||
While the OMOP CDM supports a diverse set of use cases and data types, we acknowledge that not all can be represented in the CDM in its current form. Based on your use case it may be necessary to modify just your database, create an expansion, or suggest changes to the model that will be incorporated into the next official version. This document describes the types of additions that can be made to the CDM and how they should be utilized by the community.
|
||||
|
||||
## Site - Specific Add on
|
||||
|
||||
It is entirely within your rights as a data owner or holder to create additional columns or even tables in your own instance of your CDM that is specific to your site. However, they are not supported or recognized by OHDSI tools and not part of the canonical OMOP CDM. The Add on column or table is used for a site specific use case or data element. Examples include: privacy flags, source table identifiers or other data elements. See [this poster](https://www.ohdsi.org/wp-content/uploads/2021/09/18-Implementing-Adopting-a-Customized-OMOP-Common-Data-Model.pdf) for background information and an implementation guide.
|
||||
|
||||
## Expansion/Extension
|
||||
|
||||
These are typically sets of tables created by working groups to model a specific type of data. The idea is that these tables follow the general conventions of the OMOP CDM but are not part of the canonical data model and therefore do not fall under the purview of the CDM working group. They are developed using OMOP conventions applied to domain specific datasets. It is possible they could become part of the CDM in the future (like the episode and episode_event tables) but that is not a given. If using an expansion/extension with your data they are invisible to the tools. They can be used as part of network research but you would need to ensure that all participating databases are using the extension/expansion before writing a study package that incorporates the tables.
|
||||
|
||||
**Examples include:**
|
||||
|
||||
- Oncology
|
||||
- Github: https://ohdsi.github.io/OncologyWG/
|
||||
- Medical Imaging
|
||||
- Github: https://github.com/paulnagy/DICOM2OMOP
|
||||
- Paper: https://link-springer-com.ezjandj.infotrieve.com/article/10.1007/s10278-024-00982-6
|
||||
- GIS
|
||||
- Github: https://ohdsi.github.io/GIS/
|
||||
|
||||
## Change to Canonical CDM
|
||||
|
||||
Please see the [full process](/CommonDataModel/cdmRequestProcess.html) for how to request changes to the current version of the OMOP CDM. These change requests MUST be backed by network uses cases and MUST be approved by the [CDM working group](https://forms.office.com/Pages/ResponsePage.aspx?id=lAAPoyCRq0q6TOVQkCOy1ZyG6Ud_r2tKuS0HcGnqiQZUOVJFUzBFWE1aSVlLN0ozR01MUVQ4T0RGNyQlQCN0PWcu). Overall these are typically small changes or additions that make the CDM more usable from a network perspective or fulfill a clearly demonstrated need. Good examples are the recently ratified [NOTE_NLP updates](https://github.com/OHDSI/CommonDataModel/tree/NLP_Proposal_2023) and presentation by the vocabulary team to add [value_source_concept_id](https://ohdsiorg.sharepoint.com/:v:/s/Workgroup-CommonDataModel/EcMaYjUPeSVMrmSozflBsmQBNEtPpiCJ9AfZ3QQtGHIuFg?e=UnVgIh&nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJTdHJlYW1XZWJBcHAiLCJyZWZlcnJhbFZpZXciOiJTaGFyZURpYWxvZy1MaW5rIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXcifX0%3D) to the measurement and observation tables.
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue