Skip to content

Commit

Permalink
New cost table instead of individual cost tables
Browse files Browse the repository at this point in the history
  • Loading branch information
cgreich committed May 2, 2016
1 parent 28fddb8 commit 2ab4be7
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 12 deletions.
37 changes: 33 additions & 4 deletions Oracle/OMOP CDM ddl - Oracle.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*********************************************************************************
# Copyright 2014 Observational Health Data Sciences and Informatics
# Copyright 2014-6 Observational Health Data Sciences and Informatics
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -28,9 +28,9 @@
script to create OMOP common data model, version 5.0 for Oracle database
last revised: 12 Oct 2014
last revised: 1-May-2016
author: Patrick Ryan
Authors: Patrick Ryan, Christian Reich
*************************/
Expand Down Expand Up @@ -551,7 +551,8 @@ CREATE TABLE payer_plan_period
;



-- The individual cost tables are phased out and will be removed
/*
CREATE TABLE visit_cost
(
visit_cost_id INTEGER NOT NULL ,
Expand Down Expand Up @@ -628,6 +629,34 @@ CREATE TABLE device_cost
payer_plan_period_id INTEGER NULL
)
;
*/


CREATE TABLE cost
(
cost_id INTEGER NOT NULL ,
cost_event_id INTEGER NOT NULL ,
cost_domain_id VARCHAR2(20) NOT NULL ,
cost_type_concept_id INTEGER NOT NULL ,
currency_concept_id INTEGER NULL ,
total_charge FLOAT NULL ,
total_cost FLOAT NULL ,
total_paid FLOAT NULL ,
paid_by_payer FLOAT NULL ,
paid_by_patient FLOAT NULL ,
paid_patient_copay FLOAT NULL ,
paid_patient_coinsurance FLOAT NULL ,
paid_patient_deductible FLOAT NULL ,
paid_by_primary FLOAT NULL ,
paid_ingredient_cost FLOAT NULL ,
paid_dispensing_fee FLOAT NULL ,
payer_plan_period_id INTEGER NULL ,
amount_allowed FLOAT NULL ,
revenue_code_concept_id INTEGER NULL ,
reveue_code_source_value VARCHAR2(50) NULL
)
;




Expand Down
35 changes: 32 additions & 3 deletions PostgreSQL/OMOP CDM ddl - PostgreSQL.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*********************************************************************************
# Copyright 2014 Observational Health Data Sciences and Informatics
# Copyright 2014-6 Observational Health Data Sciences and Informatics
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -28,9 +28,9 @@
script to create OMOP common data model, version 5.0 for PostgreSQL database
last revised: 12 Oct 2014
last revised: 1-May-2016
author: Patrick Ryan
Authors: Patrick Ryan, Christian Reich
*************************/
Expand Down Expand Up @@ -551,6 +551,7 @@ CREATE TABLE payer_plan_period
;


/* The individual cost tables are being phased out and will disappear soon
CREATE TABLE visit_cost
(
Expand Down Expand Up @@ -628,6 +629,34 @@ CREATE TABLE device_cost
payer_plan_period_id INTEGER NULL
)
;
*/


CREATE TABLE cost
(
cost_id INTEGER NOT NULL ,
cost_event_id INTEGER NOT NULL ,
cost_domain_id VARCHAR(20) NOT NULL ,
cost_type_concept_id INTEGER NOT NULL ,
currency_concept_id INTEGER NULL ,
total_charge NUMERIC NULL ,
total_cost NUMERIC NULL ,
total_paid NUMERIC NULL ,
paid_by_payer NUMERIC NULL ,
paid_by_patient NUMERIC NULL ,
paid_patient_copay NUMERIC NULL ,
paid_patient_coinsurance NUMERIC NULL ,
paid_patient_deductible NUMERIC NULL ,
paid_by_primary NUMERIC NULL ,
paid_ingredient_cost NUMERIC NULL ,
paid_dispensing_fee NUMERIC NULL ,
payer_plan_period_id INTEGER NULL ,
amount_allowed NUMERIC NULL ,
revenue_code_concept_id INTEGER NULL ,
reveue_code_source_value VARCHAR(50) NULL
)
;




Expand Down
37 changes: 32 additions & 5 deletions Sql Server/OMOP CDM ddl - SQL Server.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*********************************************************************************
# Copyright 2014 Observational Health Data Sciences and Informatics
# Copyright 2014-6 Observational Health Data Sciences and Informatics
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -28,9 +28,9 @@
script to create OMOP common data model, version 5.0 for SQL Server database
last revised: 12 Oct 2014
last revised: 1-May-2016
author: Patrick Ryan
Authors: Patrick Ryan, Christian Reich
*************************/
Expand Down Expand Up @@ -551,6 +551,7 @@ CREATE TABLE payer_plan_period
;


/* The individual cost tables are being phased out and will disappear
CREATE TABLE visit_cost
(
Expand Down Expand Up @@ -611,8 +612,6 @@ CREATE TABLE drug_cost


CREATE TABLE device_cost
(
device_cost_id INTEGER NOT NULL ,
Expand All @@ -628,6 +627,34 @@ CREATE TABLE device_cost
payer_plan_period_id INTEGER NULL
)
;
*/


CREATE TABLE cost
(
cost_id INTEGER NOT NULL ,
cost_event_id INTEGER NOT NULL ,
cost_domain_id VARCHAR(20) NOT NULL ,
cost_type_concept_id INTEGER NOT NULL ,
currency_concept_id INTEGER NULL ,
total_charge FLOAT NULL ,
total_cost FLOAT NULL ,
total_paid FLOAT NULL ,
paid_by_payer FLOAT NULL ,
paid_by_patient FLOAT NULL ,
paid_patient_copay FLOAT NULL ,
paid_patient_coinsurance FLOAT NULL ,
paid_patient_deductible FLOAT NULL ,
paid_by_primary FLOAT NULL ,
paid_ingredient_cost FLOAT NULL ,
paid_dispensing_fee FLOAT NULL ,
payer_plan_period_id INTEGER NULL ,
amount_allowed FLOAT NULL ,
revenue_code_concept_id INTEGER NULL ,
reveue_code_source_value VARCHAR(50) NULL
)
;




Expand Down

0 comments on commit 2ab4be7

Please sign in to comment.