Skip to content

Commit 2ab4be7

Browse files
committed
New cost table instead of individual cost tables
1 parent 28fddb8 commit 2ab4be7

File tree

3 files changed

+97
-12
lines changed

3 files changed

+97
-12
lines changed

Oracle/OMOP CDM ddl - Oracle.sql

+33-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*********************************************************************************
2-
# Copyright 2014 Observational Health Data Sciences and Informatics
2+
# Copyright 2014-6 Observational Health Data Sciences and Informatics
33
#
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -28,9 +28,9 @@
2828
2929
script to create OMOP common data model, version 5.0 for Oracle database
3030
31-
last revised: 12 Oct 2014
31+
last revised: 1-May-2016
3232
33-
author: Patrick Ryan
33+
Authors: Patrick Ryan, Christian Reich
3434
3535
3636
*************************/
@@ -551,7 +551,8 @@ CREATE TABLE payer_plan_period
551551
;
552552

553553

554-
554+
-- The individual cost tables are phased out and will be removed
555+
/*
555556
CREATE TABLE visit_cost
556557
(
557558
visit_cost_id INTEGER NOT NULL ,
@@ -628,6 +629,34 @@ CREATE TABLE device_cost
628629
payer_plan_period_id INTEGER NULL
629630
)
630631
;
632+
*/
633+
634+
635+
CREATE TABLE cost
636+
(
637+
cost_id INTEGER NOT NULL ,
638+
cost_event_id INTEGER NOT NULL ,
639+
cost_domain_id VARCHAR2(20) NOT NULL ,
640+
cost_type_concept_id INTEGER NOT NULL ,
641+
currency_concept_id INTEGER NULL ,
642+
total_charge FLOAT NULL ,
643+
total_cost FLOAT NULL ,
644+
total_paid FLOAT NULL ,
645+
paid_by_payer FLOAT NULL ,
646+
paid_by_patient FLOAT NULL ,
647+
paid_patient_copay FLOAT NULL ,
648+
paid_patient_coinsurance FLOAT NULL ,
649+
paid_patient_deductible FLOAT NULL ,
650+
paid_by_primary FLOAT NULL ,
651+
paid_ingredient_cost FLOAT NULL ,
652+
paid_dispensing_fee FLOAT NULL ,
653+
payer_plan_period_id INTEGER NULL ,
654+
amount_allowed FLOAT NULL ,
655+
revenue_code_concept_id INTEGER NULL ,
656+
reveue_code_source_value VARCHAR2(50) NULL
657+
)
658+
;
659+
631660

632661

633662

PostgreSQL/OMOP CDM ddl - PostgreSQL.sql

+32-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*********************************************************************************
2-
# Copyright 2014 Observational Health Data Sciences and Informatics
2+
# Copyright 2014-6 Observational Health Data Sciences and Informatics
33
#
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -28,9 +28,9 @@
2828
2929
script to create OMOP common data model, version 5.0 for PostgreSQL database
3030
31-
last revised: 12 Oct 2014
31+
last revised: 1-May-2016
3232
33-
author: Patrick Ryan
33+
Authors: Patrick Ryan, Christian Reich
3434
3535
3636
*************************/
@@ -551,6 +551,7 @@ CREATE TABLE payer_plan_period
551551
;
552552

553553

554+
/* The individual cost tables are being phased out and will disappear soon
554555
555556
CREATE TABLE visit_cost
556557
(
@@ -628,6 +629,34 @@ CREATE TABLE device_cost
628629
payer_plan_period_id INTEGER NULL
629630
)
630631
;
632+
*/
633+
634+
635+
CREATE TABLE cost
636+
(
637+
cost_id INTEGER NOT NULL ,
638+
cost_event_id INTEGER NOT NULL ,
639+
cost_domain_id VARCHAR(20) NOT NULL ,
640+
cost_type_concept_id INTEGER NOT NULL ,
641+
currency_concept_id INTEGER NULL ,
642+
total_charge NUMERIC NULL ,
643+
total_cost NUMERIC NULL ,
644+
total_paid NUMERIC NULL ,
645+
paid_by_payer NUMERIC NULL ,
646+
paid_by_patient NUMERIC NULL ,
647+
paid_patient_copay NUMERIC NULL ,
648+
paid_patient_coinsurance NUMERIC NULL ,
649+
paid_patient_deductible NUMERIC NULL ,
650+
paid_by_primary NUMERIC NULL ,
651+
paid_ingredient_cost NUMERIC NULL ,
652+
paid_dispensing_fee NUMERIC NULL ,
653+
payer_plan_period_id INTEGER NULL ,
654+
amount_allowed NUMERIC NULL ,
655+
revenue_code_concept_id INTEGER NULL ,
656+
reveue_code_source_value VARCHAR(50) NULL
657+
)
658+
;
659+
631660

632661

633662

Sql Server/OMOP CDM ddl - SQL Server.sql

+32-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*********************************************************************************
2-
# Copyright 2014 Observational Health Data Sciences and Informatics
2+
# Copyright 2014-6 Observational Health Data Sciences and Informatics
33
#
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -28,9 +28,9 @@
2828
2929
script to create OMOP common data model, version 5.0 for SQL Server database
3030
31-
last revised: 12 Oct 2014
31+
last revised: 1-May-2016
3232
33-
author: Patrick Ryan
33+
Authors: Patrick Ryan, Christian Reich
3434
3535
3636
*************************/
@@ -551,6 +551,7 @@ CREATE TABLE payer_plan_period
551551
;
552552

553553

554+
/* The individual cost tables are being phased out and will disappear
554555
555556
CREATE TABLE visit_cost
556557
(
@@ -611,8 +612,6 @@ CREATE TABLE drug_cost
611612
612613
613614
614-
615-
616615
CREATE TABLE device_cost
617616
(
618617
device_cost_id INTEGER NOT NULL ,
@@ -628,6 +627,34 @@ CREATE TABLE device_cost
628627
payer_plan_period_id INTEGER NULL
629628
)
630629
;
630+
*/
631+
632+
633+
CREATE TABLE cost
634+
(
635+
cost_id INTEGER NOT NULL ,
636+
cost_event_id INTEGER NOT NULL ,
637+
cost_domain_id VARCHAR(20) NOT NULL ,
638+
cost_type_concept_id INTEGER NOT NULL ,
639+
currency_concept_id INTEGER NULL ,
640+
total_charge FLOAT NULL ,
641+
total_cost FLOAT NULL ,
642+
total_paid FLOAT NULL ,
643+
paid_by_payer FLOAT NULL ,
644+
paid_by_patient FLOAT NULL ,
645+
paid_patient_copay FLOAT NULL ,
646+
paid_patient_coinsurance FLOAT NULL ,
647+
paid_patient_deductible FLOAT NULL ,
648+
paid_by_primary FLOAT NULL ,
649+
paid_ingredient_cost FLOAT NULL ,
650+
paid_dispensing_fee FLOAT NULL ,
651+
payer_plan_period_id INTEGER NULL ,
652+
amount_allowed FLOAT NULL ,
653+
revenue_code_concept_id INTEGER NULL ,
654+
reveue_code_source_value VARCHAR(50) NULL
655+
)
656+
;
657+
631658

632659

633660

0 commit comments

Comments
 (0)