From 4fc67257cac363f3c4021e9780f7200d0f758983 Mon Sep 17 00:00:00 2001 From: Gowtham Rao Date: Fri, 11 Aug 2017 12:12:42 -0400 Subject: [PATCH 01/11] Committing visit_detail description https://github.com/OHDSI/CommonDataModel/issues/70 --- .../VISIT_DETAIL.md | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/VISIT_DETAIL.md diff --git a/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/VISIT_DETAIL.md b/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/VISIT_DETAIL.md new file mode 100644 index 0000000..d8907b0 --- /dev/null +++ b/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/VISIT_DETAIL.md @@ -0,0 +1,43 @@ +The VISIT_DETAIL table is an optional table used to represents details of each record in the parent visit_occurrence table. For every record in visit_occurrence table there may be 0 or more records in the visit_detail table with a 1:n relationship where n may be 0. The visit_detail table is structurally very similar to visit_occurrence table and belongs to the same visit-domain in OMOP CDM. The two key difference from visit_occurrence is the presence of new foreign keys pointing to itself (visit_detail_parent_id) and to visit_occurrence table (visit_occurrence_id) + +Field|Required|Type|Description +:------------------------|:--------|:-----|:------------------------------------------------- +|visit_detail_id|Yes|integer|A unique identifier for each Person's visit or encounter at a healthcare provider.| +|person_id|Yes|integer|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_detail_concept_id|Yes|integer|A foreign key that refers to a visit Concept identifier in the Standardized Vocabularies.| +|visit_start_date|Yes|date|The start date of the visit.| +|visit_start_datetime|No|datetime|The date and time of the visit started.| +|visit_end_date|Yes|date|The end date of the visit. If this is a one-day visit the end date should match the start date.| +|visit_end_datetime|No|datetime|The date and time of the visit end.| +|visit_type_concept_id|Yes|Integer|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.| +|provider_id|No|integer|A foreign key to the provider in the provider table who was associated with the visit.| +|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_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_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_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| +|visit_detail_parent_id |Integer| No |A foreign key to the VISIT_DETAIL table record to represent the immediate parent visit-detail record.| +|visit_occurrence_id |Integer| No |A foreign key that refers to the record in the VISIT_OCCURRENCE table| + +### Conventions + + * All conventions used in Visit occurrence apply to visit detail, some notable exceptions: + * A Visit Detail is an optional detail record for each visit-occurrence to a healthcare facility. For every record in visit_detail there has to be a parent visit_occurrence record. + * One record is visit_detail can only have one visit_occurrence parent. + * A single visit_occurrence record may have many child visit_detail records. + * Valid Visit Concepts belong to the "Visit" domain. Standard Visit Concepts are yet to be defined, but will represent a detail of the standard visit concept in visit-occurrence. + * Handling of death: Is same as visit_occurrence + * Source Concepts from place of service vocabularies are mapped into these standard visit Concepts in the Standardized Vocabularies. + * At any one day, there could be more than one visit. Visit_occurrence allows for more than one visit within single day. Visit_detail is to be used to only capture details within the visit_occurrence. + * One visit may involve multiple providers, in which case, in visit_occurrence, the ETL must specify how a single provider id is selected or leave the provider_id field null. Visit_detail allows for ETL to speicify multiple child records per visit_occurrence - and each of these child may represent different provider_ids. + * One visit may involve multiple Care Sites, in which case, in visit_occurrence, the ETL must specify how a single care_site id is selected or leave the care_site_id field null. Visit_detail allows for ETL to speicify multiple child records per visit_occurrence - and each of these child may represent different care_sites. + * Just like in visit_occurrence, records in visit_detail may be sequentially related to each. These sequential relations are represented using preceding_visit_detail_id + * Unlike visit_occurrence, visit_detail may have nested visits with hierarchial relationships to each other. + + Example: an entire inpatient stay maybe one record in visit_occurrence table. This may have one or more detail information such as ER, ICU, medical floor, rehabilitation floor etc. Each of these visit_details may have different start/end date-times, different concept_id's and fact_id's - that would be separate record in visit_detail with a FK link to visit_occurrence. Each record within visit_detail maybe related to each other, sequentially –> ER leading to ICU leading to medical floor, leading to rehabilitation, or in hierarchical parent-child visit –> a visit for dialysis while in ICU. + + +Reference: https://github.com/OHDSI/CommonDataModel/issues/70 From 6cd6b7029a28e129fcc8de5afbf6c43b54b7ca41 Mon Sep 17 00:00:00 2001 From: Gowtham Rao Date: Fri, 11 Aug 2017 15:01:54 -0400 Subject: [PATCH 02/11] Update CONDITION_OCCURRENCE.md added visit_detail_id --- .../StandardizedClinicalDataTables/CONDITION_OCCURRENCE.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/CONDITION_OCCURRENCE.md b/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/CONDITION_OCCURRENCE.md index e20471d..e720938 100644 --- a/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/CONDITION_OCCURRENCE.md +++ b/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/CONDITION_OCCURRENCE.md @@ -15,7 +15,7 @@ Field|Required|Type|Description | condition_type_concept_id | Yes | integer | 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. | | stop_reason | No | varchar(20) | The reason that the condition was no longer present, as indicated in the source data. | | provider_id | No | integer | A foreign key to the Provider in the PROVIDER table who was responsible for capturing (diagnosing) the Condition. | -| visit_occurrence_id | No | integer | A foreign key to the visit in the VISIT table during which the Condition was determined (diagnosed). | +| visit_occurrence_id | No | integer | A foreign key to the visit in the VISIT_OCCURRENCE table during which the Condition was determined (diagnosed). | visit_detail_id | No | integer | A foreign key to the visit in the VISIT_DETAIL table during which the Condition was determined (diagnosed). | | condition_source_value | No | varchar(50) | 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. | | condition_source_concept_id | No | integer | A foreign key to a Condition Concept that refers to the code used in the source. | | condition_status_source_value | No | varchar(50) | The source code for the condition status as it appears in the source data. | @@ -37,4 +37,4 @@ Field|Required|Type|Description * Presently, there is no designated vocabulary, domain, or class that represents condition status. The following concepts from SNOMED are recommended: * Admitting diagnosis: 4203942 * Final diagnosis: 4230359 � should also be used for �Discharge diagnosis� - * Preliminary diagnosis: 4033240 \ No newline at end of file + * Preliminary diagnosis: 4033240 From 62c4ef6f029bbe9c90e569a63f0db1db356a4d83 Mon Sep 17 00:00:00 2001 From: Gowtham Rao Date: Fri, 11 Aug 2017 15:04:32 -0400 Subject: [PATCH 03/11] Update PROCEDURE_OCCURRENCE.md added visit_detail_id https://github.com/OHDSI/CommonDataModel/issues/70 --- .../StandardizedClinicalDataTables/PROCEDURE_OCCURRENCE.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/PROCEDURE_OCCURRENCE.md b/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/PROCEDURE_OCCURRENCE.md index 6b0fab0..0a77280 100644 --- a/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/PROCEDURE_OCCURRENCE.md +++ b/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/PROCEDURE_OCCURRENCE.md @@ -18,6 +18,7 @@ Field|Required|Type|Description |procedure_source_value|No|varchar(50)|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.| |procedure_source_concept_id|No|integer|A foreign key to a Procedure Concept that refers to the code used in the source.| |qualifier_source_value|No|varchar(50)|The source code for the qualifier as it appears in the source data.| +|visit_detail_id|No|integer|A foreign key to the visit in the visit table during which the Procedure was carried out.| ### Conventions @@ -27,4 +28,4 @@ Field|Required|Type|Description * If the quantity value is omitted, a single procedure is assumed. * The Procedure Type defines from where the Procedure Occurrence is drawn or inferred. For administrative claims records the type indicates whether a Procedure was primary or secondary and their relative positioning within a claim. * The Visit during which the procedure was performed is recorded through a reference to the VISIT_OCCURRENCE table. This information is not always available. - * The Provider carrying out the procedure is recorded through a reference to the PROVIDER table. This information is not always available. \ No newline at end of file + * The Provider carrying out the procedure is recorded through a reference to the PROVIDER table. This information is not always available. From f3434fc614e85e5259290e909d6524c7355b5415 Mon Sep 17 00:00:00 2001 From: Gowtham Rao Date: Fri, 11 Aug 2017 15:05:29 -0400 Subject: [PATCH 04/11] Update DEVICE_EXPOSURE.md added visit_detail_id https://github.com/OHDSI/CommonDataModel/issues/70 --- .../StandardizedClinicalDataTables/DEVICE_EXPOSURE.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/DEVICE_EXPOSURE.md b/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/DEVICE_EXPOSURE.md index 197cd77..047f25b 100644 --- a/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/DEVICE_EXPOSURE.md +++ b/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/DEVICE_EXPOSURE.md @@ -16,6 +16,7 @@ Field|Required|Type|Description |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_ 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.| ### Conventions @@ -24,4 +25,4 @@ Field|Required|Type|Description * Valid Device Concepts belong to the "Device" domain. The Concepts of this domain are derived from the DI portion of a UDI or based on other source vocabularies, like HCPCS. * A Device Type is assigned to each Device Exposure to track from what source the information was drawn or inferred. The valid domain_id for these Concepts is "Device Type". * The Visit during which the Device was first used is recorded through a reference to the VISIT_OCCURRENCE table. This information is not always available. - * The Provider exposing the patient to the Device is recorded through a reference to the PROVIDER table. This information is not always available. \ No newline at end of file + * The Provider exposing the patient to the Device is recorded through a reference to the PROVIDER table. This information is not always available. From 62ca39f36c4a552e1a589537f802064302addee8 Mon Sep 17 00:00:00 2001 From: Gowtham Rao Date: Fri, 11 Aug 2017 15:08:41 -0400 Subject: [PATCH 05/11] Update DRUG_EXPOSURE.md added visit_detail_id https://github.com/OHDSI/CommonDataModel/issues/70 --- .../StandardizedClinicalDataTables/DRUG_EXPOSURE.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/DRUG_EXPOSURE.md b/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/DRUG_EXPOSURE.md index 23eac5b..30b169d 100644 --- a/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/DRUG_EXPOSURE.md +++ b/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/DRUG_EXPOSURE.md @@ -31,6 +31,7 @@ Field|Required|Type|Description |drug_source_concept_id|No|integer|A foreign key to a Drug Concept that refers to the code used in the source.| |route_source_value|No|varchar(50)|The information about the route of administration as detailed in the source.| |dose_unit_source_value|No|varchar(50)|The information about the dose unit as detailed 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.| ### Conventions @@ -43,4 +44,4 @@ Field|Required|Type|Description * The lot_number field contains an identifier assigned from the manufacturer of the Drug product. * If possible, the visit in which the drug was prescribed or delivered is recorded in the visit_occurrence_id field through a reference to the visit table. * If possible, the prescribing or administering provider (physician or nurse) is recorded in the provider_id field through a reference to the provider table. - * The drug_exposure_end_date denotes the day the drug exposure ended for the patient. This could be that the duration of drug_supply was reached (in which case drug_exposure_end_date = drug_exposure_start_date + days_supply -1), or because the exposure was stopped (medication changed, medication discontinued, etc.) \ No newline at end of file + * The drug_exposure_end_date denotes the day the drug exposure ended for the patient. This could be that the duration of drug_supply was reached (in which case drug_exposure_end_date = drug_exposure_start_date + days_supply -1), or because the exposure was stopped (medication changed, medication discontinued, etc.) From fbee7bcfb1bae0aacc63db09d5e33c480778f6ae Mon Sep 17 00:00:00 2001 From: Gowtham Rao Date: Fri, 11 Aug 2017 15:09:46 -0400 Subject: [PATCH 06/11] Update MEASUREMENT.md --- .../StandardizedClinicalDataTables/MEASUREMENT.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/MEASUREMENT.md b/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/MEASUREMENT.md index d050a59..4bb09b8 100644 --- a/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/MEASUREMENT.md +++ b/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/MEASUREMENT.md @@ -16,6 +16,7 @@ Field|Required|Type|Description |range_high|No|float|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.| |provider_id|No|integer|A foreign key to the provider in the PROVIDER table who was responsible for initiating or obtaining the measurement.| |visit_occurrence_id|No|integer|A foreign key to the Visit in the VISIT_OCCURRENCE table during which the Measurement was recorded.| +|visit_detail_id|No|integer|A foreign key to the Visit in the VISIT_DETAIL table during which the Measurement was recorded.| |measurement_source_value|No|varchar(50)|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.| |measurement_source_concept_id|No|integer|A foreign key to a Concept in the Standard Vocabularies that refers to the code used in the source.| |unit_source_value|No|varchar(50)|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.| @@ -35,4 +36,4 @@ Field|Required|Type|Description * The Unit is optional even if a value_as_number is provided. * If reference ranges for upper and lower limit of normal as provided (typically by a laboratory) these are stored in the range_high and range_low fields. Ranges have the same unit as the value_as_number. * The Visit during which the observation was made is recorded through a reference to the VISIT_OCCURRENCE table. This information is not always available. - * The Provider making the observation is recorded through a reference to the PROVIDER table. This information is not always available. \ No newline at end of file + * The Provider making the observation is recorded through a reference to the PROVIDER table. This information is not always available. From 56a8b4a95e58a74ee7ada5f45389caaa12dbc0bf Mon Sep 17 00:00:00 2001 From: Gowtham Rao Date: Fri, 11 Aug 2017 15:10:23 -0400 Subject: [PATCH 07/11] Update MEASUREMENT.md added visit_detail_id https://github.com/OHDSI/CommonDataModel/issues/70 --- .../StandardizedClinicalDataTables/MEASUREMENT.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/MEASUREMENT.md b/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/MEASUREMENT.md index 4bb09b8..2439469 100644 --- a/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/MEASUREMENT.md +++ b/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/MEASUREMENT.md @@ -16,7 +16,7 @@ Field|Required|Type|Description |range_high|No|float|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.| |provider_id|No|integer|A foreign key to the provider in the PROVIDER table who was responsible for initiating or obtaining the measurement.| |visit_occurrence_id|No|integer|A foreign key to the Visit in the VISIT_OCCURRENCE table during which the Measurement was recorded.| -|visit_detail_id|No|integer|A foreign key to the Visit in the VISIT_DETAIL table during which the Measurement was recorded.| +|visit_detail_id|No|integer|A foreign key to the Visit in the VISIT_DETAIL table during which the Measurement was recorded. | |measurement_source_value|No|varchar(50)|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.| |measurement_source_concept_id|No|integer|A foreign key to a Concept in the Standard Vocabularies that refers to the code used in the source.| |unit_source_value|No|varchar(50)|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.| From d0729990318d0c1bdd9ce2b8894661fbba4f271f Mon Sep 17 00:00:00 2001 From: Gowtham Rao Date: Fri, 11 Aug 2017 15:11:26 -0400 Subject: [PATCH 08/11] Update OBSERVATION.md added visit_detail_id https://github.com/OHDSI/CommonDataModel/issues/70 --- .../StandardizedClinicalDataTables/OBSERVATION.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/OBSERVATION.md b/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/OBSERVATION.md index 90350e0..ef62a5a 100644 --- a/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/OBSERVATION.md +++ b/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/OBSERVATION.md @@ -15,6 +15,7 @@ Field|Required|Type|Description |unit_concept_id|No|integer|A foreign key to a Standard Concept ID of measurement units in the Standardized Vocabularies.| |provider_id|No|integer|A foreign key to the provider in the PROVIDER table who was responsible for making the observation.| |visit_occurrence_id|No|integer|A foreign key to the visit in the VISIT_OCCURRENCE table during which the observation was recorded.| +|visit_detail_id|No|integer|A foreign key to the visit in the VISIT_DETAIL table during which the observation was recorded.| |observation_source_value|No|varchar(50)|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.| |observation_source_concept_id|No|integer|A foreign key to a Concept that refers to the code used in the source.| |unit_source_value|No|varchar(50)|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.| @@ -32,4 +33,4 @@ Field|Required|Type|Description * Note that the value of value_as_concept_id may be provided through mapping from a source Concept which contains the content of the Observation. In those situations, the CONCEPT_RELATIONSHIP table in addition to the "Maps to" record contains a second record with the relationship_id set to "Maps to value". For example, ICD9CM V17.5 concept_id 44828510 "Family history of asthma" has a "Maps to" relationship to 4167217 "Family history of clinical finding" as well as a "Maps to value" record to 317009 "Asthma". * The qualifier_concept_id field contains all attributes specifying the clinical fact further, such as as degrees, severities, drug-drug interaction alerts etc. * The Visit during which the observation was made is recorded through a reference to the VISIT_OCCURRENCE table. This information is not always available. - * The Provider making the observation is recorded through a reference to the PROVIDER table. This information is not always available. \ No newline at end of file + * The Provider making the observation is recorded through a reference to the PROVIDER table. This information is not always available. From 4b1b256e6fe21740be896723ee24215fdac6f04b Mon Sep 17 00:00:00 2001 From: Gowtham Rao Date: Fri, 11 Aug 2017 15:12:35 -0400 Subject: [PATCH 09/11] Update VISIT_DETAIL.md visit_detail tables https://github.com/OHDSI/CommonDataModel/issues/70 --- .../StandardizedClinicalDataTables/VISIT_DETAIL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/VISIT_DETAIL.md b/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/VISIT_DETAIL.md index d8907b0..87ef30a 100644 --- a/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/VISIT_DETAIL.md +++ b/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/VISIT_DETAIL.md @@ -36,8 +36,8 @@ Field|Required|Type|Description * One visit may involve multiple Care Sites, in which case, in visit_occurrence, the ETL must specify how a single care_site id is selected or leave the care_site_id field null. Visit_detail allows for ETL to speicify multiple child records per visit_occurrence - and each of these child may represent different care_sites. * Just like in visit_occurrence, records in visit_detail may be sequentially related to each. These sequential relations are represented using preceding_visit_detail_id * Unlike visit_occurrence, visit_detail may have nested visits with hierarchial relationships to each other. + * Representation of US claim data: US claims data generally has two-levels. Header/summary data that summarizes the entire claim; Line/detail that details a claim. Detail is thus a child of the summary, and for every record in summary there is one or more records in detail. i.e. there will be atleast one FK link from visit_detail to visit_occurrence. Example: an entire inpatient stay maybe one record in visit_occurrence table. This may have one or more detail information such as ER, ICU, medical floor, rehabilitation floor etc. Each of these visit_details may have different start/end date-times, different concept_id's and fact_id's - that would be separate record in visit_detail with a FK link to visit_occurrence. Each record within visit_detail maybe related to each other, sequentially –> ER leading to ICU leading to medical floor, leading to rehabilitation, or in hierarchical parent-child visit –> a visit for dialysis while in ICU. -Reference: https://github.com/OHDSI/CommonDataModel/issues/70 From 319561e06e568f7089f99a1f2ff458cde4c6d0f7 Mon Sep 17 00:00:00 2001 From: Gowtham Rao Date: Fri, 11 Aug 2017 16:23:01 -0400 Subject: [PATCH 10/11] Update VISIT_DETAIL.md --- .../StandardizedClinicalDataTables/VISIT_DETAIL.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/VISIT_DETAIL.md b/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/VISIT_DETAIL.md index 87ef30a..4db98f4 100644 --- a/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/VISIT_DETAIL.md +++ b/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/VISIT_DETAIL.md @@ -1,4 +1,5 @@ -The VISIT_DETAIL table is an optional table used to represents details of each record in the parent visit_occurrence table. For every record in visit_occurrence table there may be 0 or more records in the visit_detail table with a 1:n relationship where n may be 0. The visit_detail table is structurally very similar to visit_occurrence table and belongs to the same visit-domain in OMOP CDM. The two key difference from visit_occurrence is the presence of new foreign keys pointing to itself (visit_detail_parent_id) and to visit_occurrence table (visit_occurrence_id) +The VISIT_DETAIL table is an optional table used to represents details of each record in the parent visit_occurrence table. For every record in visit_occurrence table there may be 0 or more records in the visit_detail table with a 1:n relationship where n may be 0. The visit_detail table is structurally very similar to visit_occurrence table and belongs to the similar domain as the visit. + Field|Required|Type|Description :------------------------|:--------|:-----|:------------------------------------------------- @@ -40,4 +41,6 @@ Field|Required|Type|Description Example: an entire inpatient stay maybe one record in visit_occurrence table. This may have one or more detail information such as ER, ICU, medical floor, rehabilitation floor etc. Each of these visit_details may have different start/end date-times, different concept_id's and fact_id's - that would be separate record in visit_detail with a FK link to visit_occurrence. Each record within visit_detail maybe related to each other, sequentially –> ER leading to ICU leading to medical floor, leading to rehabilitation, or in hierarchical parent-child visit –> a visit for dialysis while in ICU. - +Note the concept-id for visits is 9, and is shared between visit_occurrence and visit_detail in OMOP CDM. The key deviation from visit_occurrence is +- self-referencing key: a new foreign key visit_detail_parent_id allows self referencing for nested visits. +- visit_detail points to its parent record in visit_occurrence table (visit_occurrence_id) From 23d2d6398ebdd730244efa01d71507d052eaf766 Mon Sep 17 00:00:00 2001 From: Gowtham Rao Date: Sat, 9 Sep 2017 12:53:49 -0400 Subject: [PATCH 11/11] Update VISIT_DETAIL.md --- .../StandardizedClinicalDataTables/VISIT_DETAIL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/VISIT_DETAIL.md b/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/VISIT_DETAIL.md index 4db98f4..6fd1442 100644 --- a/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/VISIT_DETAIL.md +++ b/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/VISIT_DETAIL.md @@ -21,7 +21,7 @@ Field|Required|Type|Description |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| |visit_detail_parent_id |Integer| No |A foreign key to the VISIT_DETAIL table record to represent the immediate parent visit-detail record.| -|visit_occurrence_id |Integer| No |A foreign key that refers to the record in the VISIT_OCCURRENCE table| +|visit_occurrence_id |Integer| Yes |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.| ### Conventions