From 2edb6de8820d12f5acd3578739430f884017dfeb Mon Sep 17 00:00:00 2001 From: clairblacketer Date: Fri, 23 Jun 2017 14:23:53 -0400 Subject: [PATCH 01/17] Updated header for v5.1.0 --- Impala/OMOP_CDM_ddl_Impala.sql | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Impala/OMOP_CDM_ddl_Impala.sql b/Impala/OMOP_CDM_ddl_Impala.sql index ab1bdf5..c5c3779 100644 --- a/Impala/OMOP_CDM_ddl_Impala.sql +++ b/Impala/OMOP_CDM_ddl_Impala.sql @@ -17,16 +17,16 @@ /************************ - ####### # # ####### ###### ##### ###### # # ####### - # # ## ## # # # # # # # # ## ## # # # - # # # # # # # # # # # # # # # # # # # # - # # # # # # # ###### # # # # # # # # ###### - # # # # # # # # # # # # # # # - # # # # # # # # # # # # # # # # # - ####### # # ####### # ##### ###### # # ## ##### + ####### # # ####### ###### ##### ###### # # ####### # ### + # # ## ## # # # # # # # # ## ## # # # ## # # + # # # # # # # # # # # # # # # # # # # # # # # # + # # # # # # # ###### # # # # # # # # ###### # # # + # # # # # # # # # # # # # # # ### # ### # # + # # # # # # # # # # # # # # # # # ### # ### # # + ####### # # ####### # ##### ###### # # ## ##### ### ##### ### ### + - -script to create OMOP common data model, version 5.0 for Hadoop (Hive/Impala) database +script to create OMOP common data model, version 5.1.0 for Hadoop (Hive/Impala) database Based on the PostgreSQL version, with the following changes: * NULL/NOT NULL is not used. From 74e93ae32863e81f2662145e13b7b9bd447bd910 Mon Sep 17 00:00:00 2001 From: clairblacketer Date: Fri, 23 Jun 2017 14:25:21 -0400 Subject: [PATCH 02/17] Updated header for v5.1.0 --- Oracle/OMOP CDM constraints - Oracle.sql | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Oracle/OMOP CDM constraints - Oracle.sql b/Oracle/OMOP CDM constraints - Oracle.sql index d4eeea9..85868aa 100644 --- a/Oracle/OMOP CDM constraints - Oracle.sql +++ b/Oracle/OMOP CDM constraints - Oracle.sql @@ -17,16 +17,17 @@ /************************ - ####### # # ####### ###### ##### ###### # # ####### ##### - # # ## ## # # # # # # # # ## ## # # # # # #### # # #### ##### ##### ## # # # ##### #### - # # # # # # # # # # # # # # # # # # # # # # # ## # # # # # # # # ## # # # - # # # # # # # ###### # # # # # # # # ###### # # # # # # #### # # # # # # # # # # #### - # # # # # # # # # # # # # # # # # # # # # # # ##### ###### # # # # # # - # # # # # # # # # # # # # # # # # # # # # # ## # # # # # # # # # ## # # # - ####### # # ####### # ##### ###### # # ## ##### ##### #### # # #### # # # # # # # # # #### + ####### # # ####### ###### ##### ###### # # ####### # ### ##### + # # ## ## # # # # # # # # ## ## # # # ## # # # # #### # # #### ##### ##### ## # # # ##### #### + # # # # # # # # # # # # # # # # # # # # # # # # # # # ## # # # # # # # # ## # # # + # # # # # # # ###### # # # # # # # # ###### # # # # # # # # # #### # # # # # # # # # # #### + # # # # # # # # # # # # # # # ### # ### # # # # # # # # # # ##### ###### # # # # # # + # # # # # # # # # # # # # # # # # ### # ### # # # # # # # ## # # # # # # # # # ## # # # + ####### # # ####### # ##### ###### # # ## ##### ### ##### ### ### ##### #### # # #### # # # # # # # # # #### + -script to create constraints within OMOP common data model, version 5.0 for Oracle database +script to create constraints within OMOP common data model, version 5.1.0 for Oracle database last revised: 12 Oct 2014 From 66b994e32c3bddfcd5af30c9c5282007a6e5a2ea Mon Sep 17 00:00:00 2001 From: clairblacketer Date: Fri, 23 Jun 2017 14:26:05 -0400 Subject: [PATCH 03/17] Updated headers for v5.1.0 --- Oracle/OMOP CDM ddl - Oracle.sql | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Oracle/OMOP CDM ddl - Oracle.sql b/Oracle/OMOP CDM ddl - Oracle.sql index 3cec564..76ec451 100644 --- a/Oracle/OMOP CDM ddl - Oracle.sql +++ b/Oracle/OMOP CDM ddl - Oracle.sql @@ -17,16 +17,16 @@ /************************ - ####### # # ####### ###### ##### ###### # # ####### - # # ## ## # # # # # # # # ## ## # # # - # # # # # # # # # # # # # # # # # # # # - # # # # # # # ###### # # # # # # # # ###### - # # # # # # # # # # # # # # # - # # # # # # # # # # # # # # # # # - ####### # # ####### # ##### ###### # # ## ##### - + ####### # # ####### ###### ##### ###### # # ####### # ### + # # ## ## # # # # # # # # ## ## # # # ## # # + # # # # # # # # # # # # # # # # # # # # # # # # + # # # # # # # ###### # # # # # # # # ###### # # # + # # # # # # # # # # # # # # # ### # ### # # + # # # # # # # # # # # # # # # # # ### # ### # # + ####### # # ####### # ##### ###### # # ## ##### ### ##### ### ### + -script to create OMOP common data model, version 5.0 for Oracle database +script to create OMOP common data model, version 5.1.0 for Oracle database last revised: 1-May-2016 From 44ba62365abbba9ecc96d52cda126a83741f5980 Mon Sep 17 00:00:00 2001 From: clairblacketer Date: Fri, 23 Jun 2017 14:26:51 -0400 Subject: [PATCH 04/17] Updated headers for v5.1.0 --- ...exes required - Oracle - With constraints.sql | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Oracle/OMOP CDM indexes required - Oracle - With constraints.sql b/Oracle/OMOP CDM indexes required - Oracle - With constraints.sql index 9aeea74..1d24c9d 100644 --- a/Oracle/OMOP CDM indexes required - Oracle - With constraints.sql +++ b/Oracle/OMOP CDM indexes required - Oracle - With constraints.sql @@ -17,16 +17,16 @@ /************************ - ####### # # ####### ###### ##### ###### # # ####### ### - # # ## ## # # # # # # # # ## ## # # # # # # ##### ###### # # ###### #### - # # # # # # # # # # # # # # # # # # # # # ## # # # # # # # # - # # # # # # # ###### # # # # # # # # ###### # # # # # # ##### ## ##### #### - # # # # # # # # # # # # # # # # # # # # # # ## # # - # # # # # # # # # # # # # # # # # # # ## # # # # # # # # - ####### # # ####### # ##### ###### # # ## ##### ### # # ##### ###### # # ###### #### + ####### # # ####### ###### ##### ###### # # ####### # ### ### + # # ## ## # # # # # # # # ## ## # # # ## # # # # # ##### ###### # # ###### #### + # # # # # # # # # # # # # # # # # # # # # # # # # ## # # # # # # # # + # # # # # # # ###### # # # # # # # # ###### # # # # # # # # # ##### ## ##### #### + # # # # # # # # # # # # # # # ### # ### # # # # # # # # # ## # # + # # # # # # # # # # # # # # # # # ### # ### # # # # ## # # # # # # # # + ####### # # ####### # ##### ###### # # ## ##### ### ##### ### ### ### # # ##### ###### # # ###### #### -script to create the required indexes within OMOP common data model, version 5.0 for Oracle database +script to create the required indexes within OMOP common data model, version 5.1.0 for Oracle database last revised: 12 Oct 2014 From 3196675a90e036848fb814656409f99ca9723820 Mon Sep 17 00:00:00 2001 From: clairblacketer Date: Fri, 23 Jun 2017 14:27:17 -0400 Subject: [PATCH 05/17] Updated headers for v5.1.0 --- ...s required - Oracle - Without constraints.sql | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Oracle/OMOP CDM indexes required - Oracle - Without constraints.sql b/Oracle/OMOP CDM indexes required - Oracle - Without constraints.sql index a46c565..73ed627 100644 --- a/Oracle/OMOP CDM indexes required - Oracle - Without constraints.sql +++ b/Oracle/OMOP CDM indexes required - Oracle - Without constraints.sql @@ -17,16 +17,16 @@ /************************ - ####### # # ####### ###### ##### ###### # # ####### ### - # # ## ## # # # # # # # # ## ## # # # # # # ##### ###### # # ###### #### - # # # # # # # # # # # # # # # # # # # # # ## # # # # # # # # - # # # # # # # ###### # # # # # # # # ###### # # # # # # ##### ## ##### #### - # # # # # # # # # # # # # # # # # # # # # # ## # # - # # # # # # # # # # # # # # # # # # # ## # # # # # # # # - ####### # # ####### # ##### ###### # # ## ##### ### # # ##### ###### # # ###### #### + ####### # # ####### ###### ##### ###### # # ####### # ### ### + # # ## ## # # # # # # # # ## ## # # # ## # # # # # ##### ###### # # ###### #### + # # # # # # # # # # # # # # # # # # # # # # # # # ## # # # # # # # # + # # # # # # # ###### # # # # # # # # ###### # # # # # # # # # ##### ## ##### #### + # # # # # # # # # # # # # # # ### # ### # # # # # # # # # ## # # + # # # # # # # # # # # # # # # # # ### # ### # # # # ## # # # # # # # # + ####### # # ####### # ##### ###### # # ## ##### ### ##### ### ### ### # # ##### ###### # # ###### #### -script to create the required indexes within OMOP common data model, version 5.0 for Oracle database +script to create the required indexes within OMOP common data model, version 5.1.0 for Oracle database last revised: 12 Oct 2014 From b2bbf1245e63bb9e4fa86447c3f601a8b254b8fd Mon Sep 17 00:00:00 2001 From: clairblacketer Date: Fri, 23 Jun 2017 14:28:13 -0400 Subject: [PATCH 06/17] Updated headers for v5.1.0 --- PostgreSQL/OMOP CDM constraints - PostgreSQL.sql | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/PostgreSQL/OMOP CDM constraints - PostgreSQL.sql b/PostgreSQL/OMOP CDM constraints - PostgreSQL.sql index 7fcc090..f4842e3 100644 --- a/PostgreSQL/OMOP CDM constraints - PostgreSQL.sql +++ b/PostgreSQL/OMOP CDM constraints - PostgreSQL.sql @@ -17,16 +17,16 @@ /************************ - ####### # # ####### ###### ##### ###### # # ####### ##### - # # ## ## # # # # # # # # ## ## # # # # # #### # # #### ##### ##### ## # # # ##### #### - # # # # # # # # # # # # # # # # # # # # # # # ## # # # # # # # # ## # # # - # # # # # # # ###### # # # # # # # # ###### # # # # # # #### # # # # # # # # # # #### - # # # # # # # # # # # # # # # # # # # # # # # ##### ###### # # # # # # - # # # # # # # # # # # # # # # # # # # # # # ## # # # # # # # # # ## # # # - ####### # # ####### # ##### ###### # # ## ##### ##### #### # # #### # # # # # # # # # #### + ####### # # ####### ###### ##### ###### # # ####### # ### ##### + # # ## ## # # # # # # # # ## ## # # # ## # # # # #### # # #### ##### ##### ## # # # ##### #### + # # # # # # # # # # # # # # # # # # # # # # # # # # # ## # # # # # # # # ## # # # + # # # # # # # ###### # # # # # # # # ###### # # # # # # # # # #### # # # # # # # # # # #### + # # # # # # # # # # # # # # # ### # ### # # # # # # # # # # ##### ###### # # # # # # + # # # # # # # # # # # # # # # # # ### # ### # # # # # # # ## # # # # # # # # # ## # # # + ####### # # ####### # ##### ###### # # ## ##### ### ##### ### ### ##### #### # # #### # # # # # # # # # #### -script to create constraints within OMOP common data model, version 5.0 for PostgreSQL database +script to create constraints within OMOP common data model, version 5.1.0 for PostgreSQL database last revised: 12 Oct 2014 From f3ca3c0fb60bef036da7211f7238014265437ef9 Mon Sep 17 00:00:00 2001 From: clairblacketer Date: Fri, 23 Jun 2017 14:28:45 -0400 Subject: [PATCH 07/17] Updated header for v5.1.0 --- PostgreSQL/OMOP CDM ddl - PostgreSQL.sql | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/PostgreSQL/OMOP CDM ddl - PostgreSQL.sql b/PostgreSQL/OMOP CDM ddl - PostgreSQL.sql index 8229cc2..fb0bd18 100644 --- a/PostgreSQL/OMOP CDM ddl - PostgreSQL.sql +++ b/PostgreSQL/OMOP CDM ddl - PostgreSQL.sql @@ -17,16 +17,16 @@ /************************ - ####### # # ####### ###### ##### ###### # # ####### - # # ## ## # # # # # # # # ## ## # # # - # # # # # # # # # # # # # # # # # # # # - # # # # # # # ###### # # # # # # # # ###### - # # # # # # # # # # # # # # # - # # # # # # # # # # # # # # # # # - ####### # # ####### # ##### ###### # # ## ##### + ####### # # ####### ###### ##### ###### # # ####### # ### + # # ## ## # # # # # # # # ## ## # # # ## # # + # # # # # # # # # # # # # # # # # # # # # # # # + # # # # # # # ###### # # # # # # # # ###### # # # + # # # # # # # # # # # # # # # ### # ### # # + # # # # # # # # # # # # # # # # # ### # ### # # + ####### # # ####### # ##### ###### # # ## ##### ### ##### ### ### -script to create OMOP common data model, version 5.0 for PostgreSQL database +script to create OMOP common data model, version 5.1.0 for PostgreSQL database last revised: 1-May-2016 From 1c2fab8ae207ef8bac71a396acdf62030599053b Mon Sep 17 00:00:00 2001 From: clairblacketer Date: Fri, 23 Jun 2017 14:29:21 -0400 Subject: [PATCH 08/17] Updated headers for v5.1.0 --- .../OMOP CDM indexes required - PostgreSQL.sql | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/PostgreSQL/OMOP CDM indexes required - PostgreSQL.sql b/PostgreSQL/OMOP CDM indexes required - PostgreSQL.sql index 65760d5..837e003 100644 --- a/PostgreSQL/OMOP CDM indexes required - PostgreSQL.sql +++ b/PostgreSQL/OMOP CDM indexes required - PostgreSQL.sql @@ -17,16 +17,16 @@ /************************ - ####### # # ####### ###### ##### ###### # # ####### ### - # # ## ## # # # # # # # # ## ## # # # # # # ##### ###### # # ###### #### - # # # # # # # # # # # # # # # # # # # # # ## # # # # # # # # - # # # # # # # ###### # # # # # # # # ###### # # # # # # ##### ## ##### #### - # # # # # # # # # # # # # # # # # # # # # # ## # # - # # # # # # # # # # # # # # # # # # # ## # # # # # # # # - ####### # # ####### # ##### ###### # # ## ##### ### # # ##### ###### # # ###### #### + ####### # # ####### ###### ##### ###### # # ####### # ### ### + # # ## ## # # # # # # # # ## ## # # # ## # # # # # ##### ###### # # ###### #### + # # # # # # # # # # # # # # # # # # # # # # # # # ## # # # # # # # # + # # # # # # # ###### # # # # # # # # ###### # # # # # # # # # ##### ## ##### #### + # # # # # # # # # # # # # # # ### # ### # # # # # # # # # ## # # + # # # # # # # # # # # # # # # # # ### # ### # # # # ## # # # # # # # # + ####### # # ####### # ##### ###### # # ## ##### ### ##### ### ### ### # # ##### ###### # # ###### #### -script to create the required indexes within OMOP common data model, version 5.0 for PostgreSQL database +script to create the required indexes within OMOP common data model, version 5.1.0 for PostgreSQL database last revised: 12 Oct 2014 From 62b2e477b172fa5d6c98aa694429111e5d0dd2a9 Mon Sep 17 00:00:00 2001 From: clairblacketer Date: Fri, 23 Jun 2017 14:30:37 -0400 Subject: [PATCH 09/17] Updated header for v5.1.0 --- Sql Server/OMOP CDM constraints - SQL Server.sql | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Sql Server/OMOP CDM constraints - SQL Server.sql b/Sql Server/OMOP CDM constraints - SQL Server.sql index ba71a9a..a79f20f 100644 --- a/Sql Server/OMOP CDM constraints - SQL Server.sql +++ b/Sql Server/OMOP CDM constraints - SQL Server.sql @@ -17,16 +17,16 @@ /************************ - ####### # # ####### ###### ##### ###### # # ####### ##### - # # ## ## # # # # # # # # ## ## # # # # # #### # # #### ##### ##### ## # # # ##### #### - # # # # # # # # # # # # # # # # # # # # # # # ## # # # # # # # # ## # # # - # # # # # # # ###### # # # # # # # # ###### # # # # # # #### # # # # # # # # # # #### - # # # # # # # # # # # # # # # # # # # # # # # ##### ###### # # # # # # - # # # # # # # # # # # # # # # # # # # # # # ## # # # # # # # # # ## # # # - ####### # # ####### # ##### ###### # # ## ##### ##### #### # # #### # # # # # # # # # #### + ####### # # ####### ###### ##### ###### # # ####### # ### ##### + # # ## ## # # # # # # # # ## ## # # # ## # # # # #### # # #### ##### ##### ## # # # ##### #### + # # # # # # # # # # # # # # # # # # # # # # # # # # # ## # # # # # # # # ## # # # + # # # # # # # ###### # # # # # # # # ###### # # # # # # # # # #### # # # # # # # # # # #### + # # # # # # # # # # # # # # # ### # ### # # # # # # # # # # ##### ###### # # # # # # + # # # # # # # # # # # # # # # # # ### # ### # # # # # # # ## # # # # # # # # # ## # # # + ####### # # ####### # ##### ###### # # ## ##### ### ##### ### ### ##### #### # # #### # # # # # # # # # #### -script to create constraints within OMOP common data model, version 5.0 for SQL Server database +script to create constraints within OMOP common data model, version 5.1.0 for SQL Server database last revised: 12 Oct 2014 From f169afce88fe888e135f79c6cd26c36f1df22fd9 Mon Sep 17 00:00:00 2001 From: clairblacketer Date: Fri, 23 Jun 2017 14:31:08 -0400 Subject: [PATCH 10/17] Update headers for v5.1.0 --- Sql Server/OMOP CDM ddl - SQL Server.sql | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Sql Server/OMOP CDM ddl - SQL Server.sql b/Sql Server/OMOP CDM ddl - SQL Server.sql index 88eb0da..20f4f27 100644 --- a/Sql Server/OMOP CDM ddl - SQL Server.sql +++ b/Sql Server/OMOP CDM ddl - SQL Server.sql @@ -17,16 +17,16 @@ /************************ - ####### # # ####### ###### ##### ###### # # ####### - # # ## ## # # # # # # # # ## ## # # # - # # # # # # # # # # # # # # # # # # # # - # # # # # # # ###### # # # # # # # # ###### - # # # # # # # # # # # # # # # - # # # # # # # # # # # # # # # # # - ####### # # ####### # ##### ###### # # ## ##### + ####### # # ####### ###### ##### ###### # # ####### # ### + # # ## ## # # # # # # # # ## ## # # # ## # # + # # # # # # # # # # # # # # # # # # # # # # # # + # # # # # # # ###### # # # # # # # # ###### # # # + # # # # # # # # # # # # # # # ### # ### # # + # # # # # # # # # # # # # # # # # ### # ### # # + ####### # # ####### # ##### ###### # # ## ##### ### ##### ### ### -script to create OMOP common data model, version 5.0 for SQL Server database +script to create OMOP common data model, version 5.1.0 for SQL Server database last revised: 1-May-2016 From 1ed1edc3357f72aba8c5f3470584047b5dfdfff6 Mon Sep 17 00:00:00 2001 From: clairblacketer Date: Fri, 23 Jun 2017 14:31:49 -0400 Subject: [PATCH 11/17] Update headers for v5.1.0 --- .../OMOP CDM indexes required - SQL Server.sql | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Sql Server/OMOP CDM indexes required - SQL Server.sql b/Sql Server/OMOP CDM indexes required - SQL Server.sql index f701dba..ae42eb1 100644 --- a/Sql Server/OMOP CDM indexes required - SQL Server.sql +++ b/Sql Server/OMOP CDM indexes required - SQL Server.sql @@ -17,16 +17,16 @@ /************************ - ####### # # ####### ###### ##### ###### # # ####### ### - # # ## ## # # # # # # # # ## ## # # # # # # ##### ###### # # ###### #### - # # # # # # # # # # # # # # # # # # # # # ## # # # # # # # # - # # # # # # # ###### # # # # # # # # ###### # # # # # # ##### ## ##### #### - # # # # # # # # # # # # # # # # # # # # # # ## # # - # # # # # # # # # # # # # # # # # # # ## # # # # # # # # - ####### # # ####### # ##### ###### # # ## ##### ### # # ##### ###### # # ###### #### + ####### # # ####### ###### ##### ###### # # ####### # ### ### + # # ## ## # # # # # # # # ## ## # # # ## # # # # # ##### ###### # # ###### #### + # # # # # # # # # # # # # # # # # # # # # # # # # ## # # # # # # # # + # # # # # # # ###### # # # # # # # # ###### # # # # # # # # # ##### ## ##### #### + # # # # # # # # # # # # # # # ### # ### # # # # # # # # # ## # # + # # # # # # # # # # # # # # # # # ### # ### # # # # ## # # # # # # # # + ####### # # ####### # ##### ###### # # ## ##### ### ##### ### ### ### # # ##### ###### # # ###### #### -script to create the required indexes within OMOP common data model, version 5.0 for SQL Server database +script to create the required indexes within OMOP common data model, version 5.1.0 for SQL Server database last revised: 12 Oct 2014 From 788f2faf235b09037f8db986acb10e77c76e94d8 Mon Sep 17 00:00:00 2001 From: clairblacketer Date: Wed, 5 Jul 2017 12:01:20 -0400 Subject: [PATCH 12/17] Added backwards compatibility --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 51ed474..9d42769 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ See full CDM specification file on our github [wiki](https://github.com/OHDSI/Co Release Notes ============= -This version is based on this CDM working group proposal [#60](https://github.com/OHDSI/CommonDataModel/issues/60) and [#59](https://github.com/OHDSI/CommonDataModel/issues/59). The proposed and accepted changes include adding a datetime field to every table that had a date column and adding field DENOMINATOR_VALUE to the DRUG_STRENGTH table. These were the new columns added: +This version is based on the CDM working group proposal [#60](https://github.com/OHDSI/CommonDataModel/issues/60) and [#59](https://github.com/OHDSI/CommonDataModel/issues/59) and is **backwards compatibile with v5.0.1**. The proposed and accepted changes include adding a datetime field to every table that had a date column and adding field DENOMINATOR_VALUE to the DRUG_STRENGTH table. These were the new columns added: **PERSON** * birth_datetime, not required From 55d15a6a2ee0f44d565dabc66a5656462b14cb5d Mon Sep 17 00:00:00 2001 From: clairblacketer Date: Wed, 5 Jul 2017 15:55:20 -0400 Subject: [PATCH 13/17] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 9d42769..79f2aab 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,8 @@ This version is based on the CDM working group proposal [#60](https://github.com **NOTE** * note_datetime, not required +There are additional changes listed on the [OHDSI wiki](http://www.ohdsi.org/web/wiki/doku.php?id=documentation:next_cdm) that have been accepted but are not listed in this version because after being accepted they were never added to the DDL. Version 5.1.0 as it is now is being used by members of the community and any changes would cause problems so the additional accepted proposals will be added in subsequent versions. + --------- This repo contains the definition of the OMOP Common Data Model. It supports the 4 SQL technologies: Impala, Oracle, Postgres and SQL Server. For each, the DDL, constraints and indexes (if appropriate) are defined. From de8c1d0f234ac2945c921124b36cbfeae2751a48 Mon Sep 17 00:00:00 2001 From: Tom White Date: Thu, 6 Jul 2017 09:48:01 +0100 Subject: [PATCH 14/17] Change empty 'invalid_reason' field to null for compatibility with Atlas cohort generation. --- Impala/OMOP_Parquet.sql | 8 ++++---- Impala/OMOP_Parquet_v5.1.sql | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Impala/OMOP_Parquet.sql b/Impala/OMOP_Parquet.sql index bb2b65a..62eabcc 100644 --- a/Impala/OMOP_Parquet.sql +++ b/Impala/OMOP_Parquet.sql @@ -15,7 +15,7 @@ SELECT concept_code, TO_UTC_TIMESTAMP(CONCAT_WS('-', SUBSTR(CAST(valid_start_date AS STRING), 1, 4), SUBSTR(CAST(valid_start_date AS STRING), 5, 2), SUBSTR(CAST(valid_start_date AS STRING), 7, 2)), 'UTC') AS valid_start_date, TO_UTC_TIMESTAMP(CONCAT_WS('-', SUBSTR(CAST(valid_end_date AS STRING), 1, 4), SUBSTR(CAST(valid_end_date AS STRING), 5, 2), SUBSTR(CAST(valid_end_date AS STRING), 7, 2)), 'UTC') AS valid_end_date, - invalid_reason + nullif(invalid_reason, '') AS invalid_reason FROM omop_cdm.concept; CREATE TABLE omop_cdm_parquet.vocabulary @@ -42,7 +42,7 @@ SELECT relationship_id, TO_UTC_TIMESTAMP(CONCAT_WS('-', SUBSTR(CAST(valid_start_date AS STRING), 1, 4), SUBSTR(CAST(valid_start_date AS STRING), 5, 2), SUBSTR(CAST(valid_start_date AS STRING), 7, 2)), 'UTC') AS valid_start_date, TO_UTC_TIMESTAMP(CONCAT_WS('-', SUBSTR(CAST(valid_end_date AS STRING), 1, 4), SUBSTR(CAST(valid_end_date AS STRING), 5, 2), SUBSTR(CAST(valid_end_date AS STRING), 7, 2)), 'UTC') AS valid_end_date, - invalid_reason + nullif(invalid_reason, '') AS invalid_reason FROM omop_cdm.concept_relationship; CREATE TABLE omop_cdm_parquet.relationship @@ -72,7 +72,7 @@ SELECT target_vocabulary_id, TO_UTC_TIMESTAMP(CONCAT_WS('-', SUBSTR(CAST(valid_start_date AS STRING), 1, 4), SUBSTR(CAST(valid_start_date AS STRING), 5, 2), SUBSTR(CAST(valid_start_date AS STRING), 7, 2)), 'UTC') AS valid_start_date, TO_UTC_TIMESTAMP(CONCAT_WS('-', SUBSTR(CAST(valid_end_date AS STRING), 1, 4), SUBSTR(CAST(valid_end_date AS STRING), 5, 2), SUBSTR(CAST(valid_end_date AS STRING), 7, 2)), 'UTC') AS valid_end_date, - invalid_reason + nullif(invalid_reason, '') AS invalid_reason FROM omop_cdm.source_to_concept_map; CREATE TABLE omop_cdm_parquet.drug_strength @@ -90,7 +90,7 @@ SELECT box_size, TO_UTC_TIMESTAMP(CONCAT_WS('-', SUBSTR(CAST(valid_start_date AS STRING), 1, 4), SUBSTR(CAST(valid_start_date AS STRING), 5, 2), SUBSTR(CAST(valid_start_date AS STRING), 7, 2)), 'UTC') AS valid_start_date, TO_UTC_TIMESTAMP(CONCAT_WS('-', SUBSTR(CAST(valid_end_date AS STRING), 1, 4), SUBSTR(CAST(valid_end_date AS STRING), 5, 2), SUBSTR(CAST(valid_end_date AS STRING), 7, 2)), 'UTC') AS valid_end_date, - invalid_reason + nullif(invalid_reason, '') AS invalid_reason FROM omop_cdm.drug_strength; CREATE TABLE omop_cdm_parquet.cohort_definition diff --git a/Impala/OMOP_Parquet_v5.1.sql b/Impala/OMOP_Parquet_v5.1.sql index ed89658..6c1b447 100644 --- a/Impala/OMOP_Parquet_v5.1.sql +++ b/Impala/OMOP_Parquet_v5.1.sql @@ -15,7 +15,7 @@ SELECT concept_code, TO_UTC_TIMESTAMP(CONCAT_WS('-', SUBSTR(CAST(valid_start_date AS STRING), 1, 4), SUBSTR(CAST(valid_start_date AS STRING), 5, 2), SUBSTR(CAST(valid_start_date AS STRING), 7, 2)), 'UTC') AS valid_start_date, TO_UTC_TIMESTAMP(CONCAT_WS('-', SUBSTR(CAST(valid_end_date AS STRING), 1, 4), SUBSTR(CAST(valid_end_date AS STRING), 5, 2), SUBSTR(CAST(valid_end_date AS STRING), 7, 2)), 'UTC') AS valid_end_date, - invalid_reason + nullif(invalid_reason, '') AS invalid_reason FROM omop_cdm.concept; CREATE TABLE omop_cdm_parquet.vocabulary @@ -42,7 +42,7 @@ SELECT relationship_id, TO_UTC_TIMESTAMP(CONCAT_WS('-', SUBSTR(CAST(valid_start_date AS STRING), 1, 4), SUBSTR(CAST(valid_start_date AS STRING), 5, 2), SUBSTR(CAST(valid_start_date AS STRING), 7, 2)), 'UTC') AS valid_start_date, TO_UTC_TIMESTAMP(CONCAT_WS('-', SUBSTR(CAST(valid_end_date AS STRING), 1, 4), SUBSTR(CAST(valid_end_date AS STRING), 5, 2), SUBSTR(CAST(valid_end_date AS STRING), 7, 2)), 'UTC') AS valid_end_date, - invalid_reason + nullif(invalid_reason, '') AS invalid_reason FROM omop_cdm.concept_relationship; CREATE TABLE omop_cdm_parquet.relationship @@ -72,7 +72,7 @@ SELECT target_vocabulary_id, TO_UTC_TIMESTAMP(CONCAT_WS('-', SUBSTR(CAST(valid_start_date AS STRING), 1, 4), SUBSTR(CAST(valid_start_date AS STRING), 5, 2), SUBSTR(CAST(valid_start_date AS STRING), 7, 2)), 'UTC') AS valid_start_date, TO_UTC_TIMESTAMP(CONCAT_WS('-', SUBSTR(CAST(valid_end_date AS STRING), 1, 4), SUBSTR(CAST(valid_end_date AS STRING), 5, 2), SUBSTR(CAST(valid_end_date AS STRING), 7, 2)), 'UTC') AS valid_end_date, - invalid_reason + nullif(invalid_reason, '') AS invalid_reason FROM omop_cdm.source_to_concept_map; CREATE TABLE omop_cdm_parquet.drug_strength @@ -90,7 +90,7 @@ SELECT box_size, TO_UTC_TIMESTAMP(CONCAT_WS('-', SUBSTR(CAST(valid_start_date AS STRING), 1, 4), SUBSTR(CAST(valid_start_date AS STRING), 5, 2), SUBSTR(CAST(valid_start_date AS STRING), 7, 2)), 'UTC') AS valid_start_date, TO_UTC_TIMESTAMP(CONCAT_WS('-', SUBSTR(CAST(valid_end_date AS STRING), 1, 4), SUBSTR(CAST(valid_end_date AS STRING), 5, 2), SUBSTR(CAST(valid_end_date AS STRING), 7, 2)), 'UTC') AS valid_end_date, - invalid_reason + nullif(invalid_reason, '') AS invalid_reason FROM omop_cdm.drug_strength; CREATE TABLE omop_cdm_parquet.cohort_definition From f25f170b8e10339cb5fd0cb04e77be9382f03d3f Mon Sep 17 00:00:00 2001 From: clairblacketer Date: Wed, 12 Jul 2017 15:44:45 -0400 Subject: [PATCH 15/17] Update readme with notes on bugfix --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 79f2aab..992c41e 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,13 @@ -Common Data Model v5.1.0 +Common Data Model v5.1.1 ================= See full CDM specification file on our github [wiki](https://github.com/OHDSI/CommonDataModel/wiki) or in the [CDM V5.1.0 PDF](https://github.com/OHDSI/CommonDataModel/blob/master/OMOP_CDM_v5_1_0.pdf) -Release Notes +Release Notes for v5.1.1 +============= +This version has a small bug-fix for impala to make it compatible with ATLAS cohort generation. + +Release Notes for v5.1.0 ============= This version is based on the CDM working group proposal [#60](https://github.com/OHDSI/CommonDataModel/issues/60) and [#59](https://github.com/OHDSI/CommonDataModel/issues/59) and is **backwards compatibile with v5.0.1**. The proposed and accepted changes include adding a datetime field to every table that had a date column and adding field DENOMINATOR_VALUE to the DRUG_STRENGTH table. These were the new columns added: From 12131ed4e321c8833c2866ea80232b6a636ac83b Mon Sep 17 00:00:00 2001 From: clairblacketer Date: Wed, 12 Jul 2017 15:47:13 -0400 Subject: [PATCH 16/17] Updating pdf documentation to reflect v5.1.1. --- OMOP_CDM_v5_1_0.pdf => OMOP_CDM_v5_1_1.pdf | Bin 1 file changed, 0 insertions(+), 0 deletions(-) rename OMOP_CDM_v5_1_0.pdf => OMOP_CDM_v5_1_1.pdf (100%) diff --git a/OMOP_CDM_v5_1_0.pdf b/OMOP_CDM_v5_1_1.pdf similarity index 100% rename from OMOP_CDM_v5_1_0.pdf rename to OMOP_CDM_v5_1_1.pdf From f5903ad2cc8c642a766051c904e070683cbe2bd1 Mon Sep 17 00:00:00 2001 From: clairblacketer Date: Wed, 12 Jul 2017 15:51:12 -0400 Subject: [PATCH 17/17] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 992c41e..19f459c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ Common Data Model v5.1.1 ================= -See full CDM specification file on our github [wiki](https://github.com/OHDSI/CommonDataModel/wiki) or in the [CDM V5.1.0 PDF](https://github.com/OHDSI/CommonDataModel/blob/master/OMOP_CDM_v5_1_0.pdf) +See full CDM specification file on our github [wiki](https://github.com/OHDSI/CommonDataModel/wiki) or in the [CDM V5.1.1 PDF](https://github.com/OHDSI/CommonDataModel/blob/master/OMOP_CDM_v5_1_1.pdf) Release Notes for v5.1.1 =============