Addressed issue #112

This commit is contained in:
parisni 2017-09-10 02:14:11 +02:00
parent 2420ca1301
commit a1e6feab9d
11 changed files with 743 additions and 802 deletions

View File

@ -15,7 +15,7 @@ Field|Required|Type|Description
|provider_id|No|integer|A foreign key to the provider in the PROVIDER table who initiated of administered the Device.| |provider_id|No|integer|A foreign key to the provider in the PROVIDER table who initiated of administered the Device.|
|visit_occurrence_id|No|integer|A foreign key to the visit in the VISIT table during which the device was used.| |visit_occurrence_id|No|integer|A foreign key to the visit in the VISIT table during which the device was used.|
|device_source_value|No|varchar(50)|The source code for the Device as it appears in the source data. This code is mapped to a standard Device Concept in the Standardized Vocabularies and the original code is stored here for reference.| |device_source_value|No|varchar(50)|The source code for the Device as it appears in the source data. This code is mapped to a standard Device Concept in the Standardized Vocabularies and the original code is stored here for reference.|
|device_source_ concept_id|No|integer|A foreign key to a Device Concept that refers to the code used in the source.| |device_source_concept_id|No|integer|A foreign key to a Device Concept that refers to the code used in the source.|
|visit_detail_id|No|integer|A foreign key to the visit in the visit-detail table during which the Drug Exposure was initiated.| |visit_detail_id|No|integer|A foreign key to the visit in the visit-detail table during which the Drug Exposure was initiated.|
### Conventions ### Conventions

View File

@ -12,7 +12,7 @@ Field | Required | Type | Description
|note_nlp_source_concept_id | no | integer | A foreign key to a Concept that refers to the code in the source vocabulary used by the NLP system| |note_nlp_source_concept_id | no | integer | A foreign key to a Concept that refers to the code in the source vocabulary used by the NLP system|
|nlp_system | No | varchar(250) | Name and version of the NLP system that extracted the term.Useful for data provenance.| |nlp_system | No | varchar(250) | Name and version of the NLP system that extracted the term.Useful for data provenance.|
|nlp_date | Yes | date | The date of the note processing.Useful for data provenance.| |nlp_date | Yes | date | The date of the note processing.Useful for data provenance.|
|nlp_date_time | No | datetime | The date and time of the note processing. Useful for data provenance.| |nlp_datetime | No | datetime | The date and time of the note processing. Useful for data provenance.|
|term_exists | No | varchar(1) | A summary modifier that signifies presence or absence of the term for a given patient. Useful for quick querying. *| |term_exists | No | varchar(1) | A summary modifier that signifies presence or absence of the term for a given patient. Useful for quick querying. *|
|term_temporal | No | varchar(50) | An optional time modifier associated with the extracted term. (for now “past” or “present” only). Standardize it later.| |term_temporal | No | varchar(50) | An optional time modifier associated with the extracted term. (for now “past” or “present” only). Standardize it later.|
|term_modifiers | No | varchar(2000) | A compact description of all the modifiers of the specific term extracted by the NLP system. (e.g. “son has rash” ? “negated=no,subject=family, certainty=undef,conditional=false,general=false”).| |term_modifiers | No | varchar(2000) | A compact description of all the modifiers of the specific term extracted by the NLP system. (e.g. “son has rash” ? “negated=no,subject=family, certainty=undef,conditional=false,general=false”).|

View File

@ -16,7 +16,7 @@ Field|Required|Type|Description
|visit_source_value|No|string(50)|The source code for the visit as it appears in the source data.| |visit_source_value|No|string(50)|The source code for the visit as it appears in the source data.|
|visit_source_concept_id|No|Integer|A foreign key to a Concept that refers to the code used in the source.| |visit_source_concept_id|No|Integer|A foreign key to a Concept that refers to the code used in the source.|
|admitting_source_value |Varchar(50)| No| The source code for the admitting source as it appears in the source data.| |admitting_source_value |Varchar(50)| No| The source code for the admitting source as it appears in the source data.|
|admitting_source_concept_id| |Integer |No |A foreign key to the predefined concept in the Place of Service Vocabulary reflecting the admitting source for a visit.| |admitting_source_concept_id |Integer |No |A foreign key to the predefined concept in the Place of Service Vocabulary reflecting the admitting source for a visit.|
|discharge_to_source_value| Varchar(50)| No| The source code for the discharge disposition as it appears in the source data.| |discharge_to_source_value| Varchar(50)| No| The source code for the discharge disposition as it appears in the source data.|
|discharge_to_concept_id| Integer |No |A foreign key to the predefined concept in the Place of Service Vocabulary reflecting the discharge disposition for a visit.| |discharge_to_concept_id| Integer |No |A foreign key to the predefined concept in the Place of Service Vocabulary reflecting the discharge disposition for a visit.|
|preceding_visit_detail_id |Integer| No |A foreign key to the VISIT_DETAIL table of the visit immediately preceding this visit| |preceding_visit_detail_id |Integer| No |A foreign key to the VISIT_DETAIL table of the visit immediately preceding this visit|

View File

@ -14,7 +14,7 @@ Field|Required|Type|Description
|care_site_id|No|integer|A foreign key to the care site in the care site table that was visited.| |care_site_id|No|integer|A foreign key to the care site in the care site table that was visited.|
|visit_source_value|No|string(50)|The source code for the visit as it appears in the source data.| |visit_source_value|No|string(50)|The source code for the visit as it appears in the source data.|
|visit_source_concept_id|No|Integer|A foreign key to a Concept that refers to the code used in the source.| |visit_source_concept_id|No|Integer|A foreign key to a Concept that refers to the code used in the source.|
|admitting_source_concept_id| |Integer |No |A foreign key to the predefined concept in the Place of Service Vocabulary reflecting the admitting source for a visit.| |admitting_source_concept_id| Integer |No |A foreign key to the predefined concept in the Place of Service Vocabulary reflecting the admitting source for a visit.|
|admitting_source_value |Varchar(50)| No| The source code for the admitting source as it appears in the source data.| |admitting_source_value |Varchar(50)| No| The source code for the admitting source as it appears in the source data.|
|discharge_to_concept_id| Integer |No |A foreign key to the predefined concept in the Place of Service Vocabulary reflecting the discharge disposition for a visit.| |discharge_to_concept_id| Integer |No |A foreign key to the predefined concept in the Place of Service Vocabulary reflecting the discharge disposition for a visit.|
|discharge_to_source_value| Varchar(50)| No| The source code for the discharge disposition as it appears in the source data.| |discharge_to_source_value| Varchar(50)| No| The source code for the discharge disposition as it appears in the source data.|

View File

@ -7,7 +7,7 @@ Field|Required|Type|Description
|cdm_holder|No|varchar(255)|The name of the organization responsible for the development of the CDM instance| |cdm_holder|No|varchar(255)|The name of the organization responsible for the development of the CDM instance|
|source_description|No|CLOB|A description of the source data origin and purpose for collection. The description may contain a summary of the period of time that is expected to be covered by this dataset.| |source_description|No|CLOB|A description of the source data origin and purpose for collection. The description may contain a summary of the period of time that is expected to be covered by this dataset.|
|source_documentation_reference|No|varchar(255)|URL or other external reference to location of source documentation| |source_documentation_reference|No|varchar(255)|URL or other external reference to location of source documentation|
|cdm_etl _reference|No|varchar(255)|URL or other external reference to location of ETL specification documentation and ETL source code| |cdm_etl_reference|No|varchar(255)|URL or other external reference to location of ETL specification documentation and ETL source code|
|source_release_date|No|date|The date for which the source data are most current, such as the last day of data capture| |source_release_date|No|date|The date for which the source data are most current, such as the last day of data capture|
|cdm_release_date|No|date|The date when the CDM was instantiated| |cdm_release_date|No|date|The date when the CDM was instantiated|
|cdm_version|No|varchar(10)|The version of CDM used| |cdm_version|No|varchar(10)|The version of CDM used|

View File

@ -8,7 +8,7 @@ Field|Required|Type|Description
|definition_type_concept_id|Yes|integer|Type defining what kind of Cohort Definition the record represents and how the syntax may be executed| |definition_type_concept_id|Yes|integer|Type defining what kind of Cohort Definition the record represents and how the syntax may be executed|
|cohort_definition_syntax|No|CLOB|Syntax or code to operationalize the Cohort definition| |cohort_definition_syntax|No|CLOB|Syntax or code to operationalize the Cohort definition|
|subject_concept_id|Yes|integer|A foreign key to the Concept to which defines the domain of subjects that are members of the cohort (e.g., Person, Provider, Visit).| |subject_concept_id|Yes|integer|A foreign key to the Concept to which defines the domain of subjects that are members of the cohort (e.g., Person, Provider, Visit).|
|cohort_instantiation_date|No|Date|A date to indicate when the Cohort was instantiated in the COHORT table| |cohort_initiation_date|No|Date|A date to indicate when the Cohort was initiated in the COHORT table|
### Conventions ### Conventions
* The cohort_definition_syntax does not prescribe any specific syntax or programming language. Typically, it would be any flavor SQL, a cohort definition language, or a free-text description of the algorithm. * The cohort_definition_syntax does not prescribe any specific syntax or programming language. Typically, it would be any flavor SQL, a cohort definition language, or a free-text description of the algorithm.

View File

@ -1,6 +1,6 @@
The CONCEPT_SYNONYM table is used to store alternate names and descriptions for Concepts. The CONCEPT_SYNONYM table is used to store alternate names and descriptions for Concepts.
|Field|Required|Type|Description| Field|Required|Type|Description|
:---------------------|:---------|:------------|:------------------------ :---------------------|:---------|:------------|:------------------------
|concept_id|Yes|Integer|A foreign key to the Concept in the CONCEPT table.| |concept_id|Yes|Integer|A foreign key to the Concept in the CONCEPT table.|
|concept_synonym_name|Yes|varchar(1000)|The alternative name for the Concept.| |concept_synonym_name|Yes|varchar(1000)|The alternative name for the Concept.|

View File

@ -1,6 +1,6 @@
The RELATIONSHIP table provides a reference list of all types of relationships that can be used to associate any two concepts in the CONCEPT_RELATIONSHP table. The RELATIONSHIP table provides a reference list of all types of relationships that can be used to associate any two concepts in the CONCEPT_RELATIONSHP table.
|Field|Required|Type|Description| Field|Required|Type|Description|
:-----------------------|:--------|:------------|:----------------------------------------- :-----------------------|:--------|:------------|:-----------------------------------------
|relationship_id|Yes|varchar(20)| The type of relationship captured by the relationship record.| |relationship_id|Yes|varchar(20)| The type of relationship captured by the relationship record.|
|relationship_name|Yes|varchar(255)| The text that describes the relationship type.| |relationship_name|Yes|varchar(255)| The text that describes the relationship type.|

View File

@ -1,538 +1,443 @@
-- --
--CLINICAL --CLINICAL
-- --
-- VISIT_OCCURRENCE
COMMENT ON COLUMN visit_occurrence.visit_occurrence_id IS 'A unique identifier for each Person'';s visit or encounter at a healthcare provider.';
COMMENT ON COLUMN visit_occurrence.person_id IS 'A foreign key identifier to the Person for whom the visit is recorded. The demographic details of that Person are stored in the PERSON table.';
-- VISIT_OCCURENCE COMMENT ON COLUMN visit_occurrence.visit_concept_id IS 'A foreign key that refers to a visit Concept identifier in the Standardized Vocabularies.';
COMMENT ON COLUMN omop.visit_occurence.visit_occurrence_id IS 'A unique identifier for each Person'';s visit or encounter at a healthcare provider.'; COMMENT ON COLUMN visit_occurrence.visit_start_date IS 'The start date of the visit.';
COMMENT ON COLUMN omop.visit_occurence.person_id IS 'A foreign key identifier to the Person for whom the visit is recorded. The demographic details of that Person are stored in the PERSON table.'; COMMENT ON COLUMN visit_occurrence.visit_start_datetime IS 'The date and time of the visit started.';
COMMENT ON COLUMN omop.visit_occurence.visit_concept_id IS 'A foreign key that refers to a visit Concept identifier in the Standardized Vocabularies.'; COMMENT ON COLUMN visit_occurrence.visit_end_date IS 'The end date of the visit. If this is a one-day visit the end date should match the start date.';
COMMENT ON COLUMN omop.visit_occurence.visit_start_date IS 'The start date of the visit.'; COMMENT ON COLUMN visit_occurrence.visit_end_datetime IS 'The date and time of the visit end.';
COMMENT ON COLUMN omop.visit_occurence.visit_start_datetime IS 'The date and time of the visit started.'; COMMENT ON COLUMN visit_occurrence.visit_type_concept_id IS 'A foreign key to the predefined Concept identifier in the Standardized Vocabularies reflecting the type of source data from which the visit record is derived.';
COMMENT ON COLUMN omop.visit_occurence.visit_end_date IS 'The end date of the visit. If this is a one-day visit the end date should match the start date.'; COMMENT ON COLUMN visit_occurrence.provider_id IS 'A foreign key to the provider in the provider table who was associated with the visit.';
COMMENT ON COLUMN omop.visit_occurence.visit_end_datetime IS 'The date and time of the visit end.'; COMMENT ON COLUMN visit_occurrence.care_site_id IS 'A foreign key to the care site in the care site table that was visited.';
COMMENT ON COLUMN omop.visit_occurence.visit_type_concept_id IS 'A foreign key to the predefined Concept identifier in the Standardized Vocabularies reflecting the type of source data from which the visit record is derived.'; COMMENT ON COLUMN visit_occurrence.visit_source_value IS 'The source code for the visit as it appears in the source data.';
COMMENT ON COLUMN omop.visit_occurence.provider_id IS 'A foreign key to the provider in the provider table who was associated with the visit.'; COMMENT ON COLUMN visit_occurrence.visit_source_concept_id IS 'A foreign key to a Concept that refers to the code used in the source.';
COMMENT ON COLUMN omop.visit_occurence.care_site_id IS 'A foreign key to the care site in the care site table that was visited.'; COMMENT ON COLUMN visit_occurrence.admitting_source_concept_id IS 'A foreign key to the predefined concept in the Place of Service Vocabulary reflecting the admitting source for a visit.';
COMMENT ON COLUMN omop.visit_occurence.visit_source_value IS 'The source code for the visit as it appears in the source data.'; COMMENT ON COLUMN visit_occurrence.admitting_source_value IS 'The source code for the admitting source as it appears in the source data.';
COMMENT ON COLUMN omop.visit_occurence.visit_source_concept_id IS 'A foreign key to a Concept that refers to the code used in the source.'; COMMENT ON COLUMN visit_occurrence.discharge_to_concept_id IS 'A foreign key to the predefined concept in the Place of Service Vocabulary reflecting the discharge disposition for a visit.';
COMMENT ON COLUMN omop.visit_occurence.admitting_source_concept_id| IS 'A foreign key to the predefined concept in the Place of Service Vocabulary reflecting the admitting source for a visit.'; COMMENT ON COLUMN visit_occurrence.discharge_to_source_value IS 'The source code for the discharge disposition as it appears in the source data.';
COMMENT ON COLUMN omop.visit_occurence.admitting_source_value IS ' The source code for the admitting source as it appears in the source data.'; COMMENT ON COLUMN visit_occurrence.preceding_visit_occurrence_id IS 'A foreign key to the VISIT_OCCURRENCE table of the visit immediately preceding this visit';
COMMENT ON COLUMN omop.visit_occurence.discharge_to_concept_id IS 'A foreign key to the predefined concept in the Place of Service Vocabulary reflecting the discharge disposition for a visit.'; -- CONDITION_OCCURRENCE
COMMENT ON COLUMN omop.visit_occurence.discharge_to_source_value IS ' The source code for the discharge disposition as it appears in the source data.'; COMMENT ON COLUMN condition_occurrence. condition_occurrence_id IS 'A unique identifier for each Condition Occurrence event.';
COMMENT ON COLUMN omop.visit_occurence.preceding_visit_occurrence_id IS 'A foreign key to the VISIT_OCCURRENCE table of the visit immediately preceding this visit'; COMMENT ON COLUMN condition_occurrence. person_id IS 'A foreign key identifier to the Person who is experiencing the condition. The demographic details of that Person are stored in the PERSON table.';
COMMENT ON COLUMN condition_occurrence. condition_concept_id IS 'A foreign key that refers to a Standard Condition Concept identifier in the Standardized Vocabularies.';
COMMENT ON COLUMN condition_occurrence. condition_start_date IS 'The date when the instance of the Condition is recorded.';
-- CONDITION_OCCURENCE COMMENT ON COLUMN condition_occurrence. condition_start_datetime IS 'The date and time when the instance of the Condition is recorded.';
COMMENT ON COLUMN omop.condition_occurence. condition_occurrence_id IS ' A unique identifier for each Condition Occurrence event. '; COMMENT ON COLUMN condition_occurrence. condition_end_date IS 'The date when the instance of the Condition is considered to have ended.';
COMMENT ON COLUMN omop.condition_occurence. person_id IS ' A foreign key identifier to the Person who is experiencing the condition. The demographic details of that Person are stored in the PERSON table. '; COMMENT ON COLUMN condition_occurrence. condition_end_datetime IS 'The date when the instance of the Condition is considered to have ended.';
COMMENT ON COLUMN omop.condition_occurence. condition_concept_id IS ' A foreign key that refers to a Standard Condition Concept identifier in the Standardized Vocabularies. '; COMMENT ON COLUMN condition_occurrence. condition_type_concept_id IS 'A foreign key to the predefined Concept identifier in the Standardized Vocabularies reflecting the source data from which the condition was recorded, the level of standardization, and the type of occurrence.';
COMMENT ON COLUMN omop.condition_occurence. condition_start_date IS ' The date when the instance of the Condition is recorded. '; COMMENT ON COLUMN condition_occurrence. stop_reason IS 'The reason that the condition was no longer present, as indicated in the source data.';
COMMENT ON COLUMN omop.condition_occurence. condition_start_datetime IS ' The date and time when the instance of the Condition is recorded. '; COMMENT ON COLUMN condition_occurrence. provider_id IS 'A foreign key to the Provider in the PROVIDER table who was responsible for capturing (diagnosing) the Condition.';
COMMENT ON COLUMN omop.condition_occurence. condition_end_date IS ' The date when the instance of the Condition is considered to have ended. '; COMMENT ON COLUMN condition_occurrence. visit_occurrence_id IS 'A foreign key to the visit in the VISIT_OCCURRENCE table during which the Condition was determined (diagnosed).';
COMMENT ON COLUMN omop.condition_occurence. condition_end_datetime IS ' The date when the instance of the Condition is considered to have ended. '; COMMENT ON COLUMN condition_occurrence. visit_detail_id IS 'A foreign key to the visit in the VISIT_DETAIL table during which the Condition was determined (diagnosed).';
COMMENT ON COLUMN omop.condition_occurence. condition_type_concept_id IS ' A foreign key to the predefined Concept identifier in the Standardized Vocabularies reflecting the source data from which the condition was recorded, the level of standardization, and the type of occurrence. '; COMMENT ON COLUMN condition_occurrence. condition_source_value IS 'The source code for the condition as it appears in the source data. This code is mapped to a standard condition concept in the Standardized Vocabularies and the original code is stored here for reference.';
COMMENT ON COLUMN omop.condition_occurence. stop_reason IS ' The reason that the condition was no longer present, as indicated in the source data. '; COMMENT ON COLUMN condition_occurrence. condition_source_concept_id IS 'A foreign key to a Condition Concept that refers to the code used in the source.';
COMMENT ON COLUMN omop.condition_occurence. provider_id IS ' A foreign key to the Provider in the PROVIDER table who was responsible for capturing (diagnosing) the Condition. '; COMMENT ON COLUMN condition_occurrence. condition_status_source_value IS 'The source code for the condition status as it appears in the source data.';
COMMENT ON COLUMN omop.condition_occurence. visit_occurrence_id IS ' A foreign key to the visit in the VISIT_OCCURRENCE table during which the Condition was determined (diagnosed). '; COMMENT ON COLUMN condition_occurrence. condition_status_concept_id IS 'A foreign key to the predefined concept in the standard vocabulary reflecting the condition status';
COMMENT ON COLUMN omop.condition_occurence. visit_detail_id IS ' A foreign key to the visit in the VISIT_DETAIL table during which the Condition was determined (diagnosed). ';
COMMENT ON COLUMN omop.condition_occurence. condition_source_value IS ' The source code for the condition as it appears in the source data. This code is mapped to a standard condition concept in the Standardized Vocabularies and the original code is stored here for reference. ';
COMMENT ON COLUMN omop.condition_occurence. condition_source_concept_id IS ' A foreign key to a Condition Concept that refers to the code used in the source. ';
COMMENT ON COLUMN omop.condition_occurence. condition_status_source_value IS ' The source code for the condition status as it appears in the source data. ';
COMMENT ON COLUMN omop.condition_occurence. condition_status_concept_id IS ' A foreign key to the predefined concept in the standard vocabulary reflecting the condition status ';
-- DEATH -- DEATH
COMMENT ON COLUMN omop.death.person_id IS 'A foreign key identifier to the deceased person. The demographic details of that person are stored in the person table.'; COMMENT ON COLUMN death.person_id IS 'A foreign key identifier to the deceased person. The demographic details of that person are stored in the person table.';
COMMENT ON COLUMN omop.death.death_date IS 'The date the person was deceased. If the precise date including day or month is not known or not allowed, December is used as the default month, and the last day of the month the default day.'; COMMENT ON COLUMN death.death_date IS 'The date the person was deceased. If the precise date including day or month is not known or not allowed, December is used as the default month, and the last day of the month the default day.';
COMMENT ON COLUMN omop.death.death_datetime IS 'The date and time the person was deceased. If the precise date including day or month is not known or not allowed, December is used as the default month, and the last day of the month the default day.'; COMMENT ON COLUMN death.death_datetime IS 'The date and time the person was deceased. If the precise date including day or month is not known or not allowed, December is used as the default month, and the last day of the month the default day.';
COMMENT ON COLUMN omop.death.death_type_concept_id IS 'A foreign key referring to the predefined concept identifier in the Standardized Vocabularies reflecting how the death was represented in the source data.'; COMMENT ON COLUMN death.death_type_concept_id IS 'A foreign key referring to the predefined concept identifier in the Standardized Vocabularies reflecting how the death was represented in the source data.';
COMMENT ON COLUMN omop.death.cause_concept_id IS 'A foreign key referring to a standard concept identifier in the Standardized Vocabularies for conditions.'; COMMENT ON COLUMN death.cause_concept_id IS 'A foreign key referring to a standard concept identifier in the Standardized Vocabularies for conditions.';
COMMENT ON COLUMN omop.death.cause_source_value IS 'The source code for the cause of death as it appears in the source data. This code is mapped to a standard concept in the Standardized Vocabularies and the original code is, stored here for reference.'; COMMENT ON COLUMN death.cause_source_value IS 'The source code for the cause of death as it appears in the source data. This code is mapped to a standard concept in the Standardized Vocabularies and the original code is, stored here for reference.';
COMMENT ON COLUMN omop.death.cause_source_concept_id IS 'A foreign key to the concept that refers to the code used in the source. Note, this variable name is abbreviated to ensure it will be allowable across database platforms.'; COMMENT ON COLUMN death.cause_source_concept_id IS 'A foreign key to the concept that refers to the code used in the source. Note, this variable name is abbreviated to ensure it will be allowable across database platforms.';
-- DEVICE_EXPOSURE -- DEVICE_EXPOSURE
COMMENT ON COLUMN omop.device_exposure.device_exposure_id IS 'A system-generated unique identifier for each Device Exposure.'; COMMENT ON COLUMN device_exposure.device_exposure_id IS 'A system-generated unique identifier for each Device Exposure.';
COMMENT ON COLUMN omop.device_exposure.person_id IS 'A foreign key identifier to the Person who is subjected to the Device. The demographic details of that person are stored in the Person table.'; COMMENT ON COLUMN device_exposure.person_id IS 'A foreign key identifier to the Person who is subjected to the Device. The demographic details of that person are stored in the Person table.';
COMMENT ON COLUMN omop.device_exposure.device_concept_id IS 'A foreign key that refers to a Standard Concept identifier in the Standardized Vocabularies for the Device concept.'; COMMENT ON COLUMN device_exposure.device_concept_id IS 'A foreign key that refers to a Standard Concept identifier in the Standardized Vocabularies for the Device concept.';
COMMENT ON COLUMN omop.device_exposure.device_exposure_start_date IS 'The date the Device or supply was applied or used.'; COMMENT ON COLUMN device_exposure.device_exposure_start_date IS 'The date the Device or supply was applied or used.';
COMMENT ON COLUMN omop.device_exposure.device_exposure_start_datetime IS 'The date and time the Device or supply was applied or used.'; COMMENT ON COLUMN device_exposure.device_exposure_start_datetime IS 'The date and time the Device or supply was applied or used.';
COMMENT ON COLUMN omop.device_exposure.device_exposure_end_date IS 'The date the Device or supply was removed from use.'; COMMENT ON COLUMN device_exposure.device_exposure_end_date IS 'The date the Device or supply was removed from use.';
COMMENT ON COLUMN omop.device_exposure.device_exposure_end_datetime IS 'The date and time the Device or supply was removed from use.'; COMMENT ON COLUMN device_exposure.device_exposure_end_datetime IS 'The date and time the Device or supply was removed from use.';
COMMENT ON COLUMN omop.device_exposure.device_type_concept_id IS 'A foreign key to the predefined Concept identifier in the Standardized Vocabularies reflecting the type of Device Exposure recorded. It indicates how the Device Exposure was represented in the source data.'; COMMENT ON COLUMN device_exposure.device_type_concept_id IS 'A foreign key to the predefined Concept identifier in the Standardized Vocabularies reflecting the type of Device Exposure recorded. It indicates how the Device Exposure was represented in the source data.';
COMMENT ON COLUMN omop.device_exposure.unique_device_id IS 'A UDI or equivalent identifying the instance of the Device used in the Person.'; COMMENT ON COLUMN device_exposure.unique_device_id IS 'A UDI or equivalent identifying the instance of the Device used in the Person.';
COMMENT ON COLUMN omop.device_exposure.quantity IS 'The number of individual Devices used for the exposure.'; COMMENT ON COLUMN device_exposure.quantity IS 'The number of individual Devices used for the exposure.';
COMMENT ON COLUMN omop.device_exposure.provider_id IS 'A foreign key to the provider in the PROVIDER table who initiated of administered the Device.'; COMMENT ON COLUMN device_exposure.provider_id IS 'A foreign key to the provider in the PROVIDER table who initiated of administered the Device.';
COMMENT ON COLUMN omop.device_exposure.visit_occurrence_id IS 'A foreign key to the visit in the VISIT table during which the device was used.'; COMMENT ON COLUMN device_exposure.visit_occurrence_id IS 'A foreign key to the visit in the VISIT table during which the device was used.';
COMMENT ON COLUMN omop.device_exposure.device_source_value IS 'The source code for the Device as it appears in the source data. This code is mapped to a standard Device Concept in the Standardized Vocabularies and the original code is stored here for reference.'; COMMENT ON COLUMN device_exposure.device_source_value IS 'The source code for the Device as it appears in the source data. This code is mapped to a standard Device Concept in the Standardized Vocabularies and the original code is stored here for reference.';
COMMENT ON COLUMN omop.device_exposure.device_source_ concept_id IS 'A foreign key to a Device Concept that refers to the code used in the source.'; COMMENT ON COLUMN device_exposure.device_source_concept_id IS 'A foreign key to a Device Concept that refers to the code used in the source.';
COMMENT ON COLUMN omop.device_exposure.visit_detail_id IS 'A foreign key to the visit in the visit-detail table during which the Drug Exposure was initiated.'; COMMENT ON COLUMN device_exposure.visit_detail_id IS 'A foreign key to the visit in the visit-detail table during which the Drug Exposure was initiated.';
-- DRUG_EXPOSURE -- DRUG_EXPOSURE
COMMENT ON COLUMN omop.drug_exposure.drug_exposure_id IS 'A system-generated unique identifier for each Drug utilization event.'; COMMENT ON COLUMN drug_exposure.drug_exposure_id IS 'A system-generated unique identifier for each Drug utilization event.';
COMMENT ON COLUMN omop.drug_exposure.person_id IS 'A foreign key identifier to the person who is subjected to the Drug. The demographic details of that person are stored in the person table.'; COMMENT ON COLUMN drug_exposure.person_id IS 'A foreign key identifier to the person who is subjected to the Drug. The demographic details of that person are stored in the person table.';
COMMENT ON COLUMN omop.drug_exposure.drug_concept_id IS 'A foreign key that refers to a Standard Concept identifier in the Standardized Vocabularies for the Drug concept.'; COMMENT ON COLUMN drug_exposure.drug_concept_id IS 'A foreign key that refers to a Standard Concept identifier in the Standardized Vocabularies for the Drug concept.';
COMMENT ON COLUMN omop.drug_exposure.drug_exposure_start_date IS 'The start date for the current instance of Drug utilization. Valid entries include a start date of a prescription, the date a prescription was filled, or the date on which a Drug administration procedure was recorded.'; COMMENT ON COLUMN drug_exposure.drug_exposure_start_date IS 'The start date for the current instance of Drug utilization. Valid entries include a start date of a prescription, the date a prescription was filled, or the date on which a Drug administration procedure was recorded.';
COMMENT ON COLUMN omop.drug_exposure.drug_exposure_start_datetime IS 'The start date and time for the current instance of Drug utilization. Valid entries include a start date of a prescription, the date a prescription was filled, or the date on which a Drug administration procedure was recorded.'; COMMENT ON COLUMN drug_exposure.drug_exposure_start_datetime IS 'The start date and time for the current instance of Drug utilization. Valid entries include a start date of a prescription, the date a prescription was filled, or the date on which a Drug administration procedure was recorded.';
COMMENT ON COLUMN omop.drug_exposure.drug_exposure_end_date IS 'The end date for the current instance of Drug utilization. It is not available from all sources.'; COMMENT ON COLUMN drug_exposure.drug_exposure_end_date IS 'The end date for the current instance of Drug utilization. It is not available from all sources.';
COMMENT ON COLUMN omop.drug_exposure.drug_exposure_end_datetime IS 'The end date and time for the current instance of Drug utilization. It is not available from all sources.'; COMMENT ON COLUMN drug_exposure.drug_exposure_end_datetime IS 'The end date and time for the current instance of Drug utilization. It is not available from all sources.';
COMMENT ON COLUMN omop.drug_exposure.verbatim_end_date IS 'The known end date of a drug_exposure as provided by the source'; COMMENT ON COLUMN drug_exposure.verbatim_end_date IS 'The known end date of a drug_exposure as provided by the source';
COMMENT ON COLUMN omop.drug_exposure.drug_type_concept_id IS ' A foreign key to the predefined Concept identifier in the Standardized Vocabularies reflecting the type of Drug Exposure recorded. It indicates how the Drug Exposure was represented in the source data.'; COMMENT ON COLUMN drug_exposure.drug_type_concept_id IS 'A foreign key to the predefined Concept identifier in the Standardized Vocabularies reflecting the type of Drug Exposure recorded. It indicates how the Drug Exposure was represented in the source data.';
COMMENT ON COLUMN omop.drug_exposure.stop_reason IS 'The reason the Drug was stopped. Reasons include regimen completed, changed, removed, etc.'; COMMENT ON COLUMN drug_exposure.stop_reason IS 'The reason the Drug was stopped. Reasons include regimen completed, changed, removed, etc.';
COMMENT ON COLUMN omop.drug_exposure.refills IS 'The number of refills after the initial prescription. The initial prescription is not counted, values start with 0.'; COMMENT ON COLUMN drug_exposure.refills IS 'The number of refills after the initial prescription. The initial prescription is not counted, values start with 0.';
COMMENT ON COLUMN omop.drug_exposure.quantity IS 'The quantity of drug as recorded in the original prescription or dispensing record.'; COMMENT ON COLUMN drug_exposure.quantity IS 'The quantity of drug as recorded in the original prescription or dispensing record.';
COMMENT ON COLUMN omop.drug_exposure.days_supply IS 'The number of days of supply of the medication as recorded in the original prescription or dispensing record.'; COMMENT ON COLUMN drug_exposure.days_supply IS 'The number of days of supply of the medication as recorded in the original prescription or dispensing record.';
COMMENT ON COLUMN omop.drug_exposure.sig IS 'The directions ("signetur") on the Drug prescription as recorded in the original prescription (and printed on the container) or dispensing record.'; COMMENT ON COLUMN drug_exposure.sig IS 'The directions ("signetur") on the Drug prescription as recorded in the original prescription (and printed on the container) or dispensing record.';
COMMENT ON COLUMN omop.drug_exposure.route_concept_id IS 'A foreign key to a predefined concept in the Standardized Vocabularies reflecting the route of administration.'; COMMENT ON COLUMN drug_exposure.route_concept_id IS 'A foreign key to a predefined concept in the Standardized Vocabularies reflecting the route of administration.';
COMMENT ON COLUMN omop.drug_exposure.lot_number IS 'An identifier assigned to a particular quantity or lot of Drug product from the manufacturer.'; COMMENT ON COLUMN drug_exposure.lot_number IS 'An identifier assigned to a particular quantity or lot of Drug product from the manufacturer.';
COMMENT ON COLUMN omop.drug_exposure.provider_id IS 'A foreign key to the provider in the provider table who initiated (prescribed or administered) the Drug Exposure.'; COMMENT ON COLUMN drug_exposure.provider_id IS 'A foreign key to the provider in the provider table who initiated (prescribed or administered) the Drug Exposure.';
COMMENT ON COLUMN omop.drug_exposure.visit_occurrence_id IS 'A foreign key to the visit in the visit table during which the Drug Exposure was initiated.'; COMMENT ON COLUMN drug_exposure.visit_occurrence_id IS 'A foreign key to the visit in the visit table during which the Drug Exposure was initiated.';
COMMENT ON COLUMN omop.drug_exposure.drug_source_value IS 'The source code for the Drug as it appears in the source data. This code is mapped to a Standard Drug concept in the Standardized Vocabularies and the original code is, stored here for reference.'; COMMENT ON COLUMN drug_exposure.drug_source_value IS 'The source code for the Drug as it appears in the source data. This code is mapped to a Standard Drug concept in the Standardized Vocabularies and the original code is, stored here for reference.';
COMMENT ON COLUMN omop.drug_exposure.drug_source_concept_id IS 'A foreign key to a Drug Concept that refers to the code used in the source.'; COMMENT ON COLUMN drug_exposure.drug_source_concept_id IS 'A foreign key to a Drug Concept that refers to the code used in the source.';
COMMENT ON COLUMN omop.drug_exposure.route_source_value IS 'The information about the route of administration as detailed in the source.'; COMMENT ON COLUMN drug_exposure.route_source_value IS 'The information about the route of administration as detailed in the source.';
COMMENT ON COLUMN omop.drug_exposure.dose_unit_source_value IS 'The information about the dose unit as detailed in the source.'; COMMENT ON COLUMN drug_exposure.dose_unit_source_value IS 'The information about the dose unit as detailed in the source.';
COMMENT ON COLUMN omop.drug_exposure.visit_detail_id IS 'A foreign key to the visit in the VISIT_DETAIL table during which the Drug Exposure was initiated.'; COMMENT ON COLUMN drug_exposure.visit_detail_id IS 'A foreign key to the visit in the VISIT_DETAIL table during which the Drug Exposure was initiated.';
-- FACT_RELATIONSHIP -- FACT_RELATIONSHIP
COMMENT ON COLUMN omop.FACT_RELATIONSHIP.domain_concept_id_1 IS 'The concept representing the domain of fact one, from which the corresponding table can be inferred.'; COMMENT ON COLUMN FACT_RELATIONSHIP.domain_concept_id_1 IS 'The concept representing the domain of fact one, from which the corresponding table can be inferred.';
COMMENT ON COLUMN omop.FACT_RELATIONSHIP.fact_id_1 IS 'The unique identifier in the table corresponding to the domain of fact one.'; COMMENT ON COLUMN FACT_RELATIONSHIP.fact_id_1 IS 'The unique identifier in the table corresponding to the domain of fact one.';
COMMENT ON COLUMN omop.FACT_RELATIONSHIP.domain_concept_id_2 IS 'The concept representing the domain of fact two, from which the corresponding table can be inferred.'; COMMENT ON COLUMN FACT_RELATIONSHIP.domain_concept_id_2 IS 'The concept representing the domain of fact two, from which the corresponding table can be inferred.';
COMMENT ON COLUMN omop.FACT_RELATIONSHIP.fact_id_2 IS 'The unique identifier in the table corresponding to the domain of fact two.'; COMMENT ON COLUMN FACT_RELATIONSHIP.fact_id_2 IS 'The unique identifier in the table corresponding to the domain of fact two.';
COMMENT ON COLUMN omop.FACT_RELATIONSHIP.relationship_concept_id IS 'A foreign key to a Standard Concept ID of relationship in the Standardized Vocabularies.'; COMMENT ON COLUMN FACT_RELATIONSHIP.relationship_concept_id IS 'A foreign key to a Standard Concept ID of relationship in the Standardized Vocabularies.';
-- MEASUREMENT -- MEASUREMENT
COMMENT ON COLUMN omop.MEASUREMENT.measurement_id IS 'A unique identifier for each Measurement.'; COMMENT ON COLUMN MEASUREMENT.measurement_id IS 'A unique identifier for each Measurement.';
COMMENT ON COLUMN omop.MEASUREMENT.person_id IS 'A foreign key identifier to the Person about whom the measurement was recorded. The demographic details of that Person are stored in the PERSON table.'; COMMENT ON COLUMN MEASUREMENT.person_id IS 'A foreign key identifier to the Person about whom the measurement was recorded. The demographic details of that Person are stored in the PERSON table.';
COMMENT ON COLUMN omop.MEASUREMENT.measurement_concept_id IS 'A foreign key to the standard measurement concept identifier in the Standardized Vocabularies.'; COMMENT ON COLUMN MEASUREMENT.measurement_concept_id IS 'A foreign key to the standard measurement concept identifier in the Standardized Vocabularies.';
COMMENT ON COLUMN omop.MEASUREMENT.measurement_date IS 'The date of the Measurement.'; COMMENT ON COLUMN MEASUREMENT.measurement_date IS 'The date of the Measurement.';
COMMENT ON COLUMN omop.MEASUREMENT.measurement_datetime IS 'The date and time of the Measurement. Some database systems don'';t have a datatype of time. To accomodate all temporal analyses, datatype datetime can be used (combining measurement_date and measurement_time [forum discussion](http://forums.ohdsi.org/t/date-time-and-datetime-problem-and-the-world-of-hours-and-1day/314))'; COMMENT ON COLUMN MEASUREMENT.measurement_datetime IS 'The date and time of the Measurement. Some database systems don'';t have a datatype of time. To accomodate all temporal analyses, datatype datetime can be used (combining measurement_date and measurement_time [forum discussion](http://forums.ohdsi.org/t/date-time-and-datetime-problem-and-the-world-of-hours-and-1day/314))';
COMMENT ON COLUMN omop.MEASUREMENT.measurement_type_concept_id IS 'A foreign key to the predefined Concept in the Standardized Vocabularies reflecting the provenance from where the Measurement record was recorded.'; COMMENT ON COLUMN MEASUREMENT.measurement_type_concept_id IS 'A foreign key to the predefined Concept in the Standardized Vocabularies reflecting the provenance from where the Measurement record was recorded.';
COMMENT ON COLUMN omop.MEASUREMENT.operator_concept_id IS 'A foreign key identifier to the predefined Concept in the Standardized Vocabularies reflecting the mathematical operator that is applied to the value_as_number. Operators are <, <=, =, >=, >.'; COMMENT ON COLUMN MEASUREMENT.operator_concept_id IS 'A foreign key identifier to the predefined Concept in the Standardized Vocabularies reflecting the mathematical operator that is applied to the value_as_number. Operators are <, <=, =, >=, >.';
COMMENT ON COLUMN omop.MEASUREMENT.value_as_number IS 'A Measurement result where the result is expressed as a numeric value.'; COMMENT ON COLUMN MEASUREMENT.value_as_number IS 'A Measurement result where the result is expressed as a numeric value.';
COMMENT ON COLUMN omop.MEASUREMENT.value_as_concept_id IS 'A foreign key to a Measurement result represented as a Concept from the Standardized Vocabularies (e.g., positive/negative, present/absent, low/high, etc.).'; COMMENT ON COLUMN MEASUREMENT.value_as_concept_id IS 'A foreign key to a Measurement result represented as a Concept from the Standardized Vocabularies (e.g., positive/negative, present/absent, low/high, etc.).';
COMMENT ON COLUMN omop.MEASUREMENT.unit_concept_id IS 'A foreign key to a Standard Concept ID of Measurement Units in the Standardized Vocabularies.'; COMMENT ON COLUMN MEASUREMENT.unit_concept_id IS 'A foreign key to a Standard Concept ID of Measurement Units in the Standardized Vocabularies.';
COMMENT ON COLUMN omop.MEASUREMENT.range_low IS 'The lower limit of the normal range of the Measurement result. The lower range is assumed to be of the same unit of measure as the Measurement value.'; COMMENT ON COLUMN MEASUREMENT.range_low IS 'The lower limit of the normal range of the Measurement result. The lower range is assumed to be of the same unit of measure as the Measurement value.';
COMMENT ON COLUMN omop.MEASUREMENT.range_high IS 'The upper limit of the normal range of the Measurement. The upper range is assumed to be of the same unit of measure as the Measurement value.'; COMMENT ON COLUMN MEASUREMENT.range_high IS 'The upper limit of the normal range of the Measurement. The upper range is assumed to be of the same unit of measure as the Measurement value.';
COMMENT ON COLUMN omop.MEASUREMENT.provider_id IS 'A foreign key to the provider in the PROVIDER table who was responsible for initiating or obtaining the measurement.'; COMMENT ON COLUMN MEASUREMENT.provider_id IS 'A foreign key to the provider in the PROVIDER table who was responsible for initiating or obtaining the measurement.';
COMMENT ON COLUMN omop.MEASUREMENT.visit_occurrence_id IS 'A foreign key to the Visit in the VISIT_OCCURRENCE table during which the Measurement was recorded.'; COMMENT ON COLUMN MEASUREMENT.visit_occurrence_id IS 'A foreign key to the Visit in the VISIT_OCCURRENCE table during which the Measurement was recorded.';
COMMENT ON COLUMN omop.MEASUREMENT.visit_detail_id IS 'A foreign key to the Visit in the VISIT_DETAIL table during which the Measurement was recorded. '; COMMENT ON COLUMN MEASUREMENT.visit_detail_id IS 'A foreign key to the Visit in the VISIT_DETAIL table during which the Measurement was recorded.';
COMMENT ON COLUMN omop.MEASUREMENT.measurement_source_value IS 'The Measurement name as it appears in the source data. This code is mapped to a Standard Concept in the Standardized Vocabularies and the original code is stored here for reference.'; COMMENT ON COLUMN MEASUREMENT.measurement_source_value IS 'The Measurement name as it appears in the source data. This code is mapped to a Standard Concept in the Standardized Vocabularies and the original code is stored here for reference.';
COMMENT ON COLUMN omop.MEASUREMENT.measurement_source_concept_id IS 'A foreign key to a Concept in the Standard Vocabularies that refers to the code used in the source.'; COMMENT ON COLUMN MEASUREMENT.measurement_source_concept_id IS 'A foreign key to a Concept in the Standard Vocabularies that refers to the code used in the source.';
COMMENT ON COLUMN omop.MEASUREMENT.unit_source_value IS 'The source code for the unit as it appears in the source data. This code is mapped to a standard unit concept in the Standardized Vocabularies and the original code is stored here for reference.'; COMMENT ON COLUMN MEASUREMENT.unit_source_value IS 'The source code for the unit as it appears in the source data. This code is mapped to a standard unit concept in the Standardized Vocabularies and the original code is stored here for reference.';
COMMENT ON COLUMN omop.MEASUREMENT.value_source_value IS 'The source value associated with the content of the value_as_number or value_as_concept_id as stored in the source data.'; COMMENT ON COLUMN MEASUREMENT.value_source_value IS 'The source value associated with the content of the value_as_number or value_as_concept_id as stored in the source data.';
-- NOTE -- NOTE
COMMENT ON COLUMN omop.NOTE.note_id IS 'A unique identifier for each note.'; COMMENT ON COLUMN NOTE.note_id IS 'A unique identifier for each note.';
COMMENT ON COLUMN omop.NOTE.person_id IS 'A foreign key identifier to the Person about whom the Note was recorded. The demographic details of that Person are stored in the PERSON table.'; COMMENT ON COLUMN NOTE.person_id IS 'A foreign key identifier to the Person about whom the Note was recorded. The demographic details of that Person are stored in the PERSON table.';
COMMENT ON COLUMN omop.NOTE.note_date IS 'The date the note was recorded.'; COMMENT ON COLUMN NOTE.note_date IS 'The date the note was recorded.';
COMMENT ON COLUMN omop.NOTE.note_datetime IS 'The date and time the note was recorded.'; COMMENT ON COLUMN NOTE.note_datetime IS 'The date and time the note was recorded.';
COMMENT ON COLUMN omop.NOTE.note_type_concept_id IS 'A foreign key to the predefined Concept in the Standardized Vocabularies reflecting the type, origin or provenance of the Note.'; COMMENT ON COLUMN NOTE.note_type_concept_id IS 'A foreign key to the predefined Concept in the Standardized Vocabularies reflecting the type, origin or provenance of the Note.';
COMMENT ON COLUMN omop.NOTE.note_class_concept_id IS ' A foreign key to the predefined Concept in the Standardized Vocabularies reflecting the HL7 LOINC Document Type Vocabulary classification of the note.'; COMMENT ON COLUMN NOTE.note_class_concept_id IS 'A foreign key to the predefined Concept in the Standardized Vocabularies reflecting the HL7 LOINC Document Type Vocabulary classification of the note.';
COMMENT ON COLUMN omop.NOTE.note_title IS ' The title of the Note as it appears in the source.'; COMMENT ON COLUMN NOTE.note_title IS 'The title of the Note as it appears in the source.';
COMMENT ON COLUMN omop.NOTE.note_text IS 'The content of the Note.'; COMMENT ON COLUMN NOTE.note_text IS 'The content of the Note.';
COMMENT ON COLUMN omop.NOTE.encoding_concept_id IS ' A foreign key to the predefined Concept in the Standardized Vocabularies reflecting the note character encoding type'; COMMENT ON COLUMN NOTE.encoding_concept_id IS 'A foreign key to the predefined Concept in the Standardized Vocabularies reflecting the note character encoding type';
COMMENT ON COLUMN omop.NOTE.language_concept_id IS 'A foreign key to the predefined Concept in the Standardized Vocabularies reflecting the language of the note'; COMMENT ON COLUMN NOTE.language_concept_id IS 'A foreign key to the predefined Concept in the Standardized Vocabularies reflecting the language of the note';
COMMENT ON COLUMN omop.NOTE.provider_id IS 'A foreign key to the Provider in the PROVIDER table who took the Note.'; COMMENT ON COLUMN NOTE.provider_id IS 'A foreign key to the Provider in the PROVIDER table who took the Note.';
COMMENT ON COLUMN omop.NOTE.note_source_value IS 'The source value associated with the origin of the note'; COMMENT ON COLUMN NOTE.note_source_value IS 'The source value associated with the origin of the note';
COMMENT ON COLUMN omop.NOTE.visit_occurrence_id IS 'Foreign key to the Visit in the VISIT_OCCURRENCE table when the Note was taken.'; COMMENT ON COLUMN NOTE.visit_occurrence_id IS 'Foreign key to the Visit in the VISIT_OCCURRENCE table when the Note was taken.';
-- VISIT_DETAIL -- VISIT_DETAIL
COMMENT ON COLUMN omop.VISIT_DETAIL.visit_detail_id IS 'A unique identifier for each Person'';s visit or encounter at a healthcare provider.'; COMMENT ON COLUMN VISIT_DETAIL.visit_detail_id IS 'A unique identifier for each Person'';s visit or encounter at a healthcare provider.';
COMMENT ON COLUMN omop.VISIT_DETAIL.person_id IS 'A foreign key identifier to the Person for whom the visit is recorded. The demographic details of that Person are stored in the PERSON table.'; COMMENT ON COLUMN VISIT_DETAIL.person_id IS 'A foreign key identifier to the Person for whom the visit is recorded. The demographic details of that Person are stored in the PERSON table.';
COMMENT ON COLUMN omop.VISIT_DETAIL.visit_detail_concept_id IS 'A foreign key that refers to a visit Concept identifier in the Standardized Vocabularies.'; COMMENT ON COLUMN VISIT_DETAIL.visit_detail_concept_id IS 'A foreign key that refers to a visit Concept identifier in the Standardized Vocabularies.';
COMMENT ON COLUMN omop.VISIT_DETAIL.visit_start_date IS 'The start date of the visit.'; COMMENT ON COLUMN VISIT_DETAIL.visit_start_date IS 'The start date of the visit.';
COMMENT ON COLUMN omop.VISIT_DETAIL.visit_start_datetime IS 'The date and time of the visit started.'; COMMENT ON COLUMN VISIT_DETAIL.visit_start_datetime IS 'The date and time of the visit started.';
COMMENT ON COLUMN omop.VISIT_DETAIL.visit_end_date IS 'The end date of the visit. If this is a one-day visit the end date should match the start date.'; COMMENT ON COLUMN VISIT_DETAIL.visit_end_date IS 'The end date of the visit. If this is a one-day visit the end date should match the start date.';
COMMENT ON COLUMN omop.VISIT_DETAIL.visit_end_datetime IS 'The date and time of the visit end.'; COMMENT ON COLUMN VISIT_DETAIL.visit_end_datetime IS 'The date and time of the visit end.';
COMMENT ON COLUMN omop.VISIT_DETAIL.visit_type_concept_id IS 'A foreign key to the predefined Concept identifier in the Standardized Vocabularies reflecting the type of source data from which the visit record is derived.'; COMMENT ON COLUMN VISIT_DETAIL.visit_type_concept_id IS 'A foreign key to the predefined Concept identifier in the Standardized Vocabularies reflecting the type of source data from which the visit record is derived.';
COMMENT ON COLUMN omop.VISIT_DETAIL.provider_id IS 'A foreign key to the provider in the provider table who was associated with the visit.'; COMMENT ON COLUMN VISIT_DETAIL.provider_id IS 'A foreign key to the provider in the provider table who was associated with the visit.';
COMMENT ON COLUMN omop.VISIT_DETAIL.care_site_id IS 'A foreign key to the care site in the care site table that was visited.'; COMMENT ON COLUMN VISIT_DETAIL.care_site_id IS 'A foreign key to the care site in the care site table that was visited.';
COMMENT ON COLUMN omop.VISIT_DETAIL.visit_source_value IS 'The source code for the visit as it appears in the source data.'; COMMENT ON COLUMN VISIT_DETAIL.visit_source_value IS 'The source code for the visit as it appears in the source data.';
COMMENT ON COLUMN omop.VISIT_DETAIL.visit_source_concept_id IS 'A foreign key to a Concept that refers to the code used in the source.'; COMMENT ON COLUMN VISIT_DETAIL.visit_source_concept_id IS 'A foreign key to a Concept that refers to the code used in the source.';
COMMENT ON COLUMN omop.VISIT_DETAIL.admitting_source_value IS ' The source code for the admitting source as it appears in the source data.'; COMMENT ON COLUMN VISIT_DETAIL.admitting_source_value IS 'The source code for the admitting source as it appears in the source data.';
COMMENT ON COLUMN omop.VISIT_DETAIL.admitting_source_concept_id| IS 'A foreign key to the predefined concept in the Place of Service Vocabulary reflecting the admitting source for a visit.'; COMMENT ON COLUMN VISIT_DETAIL.admitting_source_concept_id IS 'A foreign key to the predefined concept in the Place of Service Vocabulary reflecting the admitting source for a visit.';
COMMENT ON COLUMN omop.VISIT_DETAIL.discharge_to_source_value IS ' The source code for the discharge disposition as it appears in the source data.'; COMMENT ON COLUMN VISIT_DETAIL.discharge_to_source_value IS 'The source code for the discharge disposition as it appears in the source data.';
COMMENT ON COLUMN omop.VISIT_DETAIL.discharge_to_concept_id IS 'A foreign key to the predefined concept in the Place of Service Vocabulary reflecting the discharge disposition for a visit.'; COMMENT ON COLUMN VISIT_DETAIL.discharge_to_concept_id IS 'A foreign key to the predefined concept in the Place of Service Vocabulary reflecting the discharge disposition for a visit.';
COMMENT ON COLUMN omop.VISIT_DETAIL.preceding_visit_detail_id IS 'A foreign key to the VISIT_DETAIL table of the visit immediately preceding this visit'; COMMENT ON COLUMN VISIT_DETAIL.preceding_visit_detail_id IS 'A foreign key to the VISIT_DETAIL table of the visit immediately preceding this visit';
COMMENT ON COLUMN omop.VISIT_DETAIL.visit_detail_parent_id IS 'A foreign key to the VISIT_DETAIL table record to represent the immediate parent visit-detail record.'; COMMENT ON COLUMN VISIT_DETAIL.visit_detail_parent_id IS 'A foreign key to the VISIT_DETAIL table record to represent the immediate parent visit-detail record.';
COMMENT ON COLUMN omop.VISIT_DETAIL.visit_occurrence_id IS 'A foreign key that refers to the record in the VISIT_OCCURRENCE table. This is a required field, because for every visit_detail is a child of visit_occurrence and cannot exist without a corresponding parent record in visit_occurrence.'; COMMENT ON COLUMN VISIT_DETAIL.visit_occurrence_id IS 'A foreign key that refers to the record in the VISIT_OCCURRENCE table. This is a required field, because for every visit_detail is a child of visit_occurrence and cannot exist without a corresponding parent record in visit_occurrence.';
-- SPECIMEN -- SPECIMEN
COMMENT ON COLUMN omop.SPECIMEN.specimen_id IS 'A unique identifier for each specimen.'; COMMENT ON COLUMN SPECIMEN.specimen_id IS 'A unique identifier for each specimen.';
COMMENT ON COLUMN omop.SPECIMEN.person_id IS 'A foreign key identifier to the Person for whom the Specimen is recorded.'; COMMENT ON COLUMN SPECIMEN.person_id IS 'A foreign key identifier to the Person for whom the Specimen is recorded.';
COMMENT ON COLUMN omop.SPECIMEN.specimen_concept_id IS 'A foreign key referring to a Standard Concept identifier in the Standardized Vocabularies for the Specimen.'; COMMENT ON COLUMN SPECIMEN.specimen_concept_id IS 'A foreign key referring to a Standard Concept identifier in the Standardized Vocabularies for the Specimen.';
COMMENT ON COLUMN omop.SPECIMEN.specimen_type_concept_id IS 'A foreign key referring to the Concept identifier in the Standardized Vocabularies reflecting the system of record from which the Specimen was represented in the source data.'; COMMENT ON COLUMN SPECIMEN.specimen_type_concept_id IS 'A foreign key referring to the Concept identifier in the Standardized Vocabularies reflecting the system of record from which the Specimen was represented in the source data.';
COMMENT ON COLUMN omop.SPECIMEN.specimen_date IS 'The date the specimen was obtained from the Person.'; COMMENT ON COLUMN SPECIMEN.specimen_date IS 'The date the specimen was obtained from the Person.';
COMMENT ON COLUMN omop.SPECIMEN.specimen_datetime IS 'The date and time on the date when the Specimen was obtained from the person.'; COMMENT ON COLUMN SPECIMEN.specimen_datetime IS 'The date and time on the date when the Specimen was obtained from the person.';
COMMENT ON COLUMN omop.SPECIMEN.quantity IS 'The amount of specimen collection from the person during the sampling procedure.'; COMMENT ON COLUMN SPECIMEN.quantity IS 'The amount of specimen collection from the person during the sampling procedure.';
COMMENT ON COLUMN omop.SPECIMEN.unit_concept_id IS 'A foreign key to a Standard Concept identifier for the Unit associated with the numeric quantity of the Specimen collection.'; COMMENT ON COLUMN SPECIMEN.unit_concept_id IS 'A foreign key to a Standard Concept identifier for the Unit associated with the numeric quantity of the Specimen collection.';
COMMENT ON COLUMN omop.SPECIMEN.anatomic_site_concept_id IS 'A foreign key to a Standard Concept identifier for the anatomic location of specimen collection.'; COMMENT ON COLUMN SPECIMEN.anatomic_site_concept_id IS 'A foreign key to a Standard Concept identifier for the anatomic location of specimen collection.';
COMMENT ON COLUMN omop.SPECIMEN.disease_status_concept_id IS 'A foreign key to a Standard Concept identifier for the Disease Status of specimen collection.'; COMMENT ON COLUMN SPECIMEN.disease_status_concept_id IS 'A foreign key to a Standard Concept identifier for the Disease Status of specimen collection.';
COMMENT ON COLUMN omop.SPECIMEN.specimen_source_id IS 'The Specimen identifier as it appears in the source data.'; COMMENT ON COLUMN SPECIMEN.specimen_source_id IS 'The Specimen identifier as it appears in the source data.';
COMMENT ON COLUMN omop.SPECIMEN.specimen_source_value IS 'The Specimen value as it appears in the source data. This value is mapped to a Standard Concept in the Standardized Vocabularies and the original code is, stored here for reference.'; COMMENT ON COLUMN SPECIMEN.specimen_source_value IS 'The Specimen value as it appears in the source data. This value is mapped to a Standard Concept in the Standardized Vocabularies and the original code is, stored here for reference.';
COMMENT ON COLUMN omop.SPECIMEN.unit_source_value IS 'The information about the Unit as detailed in the source.'; COMMENT ON COLUMN SPECIMEN.unit_source_value IS 'The information about the Unit as detailed in the source.';
COMMENT ON COLUMN omop.SPECIMEN.anatomic_site_source_value IS 'The information about the anatomic site as detailed in the source.'; COMMENT ON COLUMN SPECIMEN.anatomic_site_source_value IS 'The information about the anatomic site as detailed in the source.';
COMMENT ON COLUMN omop.SPECIMEN.disease_status_source_value IS 'The information about the disease status as detailed in the source.'; COMMENT ON COLUMN SPECIMEN.disease_status_source_value IS 'The information about the disease status as detailed in the source.';
-- PROCEDURE_OCCURRENCE -- PROCEDURE_OCCURRENCE
COMMENT ON COLUMN omop.PROCEDURE_OCCURRENCE.procedure_occurrence_id IS 'A system-generated unique identifier for each Procedure Occurrence.'; COMMENT ON COLUMN PROCEDURE_OCCURRENCE.procedure_occurrence_id IS 'A system-generated unique identifier for each Procedure Occurrence.';
COMMENT ON COLUMN omop.PROCEDURE_OCCURRENCE.person_id IS 'A foreign key identifier to the Person who is subjected to the Procedure. The demographic details of that Person are stored in the PERSON table.'; COMMENT ON COLUMN PROCEDURE_OCCURRENCE.person_id IS 'A foreign key identifier to the Person who is subjected to the Procedure. The demographic details of that Person are stored in the PERSON table.';
COMMENT ON COLUMN omop.PROCEDURE_OCCURRENCE.procedure_concept_id IS 'A foreign key that refers to a standard procedure Concept identifier in the Standardized Vocabularies.'; COMMENT ON COLUMN PROCEDURE_OCCURRENCE.procedure_concept_id IS 'A foreign key that refers to a standard procedure Concept identifier in the Standardized Vocabularies.';
COMMENT ON COLUMN omop.PROCEDURE_OCCURRENCE.procedure_date IS 'The date on which the Procedure was performed.'; COMMENT ON COLUMN PROCEDURE_OCCURRENCE.procedure_date IS 'The date on which the Procedure was performed.';
COMMENT ON COLUMN omop.PROCEDURE_OCCURRENCE.procedure_datetime IS 'The date and time on which the Procedure was performed.'; COMMENT ON COLUMN PROCEDURE_OCCURRENCE.procedure_datetime IS 'The date and time on which the Procedure was performed.';
COMMENT ON COLUMN omop.PROCEDURE_OCCURRENCE.procedure_type_concept_id IS 'A foreign key to the predefined Concept identifier in the Standardized Vocabularies reflecting the type of source data from which the procedure record is derived.'; COMMENT ON COLUMN PROCEDURE_OCCURRENCE.procedure_type_concept_id IS 'A foreign key to the predefined Concept identifier in the Standardized Vocabularies reflecting the type of source data from which the procedure record is derived.';
COMMENT ON COLUMN omop.PROCEDURE_OCCURRENCE.modifier_concept_id IS 'A foreign key to a Standard Concept identifier for a modifier to the Procedure (e.g. bilateral)'; COMMENT ON COLUMN PROCEDURE_OCCURRENCE.modifier_concept_id IS 'A foreign key to a Standard Concept identifier for a modifier to the Procedure (e.g. bilateral)';
COMMENT ON COLUMN omop.PROCEDURE_OCCURRENCE.quantity IS 'The quantity of procedures ordered or administered.'; COMMENT ON COLUMN PROCEDURE_OCCURRENCE.quantity IS 'The quantity of procedures ordered or administered.';
COMMENT ON COLUMN omop.PROCEDURE_OCCURRENCE.provider_id IS 'A foreign key to the provider in the provider table who was responsible for carrying out the procedure.'; COMMENT ON COLUMN PROCEDURE_OCCURRENCE.provider_id IS 'A foreign key to the provider in the provider table who was responsible for carrying out the procedure.';
COMMENT ON COLUMN omop.PROCEDURE_OCCURRENCE.visit_occurrence_id IS 'A foreign key to the visit in the visit table during which the Procedure was carried out.'; COMMENT ON COLUMN PROCEDURE_OCCURRENCE.visit_occurrence_id IS 'A foreign key to the visit in the visit table during which the Procedure was carried out.';
COMMENT ON COLUMN omop.PROCEDURE_OCCURRENCE.procedure_source_value IS 'The source code for the Procedure as it appears in the source data. This code is mapped to a standard procedure Concept in the Standardized Vocabularies and the original code is, stored here for reference. Procedure source codes are typically ICD-9-Proc, CPT-4, HCPCS or OPCS-4 codes.'; COMMENT ON COLUMN PROCEDURE_OCCURRENCE.procedure_source_value IS 'The source code for the Procedure as it appears in the source data. This code is mapped to a standard procedure Concept in the Standardized Vocabularies and the original code is, stored here for reference. Procedure source codes are typically ICD-9-Proc, CPT-4, HCPCS or OPCS-4 codes.';
COMMENT ON COLUMN omop.PROCEDURE_OCCURRENCE.procedure_source_concept_id IS 'A foreign key to a Procedure Concept that refers to the code used in the source.'; COMMENT ON COLUMN PROCEDURE_OCCURRENCE.procedure_source_concept_id IS 'A foreign key to a Procedure Concept that refers to the code used in the source.';
COMMENT ON COLUMN omop.PROCEDURE_OCCURRENCE.qualifier_source_value IS 'The source code for the qualifier as it appears in the source data.'; COMMENT ON COLUMN PROCEDURE_OCCURRENCE.qualifier_source_value IS 'The source code for the qualifier as it appears in the source data.';
COMMENT ON COLUMN omop.PROCEDURE_OCCURRENCE.visit_detail_id IS 'A foreign key to the visit in the visit table during which the Procedure was carried out.'; COMMENT ON COLUMN PROCEDURE_OCCURRENCE.visit_detail_id IS 'A foreign key to the visit in the visit table during which the Procedure was carried out.';
-- PERSON -- PERSON
COMMENT ON COLUMN omop.PERSON.person_id IS 'A unique identifier for each person.'; COMMENT ON COLUMN PERSON.person_id IS 'A unique identifier for each person.';
COMMENT ON COLUMN omop.PERSON.gender_concept_id IS 'A foreign key that refers to an identifier in the CONCEPT table for the unique gender of the person.'; COMMENT ON COLUMN PERSON.gender_concept_id IS 'A foreign key that refers to an identifier in the CONCEPT table for the unique gender of the person.';
COMMENT ON COLUMN omop.PERSON.year_of_birth IS 'The year of birth of the person. For data sources with date of birth, the year is extracted. For data sources where the year of birth is not available, the approximate year of birth is derived based on any age group categorization available.'; COMMENT ON COLUMN PERSON.year_of_birth IS 'The year of birth of the person. For data sources with date of birth, the year is extracted. For data sources where the year of birth is not available, the approximate year of birth is derived based on any age group categorization available.';
COMMENT ON COLUMN omop.PERSON.month_of_birth IS 'The month of birth of the person. For data sources that provide the precise date of birth, the month is extracted and stored in this field.'; COMMENT ON COLUMN PERSON.month_of_birth IS 'The month of birth of the person. For data sources that provide the precise date of birth, the month is extracted and stored in this field.';
COMMENT ON COLUMN omop.PERSON.day_of_birth IS 'The day of the month of birth of the person. For data sources that provide the precise date of birth, the day is extracted and stored in this field.'; COMMENT ON COLUMN PERSON.day_of_birth IS 'The day of the month of birth of the person. For data sources that provide the precise date of birth, the day is extracted and stored in this field.';
COMMENT ON COLUMN omop.PERSON.birth_datetime IS 'The date and time of birth of the person.'; COMMENT ON COLUMN PERSON.birth_datetime IS 'The date and time of birth of the person.';
COMMENT ON COLUMN omop.PERSON.race_concept_id IS 'A foreign key that refers to an identifier in the CONCEPT table for the unique race of the person.'; COMMENT ON COLUMN PERSON.race_concept_id IS 'A foreign key that refers to an identifier in the CONCEPT table for the unique race of the person.';
COMMENT ON COLUMN omop.PERSON.ethnicity_concept_id IS 'A foreign key that refers to the standard concept identifier in the Standardized Vocabularies for the ethnicity of the person.'; COMMENT ON COLUMN PERSON.ethnicity_concept_id IS 'A foreign key that refers to the standard concept identifier in the Standardized Vocabularies for the ethnicity of the person.';
COMMENT ON COLUMN omop.PERSON.location_id IS 'A foreign key to the place of residency for the person in the location table, where the detailed address information is stored.'; COMMENT ON COLUMN PERSON.location_id IS 'A foreign key to the place of residency for the person in the location table, where the detailed address information is stored.';
COMMENT ON COLUMN omop.PERSON.provider_id IS 'A foreign key to the primary care provider the person is seeing in the provider table.'; COMMENT ON COLUMN PERSON.provider_id IS 'A foreign key to the primary care provider the person is seeing in the provider table.';
COMMENT ON COLUMN omop.PERSON.care_site_id IS 'A foreign key to the site of primary care in the care_site table, where the details of the care site are stored.'; COMMENT ON COLUMN PERSON.care_site_id IS 'A foreign key to the site of primary care in the care_site table, where the details of the care site are stored.';
COMMENT ON COLUMN omop.PERSON.person_source_value IS 'An (encrypted) key derived from the person identifier in the source data. This is necessary when a use case requires a link back to the person data at the source dataset.'; COMMENT ON COLUMN PERSON.person_source_value IS 'An (encrypted) key derived from the person identifier in the source data. This is necessary when a use case requires a link back to the person data at the source dataset.';
COMMENT ON COLUMN omop.PERSON.gender_source_value IS 'The source code for the gender of the person as it appears in the source data. The persons gender is mapped to a standard gender concept in the Standardized Vocabularies; the original value is stored here for reference.'; COMMENT ON COLUMN PERSON.gender_source_value IS 'The source code for the gender of the person as it appears in the source data. The persons gender is mapped to a standard gender concept in the Standardized Vocabularies; the original value is stored here for reference.';
COMMENT ON COLUMN omop.PERSON.gender_source_concept_id IS 'A foreign key to the gender concept that refers to the code used in the source.'; COMMENT ON COLUMN PERSON.gender_source_concept_id IS 'A foreign key to the gender concept that refers to the code used in the source.';
COMMENT ON COLUMN omop.PERSON.race_source_value IS 'The source code for the race of the person as it appears in the source data. The person race is mapped to a standard race concept in the Standardized Vocabularies and the original value is stored here for reference.'; COMMENT ON COLUMN PERSON.race_source_value IS 'The source code for the race of the person as it appears in the source data. The person race is mapped to a standard race concept in the Standardized Vocabularies and the original value is stored here for reference.';
COMMENT ON COLUMN omop.PERSON.race_source_concept_id IS 'A foreign key to the race concept that refers to the code used in the source.'; COMMENT ON COLUMN PERSON.race_source_concept_id IS 'A foreign key to the race concept that refers to the code used in the source.';
COMMENT ON COLUMN omop.PERSON.ethnicity_source_value IS 'The source code for the ethnicity of the person as it appears in the source data. The person ethnicity is mapped to a standard ethnicity concept in the Standardized Vocabularies and the original code is, stored here for reference.'; COMMENT ON COLUMN PERSON.ethnicity_source_value IS 'The source code for the ethnicity of the person as it appears in the source data. The person ethnicity is mapped to a standard ethnicity concept in the Standardized Vocabularies and the original code is, stored here for reference.';
COMMENT ON COLUMN omop.PERSON.ethnicity_source_concept_id IS 'A foreign key to the ethnicity concept that refers to the code used in the source.'; COMMENT ON COLUMN PERSON.ethnicity_source_concept_id IS 'A foreign key to the ethnicity concept that refers to the code used in the source.';
-- OBSERVATION_PERIOD -- OBSERVATION_PERIOD
COMMENT ON COLUMN omop.OBSERVATION_PERIOD.observation_period_id IS 'A unique identifier for each observation period.'; COMMENT ON COLUMN OBSERVATION_PERIOD.observation_period_id IS 'A unique identifier for each observation period.';
COMMENT ON COLUMN omop.OBSERVATION_PERIOD.person_id IS 'A foreign key identifier to the person for whom the observation period is defined. The demographic details of that person are stored in the person table.'; COMMENT ON COLUMN OBSERVATION_PERIOD.person_id IS 'A foreign key identifier to the person for whom the observation period is defined. The demographic details of that person are stored in the person table.';
COMMENT ON COLUMN omop.OBSERVATION_PERIOD.observation_period_start_date IS 'The start date of the observation period for which data are available from the data source.'; COMMENT ON COLUMN OBSERVATION_PERIOD.observation_period_start_date IS 'The start date of the observation period for which data are available from the data source.';
COMMENT ON COLUMN omop.OBSERVATION_PERIOD.observation_period_end_date IS 'The end date of the observation period for which data are available from the data source.'; COMMENT ON COLUMN OBSERVATION_PERIOD.observation_period_end_date IS 'The end date of the observation period for which data are available from the data source.';
COMMENT ON COLUMN omop.OBSERVATION_PERIOD.period_type_concept_id IS 'A foreign key identifier to the predefined concept in the Standardized Vocabularies reflecting the source of the observation period information'; COMMENT ON COLUMN OBSERVATION_PERIOD.period_type_concept_id IS 'A foreign key identifier to the predefined concept in the Standardized Vocabularies reflecting the source of the observation period information';
-- OBSERVATION -- OBSERVATION
COMMENT ON COLUMN omop.OBSERVATION.observation_id IS 'A unique identifier for each observation.'; COMMENT ON COLUMN OBSERVATION.observation_id IS 'A unique identifier for each observation.';
COMMENT ON COLUMN omop.OBSERVATION.person_id IS 'A foreign key identifier to the Person about whom the observation was recorded. The demographic details of that Person are stored in the PERSON table.'; COMMENT ON COLUMN OBSERVATION.person_id IS 'A foreign key identifier to the Person about whom the observation was recorded. The demographic details of that Person are stored in the PERSON table.';
COMMENT ON COLUMN omop.OBSERVATION.observation_concept_id IS 'A foreign key to the standard observation concept identifier in the Standardized Vocabularies.'; COMMENT ON COLUMN OBSERVATION.observation_concept_id IS 'A foreign key to the standard observation concept identifier in the Standardized Vocabularies.';
COMMENT ON COLUMN omop.OBSERVATION.observation_date IS 'The date of the observation.'; COMMENT ON COLUMN OBSERVATION.observation_date IS 'The date of the observation.';
COMMENT ON COLUMN omop.OBSERVATION.observation_datetime IS 'The date and time of the observation.'; COMMENT ON COLUMN OBSERVATION.observation_datetime IS 'The date and time of the observation.';
COMMENT ON COLUMN omop.OBSERVATION.observation_type_concept_id IS 'A foreign key to the predefined concept identifier in the Standardized Vocabularies reflecting the type of the observation.'; COMMENT ON COLUMN OBSERVATION.observation_type_concept_id IS 'A foreign key to the predefined concept identifier in the Standardized Vocabularies reflecting the type of the observation.';
COMMENT ON COLUMN omop.OBSERVATION.value_as_number IS 'The observation result stored as a number. This is applicable to observations where the result is expressed as a numeric value.'; COMMENT ON COLUMN OBSERVATION.value_as_number IS 'The observation result stored as a number. This is applicable to observations where the result is expressed as a numeric value.';
COMMENT ON COLUMN omop.OBSERVATION.value_as_string IS 'The observation result stored as a string. This is applicable to observations where the result is expressed as verbatim text.'; COMMENT ON COLUMN OBSERVATION.value_as_string IS 'The observation result stored as a string. This is applicable to observations where the result is expressed as verbatim text.';
COMMENT ON COLUMN omop.OBSERVATION.value_as_concept_id IS 'A foreign key to an observation result stored as a Concept ID. This is applicable to observations where the result can be expressed as a Standard Concept from the Standardized Vocabularies (e.g., positive/negative, present/absent, low/high, etc.).'; COMMENT ON COLUMN OBSERVATION.value_as_concept_id IS 'A foreign key to an observation result stored as a Concept ID. This is applicable to observations where the result can be expressed as a Standard Concept from the Standardized Vocabularies (e.g., positive/negative, present/absent, low/high, etc.).';
COMMENT ON COLUMN omop.OBSERVATION.qualifier_concept_id IS 'A foreign key to a Standard Concept ID for a qualifier (e.g., severity of drug-drug interaction alert)'; COMMENT ON COLUMN OBSERVATION.qualifier_concept_id IS 'A foreign key to a Standard Concept ID for a qualifier (e.g., severity of drug-drug interaction alert)';
COMMENT ON COLUMN omop.OBSERVATION.unit_concept_id IS 'A foreign key to a Standard Concept ID of measurement units in the Standardized Vocabularies.'; COMMENT ON COLUMN OBSERVATION.unit_concept_id IS 'A foreign key to a Standard Concept ID of measurement units in the Standardized Vocabularies.';
COMMENT ON COLUMN omop.OBSERVATION.provider_id IS 'A foreign key to the provider in the PROVIDER table who was responsible for making the observation.'; COMMENT ON COLUMN OBSERVATION.provider_id IS 'A foreign key to the provider in the PROVIDER table who was responsible for making the observation.';
COMMENT ON COLUMN omop.OBSERVATION.visit_occurrence_id IS 'A foreign key to the visit in the VISIT_OCCURRENCE table during which the observation was recorded.'; COMMENT ON COLUMN OBSERVATION.visit_occurrence_id IS 'A foreign key to the visit in the VISIT_OCCURRENCE table during which the observation was recorded.';
COMMENT ON COLUMN omop.OBSERVATION.visit_detail_id IS 'A foreign key to the visit in the VISIT_DETAIL table during which the observation was recorded.'; COMMENT ON COLUMN OBSERVATION.visit_detail_id IS 'A foreign key to the visit in the VISIT_DETAIL table during which the observation was recorded.';
COMMENT ON COLUMN omop.OBSERVATION.observation_source_value IS 'The observation code as it appears in the source data. This code is mapped to a Standard Concept in the Standardized Vocabularies and the original code is, stored here for reference.'; COMMENT ON COLUMN OBSERVATION.observation_source_value IS 'The observation code as it appears in the source data. This code is mapped to a Standard Concept in the Standardized Vocabularies and the original code is, stored here for reference.';
COMMENT ON COLUMN omop.OBSERVATION.observation_source_concept_id IS 'A foreign key to a Concept that refers to the code used in the source.'; COMMENT ON COLUMN OBSERVATION.observation_source_concept_id IS 'A foreign key to a Concept that refers to the code used in the source.';
COMMENT ON COLUMN omop.OBSERVATION.unit_source_value IS 'The source code for the unit as it appears in the source data. This code is mapped to a standard unit concept in the Standardized Vocabularies and the original code is, stored here for reference.'; COMMENT ON COLUMN OBSERVATION.unit_source_value IS 'The source code for the unit as it appears in the source data. This code is mapped to a standard unit concept in the Standardized Vocabularies and the original code is, stored here for reference.';
COMMENT ON COLUMN omop.OBSERVATION.qualifier_source_value IS 'The source value associated with a qualifier to characterize the observation'; COMMENT ON COLUMN OBSERVATION.qualifier_source_value IS 'The source value associated with a qualifier to characterize the observation';
-- NOTE_NLP -- NOTE_NLP
COMMENT ON COLUMN omop.NOTE_NLP.note_nlp_id IS ' A unique identifier for each term extracted from a note.'; COMMENT ON COLUMN NOTE_NLP.note_nlp_id IS 'A unique identifier for each term extracted from a note.';
COMMENT ON COLUMN omop.NOTE_NLP.note_id IS ' A foreign key to the Note table note the term was extracted from.'; COMMENT ON COLUMN NOTE_NLP.note_id IS 'A foreign key to the Note table note the term was extracted from.';
COMMENT ON COLUMN omop.NOTE_NLP.section_concept_id IS ' A foreign key to the predefined Concept in the Standardized Vocabularies representing the section of the extracted term.'; COMMENT ON COLUMN NOTE_NLP.section_concept_id IS 'A foreign key to the predefined Concept in the Standardized Vocabularies representing the section of the extracted term.';
COMMENT ON COLUMN omop.NOTE_NLP.snippet IS ' A small window of text surrounding the term.'; COMMENT ON COLUMN NOTE_NLP.snippet IS 'A small window of text surrounding the term.';
COMMENT ON COLUMN omop.NOTE_NLP.offset IS ' Character offset of the extracted term in the input note.'; COMMENT ON COLUMN NOTE_NLP.offset IS 'Character offset of the extracted term in the input note.';
COMMENT ON COLUMN omop.NOTE_NLP.lexical_variant IS ' Raw text extracted from the NLP tool.'; COMMENT ON COLUMN NOTE_NLP.lexical_variant IS 'Raw text extracted from the NLP tool.';
COMMENT ON COLUMN omop.NOTE_NLP.note_nlp_concept_id IS ' A foreign key to the predefined Concept in the Standardized Vocabularies reflecting the normalized concept for the extracted term. Domain of the term is represented as part of the Concept table.'; COMMENT ON COLUMN NOTE_NLP.note_nlp_concept_id IS 'A foreign key to the predefined Concept in the Standardized Vocabularies reflecting the normalized concept for the extracted term. Domain of the term is represented as part of the Concept table.';
COMMENT ON COLUMN omop.NOTE_NLP.note_nlp_source_concept_id IS ' A foreign key to a Concept that refers to the code in the source vocabulary used by the NLP system'; COMMENT ON COLUMN NOTE_NLP.note_nlp_source_concept_id IS 'A foreign key to a Concept that refers to the code in the source vocabulary used by the NLP system';
COMMENT ON COLUMN omop.NOTE_NLP.nlp_system IS ' Name and version of the NLP system that extracted the term.Useful for data provenance.'; COMMENT ON COLUMN NOTE_NLP.nlp_system IS 'Name and version of the NLP system that extracted the term.Useful for data provenance.';
COMMENT ON COLUMN omop.NOTE_NLP.nlp_date IS ' The date of the note processing.Useful for data provenance.'; COMMENT ON COLUMN NOTE_NLP.nlp_date IS 'The date of the note processing.Useful for data provenance.';
COMMENT ON COLUMN omop.NOTE_NLP.nlp_date_time IS ' The date and time of the note processing. Useful for data provenance.'; COMMENT ON COLUMN NOTE_NLP.nlp_datetime IS 'The date and time of the note processing. Useful for data provenance.';
COMMENT ON COLUMN omop.NOTE_NLP.term_exists IS ' A summary modifier that signifies presence or absence of the term for a given patient. Useful for quick querying. *'; COMMENT ON COLUMN NOTE_NLP.term_exists IS 'A summary modifier that signifies presence or absence of the term for a given patient. Useful for quick querying. *';
-- --
--ECONOMIC --ECONOMIC
-- --
-- COST -- COST
COMMENT ON COLUMN omop.COST.cost_id IS 'A unique identifier for each COST record.'; COMMENT ON COLUMN COST.cost_id IS 'A unique identifier for each COST record.';
COMMENT ON COLUMN omop.COST.cost_event_id IS 'A foreign key identifier to the event (e.g. Measurement, Procedure, Visit, Drug Exposure, etc) record for which cost data are recorded.'; COMMENT ON COLUMN COST.cost_event_id IS 'A foreign key identifier to the event (e.g. Measurement, Procedure, Visit, Drug Exposure, etc) record for which cost data are recorded.';
COMMENT ON COLUMN omop.COST.cost_domain_id IS 'The concept representing the domain of the cost event, from which the corresponding table can be inferred that contains the entity for which cost information is recorded.'; COMMENT ON COLUMN COST.cost_domain_id IS 'The concept representing the domain of the cost event, from which the corresponding table can be inferred that contains the entity for which cost information is recorded.';
COMMENT ON COLUMN omop.COST.cost_type_concept_id IS 'A foreign key identifier to a concept in the CONCEPT table for the provenance or the source of the COST data: Calculated from insurance claim information, provider revenue, calculated from cost-to-charge ratio, reported from accounting database, etc.'; COMMENT ON COLUMN COST.cost_type_concept_id IS 'A foreign key identifier to a concept in the CONCEPT table for the provenance or the source of the COST data: Calculated from insurance claim information, provider revenue, calculated from cost-to-charge ratio, reported from accounting database, etc.';
COMMENT ON COLUMN omop.COST.currency_concept_id IS 'A foreign key identifier to the concept representing the 3-letter code used to delineate international currencies, such as USD for US Dollar.'; COMMENT ON COLUMN COST.currency_concept_id IS 'A foreign key identifier to the concept representing the 3-letter code used to delineate international currencies, such as USD for US Dollar.';
COMMENT ON COLUMN omop.COST.total_charge IS 'The total amount charged by some provider of goods or services (e.g. hospital, physician pharmacy, dme provider) to payers (insurance companies, the patient).'; COMMENT ON COLUMN COST.total_charge IS 'The total amount charged by some provider of goods or services (e.g. hospital, physician pharmacy, dme provider) to payers (insurance companies, the patient).';
COMMENT ON COLUMN omop.COST.total_cost IS 'The cost incurred by the provider of goods or services.'; COMMENT ON COLUMN COST.total_cost IS 'The cost incurred by the provider of goods or services.';
COMMENT ON COLUMN omop.COST.total_paid IS 'The total amount actually paid from all payers for goods or services of the provider.'; COMMENT ON COLUMN COST.total_paid IS 'The total amount actually paid from all payers for goods or services of the provider.';
COMMENT ON COLUMN omop.COST.paid_by_payer IS 'The amount paid by the Payer for the goods or services.'; COMMENT ON COLUMN COST.paid_by_payer IS 'The amount paid by the Payer for the goods or services.';
COMMENT ON COLUMN omop.COST.paid_by_patient IS 'The total amount paid by the Person as a share of the expenses.'; COMMENT ON COLUMN COST.paid_by_patient IS 'The total amount paid by the Person as a share of the expenses.';
COMMENT ON COLUMN omop.COST.paid_patient_copay IS 'The amount paid by the Person as a fixed contribution to the expenses.'; COMMENT ON COLUMN COST.paid_patient_copay IS 'The amount paid by the Person as a fixed contribution to the expenses.';
COMMENT ON COLUMN omop.COST.paid_patient_coinsurance IS 'The amount paid by the Person as a joint assumption of risk. Typically, this is a percentage of the expenses defined by the Payer Plan after the Person'';s deductible is exceeded.'; COMMENT ON COLUMN COST.paid_patient_coinsurance IS 'The amount paid by the Person as a joint assumption of risk. Typically, this is a percentage of the expenses defined by the Payer Plan after the Person'';s deductible is exceeded.';
COMMENT ON COLUMN omop.COST.paid_patient_deductible IS 'The amount paid by the Person that is counted toward the deductible defined by the Payer Plan. paid_patient_deductible does contribute to the paid_by_patient variable.'; COMMENT ON COLUMN COST.paid_patient_deductible IS 'The amount paid by the Person that is counted toward the deductible defined by the Payer Plan. paid_patient_deductible does contribute to the paid_by_patient variable.';
COMMENT ON COLUMN omop.COST.paid_by_primary IS 'The amount paid by a primary Payer through the coordination of benefits.'; COMMENT ON COLUMN COST.paid_by_primary IS 'The amount paid by a primary Payer through the coordination of benefits.';
COMMENT ON COLUMN omop.COST.paid_ingredient_cost IS 'The amount paid by the Payer to a pharmacy for the drug, excluding the amount paid for dispensing the drug. paid_ingredient_cost contributes to the paid_by_payer field if this field is populated with a nonzero value.'; COMMENT ON COLUMN COST.paid_ingredient_cost IS 'The amount paid by the Payer to a pharmacy for the drug, excluding the amount paid for dispensing the drug. paid_ingredient_cost contributes to the paid_by_payer field if this field is populated with a nonzero value.';
COMMENT ON COLUMN omop.COST.paid_dispensing_fee IS 'The amount paid by the Payer to a pharmacy for dispensing a drug, excluding the amount paid for the drug ingredient. paid_dispensing_fee contributes to the paid_by_payer field if this field is populated with a nonzero value.'; COMMENT ON COLUMN COST.paid_dispensing_fee IS 'The amount paid by the Payer to a pharmacy for dispensing a drug, excluding the amount paid for the drug ingredient. paid_dispensing_fee contributes to the paid_by_payer field if this field is populated with a nonzero value.';
COMMENT ON COLUMN omop.COST.payer_plan_period_id IS 'A foreign key to the PAYER_PLAN_PERIOD table, where the details of the Payer, Plan and Family are stored. Record the payer_plan_id that relates to the payer who contributed to the paid_by_payer field.'; COMMENT ON COLUMN COST.payer_plan_period_id IS 'A foreign key to the PAYER_PLAN_PERIOD table, where the details of the Payer, Plan and Family are stored. Record the payer_plan_id that relates to the payer who contributed to the paid_by_payer field.';
COMMENT ON COLUMN omop.COST.amount_allowed IS 'The contracted amount agreed between the payer and provider.'; COMMENT ON COLUMN COST.amount_allowed IS 'The contracted amount agreed between the payer and provider.';
COMMENT ON COLUMN omop.COST.revenue_code_concept_id IS 'A foreign key referring to a Standard Concept ID in the Standardized Vocabularies for Revenue codes.'; COMMENT ON COLUMN COST.revenue_code_concept_id IS 'A foreign key referring to a Standard Concept ID in the Standardized Vocabularies for Revenue codes.';
COMMENT ON COLUMN omop.COST.revenue_code_source_value IS 'The source code for the Revenue code as it appears in the source data, stored here for reference.'; COMMENT ON COLUMN COST.revenue_code_source_value IS 'The source code for the Revenue code as it appears in the source data, stored here for reference.';
COMMENT ON COLUMN omop.COST.drg_concept_id IS 'A foreign key to the predefined concept in the DRG Vocabulary reflecting the DRG for a visit.'; COMMENT ON COLUMN COST.drg_concept_id IS 'A foreign key to the predefined concept in the DRG Vocabulary reflecting the DRG for a visit.';
COMMENT ON COLUMN omop.COST.drg_source_value IS ' The 3-digit DRG source code as it appears in the source data.'; COMMENT ON COLUMN COST.drg_source_value IS 'The 3-digit DRG source code as it appears in the source data.';
-- PAYER_PLAN_PERIOD -- PAYER_PLAN_PERIOD
COMMENT ON COLUMN omop.PAYER_PLAN_PERIOD.payer_plan_period_id IS 'A identifier for each unique combination of payer, plan, family code and time span.'; COMMENT ON COLUMN PAYER_PLAN_PERIOD.payer_plan_period_id IS 'A identifier for each unique combination of payer, plan, family code and time span.';
COMMENT ON COLUMN omop.PAYER_PLAN_PERIOD.person_id IS 'A foreign key identifier to the Person covered by the payer. The demographic details of that Person are stored in the PERSON table.'; COMMENT ON COLUMN PAYER_PLAN_PERIOD.person_id IS 'A foreign key identifier to the Person covered by the payer. The demographic details of that Person are stored in the PERSON table.';
COMMENT ON COLUMN omop.PAYER_PLAN_PERIOD.payer_plan_period_start_date IS 'The start date of the payer plan period.'; COMMENT ON COLUMN PAYER_PLAN_PERIOD.payer_plan_period_start_date IS 'The start date of the payer plan period.';
COMMENT ON COLUMN omop.PAYER_PLAN_PERIOD.payer_plan_period_end_date IS 'The end date of the payer plan period.'; COMMENT ON COLUMN PAYER_PLAN_PERIOD.payer_plan_period_end_date IS 'The end date of the payer plan period.';
COMMENT ON COLUMN omop.PAYER_PLAN_PERIOD.payer_source_value IS 'The source code for the payer as it appears in the source data.'; COMMENT ON COLUMN PAYER_PLAN_PERIOD.payer_source_value IS 'The source code for the payer as it appears in the source data.';
COMMENT ON COLUMN omop.PAYER_PLAN_PERIOD.plan_source_value IS 'The source code for the Person'';s health benefit plan as it appears in the source data.'; COMMENT ON COLUMN PAYER_PLAN_PERIOD.plan_source_value IS 'The source code for the Person'';s health benefit plan as it appears in the source data.';
COMMENT ON COLUMN omop.PAYER_PLAN_PERIOD.family_source_value IS 'The source code for the Person'';s family as it appears in the source data.'; COMMENT ON COLUMN PAYER_PLAN_PERIOD.family_source_value IS 'The source code for the Person'';s family as it appears in the source data.';
-- --
--METADATA --METADATA
-- --
-- CDM_SOURCE -- CDM_SOURCE
COMMENT ON COLUMN omop.CDM_SOURCE.cdm_source_name IS 'The full name of the source'; COMMENT ON COLUMN CDM_SOURCE.cdm_source_name IS 'The full name of the source';
COMMENT ON COLUMN omop.CDM_SOURCE.cdm_source_abbreviation IS 'An abbreviation of the name'; COMMENT ON COLUMN CDM_SOURCE.cdm_source_abbreviation IS 'An abbreviation of the name';
COMMENT ON COLUMN omop.CDM_SOURCE.cdm_holder IS 'The name of the organization responsible for the development of the CDM instance'; COMMENT ON COLUMN CDM_SOURCE.cdm_holder IS 'The name of the organization responsible for the development of the CDM instance';
COMMENT ON COLUMN omop.CDM_SOURCE.source_description IS 'A description of the source data origin and purpose for collection. The description may contain a summary of the period of time that is expected to be covered by this dataset.'; COMMENT ON COLUMN CDM_SOURCE.source_description IS 'A description of the source data origin and purpose for collection. The description may contain a summary of the period of time that is expected to be covered by this dataset.';
COMMENT ON COLUMN omop.CDM_SOURCE.source_documentation_reference IS 'URL or other external reference to location of source documentation'; COMMENT ON COLUMN CDM_SOURCE.source_documentation_reference IS 'URL or other external reference to location of source documentation';
COMMENT ON COLUMN omop.CDM_SOURCE.cdm_etl _reference IS 'URL or other external reference to location of ETL specification documentation and ETL source code'; COMMENT ON COLUMN CDM_SOURCE.cdm_etl_reference IS 'URL or other external reference to location of ETL specification documentation and ETL source code';
COMMENT ON COLUMN omop.CDM_SOURCE.source_release_date IS 'The date for which the source data are most current, such as the last day of data capture'; COMMENT ON COLUMN CDM_SOURCE.source_release_date IS 'The date for which the source data are most current, such as the last day of data capture';
COMMENT ON COLUMN omop.CDM_SOURCE.cdm_release_date IS 'The date when the CDM was instantiated'; COMMENT ON COLUMN CDM_SOURCE.cdm_release_date IS 'The date when the CDM was instantiated';
COMMENT ON COLUMN omop.CDM_SOURCE.cdm_version IS 'The version of CDM used'; COMMENT ON COLUMN CDM_SOURCE.cdm_version IS 'The version of CDM used';
COMMENT ON COLUMN omop.CDM_SOURCE.vocabulary_version IS 'The version of the vocabulary used'; COMMENT ON COLUMN CDM_SOURCE.vocabulary_version IS 'The version of the vocabulary used';
-- --
--DERIVED --DERIVED
-- --
-- COHORT_ATTRIBUTE -- COHORT_ATTRIBUTE
COMMENT ON COLUMN omop.COHORT_ATTRIBUTE.cohort_definition_id IS 'A foreign key to a record in the [COHORT_DEFINITION](https://github.com/OHDSI/CommonDataModel/wiki/COHORT_DEFINITION) table containing relevant Cohort Definition information.'; COMMENT ON COLUMN COHORT_ATTRIBUTE.cohort_definition_id IS 'A foreign key to a record in the [COHORT_DEFINITION](https://github.com/OHDSI/CommonDataModel/wiki/COHORT_DEFINITION) table containing relevant Cohort Definition information.';
COMMENT ON COLUMN omop.COHORT_ATTRIBUTE.subject_id IS 'A foreign key to the subject in the Cohort. These could be referring to records in the PERSON, PROVIDER, VISIT_OCCURRENCE table.'; COMMENT ON COLUMN COHORT_ATTRIBUTE.subject_id IS 'A foreign key to the subject in the Cohort. These could be referring to records in the PERSON, PROVIDER, VISIT_OCCURRENCE table.';
COMMENT ON COLUMN omop.COHORT_ATTRIBUTE.cohort_start_date IS 'The date when the Cohort Definition criteria for the Person, Provider or Visit first match.'; COMMENT ON COLUMN COHORT_ATTRIBUTE.cohort_start_date IS 'The date when the Cohort Definition criteria for the Person, Provider or Visit first match.';
COMMENT ON COLUMN omop.COHORT_ATTRIBUTE.cohort_end_date IS 'The date when the Cohort Definition criteria for the Person, Provider or Visit no longer match or the Cohort membership was terminated.'; COMMENT ON COLUMN COHORT_ATTRIBUTE.cohort_end_date IS 'The date when the Cohort Definition criteria for the Person, Provider or Visit no longer match or the Cohort membership was terminated.';
COMMENT ON COLUMN omop.COHORT_ATTRIBUTE.attribute_definition_id IS 'A foreign key to a record in the [ATTRIBUTE_DEFINITION](https://github.com/OHDSI/CommonDataModel/wiki/ATTRIBUTE_DEFINITION) table containing relevant Attribute Definition information.'; COMMENT ON COLUMN COHORT_ATTRIBUTE.attribute_definition_id IS 'A foreign key to a record in the [ATTRIBUTE_DEFINITION](https://github.com/OHDSI/CommonDataModel/wiki/ATTRIBUTE_DEFINITION) table containing relevant Attribute Definition information.';
COMMENT ON COLUMN omop.COHORT_ATTRIBUTE.value_as_number IS 'The attribute result stored as a number. This is applicable to attributes where the result is expressed as a numeric value.'; COMMENT ON COLUMN COHORT_ATTRIBUTE.value_as_number IS 'The attribute result stored as a number. This is applicable to attributes where the result is expressed as a numeric value.';
COMMENT ON COLUMN omop.COHORT_ATTRIBUTE.value_as_concept_id IS 'The attribute result stored as a Concept ID. This is applicable to attributes where the result is expressed as a categorical value.'; COMMENT ON COLUMN COHORT_ATTRIBUTE.value_as_concept_id IS 'The attribute result stored as a Concept ID. This is applicable to attributes where the result is expressed as a categorical value.';
-- COHORT -- COHORT
COMMENT ON COLUMN omop.COHORT.cohort_definition_id IS 'A foreign key to a record in the COHORT_DEFINITION table containing relevant Cohort Definition information.'; COMMENT ON COLUMN COHORT.cohort_definition_id IS 'A foreign key to a record in the COHORT_DEFINITION table containing relevant Cohort Definition information.';
COMMENT ON COLUMN omop.COHORT.subject_id IS 'A foreign key to the subject in the cohort. These could be referring to records in the PERSON, PROVIDER, VISIT_OCCURRENCE table.'; COMMENT ON COLUMN COHORT.subject_id IS 'A foreign key to the subject in the cohort. These could be referring to records in the PERSON, PROVIDER, VISIT_OCCURRENCE table.';
COMMENT ON COLUMN omop.COHORT.cohort_start_date IS 'The date when the Cohort Definition criteria for the Person, Provider or Visit first match.'; COMMENT ON COLUMN COHORT.cohort_start_date IS 'The date when the Cohort Definition criteria for the Person, Provider or Visit first match.';
COMMENT ON COLUMN omop.COHORT.cohort_end_date IS 'The date when the Cohort Definition criteria for the Person, Provider or Visit no longer match or the Cohort membership was terminated.'; COMMENT ON COLUMN COHORT.cohort_end_date IS 'The date when the Cohort Definition criteria for the Person, Provider or Visit no longer match or the Cohort membership was terminated.';
-- CONDITION_ERA -- CONDITION_ERA
COMMENT ON COLUMN omop.CONDITION_ERA.condition_era_id IS 'A unique identifier for each Condition Era.'; COMMENT ON COLUMN CONDITION_ERA.condition_era_id IS 'A unique identifier for each Condition Era.';
COMMENT ON COLUMN omop.CONDITION_ERA.person_id IS 'A foreign key identifier to the Person who is experiencing the Condition during the Condition Era. The demographic details of that Person are stored in the PERSON table.'; COMMENT ON COLUMN CONDITION_ERA.person_id IS 'A foreign key identifier to the Person who is experiencing the Condition during the Condition Era. The demographic details of that Person are stored in the PERSON table.';
COMMENT ON COLUMN omop.CONDITION_ERA.condition_concept_id IS 'A foreign key that refers to a standard Condition Concept identifier in the Standardized Vocabularies.'; COMMENT ON COLUMN CONDITION_ERA.condition_concept_id IS 'A foreign key that refers to a standard Condition Concept identifier in the Standardized Vocabularies.';
COMMENT ON COLUMN omop.CONDITION_ERA.condition_era_start_date IS 'The start date for the Condition Era constructed from the individual instances of Condition Occurrences. It is the start date of the very first chronologically recorded instance of the condition.'; COMMENT ON COLUMN CONDITION_ERA.condition_era_start_date IS 'The start date for the Condition Era constructed from the individual instances of Condition Occurrences. It is the start date of the very first chronologically recorded instance of the condition.';
COMMENT ON COLUMN omop.CONDITION_ERA.condition_era_end_date IS 'The end date for the Condition Era constructed from the individual instances of Condition Occurrences. It is the end date of the final continuously recorded instance of the Condition.'; COMMENT ON COLUMN CONDITION_ERA.condition_era_end_date IS 'The end date for the Condition Era constructed from the individual instances of Condition Occurrences. It is the end date of the final continuously recorded instance of the Condition.';
COMMENT ON COLUMN omop.CONDITION_ERA.condition_occurrence_count IS 'The number of individual Condition Occurrences used to construct the condition era.'; COMMENT ON COLUMN CONDITION_ERA.condition_occurrence_count IS 'The number of individual Condition Occurrences used to construct the condition era.';
-- DOSE_ERA -- DOSE_ERA
COMMENT ON COLUMN omop.DOSE_ERA.dose_era_id IS 'A unique identifier for each Dose Era.'; COMMENT ON COLUMN DOSE_ERA.dose_era_id IS 'A unique identifier for each Dose Era.';
COMMENT ON COLUMN omop.DOSE_ERA.person_id IS 'A foreign key identifier to the Person who is subjected to the drug during the drug era. The demographic details of that Person are stored in the PERSON table.'; COMMENT ON COLUMN DOSE_ERA.person_id IS 'A foreign key identifier to the Person who is subjected to the drug during the drug era. The demographic details of that Person are stored in the PERSON table.';
COMMENT ON COLUMN omop.DOSE_ERA.drug_concept_id IS 'A foreign key that refers to a Standard Concept identifier in the Standardized Vocabularies for the active Ingredient Concept.'; COMMENT ON COLUMN DOSE_ERA.drug_concept_id IS 'A foreign key that refers to a Standard Concept identifier in the Standardized Vocabularies for the active Ingredient Concept.';
COMMENT ON COLUMN omop.DOSE_ERA.unit_concept_id IS 'A foreign key that refers to a Standard Concept identifier in the Standardized Vocabularies for the unit concept.'; COMMENT ON COLUMN DOSE_ERA.unit_concept_id IS 'A foreign key that refers to a Standard Concept identifier in the Standardized Vocabularies for the unit concept.';
COMMENT ON COLUMN omop.DOSE_ERA.dose_value IS 'The numeric value of the dose.'; COMMENT ON COLUMN DOSE_ERA.dose_value IS 'The numeric value of the dose.';
COMMENT ON COLUMN omop.DOSE_ERA.dose_era_start_date IS 'The start date for the drug era constructed from the individual instances of drug exposures. It is the start date of the very first chronologically recorded instance of utilization of a drug.'; COMMENT ON COLUMN DOSE_ERA.dose_era_start_date IS 'The start date for the drug era constructed from the individual instances of drug exposures. It is the start date of the very first chronologically recorded instance of utilization of a drug.';
COMMENT ON COLUMN omop.DOSE_ERA.dose_era_end_date IS 'The end date for the drug era constructed from the individual instance of drug exposures. It is the end date of the final continuously recorded instance of utilization of a drug.'; COMMENT ON COLUMN DOSE_ERA.dose_era_end_date IS 'The end date for the drug era constructed from the individual instance of drug exposures. It is the end date of the final continuously recorded instance of utilization of a drug.';
-- DRUG_ERA -- DRUG_ERA
COMMENT ON COLUMN omop.DRUG_ERA.drug_era_id IS 'A unique identifier for each Drug Era.'; COMMENT ON COLUMN DRUG_ERA.drug_era_id IS 'A unique identifier for each Drug Era.';
COMMENT ON COLUMN omop.DRUG_ERA.person_id IS 'A foreign key identifier to the Person who is subjected to the Drug during the fDrug Era. The demographic details of that Person are stored in the PERSON table.'; COMMENT ON COLUMN DRUG_ERA.person_id IS 'A foreign key identifier to the Person who is subjected to the Drug during the fDrug Era. The demographic details of that Person are stored in the PERSON table.';
COMMENT ON COLUMN omop.DRUG_ERA.drug_concept_id IS 'A foreign key that refers to a Standard Concept identifier in the Standardized Vocabularies for the Ingredient Concept.'; COMMENT ON COLUMN DRUG_ERA.drug_concept_id IS 'A foreign key that refers to a Standard Concept identifier in the Standardized Vocabularies for the Ingredient Concept.';
COMMENT ON COLUMN omop.DRUG_ERA.drug_era_start_date IS 'The start date for the Drug Era constructed from the individual instances of Drug Exposures. It is the start date of the very first chronologically recorded instance of conutilization of a Drug.'; COMMENT ON COLUMN DRUG_ERA.drug_era_start_date IS 'The start date for the Drug Era constructed from the individual instances of Drug Exposures. It is the start date of the very first chronologically recorded instance of conutilization of a Drug.';
COMMENT ON COLUMN omop.DRUG_ERA.drug_era_end_date IS 'The end date for the drug era constructed from the individual instance of drug exposures. It is the end date of the final continuously recorded instance of utilization of a drug.'; COMMENT ON COLUMN DRUG_ERA.drug_era_end_date IS 'The end date for the drug era constructed from the individual instance of drug exposures. It is the end date of the final continuously recorded instance of utilization of a drug.';
COMMENT ON COLUMN omop.DRUG_ERA.drug_exposure_count IS 'The number of individual Drug Exposure occurrences used to construct the Drug Era.'; COMMENT ON COLUMN DRUG_ERA.drug_exposure_count IS 'The number of individual Drug Exposure occurrences used to construct the Drug Era.';
COMMENT ON COLUMN omop.DRUG_ERA.gap_days IS 'The number of days that are not covered by DRUG_EXPOSURE records that were used to make up the era record.'; COMMENT ON COLUMN DRUG_ERA.gap_days IS 'The number of days that are not covered by DRUG_EXPOSURE records that were used to make up the era record.';
-- --
--SYSTEM --SYSTEM
-- --
-- CARE_SITE -- CARE_SITE
COMMENT ON COLUMN omop.CARE_SITE.care_site_id IS 'A unique identifier for each Care Site.'; COMMENT ON COLUMN CARE_SITE.care_site_id IS 'A unique identifier for each Care Site.';
COMMENT ON COLUMN omop.CARE_SITE.care_site_name IS 'The verbatim description or name of the Care Site as in data source'; COMMENT ON COLUMN CARE_SITE.care_site_name IS 'The verbatim description or name of the Care Site as in data source';
COMMENT ON COLUMN omop.CARE_SITE.place_of_service_concept_id IS 'A foreign key that refers to a Place of Service Concept ID in the Standardized Vocabularies.'; COMMENT ON COLUMN CARE_SITE.place_of_service_concept_id IS 'A foreign key that refers to a Place of Service Concept ID in the Standardized Vocabularies.';
COMMENT ON COLUMN omop.CARE_SITE.location_id IS 'A foreign key to the geographic Location in the LOCATION table, where the detailed address information is stored.'; COMMENT ON COLUMN CARE_SITE.location_id IS 'A foreign key to the geographic Location in the LOCATION table, where the detailed address information is stored.';
COMMENT ON COLUMN omop.CARE_SITE.care_site_source_value IS 'The identifier for the Care Site in the source data, stored here for reference.'; COMMENT ON COLUMN CARE_SITE.care_site_source_value IS 'The identifier for the Care Site in the source data, stored here for reference.';
COMMENT ON COLUMN omop.CARE_SITE.place_of_service_source_value IS 'The source code for the Place of Service as it appears in the source data, stored here for reference.'; COMMENT ON COLUMN CARE_SITE.place_of_service_source_value IS 'The source code for the Place of Service as it appears in the source data, stored here for reference.';
-- LOCATION -- LOCATION
COMMENT ON COLUMN omop.LOCATION.location_id IS 'A unique identifier for each geographic location.'; COMMENT ON COLUMN LOCATION.location_id IS 'A unique identifier for each geographic location.';
COMMENT ON COLUMN omop.LOCATION.address_1 IS 'The address field 1, typically used for the street address, as it appears in the source data.'; COMMENT ON COLUMN LOCATION.address_1 IS 'The address field 1, typically used for the street address, as it appears in the source data.';
COMMENT ON COLUMN omop.LOCATION.address_2 IS 'The address field 2, typically used for additional detail such as buildings, suites, floors, as it appears in the source data.'; COMMENT ON COLUMN LOCATION.address_2 IS 'The address field 2, typically used for additional detail such as buildings, suites, floors, as it appears in the source data.';
COMMENT ON COLUMN omop.LOCATION.city IS 'The city field as it appears in the source data.'; COMMENT ON COLUMN LOCATION.city IS 'The city field as it appears in the source data.';
COMMENT ON COLUMN omop.LOCATION.state IS 'The state field as it appears in the source data.'; COMMENT ON COLUMN LOCATION.state IS 'The state field as it appears in the source data.';
COMMENT ON COLUMN omop.LOCATION.zip IS 'The zip or postal code.'; COMMENT ON COLUMN LOCATION.zip IS 'The zip or postal code.';
COMMENT ON COLUMN omop.LOCATION.county IS 'The county.'; COMMENT ON COLUMN LOCATION.county IS 'The county.';
COMMENT ON COLUMN omop.LOCATION.location_source_value IS 'The verbatim information that is used to uniquely identify the location as it appears in the source data.'; COMMENT ON COLUMN LOCATION.location_source_value IS 'The verbatim information that is used to uniquely identify the location as it appears in the source data.';
-- PROVIDER -- PROVIDER
COMMENT ON COLUMN omop.PROVIDER.provider_id IS 'A unique identifier for each Provider.'; COMMENT ON COLUMN PROVIDER.provider_id IS 'A unique identifier for each Provider.';
COMMENT ON COLUMN omop.PROVIDER.provider_name IS 'A description of the Provider.'; COMMENT ON COLUMN PROVIDER.provider_name IS 'A description of the Provider.';
COMMENT ON COLUMN omop.PROVIDER.npi IS 'The National Provider Identifier (NPI) of the provider.'; COMMENT ON COLUMN PROVIDER.npi IS 'The National Provider Identifier (NPI) of the provider.';
COMMENT ON COLUMN omop.PROVIDER.dea IS 'The Drug Enforcement Administration (DEA) number of the provider.'; COMMENT ON COLUMN PROVIDER.dea IS 'The Drug Enforcement Administration (DEA) number of the provider.';
COMMENT ON COLUMN omop.PROVIDER.specialty_concept_id IS 'A foreign key to a Standard Specialty Concept ID in the Standardized Vocabularies.'; COMMENT ON COLUMN PROVIDER.specialty_concept_id IS 'A foreign key to a Standard Specialty Concept ID in the Standardized Vocabularies.';
COMMENT ON COLUMN omop.PROVIDER.care_site_id IS 'A foreign key to the main Care Site where the provider is practicing.'; COMMENT ON COLUMN PROVIDER.care_site_id IS 'A foreign key to the main Care Site where the provider is practicing.';
COMMENT ON COLUMN omop.PROVIDER.year_of_birth IS 'The year of birth of the Provider.'; COMMENT ON COLUMN PROVIDER.year_of_birth IS 'The year of birth of the Provider.';
COMMENT ON COLUMN omop.PROVIDER.gender_concept_id IS 'The gender of the Provider.'; COMMENT ON COLUMN PROVIDER.gender_concept_id IS 'The gender of the Provider.';
COMMENT ON COLUMN omop.PROVIDER.provider_source_value IS 'The identifier used for the Provider in the source data, stored here for reference.'; COMMENT ON COLUMN PROVIDER.provider_source_value IS 'The identifier used for the Provider in the source data, stored here for reference.';
COMMENT ON COLUMN omop.PROVIDER.specialty_source_value IS 'The source code for the Provider specialty as it appears in the source data, stored here for reference.'; COMMENT ON COLUMN PROVIDER.specialty_source_value IS 'The source code for the Provider specialty as it appears in the source data, stored here for reference.';
COMMENT ON COLUMN omop.PROVIDER.specialty_source_concept_id IS 'A foreign key to a Concept that refers to the code used in the source.'; COMMENT ON COLUMN PROVIDER.specialty_source_concept_id IS 'A foreign key to a Concept that refers to the code used in the source.';
COMMENT ON COLUMN omop.PROVIDER.gender_source_value IS 'The gender code for the Provider as it appears in the source data, stored here for reference.'; COMMENT ON COLUMN PROVIDER.gender_source_value IS 'The gender code for the Provider as it appears in the source data, stored here for reference.';
COMMENT ON COLUMN omop.PROVIDER.gender_source_concept_id IS 'A foreign key to a Concept that refers to the code used in the source.'; COMMENT ON COLUMN PROVIDER.gender_source_concept_id IS 'A foreign key to a Concept that refers to the code used in the source.';
-- --
--SYSTEM --SYSTEM
-- --
-- ATTRIBUTE_DEFINITION -- ATTRIBUTE_DEFINITION
COMMENT ON COLUMN omop.ATTRIBUTE_DEFINITION.attribute_definition_id IS 'A unique identifier for each Attribute.'; COMMENT ON COLUMN ATTRIBUTE_DEFINITION.attribute_definition_id IS 'A unique identifier for each Attribute.';
COMMENT ON COLUMN omop.ATTRIBUTE_DEFINITION.attribute_name IS 'A short description of the Attribute.'; COMMENT ON COLUMN ATTRIBUTE_DEFINITION.attribute_name IS 'A short description of the Attribute.';
COMMENT ON COLUMN omop.ATTRIBUTE_DEFINITION.attribute_description IS 'A complete description of the Attribute definition'; COMMENT ON COLUMN ATTRIBUTE_DEFINITION.attribute_description IS 'A complete description of the Attribute definition';
COMMENT ON COLUMN omop.ATTRIBUTE_DEFINITION.attribute_type_concept_id IS 'Type defining what kind of Attribute Definition the record represents and how the syntax may be executed'; COMMENT ON COLUMN ATTRIBUTE_DEFINITION.attribute_type_concept_id IS 'Type defining what kind of Attribute Definition the record represents and how the syntax may be executed';
COMMENT ON COLUMN omop.ATTRIBUTE_DEFINITION.attribute_syntax IS 'Syntax or code to operationalize the Attribute definition'; COMMENT ON COLUMN ATTRIBUTE_DEFINITION.attribute_syntax IS 'Syntax or code to operationalize the Attribute definition';
-- COHORT_DEFINITION -- COHORT_DEFINITION
COMMENT ON COLUMN omop.COHORT_DEFINITION.cohort_definition_id IS 'A unique identifier for each Cohort.'; COMMENT ON COLUMN COHORT_DEFINITION.cohort_definition_id IS 'A unique identifier for each Cohort.';
COMMENT ON COLUMN omop.COHORT_DEFINITION.cohort_definition_name IS 'A short description of the Cohort.'; COMMENT ON COLUMN COHORT_DEFINITION.cohort_definition_name IS 'A short description of the Cohort.';
COMMENT ON COLUMN omop.COHORT_DEFINITION.cohort_definition_description IS 'A complete description of the Cohort definition'; COMMENT ON COLUMN COHORT_DEFINITION.cohort_definition_description IS 'A complete description of the Cohort definition';
COMMENT ON COLUMN omop.COHORT_DEFINITION.definition_type_concept_id IS 'Type defining what kind of Cohort Definition the record represents and how the syntax may be executed'; COMMENT ON COLUMN COHORT_DEFINITION.definition_type_concept_id IS 'Type defining what kind of Cohort Definition the record represents and how the syntax may be executed';
COMMENT ON COLUMN omop.COHORT_DEFINITION.cohort_definition_syntax IS 'Syntax or code to operationalize the Cohort definition'; COMMENT ON COLUMN COHORT_DEFINITION.cohort_definition_syntax IS 'Syntax or code to operationalize the Cohort definition';
COMMENT ON COLUMN omop.COHORT_DEFINITION.subject_concept_id IS 'A foreign key to the Concept to which defines the domain of subjects that are members of the cohort (e.g., Person, Provider, Visit).'; COMMENT ON COLUMN COHORT_DEFINITION.subject_concept_id IS 'A foreign key to the Concept to which defines the domain of subjects that are members of the cohort (e.g., Person, Provider, Visit).';
COMMENT ON COLUMN omop.COHORT_DEFINITION.cohort_instantiation_date IS 'A date to indicate when the Cohort was instantiated in the COHORT table'; COMMENT ON COLUMN COHORT_DEFINITION.cohort_initiation_date IS 'A date to indicate when the Cohort was initiated in the COHORT table';
-- CONCEPT_ANCESTOR -- CONCEPT_ANCESTOR
COMMENT ON COLUMN omop.CONCEPT_ANCESTOR.ancestor_concept_id IS 'A foreign key to the concept in the concept table for the higher-level concept that forms the ancestor in the relationship.'; COMMENT ON COLUMN CONCEPT_ANCESTOR.ancestor_concept_id IS 'A foreign key to the concept in the concept table for the higher-level concept that forms the ancestor in the relationship.';
COMMENT ON COLUMN omop.CONCEPT_ANCESTOR.descendant_concept_id IS 'A foreign key to the concept in the concept table for the lower-level concept that forms the descendant in the relationship.'; COMMENT ON COLUMN CONCEPT_ANCESTOR.descendant_concept_id IS 'A foreign key to the concept in the concept table for the lower-level concept that forms the descendant in the relationship.';
COMMENT ON COLUMN omop.CONCEPT_ANCESTOR.min_levels_of_separation IS 'The minimum separation in number of levels of hierarchy between ancestor and descendant concepts. This is an attribute that is used to simplify hierarchic analysis.'; COMMENT ON COLUMN CONCEPT_ANCESTOR.min_levels_of_separation IS 'The minimum separation in number of levels of hierarchy between ancestor and descendant concepts. This is an attribute that is used to simplify hierarchic analysis.';
COMMENT ON COLUMN omop.CONCEPT_ANCESTOR.max_levels_of_separation IS 'The maximum separation in number of levels of hierarchy between ancestor and descendant concepts. This is an attribute that is used to simplify hierarchic analysis.'; COMMENT ON COLUMN CONCEPT_ANCESTOR.max_levels_of_separation IS 'The maximum separation in number of levels of hierarchy between ancestor and descendant concepts. This is an attribute that is used to simplify hierarchic analysis.';
-- CONCEPT_CLASS -- CONCEPT_CLASS
COMMENT ON COLUMN omop.CONCEPT_CLASS.concept_class_id IS 'A unique key for each class.'; COMMENT ON COLUMN CONCEPT_CLASS.concept_class_id IS 'A unique key for each class.';
COMMENT ON COLUMN omop.CONCEPT_CLASS.concept_class_name IS 'The name describing the Concept Class, e.g. "Clinical Finding", "Ingredient", etc.'; COMMENT ON COLUMN CONCEPT_CLASS.concept_class_name IS 'The name describing the Concept Class, e.g. "Clinical Finding", "Ingredient", etc.';
COMMENT ON COLUMN omop.CONCEPT_CLASS.concept_class_concept_id IS 'A foreign key that refers to an identifier in the [CONCEPT](https://github.com/OHDSI/CommonDataModel/wiki/CONCEPT) table for the unique Concept Class the record belongs to.'; COMMENT ON COLUMN CONCEPT_CLASS.concept_class_concept_id IS 'A foreign key that refers to an identifier in the [CONCEPT](https://github.com/OHDSI/CommonDataModel/wiki/CONCEPT) table for the unique Concept Class the record belongs to.';
-- CONCEPT -- CONCEPT
COMMENT ON COLUMN omop.CONCEPT.concept_id IS 'A unique identifier for each Concept across all domains.'; COMMENT ON COLUMN CONCEPT.concept_id IS 'A unique identifier for each Concept across all domains.';
COMMENT ON COLUMN omop.CONCEPT.concept_name IS 'An unambiguous, meaningful and descriptive name for the Concept.'; COMMENT ON COLUMN CONCEPT.concept_name IS 'An unambiguous, meaningful and descriptive name for the Concept.';
COMMENT ON COLUMN omop.CONCEPT.domain_id IS 'A foreign key to the [DOMAIN](https://github.com/OHDSI/CommonDataModel/wiki/DOMAIN) table the Concept belongs to.'; COMMENT ON COLUMN CONCEPT.domain_id IS 'A foreign key to the [DOMAIN](https://github.com/OHDSI/CommonDataModel/wiki/DOMAIN) table the Concept belongs to.';
COMMENT ON COLUMN omop.CONCEPT.vocabulary_id IS 'A foreign key to the [VOCABULARY](https://github.com/OHDSI/CommonDataModel/wiki/VOCABULARY) table indicating from which source the Concept has been adapted.'; COMMENT ON COLUMN CONCEPT.vocabulary_id IS 'A foreign key to the [VOCABULARY](https://github.com/OHDSI/CommonDataModel/wiki/VOCABULARY) table indicating from which source the Concept has been adapted.';
COMMENT ON COLUMN omop.CONCEPT.concept_class_id IS 'The attribute or concept class of the Concept. Examples are '';Clinical Drug'';, '';Ingredient'';, '';Clinical Finding''; etc.'; COMMENT ON COLUMN CONCEPT.concept_class_id IS 'The attribute or concept class of the Concept. Examples are '';Clinical Drug'';, '';Ingredient'';, '';Clinical Finding''; etc.';
COMMENT ON COLUMN omop.CONCEPT.standard_concept IS 'This flag determines where a Concept is a Standard Concept, i.e. is used in the data, a Classification Concept, or a non-standard Source Concept. The allowables values are '';S''; (Standard Concept) and '';C''; (Classification Concept), otherwise the content is NULL.'; COMMENT ON COLUMN CONCEPT.standard_concept IS 'This flag determines where a Concept is a Standard Concept, i.e. is used in the data, a Classification Concept, or a non-standard Source Concept. The allowables values are '';S''; (Standard Concept) and '';C''; (Classification Concept), otherwise the content is NULL.';
COMMENT ON COLUMN omop.CONCEPT.concept_code IS 'The concept code represents the identifier of the Concept in the source vocabulary, such as SNOMED-CT concept IDs, RxNorm RXCUIs etc. Note that concept codes are not unique across vocabularies.'; COMMENT ON COLUMN CONCEPT.concept_code IS 'The concept code represents the identifier of the Concept in the source vocabulary, such as SNOMED-CT concept IDs, RxNorm RXCUIs etc. Note that concept codes are not unique across vocabularies.';
COMMENT ON COLUMN omop.CONCEPT.valid_start_date IS 'The date when the Concept was first recorded. The default value is 1-Jan-1970, meaning, the Concept has no (known) date of inception.'; COMMENT ON COLUMN CONCEPT.valid_start_date IS 'The date when the Concept was first recorded. The default value is 1-Jan-1970, meaning, the Concept has no (known) date of inception.';
COMMENT ON COLUMN omop.CONCEPT.valid_end_date IS 'The date when the Concept became invalid because it was deleted or superseded (updated) by a new concept. The default value is 31-Dec-2099, meaning, the Concept is valid until it becomes deprecated.'; COMMENT ON COLUMN CONCEPT.valid_end_date IS 'The date when the Concept became invalid because it was deleted or superseded (updated) by a new concept. The default value is 31-Dec-2099, meaning, the Concept is valid until it becomes deprecated.';
COMMENT ON COLUMN omop.CONCEPT.invalid_reason IS 'Reason the Concept was invalidated. Possible values are D (deleted), U (replaced with an update) or NULL when valid_end_date has the default value.'; COMMENT ON COLUMN CONCEPT.invalid_reason IS 'Reason the Concept was invalidated. Possible values are D (deleted), U (replaced with an update) or NULL when valid_end_date has the default value.';
-- CONCEPT_RELATIONSHIP -- CONCEPT_RELATIONSHIP
COMMENT ON COLUMN omop.CONCEPT_RELATIONSHIP.concept_id_1 IS 'A foreign key to a Concept in the [CONCEPT](https://github.com/OHDSI/CommonDataModel/wiki/CONCEPT) table associated with the relationship. Relationships are directional, and this field represents the source concept designation.'; COMMENT ON COLUMN CONCEPT_RELATIONSHIP.concept_id_1 IS 'A foreign key to a Concept in the [CONCEPT](https://github.com/OHDSI/CommonDataModel/wiki/CONCEPT) table associated with the relationship. Relationships are directional, and this field represents the source concept designation.';
COMMENT ON COLUMN omop.CONCEPT_RELATIONSHIP.concept_id_2 IS 'A foreign key to a Concept in the [CONCEPT](https://github.com/OHDSI/CommonDataModel/wiki/CONCEPT) table associated with the relationship. Relationships are directional, and this field represents the destination concept designation.'; COMMENT ON COLUMN CONCEPT_RELATIONSHIP.concept_id_2 IS 'A foreign key to a Concept in the [CONCEPT](https://github.com/OHDSI/CommonDataModel/wiki/CONCEPT) table associated with the relationship. Relationships are directional, and this field represents the destination concept designation.';
COMMENT ON COLUMN omop.CONCEPT_RELATIONSHIP.relationship_id IS 'A unique identifier to the type or nature of the Relationship as defined in the [RELATIONSHIP](https://github.com/OHDSI/CommonDataModel/wiki/RELATIONSHIP) table.'; COMMENT ON COLUMN CONCEPT_RELATIONSHIP.relationship_id IS 'A unique identifier to the type or nature of the Relationship as defined in the [RELATIONSHIP](https://github.com/OHDSI/CommonDataModel/wiki/RELATIONSHIP) table.';
COMMENT ON COLUMN omop.CONCEPT_RELATIONSHIP.valid_start_date IS 'The date when the instance of the Concept Relationship is first recorded.'; COMMENT ON COLUMN CONCEPT_RELATIONSHIP.valid_start_date IS 'The date when the instance of the Concept Relationship is first recorded.';
COMMENT ON COLUMN omop.CONCEPT_RELATIONSHIP.valid_end_date IS 'The date when the Concept Relationship became invalid because it was deleted or superseded (updated) by a new relationship. Default value is 31-Dec-2099.'; COMMENT ON COLUMN CONCEPT_RELATIONSHIP.valid_end_date IS 'The date when the Concept Relationship became invalid because it was deleted or superseded (updated) by a new relationship. Default value is 31-Dec-2099.';
COMMENT ON COLUMN omop.CONCEPT_RELATIONSHIP.invalid_reason IS 'Reason the relationship was invalidated. Possible values are '';D''; (deleted), '';U''; (replaced with an update) or NULL when valid_end_date has the default value.'; COMMENT ON COLUMN CONCEPT_RELATIONSHIP.invalid_reason IS 'Reason the relationship was invalidated. Possible values are '';D''; (deleted), '';U''; (replaced with an update) or NULL when valid_end_date has the default value.';
-- CONCEPT_SYNONYM -- CONCEPT_SYNONYM
COMMENT ON COLUMN omop.CONCEPT_SYNONYM.Field IS 'Description'; COMMENT ON COLUMN CONCEPT_SYNONYM.concept_id IS 'A foreign key to the Concept in the CONCEPT table.';
COMMENT ON COLUMN omop.CONCEPT_SYNONYM.concept_id IS 'A foreign key to the Concept in the CONCEPT table.'; COMMENT ON COLUMN CONCEPT_SYNONYM.concept_synonym_name IS 'The alternative name for the Concept.';
COMMENT ON COLUMN omop.CONCEPT_SYNONYM.concept_synonym_name IS 'The alternative name for the Concept.'; COMMENT ON COLUMN CONCEPT_SYNONYM.language_concept_id IS 'A foreign key to a Concept representing the language.';
COMMENT ON COLUMN omop.CONCEPT_SYNONYM.language_concept_id IS 'A foreign key to a Concept representing the language.';
-- DOMAIN -- DOMAIN
COMMENT ON COLUMN omop.DOMAIN.domain_id IS 'A unique key for each domain.'; COMMENT ON COLUMN DOMAIN.domain_id IS 'A unique key for each domain.';
COMMENT ON COLUMN omop.DOMAIN.domain_name IS 'The name describing the Domain, e.g. "Condition", "Procedure", "Measurement" etc.'; COMMENT ON COLUMN DOMAIN.domain_name IS 'The name describing the Domain, e.g. "Condition", "Procedure", "Measurement" etc.';
COMMENT ON COLUMN omop.DOMAIN.domain_concept_id IS 'A foreign key that refers to an identifier in the [CONCEPT](https://github.com/OHDSI/CommonDataModel/wiki/CONCEPT) table for the unique Domain Concept the Domain record belongs to.'; COMMENT ON COLUMN DOMAIN.domain_concept_id IS 'A foreign key that refers to an identifier in the [CONCEPT](https://github.com/OHDSI/CommonDataModel/wiki/CONCEPT) table for the unique Domain Concept the Domain record belongs to.';
-- DRUG_STRENGTH -- DRUG_STRENGTH
COMMENT ON COLUMN omop.DRUG_STRENGTH.drug_concept_id IS 'A foreign key to the Concept in the CONCEPT table representing the identifier for Branded Drug or Clinical Drug Concept.'; COMMENT ON COLUMN DRUG_STRENGTH.drug_concept_id IS 'A foreign key to the Concept in the CONCEPT table representing the identifier for Branded Drug or Clinical Drug Concept.';
COMMENT ON COLUMN omop.DRUG_STRENGTH.ingredient_concept_id IS 'A foreign key to the Concept in the CONCEPT table, representing the identifier for drug Ingredient Concept contained within the drug product.'; COMMENT ON COLUMN DRUG_STRENGTH.ingredient_concept_id IS 'A foreign key to the Concept in the CONCEPT table, representing the identifier for drug Ingredient Concept contained within the drug product.';
COMMENT ON COLUMN omop.DRUG_STRENGTH.amount_value IS 'The numeric value associated with the amount of active ingredient contained within the product.'; COMMENT ON COLUMN DRUG_STRENGTH.amount_value IS 'The numeric value associated with the amount of active ingredient contained within the product.';
COMMENT ON COLUMN omop.DRUG_STRENGTH.amount_unit_concept_id IS 'A foreign key to the Concept in the CONCEPT table representing the identifier for the Unit for the absolute amount of active ingredient.'; COMMENT ON COLUMN DRUG_STRENGTH.amount_unit_concept_id IS 'A foreign key to the Concept in the CONCEPT table representing the identifier for the Unit for the absolute amount of active ingredient.';
COMMENT ON COLUMN omop.DRUG_STRENGTH.numerator_value IS 'The numeric value associated with the concentration of the active ingredient contained in the product'; COMMENT ON COLUMN DRUG_STRENGTH.numerator_value IS 'The numeric value associated with the concentration of the active ingredient contained in the product';
COMMENT ON COLUMN omop.DRUG_STRENGTH.numerator_unit_concept_id IS 'A foreign key to the Concept in the CONCEPT table representing the identifier for the numerator Unit for the concentration of active ingredient.'; COMMENT ON COLUMN DRUG_STRENGTH.numerator_unit_concept_id IS 'A foreign key to the Concept in the CONCEPT table representing the identifier for the numerator Unit for the concentration of active ingredient.';
COMMENT ON COLUMN omop.DRUG_STRENGTH.denominator_value IS 'The amount of total liquid (or other divisible product, such as ointment, gel, spray, etc.).'; COMMENT ON COLUMN DRUG_STRENGTH.denominator_value IS 'The amount of total liquid (or other divisible product, such as ointment, gel, spray, etc.).';
COMMENT ON COLUMN omop.DRUG_STRENGTH.denominator_unit_concept_id IS 'A foreign key to the Concept in the CONCEPT table representing the identifier for the denominator Unit for the concentration of active ingredient.'; COMMENT ON COLUMN DRUG_STRENGTH.denominator_unit_concept_id IS 'A foreign key to the Concept in the CONCEPT table representing the identifier for the denominator Unit for the concentration of active ingredient.';
COMMENT ON COLUMN omop.DRUG_STRENGTH.box_size IS 'The number of units of Clinical of Branded Drug, or Quantified Clinical or Branded Drug contained in a box as dispensed to the patient'; COMMENT ON COLUMN DRUG_STRENGTH.box_size IS 'The number of units of Clinical of Branded Drug, or Quantified Clinical or Branded Drug contained in a box as dispensed to the patient';
COMMENT ON COLUMN omop.DRUG_STRENGTH.valid_start_date IS 'The date when the Concept was first recorded. The default value is 1-Jan-1970.'; COMMENT ON COLUMN DRUG_STRENGTH.valid_start_date IS 'The date when the Concept was first recorded. The default value is 1-Jan-1970.';
COMMENT ON COLUMN omop.DRUG_STRENGTH.valid_end_date IS 'The date when the concept became invalid because it was deleted or superseded (updated) by a new Concept. The default value is 31-Dec-2099.'; COMMENT ON COLUMN DRUG_STRENGTH.valid_end_date IS 'The date when the concept became invalid because it was deleted or superseded (updated) by a new Concept. The default value is 31-Dec-2099.';
COMMENT ON COLUMN omop.DRUG_STRENGTH.invalid_reason IS 'Reason the concept was invalidated. Possible values are '';D''; (deleted), '';U''; (replaced with an update) or NULL when valid_end_date has the default value.'; COMMENT ON COLUMN DRUG_STRENGTH.invalid_reason IS 'Reason the concept was invalidated. Possible values are '';D''; (deleted), '';U''; (replaced with an update) or NULL when valid_end_date has the default value.';
-- RELATIONSHIP -- RELATIONSHIP
COMMENT ON COLUMN omop.RELATIONSHIP.Field IS 'Description'; COMMENT ON COLUMN RELATIONSHIP.relationship_id IS 'The type of relationship captured by the relationship record.';
COMMENT ON COLUMN omop.RELATIONSHIP.relationship_id IS ' The type of relationship captured by the relationship record.'; COMMENT ON COLUMN RELATIONSHIP.relationship_name IS 'The text that describes the relationship type.';
COMMENT ON COLUMN omop.RELATIONSHIP.relationship_name IS ' The text that describes the relationship type.'; COMMENT ON COLUMN RELATIONSHIP.is_hierarchical IS 'Defines whether a relationship defines concepts into classes or hierarchies. Values are 1 for hierarchical relationship or 0 if not.';
COMMENT ON COLUMN omop.RELATIONSHIP.is_hierarchical IS 'Defines whether a relationship defines concepts into classes or hierarchies. Values are 1 for hierarchical relationship or 0 if not.'; COMMENT ON COLUMN RELATIONSHIP.defines_ancestry IS 'Defines whether a hierarchical relationship contributes to the concept_ancestor table. These are subsets of the hierarchical relationships. Valid values are 1 or 0.';
COMMENT ON COLUMN omop.RELATIONSHIP.defines_ancestry IS 'Defines whether a hierarchical relationship contributes to the concept_ancestor table. These are subsets of the hierarchical relationships. Valid values are 1 or 0.'; COMMENT ON COLUMN RELATIONSHIP.reverse_relationship_id IS 'The identifier for the relationship used to define the reverse relationship between two concepts.';
COMMENT ON COLUMN omop.RELATIONSHIP.reverse_relationship_id IS 'The identifier for the relationship used to define the reverse relationship between two concepts.'; COMMENT ON COLUMN RELATIONSHIP.relationship_concept_id IS 'A foreign key that refers to an identifier in the CONCEPT table for the unique relationship concept.';
COMMENT ON COLUMN omop.RELATIONSHIP.relationship_concept_id IS 'A foreign key that refers to an identifier in the CONCEPT table for the unique relationship concept.';
-- SOURCE_TO_CONCEPT_MAP -- SOURCE_TO_CONCEPT_MAP
COMMENT ON COLUMN omop.SOURCE_TO_CONCEPT_MAP.source_code IS 'The source code being translated into a Standard Concept.'; COMMENT ON COLUMN SOURCE_TO_CONCEPT_MAP.source_code IS 'The source code being translated into a Standard Concept.';
COMMENT ON COLUMN omop.SOURCE_TO_CONCEPT_MAP.source_concept_id IS 'A foreign key to the Source Concept that is being translated into a Standard Concept.'; COMMENT ON COLUMN SOURCE_TO_CONCEPT_MAP.source_concept_id IS 'A foreign key to the Source Concept that is being translated into a Standard Concept.';
COMMENT ON COLUMN omop.SOURCE_TO_CONCEPT_MAP.source_vocabulary_id IS 'A foreign key to the VOCABULARY table defining the vocabulary of the source code that is being translated to a Standard Concept.'; COMMENT ON COLUMN SOURCE_TO_CONCEPT_MAP.source_vocabulary_id IS 'A foreign key to the VOCABULARY table defining the vocabulary of the source code that is being translated to a Standard Concept.';
COMMENT ON COLUMN omop.SOURCE_TO_CONCEPT_MAP.source_code_description IS 'An optional description for the source code. This is included as a convenience to compare the description of the source code to the name of the concept.'; COMMENT ON COLUMN SOURCE_TO_CONCEPT_MAP.source_code_description IS 'An optional description for the source code. This is included as a convenience to compare the description of the source code to the name of the concept.';
COMMENT ON COLUMN omop.SOURCE_TO_CONCEPT_MAP.target_concept_id IS 'A foreign key to the target Concept to which the source code is being mapped.'; COMMENT ON COLUMN SOURCE_TO_CONCEPT_MAP.target_concept_id IS 'A foreign key to the target Concept to which the source code is being mapped.';
COMMENT ON COLUMN omop.SOURCE_TO_CONCEPT_MAP.target_vocabulary_id IS 'A foreign key to the VOCABULARY table defining the vocabulary of the target Concept.'; COMMENT ON COLUMN SOURCE_TO_CONCEPT_MAP.target_vocabulary_id IS 'A foreign key to the VOCABULARY table defining the vocabulary of the target Concept.';
COMMENT ON COLUMN omop.SOURCE_TO_CONCEPT_MAP.valid_start_date IS 'The date when the mapping instance was first recorded.'; COMMENT ON COLUMN SOURCE_TO_CONCEPT_MAP.valid_start_date IS 'The date when the mapping instance was first recorded.';
COMMENT ON COLUMN omop.SOURCE_TO_CONCEPT_MAP.valid_end_date IS 'The date when the mapping instance became invalid because it was deleted or superseded (updated) by a new relationship. Default value is 31-Dec-2099.'; COMMENT ON COLUMN SOURCE_TO_CONCEPT_MAP.valid_end_date IS 'The date when the mapping instance became invalid because it was deleted or superseded (updated) by a new relationship. Default value is 31-Dec-2099.';
COMMENT ON COLUMN omop.SOURCE_TO_CONCEPT_MAP.invalid_reason IS 'Reason the mapping instance was invalidated. Possible values are D (deleted), U (replaced with an update) or NULL when valid_end_date has the default value.'; COMMENT ON COLUMN SOURCE_TO_CONCEPT_MAP.invalid_reason IS 'Reason the mapping instance was invalidated. Possible values are D (deleted), U (replaced with an update) or NULL when valid_end_date has the default value.';
-- VOCABULARY -- VOCABULARY
COMMENT ON COLUMN omop.VOCABULARY.vocabulary_id IS 'A unique identifier for each Vocabulary, such as ICD9CM, SNOMED, Visit.'; COMMENT ON COLUMN VOCABULARY.vocabulary_id IS 'A unique identifier for each Vocabulary, such as ICD9CM, SNOMED, Visit.';
COMMENT ON COLUMN omop.VOCABULARY.vocabulary_name IS 'The name describing the vocabulary, for example "International Classification of Diseases, Ninth Revision, Clinical Modification, Volume 1 and 2 (NCHS)" etc.'; COMMENT ON COLUMN VOCABULARY.vocabulary_name IS 'The name describing the vocabulary, for example "International Classification of Diseases, Ninth Revision, Clinical Modification, Volume 1 and 2 (NCHS)" etc.';
COMMENT ON COLUMN omop.VOCABULARY.vocabulary_reference IS 'External reference to documentation or available download of the about the vocabulary.'; COMMENT ON COLUMN VOCABULARY.vocabulary_reference IS 'External reference to documentation or available download of the about the vocabulary.';
COMMENT ON COLUMN omop.VOCABULARY.vocabulary_version IS 'Version of the Vocabulary as indicated in the source.'; COMMENT ON COLUMN VOCABULARY.vocabulary_version IS 'Version of the Vocabulary as indicated in the source.';
COMMENT ON COLUMN omop.VOCABULARY.vocabulary_concept_id IS 'A foreign key that refers to a standard concept identifier in the CONCEPT table for the Vocabulary the VOCABULARY record belongs to.'; COMMENT ON COLUMN VOCABULARY.vocabulary_concept_id IS 'A foreign key that refers to a standard concept identifier in the CONCEPT table for the Vocabulary the VOCABULARY record belongs to.';
----------------------|------------------

View File

@ -45,8 +45,8 @@ Standardized vocabulary
CREATE TABLE concept ( CREATE TABLE concept (
concept_id INTEGER NOT NULL, concept_id INTEGER NOT NULL,
concept_name VARCHAR(255) NOT NULL, concept_name VARCHAR(255) NOT NULL,
domain_id VARCHAR(20) NOT NULL, domain_id VARCHAR(20) NOT NULL,
vocabulary_id VARCHAR(20) NOT NULL, vocabulary_id VARCHAR(20) NOT NULL,
concept_class_id VARCHAR(20) NOT NULL, concept_class_id VARCHAR(20) NOT NULL,
standard_concept VARCHAR(1) NULL, standard_concept VARCHAR(1) NULL,
@ -62,10 +62,10 @@ CREATE TABLE concept (
CREATE TABLE vocabulary ( CREATE TABLE vocabulary (
vocabulary_id VARCHAR(20) NOT NULL, vocabulary_id VARCHAR(20) NOT NULL,
vocabulary_name VARCHAR(255) NOT NULL, vocabulary_name VARCHAR(255) NOT NULL,
vocabulary_reference VARCHAR(255) NULL, vocabulary_reference VARCHAR(255) NULL,
vocabulary_version VARCHAR(255) NULL, vocabulary_version VARCHAR(255) NULL,
vocabulary_concept_id INTEGER NOT NULL vocabulary_concept_id INTEGER NOT NULL
) )
; ;
@ -74,16 +74,16 @@ CREATE TABLE vocabulary (
CREATE TABLE domain ( CREATE TABLE domain (
domain_id VARCHAR(20) NOT NULL, domain_id VARCHAR(20) NOT NULL,
domain_name VARCHAR(255) NOT NULL, domain_name VARCHAR(255) NOT NULL,
domain_concept_id INTEGER NOT NULL domain_concept_id INTEGER NOT NULL
) )
; ;
CREATE TABLE concept_class ( CREATE TABLE concept_class (
concept_class_id VARCHAR(20) NOT NULL, concept_class_id VARCHAR(20) NOT NULL,
concept_class_name VARCHAR(255) NOT NULL, concept_class_name VARCHAR(255) NOT NULL,
concept_class_concept_id INTEGER NOT NULL concept_class_concept_id INTEGER NOT NULL
) )
; ;
@ -103,10 +103,10 @@ CREATE TABLE concept_relationship (
CREATE TABLE relationship ( CREATE TABLE relationship (
relationship_id VARCHAR(20) NOT NULL, relationship_id VARCHAR(20) NOT NULL,
relationship_name VARCHAR(255) NOT NULL, relationship_name VARCHAR(255) NOT NULL,
is_hierarchical VARCHAR(1) NOT NULL, is_hierarchical VARCHAR(1) NOT NULL,
defines_ancestry VARCHAR(1) NOT NULL, defines_ancestry VARCHAR(1) NOT NULL,
reverse_relationship_id VARCHAR(20) NOT NULL, reverse_relationship_id VARCHAR(20) NOT NULL,
relationship_concept_id INTEGER NOT NULL relationship_concept_id INTEGER NOT NULL
) )
@ -115,32 +115,32 @@ CREATE TABLE relationship (
CREATE TABLE concept_synonym ( CREATE TABLE concept_synonym (
concept_id INTEGER NOT NULL, concept_id INTEGER NOT NULL,
concept_synonym_name VARCHAR(1000) NOT NULL, concept_synonym_name VARCHAR(1000) NOT NULL,
language_concept_id INTEGER NOT NULL language_concept_id INTEGER NOT NULL
) )
; ;
CREATE TABLE concept_ancestor ( CREATE TABLE concept_ancestor (
ancestor_concept_id INTEGER NOT NULL, ancestor_concept_id INTEGER NOT NULL,
descendant_concept_id INTEGER NOT NULL, descendant_concept_id INTEGER NOT NULL,
min_levels_of_separation INTEGER NOT NULL, min_levels_of_separation INTEGER NOT NULL,
max_levels_of_separation INTEGER NOT NULL max_levels_of_separation INTEGER NOT NULL
) )
; ;
CREATE TABLE source_to_concept_map ( CREATE TABLE source_to_concept_map (
source_code VARCHAR(50) NOT NULL, source_code VARCHAR(50) NOT NULL,
source_concept_id INTEGER NOT NULL, source_concept_id INTEGER NOT NULL,
source_vocabulary_id VARCHAR(20) NOT NULL, source_vocabulary_id VARCHAR(20) NOT NULL,
source_code_description VARCHAR(255) NULL, source_code_description VARCHAR(255) NULL,
target_concept_id INTEGER NOT NULL, target_concept_id INTEGER NOT NULL,
target_vocabulary_id VARCHAR(20) NOT NULL, target_vocabulary_id VARCHAR(20) NOT NULL,
valid_start_date DATE NOT NULL, valid_start_date DATE NOT NULL,
valid_end_date DATE NOT NULL, valid_end_date DATE NOT NULL,
invalid_reason VARCHAR(1) NULL invalid_reason VARCHAR(1) NULL
) )
; ;
@ -148,41 +148,41 @@ CREATE TABLE source_to_concept_map (
CREATE TABLE drug_strength ( CREATE TABLE drug_strength (
drug_concept_id INTEGER NOT NULL, drug_concept_id INTEGER NOT NULL,
ingredient_concept_id INTEGER NOT NULL, ingredient_concept_id INTEGER NOT NULL,
amount_value NUMERIC NULL, amount_value NUMERIC NULL,
amount_unit_concept_id INTEGER NULL, amount_unit_concept_id INTEGER NULL,
numerator_value NUMERIC NULL, numerator_value NUMERIC NULL,
numerator_unit_concept_id INTEGER NULL, numerator_unit_concept_id INTEGER NULL,
denominator_value NUMERIC NULL, denominator_value NUMERIC NULL,
denominator_unit_concept_id INTEGER NULL, denominator_unit_concept_id INTEGER NULL,
box_size INTEGER NULL, box_size INTEGER NULL,
valid_start_date DATE NOT NULL, valid_start_date DATE NOT NULL,
valid_end_date DATE NOT NULL, valid_end_date DATE NOT NULL,
invalid_reason VARCHAR(1) NULL invalid_reason VARCHAR(1) NULL
) )
; ;
CREATE TABLE cohort_definition ( CREATE TABLE cohort_definition (
cohort_definition_id INTEGER NOT NULL, cohort_definition_id INTEGER NOT NULL,
cohort_definition_name VARCHAR(255) NOT NULL, cohort_definition_name VARCHAR(255) NOT NULL,
cohort_definition_description TEXT NULL, cohort_definition_description TEXT NULL,
definition_type_concept_id INTEGER NOT NULL, definition_type_concept_id INTEGER NOT NULL,
cohort_definition_syntax TEXT NULL, cohort_definition_syntax TEXT NULL,
subject_concept_id INTEGER NOT NULL, subject_concept_id INTEGER NOT NULL,
cohort_initiation_date DATE NULL cohort_initiation_date DATE NULL
) )
; ;
CREATE TABLE attribute_definition ( CREATE TABLE attribute_definition (
attribute_definition_id INTEGER NOT NULL, attribute_definition_id INTEGER NOT NULL,
attribute_name VARCHAR(255) NOT NULL, attribute_name VARCHAR(255) NOT NULL,
attribute_description TEXT NULL, attribute_description TEXT NULL,
attribute_type_concept_id INTEGER NOT NULL, attribute_type_concept_id INTEGER NOT NULL,
attribute_syntax TEXT NULL attribute_syntax TEXT NULL
) )
; ;
@ -196,16 +196,16 @@ Standardized meta-data
CREATE TABLE cdm_source CREATE TABLE cdm_source
( (
cdm_source_name VARCHAR(255) NOT NULL, cdm_source_name VARCHAR(255) NOT NULL,
cdm_source_abbreviation VARCHAR(25) NULL, cdm_source_abbreviation VARCHAR(25) NULL,
cdm_holder VARCHAR(255) NULL, cdm_holder VARCHAR(255) NULL,
source_description TEXT NULL, source_description TEXT NULL,
source_documentation_reference VARCHAR(255) NULL, source_documentation_reference VARCHAR(255) NULL,
cdm_etl_reference VARCHAR(255) NULL, cdm_etl_reference VARCHAR(255) NULL,
source_release_date DATE NULL, source_release_date DATE NULL,
cdm_release_date DATE NULL, cdm_release_date DATE NULL,
cdm_version VARCHAR(10) NULL, cdm_version VARCHAR(10) NULL,
vocabulary_version VARCHAR(20) NULL vocabulary_version VARCHAR(20) NULL
) )
; ;
@ -224,24 +224,24 @@ Standardized clinical data
CREATE TABLE person CREATE TABLE person
( (
person_id INTEGER NOT NULL , person_id INTEGER NOT NULL ,
gender_concept_id INTEGER NOT NULL , gender_concept_id INTEGER NOT NULL ,
year_of_birth INTEGER NOT NULL , year_of_birth INTEGER NOT NULL ,
month_of_birth INTEGER NULL, month_of_birth INTEGER NULL,
day_of_birth INTEGER NULL, day_of_birth INTEGER NULL,
birth_datetime TIMESTAMP NULL, birth_datetime TIMESTAMP NULL,
race_concept_id INTEGER NOT NULL, race_concept_id INTEGER NOT NULL,
ethnicity_concept_id INTEGER NOT NULL, ethnicity_concept_id INTEGER NOT NULL,
location_id INTEGER NULL, location_id INTEGER NULL,
provider_id INTEGER NULL, provider_id INTEGER NULL,
care_site_id INTEGER NULL, care_site_id INTEGER NULL,
person_source_value VARCHAR(50) NULL, person_source_value VARCHAR(50) NULL,
gender_source_value VARCHAR(50) NULL, gender_source_value VARCHAR(50) NULL,
gender_source_concept_id INTEGER NULL, gender_source_concept_id INTEGER NULL,
race_source_value VARCHAR(50) NULL, race_source_value VARCHAR(50) NULL,
race_source_concept_id INTEGER NULL, race_source_concept_id INTEGER NULL,
ethnicity_source_value VARCHAR(50) NULL, ethnicity_source_value VARCHAR(50) NULL,
ethnicity_source_concept_id INTEGER NULL ethnicity_source_concept_id INTEGER NULL
) )
; ;
@ -251,13 +251,13 @@ CREATE TABLE person
CREATE TABLE observation_period CREATE TABLE observation_period
( (
observation_period_id INTEGER NOT NULL , observation_period_id INTEGER NOT NULL ,
person_id INTEGER NOT NULL , person_id INTEGER NOT NULL ,
observation_period_start_date DATE NOT NULL , observation_period_start_date DATE NOT NULL ,
observation_period_start_datetime TIMESTAMP NOT NULL , observation_period_start_datetime TIMESTAMP NOT NULL ,
observation_period_end_date DATE NOT NULL , observation_period_end_date DATE NOT NULL ,
observation_period_end_datetime TIMESTAMP NOT NULL , observation_period_end_datetime TIMESTAMP NOT NULL ,
period_type_concept_id INTEGER NOT NULL period_type_concept_id INTEGER NOT NULL
) )
; ;
@ -265,21 +265,21 @@ CREATE TABLE observation_period
CREATE TABLE specimen CREATE TABLE specimen
( (
specimen_id INTEGER NOT NULL , specimen_id INTEGER NOT NULL ,
person_id INTEGER NOT NULL , person_id INTEGER NOT NULL ,
specimen_concept_id INTEGER NOT NULL , specimen_concept_id INTEGER NOT NULL ,
specimen_type_concept_id INTEGER NOT NULL , specimen_type_concept_id INTEGER NOT NULL ,
specimen_date DATE NOT NULL , specimen_date DATE NOT NULL ,
specimen_datetime TIMESTAMP NULL , specimen_datetime TIMESTAMP NULL ,
quantity NUMERIC NULL , quantity NUMERIC NULL ,
unit_concept_id INTEGER NULL , unit_concept_id INTEGER NULL ,
anatomic_site_concept_id INTEGER NULL , anatomic_site_concept_id INTEGER NULL ,
disease_status_concept_id INTEGER NULL , disease_status_concept_id INTEGER NULL ,
specimen_source_id VARCHAR(50) NULL , specimen_source_id VARCHAR(50) NULL ,
specimen_source_value VARCHAR(50) NULL , specimen_source_value VARCHAR(50) NULL ,
unit_source_value VARCHAR(50) NULL , unit_source_value VARCHAR(50) NULL ,
anatomic_site_source_value VARCHAR(50) NULL , anatomic_site_source_value VARCHAR(50) NULL ,
disease_status_source_value VARCHAR(50) NULL disease_status_source_value VARCHAR(50) NULL
) )
; ;
@ -287,9 +287,9 @@ CREATE TABLE specimen
CREATE TABLE death CREATE TABLE death
( (
person_id INTEGER NOT NULL , person_id INTEGER NOT NULL ,
death_date DATE NOT NULL , death_date DATE NOT NULL ,
death_datetime TIMESTAMP NULL , death_datetime TIMESTAMP NULL ,
death_type_concept_id INTEGER NOT NULL , death_type_concept_id INTEGER NOT NULL ,
cause_concept_id INTEGER NULL , cause_concept_id INTEGER NULL ,
cause_source_value VARCHAR(50) NULL, cause_source_value VARCHAR(50) NULL,
@ -302,42 +302,67 @@ CREATE TABLE death
CREATE TABLE visit_occurrence CREATE TABLE visit_occurrence
( (
visit_occurrence_id INTEGER NOT NULL , visit_occurrence_id INTEGER NOT NULL ,
person_id INTEGER NOT NULL , person_id INTEGER NOT NULL ,
visit_concept_id INTEGER NOT NULL , visit_concept_id INTEGER NOT NULL ,
visit_start_date DATE 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_date DATE NOT NULL ,
visit_end_datetime TIMESTAMP NULL , visit_end_datetime TIMESTAMP NULL ,
visit_type_concept_id INTEGER NOT NULL , visit_type_concept_id INTEGER NOT NULL ,
provider_id INTEGER NULL, provider_id INTEGER NULL,
care_site_id INTEGER NULL, care_site_id INTEGER NULL,
visit_source_value VARCHAR(50) 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_concept_id INTEGER NULL ,
admitting_source_value VARCHAR(50) NULL , admitting_source_value VARCHAR(50) NULL ,
discharge_to_concept_id INTEGER NULL , discharge_to_concept_id INTEGER NULL ,
discharge_to_source_value VARCHAR(50) NULL , discharge_to_source_value VARCHAR(50) NULL ,
preceding_visit_occurrence_id INTEGER NULL preceding_visit_occurrence_id INTEGER NULL
) )
; ;
CREATE TABLE visit_detail
(
visit_detail_id INTEGER NOT NULL ,
person_id INTEGER NOT NULL ,
visit_detail_concept_id INTEGER NOT NULL ,
visit_start_date DATE NOT NULL ,
visit_start_datetime TIMESTAMP NULL ,
visit_end_date DATE NOT 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 ,
admitting_source_concept_id INTEGER NULL ,
admitting_source_value VARCHAR(50) NULL ,
discharge_to_concept_id INTEGER NULL ,
discharge_to_source_value VARCHAR(50) NULL ,
preceding_visit_detail_id INTEGER NULL ,
visit_detail_parent_id INTEGER NULL ,
visit_occurrence_id INTEGER NULL
)
;
CREATE TABLE procedure_occurrence CREATE TABLE procedure_occurrence
( (
procedure_occurrence_id INTEGER NOT NULL , procedure_occurrence_id INTEGER NOT NULL ,
person_id INTEGER NOT NULL , person_id INTEGER NOT NULL ,
procedure_concept_id INTEGER NOT NULL , procedure_concept_id INTEGER NOT NULL ,
procedure_date DATE NOT NULL , procedure_date DATE NOT NULL ,
procedure_datetime TIMESTAMP NOT NULL , procedure_datetime TIMESTAMP NOT NULL ,
procedure_type_concept_id INTEGER NOT NULL , procedure_type_concept_id INTEGER NOT NULL ,
modifier_concept_id INTEGER NULL , modifier_concept_id INTEGER NULL ,
quantity INTEGER NULL , quantity INTEGER NULL ,
provider_id INTEGER NULL , provider_id INTEGER NULL ,
visit_occurrence_id INTEGER NULL , visit_occurrence_id INTEGER NULL ,
procedure_source_value VARCHAR(50) NULL , visit_detail_id INTEGER NULL ,
procedure_source_concept_id INTEGER NULL , procedure_source_value VARCHAR(50) NULL ,
qualifier_source_value VARCHAR(50) NULL procedure_source_concept_id INTEGER NULL ,
qualifier_source_value VARCHAR(50) NULL
) )
; ;
@ -345,28 +370,29 @@ CREATE TABLE procedure_occurrence
CREATE TABLE drug_exposure CREATE TABLE drug_exposure
( (
drug_exposure_id INTEGER NOT NULL , drug_exposure_id INTEGER NOT NULL ,
person_id INTEGER NOT NULL , person_id INTEGER NOT NULL ,
drug_concept_id INTEGER NOT NULL , drug_concept_id INTEGER NOT NULL ,
drug_exposure_start_date DATE NOT NULL , drug_exposure_start_date DATE NOT NULL ,
drug_exposure_start_datetime TIMESTAMP NOT NULL , drug_exposure_start_datetime TIMESTAMP NOT NULL ,
drug_exposure_end_date DATE NOT NULL , drug_exposure_end_date DATE NOT NULL ,
drug_exposure_end_datetime TIMESTAMP NULL , drug_exposure_end_datetime TIMESTAMP NULL ,
verbatim_end_date DATE NULL , verbatim_end_date DATE NULL ,
drug_type_concept_id INTEGER NOT NULL , drug_type_concept_id INTEGER NOT NULL ,
stop_reason VARCHAR(20) NULL , stop_reason VARCHAR(20) NULL ,
refills INTEGER NULL , refills INTEGER NULL ,
quantity NUMERIC NULL , quantity NUMERIC NULL ,
days_supply INTEGER NULL , days_supply INTEGER NULL ,
sig TEXT NULL , sig TEXT NULL ,
route_concept_id INTEGER NULL , route_concept_id INTEGER NULL ,
lot_number VARCHAR(50) NULL , lot_number VARCHAR(50) NULL ,
provider_id INTEGER NULL , provider_id INTEGER NULL ,
visit_occurrence_id INTEGER NULL , visit_occurrence_id INTEGER NULL ,
drug_source_value VARCHAR(50) NULL , visit_detail_id INTEGER NULL ,
drug_source_concept_id INTEGER NULL , drug_source_value VARCHAR(50) NULL ,
route_source_value VARCHAR(50) NULL , drug_source_concept_id INTEGER NULL ,
dose_unit_source_value VARCHAR(50) NULL route_source_value VARCHAR(50) NULL ,
dose_unit_source_value VARCHAR(50) NULL
) )
; ;
@ -374,19 +400,20 @@ CREATE TABLE drug_exposure
CREATE TABLE device_exposure CREATE TABLE device_exposure
( (
device_exposure_id INTEGER NOT NULL , device_exposure_id INTEGER NOT NULL ,
person_id INTEGER NOT NULL , person_id INTEGER NOT NULL ,
device_concept_id INTEGER NOT NULL , device_concept_id INTEGER NOT NULL ,
device_exposure_start_date DATE NOT NULL , device_exposure_start_date DATE NOT NULL ,
device_exposure_start_datetime TIMESTAMP NOT NULL , device_exposure_start_datetime TIMESTAMP NOT NULL ,
device_exposure_end_date DATE NULL , device_exposure_end_date DATE NULL ,
device_exposure_end_datetime TIMESTAMP NULL , device_exposure_end_datetime TIMESTAMP NULL ,
device_type_concept_id INTEGER NOT NULL , device_type_concept_id INTEGER NOT NULL ,
unique_device_id VARCHAR(50) NULL , unique_device_id VARCHAR(50) NULL ,
quantity INTEGER NULL , quantity INTEGER NULL ,
provider_id INTEGER NULL , provider_id INTEGER NULL ,
visit_occurrence_id INTEGER NULL , visit_occurrence_id INTEGER NULL ,
device_source_value VARCHAR(100) NULL , visit_detail_id INTEGER NULL ,
device_source_concept_id INTEGER NULL device_source_value VARCHAR(100) NULL ,
device_source_concept_id INTEGER NULL
) )
; ;
@ -394,19 +421,20 @@ CREATE TABLE device_exposure
CREATE TABLE condition_occurrence CREATE TABLE condition_occurrence
( (
condition_occurrence_id INTEGER NOT NULL , condition_occurrence_id INTEGER NOT NULL ,
person_id INTEGER NOT NULL , person_id INTEGER NOT NULL ,
condition_concept_id INTEGER NOT NULL , condition_concept_id INTEGER NOT NULL ,
condition_start_date DATE NOT NULL , condition_start_date DATE NOT NULL ,
condition_start_datetime TIMESTAMP NOT NULL , condition_start_datetime TIMESTAMP NOT NULL ,
condition_end_date DATE NULL , condition_end_date DATE NULL ,
condition_end_datetime TIMESTAMP NULL , condition_end_datetime TIMESTAMP NULL ,
condition_type_concept_id INTEGER NOT NULL , condition_type_concept_id INTEGER NOT NULL ,
stop_reason VARCHAR(20) NULL , stop_reason VARCHAR(20) NULL ,
provider_id INTEGER NULL , provider_id INTEGER NULL ,
visit_occurrence_id INTEGER NULL , visit_occurrence_id INTEGER NULL ,
condition_source_value VARCHAR(50) NULL , visit_detail_id INTEGER NULL ,
condition_source_concept_id INTEGER NULL , condition_source_value VARCHAR(50) NULL ,
condition_status_source_value VARCHAR(50) NULL , condition_source_concept_id INTEGER NULL ,
condition_status_source_value VARCHAR(50) NULL ,
condition_status_concept_id INTEGER NULL condition_status_concept_id INTEGER NULL
) )
; ;
@ -415,24 +443,25 @@ CREATE TABLE condition_occurrence
CREATE TABLE measurement CREATE TABLE measurement
( (
measurement_id INTEGER NOT NULL , measurement_id INTEGER NOT NULL ,
person_id INTEGER NOT NULL , person_id INTEGER NOT NULL ,
measurement_concept_id INTEGER NOT NULL , measurement_concept_id INTEGER NOT NULL ,
measurement_date DATE NOT NULL , measurement_date DATE NOT NULL ,
measurement_datetime TIMESTAMP NULL , measurement_datetime TIMESTAMP NULL ,
measurement_type_concept_id INTEGER NOT NULL , measurement_type_concept_id INTEGER NOT NULL ,
operator_concept_id INTEGER NULL , operator_concept_id INTEGER NULL ,
value_as_number NUMERIC NULL , value_as_number NUMERIC NULL ,
value_as_concept_id INTEGER NULL , value_as_concept_id INTEGER NULL ,
unit_concept_id INTEGER NULL , unit_concept_id INTEGER NULL ,
range_low NUMERIC NULL , range_low NUMERIC NULL ,
range_high NUMERIC NULL , range_high NUMERIC NULL ,
provider_id INTEGER NULL , provider_id INTEGER NULL ,
visit_occurrence_id INTEGER NULL , visit_occurrence_id INTEGER NULL ,
measurement_source_value VARCHAR(50) NULL , visit_detail_id INTEGER NULL ,
measurement_source_concept_id INTEGER NULL , measurement_source_value VARCHAR(50) NULL ,
measurement_source_concept_id INTEGER NULL ,
unit_source_value VARCHAR(50) NULL , unit_source_value VARCHAR(50) NULL ,
value_source_value VARCHAR(50) NULL value_source_value VARCHAR(50) NULL
) )
; ;
@ -440,19 +469,20 @@ CREATE TABLE measurement
CREATE TABLE note CREATE TABLE note
( (
note_id INTEGER NOT NULL , note_id INTEGER NOT NULL ,
person_id INTEGER NOT NULL , person_id INTEGER NOT NULL ,
note_date DATE NOT NULL , note_date DATE NOT NULL ,
note_datetime TIMESTAMP NULL , note_datetime TIMESTAMP NULL ,
note_type_concept_id INTEGER NOT NULL , note_type_concept_id INTEGER NOT NULL ,
note_class_concept_id INTEGER NOT NULL , note_class_concept_id INTEGER NOT NULL ,
note_title VARCHAR(250) NULL , note_title VARCHAR(250) NULL ,
note_text TEXT NOT NULL , note_text TEXT NOT NULL ,
encoding_concept_id INTEGER NOT NULL , encoding_concept_id INTEGER NOT NULL ,
language_concept_id INTEGER NOT NULL , language_concept_id INTEGER NOT NULL ,
provider_id INTEGER NULL , provider_id INTEGER NULL ,
visit_occurrence_id INTEGER NULL , visit_occurrence_id INTEGER NULL ,
note_source_value VARCHAR(50) NULL note_source_value VARCHAR(50) NULL ,
visit_detail_id INTEGER NULL
) )
; ;
@ -462,42 +492,43 @@ CREATE TABLE note
CREATE TABLE note_nlp CREATE TABLE note_nlp
( (
note_nlp_id BIGINT NOT NULL , note_nlp_id BIGINT NOT NULL ,
note_id INTEGER NOT NULL , note_id INTEGER NOT NULL ,
section_concept_id INTEGER NULL , section_concept_id INTEGER NULL ,
snippet VARCHAR(250) NULL , snippet VARCHAR(250) NULL ,
"offset" VARCHAR(250) NULL , "offset" VARCHAR(250) NULL ,
lexical_variant VARCHAR(250) NOT NULL , lexical_variant VARCHAR(250) NOT NULL ,
note_nlp_concept_id INTEGER NULL , note_nlp_concept_id INTEGER NULL ,
note_nlp_source_concept_id INTEGER NULL , note_nlp_source_concept_id INTEGER NULL ,
nlp_system VARCHAR(250) NULL , nlp_system VARCHAR(250) NULL ,
nlp_date DATE NOT NULL , nlp_date DATE NOT NULL ,
nlp_datetime TIMESTAMP NULL , nlp_datetime TIMESTAMP NULL ,
term_exists VARCHAR(1) NULL , term_exists VARCHAR(1) NULL ,
term_temporal VARCHAR(50) NULL , term_temporal VARCHAR(50) NULL ,
term_modifiers VARCHAR(2000) NULL term_modifiers VARCHAR(2000) NULL
) )
; ;
CREATE TABLE observation CREATE TABLE observation
( (
observation_id INTEGER NOT NULL , observation_id INTEGER NOT NULL ,
person_id INTEGER NOT NULL , person_id INTEGER NOT NULL ,
observation_concept_id INTEGER NOT NULL , observation_concept_id INTEGER NOT NULL ,
observation_date DATE NOT NULL , observation_date DATE NOT NULL ,
observation_datetime TIMESTAMP NULL , observation_datetime TIMESTAMP NULL ,
observation_type_concept_id INTEGER NOT NULL , observation_type_concept_id INTEGER NOT NULL ,
value_as_number NUMERIC NULL , value_as_number NUMERIC NULL ,
value_as_string VARCHAR(60) NULL , value_as_string VARCHAR(60) NULL ,
value_as_concept_id INTEGER NULL , value_as_concept_id INTEGER NULL ,
qualifier_concept_id INTEGER NULL , qualifier_concept_id INTEGER NULL ,
unit_concept_id INTEGER NULL , unit_concept_id INTEGER NULL ,
provider_id INTEGER NULL , provider_id INTEGER NULL ,
visit_occurrence_id INTEGER NULL , visit_occurrence_id INTEGER NULL ,
observation_source_value VARCHAR(50) NULL , visit_detail_id INTEGER NULL ,
observation_source_concept_id INTEGER NULL , observation_source_value VARCHAR(50) NULL ,
observation_source_concept_id INTEGER NULL ,
unit_source_value VARCHAR(50) NULL , unit_source_value VARCHAR(50) NULL ,
qualifier_source_value VARCHAR(50) NULL qualifier_source_value VARCHAR(50) NULL
) )
; ;
@ -506,10 +537,10 @@ CREATE TABLE observation
CREATE TABLE fact_relationship CREATE TABLE fact_relationship
( (
domain_concept_id_1 INTEGER NOT NULL , domain_concept_id_1 INTEGER NOT NULL ,
fact_id_1 INTEGER NOT NULL , fact_id_1 INTEGER NOT NULL ,
domain_concept_id_2 INTEGER NOT NULL , domain_concept_id_2 INTEGER NOT NULL ,
fact_id_2 INTEGER NOT NULL , fact_id_2 INTEGER NOT NULL ,
relationship_concept_id INTEGER NOT NULL relationship_concept_id INTEGER NOT NULL
) )
; ;
@ -526,13 +557,13 @@ Standardized health system data
CREATE TABLE location CREATE TABLE location
( (
location_id INTEGER NOT NULL , location_id INTEGER NOT NULL ,
address_1 VARCHAR(50) NULL , address_1 VARCHAR(50) NULL ,
address_2 VARCHAR(50) NULL , address_2 VARCHAR(50) NULL ,
city VARCHAR(50) NULL , city VARCHAR(50) NULL ,
state VARCHAR(2) NULL , state VARCHAR(2) NULL ,
zip VARCHAR(9) NULL , zip VARCHAR(9) NULL ,
county VARCHAR(20) NULL , county VARCHAR(20) NULL ,
location_source_value VARCHAR(50) NULL location_source_value VARCHAR(50) NULL
) )
; ;
@ -541,11 +572,11 @@ CREATE TABLE location
CREATE TABLE care_site CREATE TABLE care_site
( (
care_site_id INTEGER NOT NULL , care_site_id INTEGER NOT NULL ,
care_site_name VARCHAR(255) NULL , care_site_name VARCHAR(255) NULL ,
place_of_service_concept_id INTEGER NULL , place_of_service_concept_id INTEGER NULL ,
location_id INTEGER NULL , location_id INTEGER NULL ,
care_site_source_value VARCHAR(50) NULL , care_site_source_value VARCHAR(50) NULL ,
place_of_service_source_value VARCHAR(50) NULL place_of_service_source_value VARCHAR(50) NULL
) )
; ;
@ -554,19 +585,19 @@ CREATE TABLE care_site
CREATE TABLE provider CREATE TABLE provider
( (
provider_id INTEGER NOT NULL , provider_id INTEGER NOT NULL ,
provider_name VARCHAR(255) NULL , provider_name VARCHAR(255) NULL ,
NPI VARCHAR(20) NULL , NPI VARCHAR(20) NULL ,
DEA VARCHAR(20) NULL , DEA VARCHAR(20) NULL ,
specialty_concept_id INTEGER NULL , specialty_concept_id INTEGER NULL ,
care_site_id INTEGER NULL , care_site_id INTEGER NULL ,
year_of_birth INTEGER NULL , year_of_birth INTEGER NULL ,
gender_concept_id INTEGER NULL , gender_concept_id INTEGER NULL ,
provider_source_value VARCHAR(50) NULL , provider_source_value VARCHAR(50) NULL ,
specialty_source_value VARCHAR(50) NULL , specialty_source_value VARCHAR(50) NULL ,
specialty_source_concept_id INTEGER NULL , specialty_source_concept_id INTEGER NULL ,
gender_source_value VARCHAR(50) NULL , gender_source_value VARCHAR(50) NULL ,
gender_source_concept_id INTEGER NULL gender_source_concept_id INTEGER NULL
) )
; ;
@ -583,12 +614,12 @@ Standardized health economics
CREATE TABLE payer_plan_period CREATE TABLE payer_plan_period
( (
payer_plan_period_id INTEGER NOT NULL , payer_plan_period_id INTEGER NOT NULL ,
person_id INTEGER NOT NULL , person_id INTEGER NOT NULL ,
payer_plan_period_start_date DATE NOT NULL , payer_plan_period_start_date DATE NOT NULL ,
payer_plan_period_end_date DATE NOT NULL , payer_plan_period_end_date DATE NOT NULL ,
payer_source_value VARCHAR (50) NULL , payer_source_value VARCHAR (50) NULL ,
plan_source_value VARCHAR (50) NULL , plan_source_value VARCHAR (50) NULL ,
family_source_value VARCHAR (50) NULL family_source_value VARCHAR (50) NULL
) )
; ;
@ -597,28 +628,28 @@ CREATE TABLE payer_plan_period
CREATE TABLE cost CREATE TABLE cost
( (
cost_id INTEGER NOT NULL , cost_id INTEGER NOT NULL ,
cost_event_id INTEGER NOT NULL , cost_event_id INTEGER NOT NULL ,
cost_domain_id VARCHAR(20) NOT NULL , cost_domain_id VARCHAR(20) NOT NULL ,
cost_type_concept_id INTEGER NOT NULL , cost_type_concept_id INTEGER NOT NULL ,
currency_concept_id INTEGER NULL , currency_concept_id INTEGER NULL ,
total_charge NUMERIC NULL , total_charge NUMERIC NULL ,
total_cost NUMERIC NULL , total_cost NUMERIC NULL ,
total_paid NUMERIC NULL , total_paid NUMERIC NULL ,
paid_by_payer NUMERIC NULL , paid_by_payer NUMERIC NULL ,
paid_by_patient NUMERIC NULL , paid_by_patient NUMERIC NULL ,
paid_patient_copay NUMERIC NULL , paid_patient_copay NUMERIC NULL ,
paid_patient_coinsurance NUMERIC NULL , paid_patient_coinsurance NUMERIC NULL ,
paid_patient_deductible NUMERIC NULL , paid_patient_deductible NUMERIC NULL ,
paid_by_primary NUMERIC NULL , paid_by_primary NUMERIC NULL ,
paid_ingredient_cost NUMERIC NULL , paid_ingredient_cost NUMERIC NULL ,
paid_dispensing_fee NUMERIC NULL , paid_dispensing_fee NUMERIC NULL ,
payer_plan_period_id INTEGER NULL , payer_plan_period_id INTEGER NULL ,
amount_allowed NUMERIC NULL , amount_allowed NUMERIC NULL ,
revenue_code_concept_id INTEGER NULL , revenue_code_concept_id INTEGER NULL ,
reveue_code_source_value VARCHAR(50) NULL , revenue_code_source_value VARCHAR(50) NULL ,
drg_concept_id INTEGER NULL, drg_concept_id INTEGER NULL,
drg_source_value VARCHAR(3) NULL drg_source_value VARCHAR(3) NULL
) )
; ;
@ -634,9 +665,9 @@ Standardized derived elements
CREATE TABLE cohort CREATE TABLE cohort
( (
cohort_definition_id INTEGER NOT NULL , cohort_definition_id INTEGER NOT NULL ,
subject_id INTEGER NOT NULL , subject_id INTEGER NOT NULL ,
cohort_start_date DATE NOT NULL , cohort_start_date DATE NOT NULL ,
cohort_end_date DATE NOT NULL cohort_end_date DATE NOT NULL
) )
; ;
@ -644,13 +675,13 @@ CREATE TABLE cohort
CREATE TABLE cohort_attribute CREATE TABLE cohort_attribute
( (
cohort_definition_id INTEGER NOT NULL , cohort_definition_id INTEGER NOT NULL ,
cohort_start_date DATE NOT NULL , cohort_start_date DATE NOT NULL ,
cohort_end_date DATE NOT NULL , cohort_end_date DATE NOT NULL ,
subject_id INTEGER NOT NULL , subject_id INTEGER NOT NULL ,
attribute_definition_id INTEGER NOT NULL , attribute_definition_id INTEGER NOT NULL ,
value_as_number NUMERIC NULL , value_as_number NUMERIC NULL ,
value_as_concept_id INTEGER NULL value_as_concept_id INTEGER NULL
) )
; ;
@ -659,24 +690,24 @@ CREATE TABLE cohort_attribute
CREATE TABLE drug_era CREATE TABLE drug_era
( (
drug_era_id INTEGER NOT NULL , drug_era_id INTEGER NOT NULL ,
person_id INTEGER NOT NULL , person_id INTEGER NOT NULL ,
drug_concept_id INTEGER NOT NULL , drug_concept_id INTEGER NOT NULL ,
drug_era_start_date DATE NOT NULL , drug_era_start_date DATE NOT NULL ,
drug_era_end_date DATE NOT NULL , drug_era_end_date DATE NOT NULL ,
drug_exposure_count INTEGER NULL , drug_exposure_count INTEGER NULL ,
gap_days INTEGER NULL gap_days INTEGER NULL
) )
; ;
CREATE TABLE dose_era CREATE TABLE dose_era
( (
dose_era_id INTEGER NOT NULL , dose_era_id INTEGER NOT NULL ,
person_id INTEGER NOT NULL , person_id INTEGER NOT NULL ,
drug_concept_id INTEGER NOT NULL , drug_concept_id INTEGER NOT NULL ,
unit_concept_id INTEGER NOT NULL , unit_concept_id INTEGER NOT NULL ,
dose_value NUMERIC NOT NULL , dose_value NUMERIC NOT NULL ,
dose_era_start_date DATE NOT NULL , dose_era_start_date DATE NOT NULL ,
dose_era_end_date DATE NOT NULL dose_era_end_date DATE NOT NULL
) )
@ -688,11 +719,11 @@ CREATE TABLE dose_era
CREATE TABLE condition_era CREATE TABLE condition_era
( (
condition_era_id INTEGER NOT NULL , condition_era_id INTEGER NOT NULL ,
person_id INTEGER NOT NULL , person_id INTEGER NOT NULL ,
condition_concept_id INTEGER NOT NULL , condition_concept_id INTEGER NOT NULL ,
condition_era_start_date DATE NOT NULL , condition_era_start_date DATE NOT NULL ,
condition_era_end_date DATE NOT NULL , condition_era_end_date DATE NOT NULL ,
condition_occurrence_count INTEGER NULL condition_occurrence_count INTEGER NULL
) )
; ;

View File

@ -4,67 +4,67 @@
#CLINICAL #CLINICAL
# #
echo "\n\n--\n--CLINICAL\n--\n" > "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n--\n--CLINICAL\n--\n" > "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
echo "\n\n-- VISIT_OCCURENCE" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n-- VISIT_OCCURRENCE" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/VISIT_OCCURRENCE.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN omop.visit_occurence.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/VISIT_OCCURRENCE.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN visit_occurrence.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
echo "\n\n-- CONDITION_OCCURENCE" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n-- CONDITION_OCCURRENCE" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/CONDITION_OCCURRENCE.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN omop.condition_occurence.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/CONDITION_OCCURRENCE.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN condition_occurrence.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
echo "\n\n-- DEATH" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n-- DEATH" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/DEATH.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN omop.death.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/DEATH.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN death.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
echo "\n\n-- DEVICE_EXPOSURE" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n-- DEVICE_EXPOSURE" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/DEVICE_EXPOSURE.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN omop.device_exposure.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/DEVICE_EXPOSURE.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN device_exposure.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
echo "\n\n-- DRUG_EXPOSURE" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n-- DRUG_EXPOSURE" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/DRUG_EXPOSURE.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN omop.drug_exposure.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/DRUG_EXPOSURE.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN drug_exposure.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
echo "\n\n-- FACT_RELATIONSHIP" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n-- FACT_RELATIONSHIP" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/FACT_RELATIONSHIP.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN omop.FACT_RELATIONSHIP.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/FACT_RELATIONSHIP.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN FACT_RELATIONSHIP.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
echo "\n\n-- MEASUREMENT" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n-- MEASUREMENT" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/MEASUREMENT.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN omop.MEASUREMENT.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/MEASUREMENT.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN MEASUREMENT.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
echo "\n\n-- NOTE" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n-- NOTE" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/NOTE.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN omop.NOTE.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/NOTE.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN NOTE.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
echo "\n\n-- VISIT_DETAIL" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n-- VISIT_DETAIL" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/VISIT_DETAIL.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN omop.VISIT_DETAIL.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/VISIT_DETAIL.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN VISIT_DETAIL.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
echo "\n\n-- SPECIMEN" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n-- SPECIMEN" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/SPECIMEN.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN omop.SPECIMEN.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/SPECIMEN.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN SPECIMEN.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
echo "\n\n-- PROCEDURE_OCCURRENCE" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n-- PROCEDURE_OCCURRENCE" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/PROCEDURE_OCCURRENCE.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN omop.PROCEDURE_OCCURRENCE.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/PROCEDURE_OCCURRENCE.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN PROCEDURE_OCCURRENCE.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
echo "\n\n-- PERSON" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n-- PERSON" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/PERSON.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN omop.PERSON.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/PERSON.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN PERSON.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
echo "\n\n-- OBSERVATION_PERIOD" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n-- OBSERVATION_PERIOD" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/OBSERVATION_PERIOD.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN omop.OBSERVATION_PERIOD.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/OBSERVATION_PERIOD.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN OBSERVATION_PERIOD.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
echo "\n\n-- OBSERVATION" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n-- OBSERVATION" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/OBSERVATION.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN omop.OBSERVATION.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/OBSERVATION.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN OBSERVATION.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
echo "\n\n-- NOTE_NLP" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n-- NOTE_NLP" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/NOTE_NLP.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN omop.NOTE_NLP.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/NOTE_NLP.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN NOTE_NLP.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
# #
#ECONOMIC #ECONOMIC
# #
echo "\n\n--\n--ECONOMIC\n--\n" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n--\n--ECONOMIC\n--\n" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
echo "\n\n-- COST" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n-- COST" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedHealthEconomicsDataTables/COST.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN omop.COST.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedHealthEconomicsDataTables/COST.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN COST.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
echo "\n\n-- PAYER_PLAN_PERIOD" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n-- PAYER_PLAN_PERIOD" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedHealthEconomicsDataTables/PAYER_PLAN_PERIOD.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN omop.PAYER_PLAN_PERIOD.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedHealthEconomicsDataTables/PAYER_PLAN_PERIOD.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN PAYER_PLAN_PERIOD.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
# #
#METADATA #METADATA
# #
echo "\n\n--\n--METADATA\n--\n" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n--\n--METADATA\n--\n" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
echo "\n\n-- CDM_SOURCE" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n-- CDM_SOURCE" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedMetadata/CDM_SOURCE.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN omop.CDM_SOURCE.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedMetadata/CDM_SOURCE.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN CDM_SOURCE.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
# #
@ -72,19 +72,19 @@ grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedMetadata/CDM_SOURC
# #
echo "\n\n--\n--DERIVED\n--\n" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n--\n--DERIVED\n--\n" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
echo "\n\n-- COHORT_ATTRIBUTE" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n-- COHORT_ATTRIBUTE" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedDerivedElements/COHORT_ATTRIBUTE.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN omop.COHORT_ATTRIBUTE.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedDerivedElements/COHORT_ATTRIBUTE.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN COHORT_ATTRIBUTE.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
echo "\n\n-- COHORT" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n-- COHORT" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedDerivedElements/COHORT.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN omop.COHORT.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedDerivedElements/COHORT.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN COHORT.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
echo "\n\n-- CONDITION_ERA" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n-- CONDITION_ERA" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedDerivedElements/CONDITION_ERA.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN omop.CONDITION_ERA.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedDerivedElements/CONDITION_ERA.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN CONDITION_ERA.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
echo "\n\n-- DOSE_ERA" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n-- DOSE_ERA" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedDerivedElements/DOSE_ERA.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN omop.DOSE_ERA.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedDerivedElements/DOSE_ERA.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN DOSE_ERA.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
echo "\n\n-- DRUG_ERA" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n-- DRUG_ERA" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedDerivedElements/DRUG_ERA.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN omop.DRUG_ERA.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedDerivedElements/DRUG_ERA.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN DRUG_ERA.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
# #
@ -93,13 +93,13 @@ grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedDerivedElements/DR
echo "\n\n--\n--SYSTEM\n--\n" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n--\n--SYSTEM\n--\n" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
echo "\n\n-- CARE_SITE" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n-- CARE_SITE" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedHealthSystemDataTables/CARE_SITE.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN omop.CARE_SITE.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedHealthSystemDataTables/CARE_SITE.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN CARE_SITE.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
echo "\n\n-- LOCATION" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n-- LOCATION" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedHealthSystemDataTables/LOCATION.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN omop.LOCATION.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedHealthSystemDataTables/LOCATION.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN LOCATION.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
echo "\n\n-- PROVIDER" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n-- PROVIDER" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedHealthSystemDataTables/PROVIDER.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN omop.PROVIDER.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedHealthSystemDataTables/PROVIDER.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN PROVIDER.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
# #
@ -108,37 +108,42 @@ grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedHealthSystemDataTa
echo "\n\n--\n--SYSTEM\n--\n" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n--\n--SYSTEM\n--\n" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
echo "\n\n-- ATTRIBUTE_DEFINITION" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n-- ATTRIBUTE_DEFINITION" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedVocabularies/ATTRIBUTE_DEFINITION.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN omop.ATTRIBUTE_DEFINITION.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedVocabularies/ATTRIBUTE_DEFINITION.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN ATTRIBUTE_DEFINITION.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
echo "\n\n-- COHORT_DEFINITION" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n-- COHORT_DEFINITION" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedVocabularies/COHORT_DEFINITION.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN omop.COHORT_DEFINITION.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedVocabularies/COHORT_DEFINITION.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN COHORT_DEFINITION.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
echo "\n\n-- CONCEPT_ANCESTOR" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n-- CONCEPT_ANCESTOR" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedVocabularies/CONCEPT_ANCESTOR.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN omop.CONCEPT_ANCESTOR.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedVocabularies/CONCEPT_ANCESTOR.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN CONCEPT_ANCESTOR.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
echo "\n\n-- CONCEPT_CLASS" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n-- CONCEPT_CLASS" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedVocabularies/CONCEPT_CLASS.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN omop.CONCEPT_CLASS.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedVocabularies/CONCEPT_CLASS.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN CONCEPT_CLASS.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
echo "\n\n-- CONCEPT" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n-- CONCEPT" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedVocabularies/CONCEPT.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN omop.CONCEPT.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedVocabularies/CONCEPT.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN CONCEPT.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
echo "\n\n-- CONCEPT_RELATIONSHIP" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n-- CONCEPT_RELATIONSHIP" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedVocabularies/CONCEPT_RELATIONSHIP.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN omop.CONCEPT_RELATIONSHIP.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedVocabularies/CONCEPT_RELATIONSHIP.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN CONCEPT_RELATIONSHIP.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
echo "\n\n-- CONCEPT_SYNONYM" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n-- CONCEPT_SYNONYM" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedVocabularies/CONCEPT_SYNONYM.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN omop.CONCEPT_SYNONYM.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedVocabularies/CONCEPT_SYNONYM.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN CONCEPT_SYNONYM.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
echo "\n\n-- DOMAIN" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n-- DOMAIN" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedVocabularies/DOMAIN.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN omop.DOMAIN.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedVocabularies/DOMAIN.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN DOMAIN.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
echo "\n\n-- DRUG_STRENGTH" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n-- DRUG_STRENGTH" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedVocabularies/DRUG_STRENGTH.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN omop.DRUG_STRENGTH.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedVocabularies/DRUG_STRENGTH.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN DRUG_STRENGTH.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
echo "\n\n-- RELATIONSHIP" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n-- RELATIONSHIP" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedVocabularies/RELATIONSHIP.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN omop.RELATIONSHIP.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedVocabularies/RELATIONSHIP.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN RELATIONSHIP.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
echo "\n\n-- SOURCE_TO_CONCEPT_MAP" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n-- SOURCE_TO_CONCEPT_MAP" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedVocabularies/SOURCE_TO_CONCEPT_MAP.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN omop.SOURCE_TO_CONCEPT_MAP.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedVocabularies/SOURCE_TO_CONCEPT_MAP.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN SOURCE_TO_CONCEPT_MAP.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
echo "\n\n-- VOCABULARY" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" echo "\n\n-- VOCABULARY" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedVocabularies/VOCABULARY.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN omop.VOCABULARY.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql" grep "|" Documentation/CommonDataModel_Wiki_Files/StandardizedVocabularies/VOCABULARY.md |sed '/^Field/ d'|sed '/^:--/ d'|sed "s/'/'';/g" |sed "s/|\(.*\)|.*|.*|\(.*\)|/COMMENT ON COLUMN VOCABULARY.\1 IS '\2';/g" >> "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
sed -i '/^--\|^COMMENT/!d' "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
sed -i "s/\t/ /g" "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
sed -i "s/'[ ]*/'/g" "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"
sed -i "s/[ ]*';/';/g" "PostgreSQL/OMOP CDM comments - PostgreSQL.sql"