Addresses cdm proposal #84
This commit is contained in:
parent
17d0bfcf5f
commit
19150d2720
|
@ -420,7 +420,9 @@ CREATE TABLE condition_occurrence (
|
|||
provider_id INTEGER,
|
||||
visit_occurrence_id INTEGER,
|
||||
condition_source_value VARCHAR(50),
|
||||
condition_source_concept_id INTEGER
|
||||
condition_source_concept_id INTEGER,
|
||||
condition_status_source_value VARCHAR(50),
|
||||
condition_status_concept_id INTEGER
|
||||
)
|
||||
ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
|
||||
TBLPROPERTIES ("skip.header.line.count"="1")
|
||||
|
|
|
@ -304,7 +304,9 @@ SELECT
|
|||
provider_id,
|
||||
visit_occurrence_id,
|
||||
condition_source_value,
|
||||
condition_source_concept_id
|
||||
condition_source_concept_id,
|
||||
condition_status_source_value,
|
||||
condition_status_concept_id
|
||||
FROM omop_cdm.condition_occurrence;
|
||||
|
||||
CREATE TABLE omop_cdm_parquet.measurement
|
||||
|
|
|
@ -385,6 +385,8 @@ ALTER TABLE condition_occurrence ADD CONSTRAINT fpk_condition_visit FOREIGN KEY
|
|||
|
||||
ALTER TABLE condition_occurrence ADD CONSTRAINT fpk_condition_concept_s FOREIGN KEY (condition_source_concept_id) REFERENCES concept (concept_id);
|
||||
|
||||
ALTER TABLE condition_occurrence ADD CONSTRAINT fpk_condition_status_concept FOREIGN KEY (condition_status_concept_id) REFERENCES concept (concept_id);
|
||||
|
||||
|
||||
ALTER TABLE measurement ADD CONSTRAINT fpk_measurement_person FOREIGN KEY (person_id) REFERENCES person (person_id);
|
||||
|
||||
|
|
|
@ -405,7 +405,9 @@ CREATE TABLE condition_occurrence
|
|||
provider_id INTEGER NULL ,
|
||||
visit_occurrence_id INTEGER NULL ,
|
||||
condition_source_value VARCHAR(50) NULL ,
|
||||
condition_source_concept_id INTEGER NULL
|
||||
condition_source_concept_id INTEGER NULL ,
|
||||
condition_status_source_value VARCHAR(50) NULL ,
|
||||
condition_status_concept_id INTEGER NULL
|
||||
)
|
||||
;
|
||||
|
||||
|
|
|
@ -384,6 +384,8 @@ ALTER TABLE condition_occurrence ADD CONSTRAINT fpk_condition_visit FOREIGN KEY
|
|||
|
||||
ALTER TABLE condition_occurrence ADD CONSTRAINT fpk_condition_concept_s FOREIGN KEY (condition_source_concept_id) REFERENCES concept (concept_id);
|
||||
|
||||
ALTER TABLE condition_occurrence ADD CONSTRAINT fpk_condition_status_concept FOREIGN KEY (condition_status_concept_id) REFERENCES concept (concept_id);
|
||||
|
||||
|
||||
ALTER TABLE measurement ADD CONSTRAINT fpk_measurement_person FOREIGN KEY (person_id) REFERENCES person (person_id);
|
||||
|
||||
|
|
|
@ -405,7 +405,9 @@ CREATE TABLE condition_occurrence
|
|||
provider_id INTEGER NULL ,
|
||||
visit_occurrence_id INTEGER NULL ,
|
||||
condition_source_value VARCHAR(50) NULL ,
|
||||
condition_source_concept_id INTEGER NULL
|
||||
condition_source_concept_id INTEGER NULL ,
|
||||
condition_status_source_value VARCHAR(50) NULL ,
|
||||
condition_status_concept_id INTEGER NULL
|
||||
)
|
||||
;
|
||||
|
||||
|
|
|
@ -9,13 +9,16 @@ Release Notes for v5.2.0
|
|||
This version is based on the CDM working group proposals:
|
||||
* [#71](https://github.com/OHDSI/CommonDataModel/issues/71) Adds the field VERBATIM_END_DATE to DRUG_EXPOSURE and makes DRUG_EXPOSURE_END_DATE a required field
|
||||
* [#73](https://github.com/OHDSI/CommonDataModel/issues/73) Removes EFFECTIVE_DRUG_DOSE and DOSE_UNIT_CONCEPT_ID from DRUG_EXPOSURE
|
||||
* [#75] (https://github.com/OHDSI/CommonDataModel/issues/75) Adds the field BOX_SIZE to DRUG_STRENGTH
|
||||
* [#75](https://github.com/OHDSI/CommonDataModel/issues/75) Adds the field BOX_SIZE to DRUG_STRENGTH
|
||||
* [#83](https://github.com/OHDSI/CommonDataModel/issues/83) Adds the following fields to VISIT_OCCURRENCE:
|
||||
* ADMITTING_SOURCE_CONCEPT_ID
|
||||
* ADMITTING_SOURCE_VALUE
|
||||
* DISCHARGE_TO_CONCEPT_ID
|
||||
* DISCHARGE_TO_SOURCE_VALUE
|
||||
* PRECEDING_VISIT_OCCURRENCE_ID
|
||||
* [#84](https://github.com/OHDSI/CommonDataModel/issues/84) Adds the following fields to CONDITION_OCCURRENCE:
|
||||
* CONDITION_STATUS_CONCEPT_ID
|
||||
* CONDITION_STATUS_SOURCE_VALUE
|
||||
|
||||
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:
|
||||
|
||||
|
|
|
@ -384,6 +384,8 @@ ALTER TABLE condition_occurrence ADD CONSTRAINT fpk_condition_visit FOREIGN KEY
|
|||
|
||||
ALTER TABLE condition_occurrence ADD CONSTRAINT fpk_condition_concept_s FOREIGN KEY (condition_source_concept_id) REFERENCES concept (concept_id);
|
||||
|
||||
ALTER TABLE condition_occurrence ADD CONSTRAINT fpk_condition_status_concept FOREIGN KEY (condition_status_concept_id) REFERENCES concept (concept_id);
|
||||
|
||||
|
||||
ALTER TABLE measurement ADD CONSTRAINT fpk_measurement_person FOREIGN KEY (person_id) REFERENCES person (person_id);
|
||||
|
||||
|
|
|
@ -405,7 +405,9 @@ CREATE TABLE condition_occurrence
|
|||
provider_id INTEGER NULL ,
|
||||
visit_occurrence_id INTEGER NULL ,
|
||||
condition_source_value VARCHAR(50) NULL ,
|
||||
condition_source_concept_id INTEGER NULL
|
||||
condition_source_concept_id INTEGER NULL ,
|
||||
condition_status_source_value VARCHAR(50) NULL ,
|
||||
condition_status_concept_id INTEGER NULL
|
||||
)
|
||||
;
|
||||
|
||||
|
|
Loading…
Reference in New Issue