diff --git a/Oracle/OMOP CDM ddl - Oracle.sql b/Oracle/OMOP CDM ddl - Oracle.sql index d955db3..e619552 100644 --- a/Oracle/OMOP CDM ddl - Oracle.sql +++ b/Oracle/OMOP CDM ddl - Oracle.sql @@ -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"); @@ -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 *************************/ @@ -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 , @@ -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 + ) +; + diff --git a/PostgreSQL/OMOP CDM ddl - PostgreSQL.sql b/PostgreSQL/OMOP CDM ddl - PostgreSQL.sql index f9b5389..fd66f62 100644 --- a/PostgreSQL/OMOP CDM ddl - PostgreSQL.sql +++ b/PostgreSQL/OMOP CDM ddl - PostgreSQL.sql @@ -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"); @@ -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 *************************/ @@ -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 ( @@ -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 + ) +; + diff --git a/Sql Server/OMOP CDM ddl - SQL Server.sql b/Sql Server/OMOP CDM ddl - SQL Server.sql index 544cab6..35c17c1 100644 --- a/Sql Server/OMOP CDM ddl - SQL Server.sql +++ b/Sql Server/OMOP CDM ddl - SQL Server.sql @@ -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"); @@ -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 *************************/ @@ -551,6 +551,7 @@ CREATE TABLE payer_plan_period ; +/* The individual cost tables are being phased out and will disappear CREATE TABLE visit_cost ( @@ -611,8 +612,6 @@ CREATE TABLE drug_cost - - CREATE TABLE device_cost ( device_cost_id INTEGER NOT NULL , @@ -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 + ) +; +