parent
29b0899b74
commit
17d0bfcf5f
|
@ -330,7 +330,12 @@ CREATE TABLE visit_occurrence (
|
|||
provider_id INTEGER,
|
||||
care_site_id INTEGER,
|
||||
visit_source_value VARCHAR(50),
|
||||
visit_source_concept_id INTEGER
|
||||
visit_source_concept_id INTEGER,
|
||||
admitting_source_concept_id INTEGER,
|
||||
admitting_source_value VARCHAR(50),
|
||||
discharge_to_concept_id INTEGER(50),
|
||||
discharge_to_source_value VARCHAR(50),
|
||||
preceding_visit_occurrence_id INTEGER
|
||||
)
|
||||
ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
|
||||
TBLPROPERTIES ("skip.header.line.count"="1")
|
||||
|
|
|
@ -213,7 +213,12 @@ SELECT
|
|||
provider_id,
|
||||
care_site_id,
|
||||
visit_source_value,
|
||||
visit_source_concept_id
|
||||
visit_source_concept_id,
|
||||
admitting_source_concept_id,
|
||||
admitting_source_value,
|
||||
discharge_to_concept_id,
|
||||
discharge_to_source_value,
|
||||
preceding_visit_occurrence_id
|
||||
FROM omop_cdm.visit_occurrence;
|
||||
|
||||
CREATE TABLE omop_cdm_parquet.procedure_occurrence
|
||||
|
|
|
@ -323,6 +323,10 @@ ALTER TABLE visit_occurrence ADD CONSTRAINT fpk_visit_care_site FOREIGN KEY (car
|
|||
|
||||
ALTER TABLE visit_occurrence ADD CONSTRAINT fpk_visit_concept_s FOREIGN KEY (visit_source_concept_id) REFERENCES concept (concept_id);
|
||||
|
||||
ALTER TABLE visit_occurrence ADD CONSTRAINT fpk_visit_admitting_s FOREIGN KEY (admitting_source_concept_id) REFERENCES concept (concept_id);
|
||||
|
||||
ALTER TABLE visit_occurrence ADD CONSTRAINT fpk_visit_discharge FOREIGN KEY (discharge_to_concept_id) REFERENCES concept (concept_id);
|
||||
|
||||
|
||||
ALTER TABLE procedure_occurrence ADD CONSTRAINT fpk_procedure_person FOREIGN KEY (person_id) REFERENCES person (person_id);
|
||||
|
||||
|
|
|
@ -312,7 +312,12 @@ CREATE TABLE visit_occurrence
|
|||
provider_id INTEGER NULL,
|
||||
care_site_id INTEGER NULL,
|
||||
visit_source_value VARCHAR(50) NULL,
|
||||
visit_source_concept_id INTEGER NULL
|
||||
visit_source_concept_id INTEGER NULL,
|
||||
admitting_source_concept_id INTEGER NULL ,
|
||||
admitting_source_value VARCHAR(50) NULL ,
|
||||
discharge_to_concept_id INTEGER(50) NULL ,
|
||||
discharge_to_source_value VARCHAR(50) NULL ,
|
||||
preceding_visit_occurrence_id INTEGER NULL
|
||||
)
|
||||
;
|
||||
|
||||
|
|
|
@ -322,6 +322,10 @@ ALTER TABLE visit_occurrence ADD CONSTRAINT fpk_visit_care_site FOREIGN KEY (car
|
|||
|
||||
ALTER TABLE visit_occurrence ADD CONSTRAINT fpk_visit_concept_s FOREIGN KEY (visit_source_concept_id) REFERENCES concept (concept_id);
|
||||
|
||||
ALTER TABLE visit_occurrence ADD CONSTRAINT fpk_visit_admitting_s FOREIGN KEY (admitting_source_concept_id) REFERENCES concept (concept_id);
|
||||
|
||||
ALTER TABLE visit_occurrence ADD CONSTRAINT fpk_visit_discharge FOREIGN KEY (discharge_to_concept_id) REFERENCES concept (concept_id);
|
||||
|
||||
|
||||
ALTER TABLE procedure_occurrence ADD CONSTRAINT fpk_procedure_person FOREIGN KEY (person_id) REFERENCES person (person_id);
|
||||
|
||||
|
|
|
@ -305,14 +305,19 @@ CREATE TABLE visit_occurrence
|
|||
person_id INTEGER NOT NULL ,
|
||||
visit_concept_id INTEGER NOT NULL ,
|
||||
visit_start_date DATE NOT NULL ,
|
||||
visit_start_datetime TIMESTAMP NULL ,
|
||||
visit_start_datetime TIMESTAMP NULL ,
|
||||
visit_end_date DATE NOT NULL ,
|
||||
visit_end_datetime TIMESTAMP NULL ,
|
||||
visit_end_datetime TIMESTAMP NULL ,
|
||||
visit_type_concept_id INTEGER NOT NULL ,
|
||||
provider_id INTEGER NULL,
|
||||
care_site_id INTEGER NULL,
|
||||
visit_source_value VARCHAR(50) NULL,
|
||||
visit_source_concept_id INTEGER NULL
|
||||
visit_source_concept_id INTEGER NULL ,
|
||||
admitting_source_concept_id INTEGER NULL ,
|
||||
admitting_source_value VARCHAR(50) NULL ,
|
||||
discharge_to_concept_id INTEGER(50) NULL ,
|
||||
discharge_to_source_value VARCHAR(50) NULL ,
|
||||
preceding_visit_occurrence_id INTEGER NULL
|
||||
)
|
||||
;
|
||||
|
||||
|
|
16
README.md
16
README.md
|
@ -7,11 +7,17 @@ See full CDM specification file on our github [wiki](https://github.com/OHDSI/Co
|
|||
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
|
||||
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:
|
||||
* [#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
|
||||
* [#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
|
||||
|
||||
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:
|
||||
|
||||
|
||||
---------
|
||||
|
|
|
@ -322,6 +322,10 @@ ALTER TABLE visit_occurrence ADD CONSTRAINT fpk_visit_care_site FOREIGN KEY (car
|
|||
|
||||
ALTER TABLE visit_occurrence ADD CONSTRAINT fpk_visit_concept_s FOREIGN KEY (visit_source_concept_id) REFERENCES concept (concept_id);
|
||||
|
||||
ALTER TABLE visit_occurrence ADD CONSTRAINT fpk_visit_admitting_s FOREIGN KEY (admitting_source_concept_id) REFERENCES concept (concept_id);
|
||||
|
||||
ALTER TABLE visit_occurrence ADD CONSTRAINT fpk_visit_discharge FOREIGN KEY (discharge_to_concept_id) REFERENCES concept (concept_id);
|
||||
|
||||
|
||||
ALTER TABLE procedure_occurrence ADD CONSTRAINT fpk_procedure_person FOREIGN KEY (person_id) REFERENCES person (person_id);
|
||||
|
||||
|
|
|
@ -313,6 +313,11 @@ CREATE TABLE visit_occurrence
|
|||
care_site_id INTEGER NULL,
|
||||
visit_source_value VARCHAR(50) NULL,
|
||||
visit_source_concept_id INTEGER NULL
|
||||
admitting_source_concept_id INTEGER NULL ,
|
||||
admitting_source_value VARCHAR(50) NULL ,
|
||||
discharge_to_concept_id INTEGER(50) NULL ,
|
||||
discharge_to_source_value VARCHAR(50) NULL ,
|
||||
preceding_visit_occurrence_id INTEGER NULL
|
||||
)
|
||||
;
|
||||
|
||||
|
|
Loading…
Reference in New Issue