Closed clairblacketer closed 6 years ago
hi @clairblacketer
11 july is not too late, let me be devil's advocate with my 2 cents on that topic. There is a strong need to get this granularity level into OMOP. to my knowledge, other projects deal with the question of visit granularity:
i2b2 (1 table=visit_dimension)
the Visit_Dimension table represents sessions where observations were made. Each row represents one session (also called a visit, event or encounter.) (https://www.i2b2.org/software/projects/datarepo/CRC_Design_Doc_13.pdf)
FHIR (1 nested table=encounter resource)
Encounter allows a flexible nesting of Encounters using the partOf element. (https://www.hl7.org/fhir/encounter.html#examples)
MIMIC (2 tables = admissions + stay)
stay_id is a generated identifier that is not based on any raw data identifier the hospital and ICU databases are not intrinsically linked and so do not have any concept of an ICU encounter identifier.(https://mimic.physionet.org/mimictables/icustays/)
this OMOP proposal (2 tables + nested = visit_occurence + visit_detail ) This proposal is clearly the most complicated approach. I understand OMOP goal is analytics, but
A single nested table proposal should be taken into consideration. Without consideration about what analytical use cases you have, and what SQL queries would solve them it is a bit early to go in one or other direction. (sorry if I missed something about that in both forum post 1 & 2).
An example of single nested table proposal could be visit_occurence + :
Then it would be two options for fact tables (measurments, notes, condition....):
@parisni
All good points. And they have been made during the debate we had. The current proposal is a two-level hierarchy, where both levels are stratified into separate tables, VISIT_OCCURRENCE and VISIT_DETAIL. This is a compromise between a number of conflicting needs:
1. Backwards compatibility. The VISIT_OCCURRENCE table already exists, and it explicitly contains the macro level. If you now want to add new nested more granular records to that table that will overlap in time all existing queries will break. 2. Consistency. We already have two dimensions were things exist in more detail and in more aggregate: DRUG_EXPOSURE/DRUG_ERA and CONDITION_OCCURRENCE/CONDITION_ERA. We didn't call VISIT_OCCURRENCE VISIT_ERA, again for compatibility reasons, but otherwise it is the same idea. 3. Matching of use cases. Instead of creating the mother of all perfect solutions, we want to create a solution that will work in most use cases simply. And that use case is VISIT_OCCURRENCE. The vast majority (I think >95%) of analytics will ask for some medical event in combination with hospitalization, or outside hospitalization, without any regard what exactly happened inside the hospital. VISIT_OCCURRENCE does that perfectly well. 4. Simplicity. Making folks do recursive queries to the same table is not popular. And it is not fast, either. 5. Availability of data. Even the most detailed EHR systems do not give you all detail down to the bed. And even if it did - do we really need the number of the bed that patient was in? Or room? What's the use case for that?
It's a pity you couldn't participate in this debate earlier, because it has been going on for half a year at least, and many of your ideas were brought up. See here, here, here, here and here . Now, we are ready to push it out. If you really feel you want to change the consensus, you will need to provide use cases which will work in your proposal, and will not work in the current proposal.
BTW: We will continue this subject on the next CDM Workgroup meeting next Tuesday the 11th of July. Please come.
Makes sense?
Hey @cgreich
Thanks for this answer. This is very true about the over-complexity of a single nested table, and I understand the backward compatibility concerns. While I am not having the big picture on OMOP, and I haven't seen any post aggregating research uses cases, versus model proposal versus sql queries, your proposal looks to answer my needs, and I am confident it is robust.
About the working on the trajectory, some testing showed me that your design works fine: please consider this link
BTW, I would be glad to meet you on the CDM workgroup, but I am not very clear with the way to do so. Being a European fellow, is there any chance I join you by a web solution & not by phone as described on the link ?
@parisni:
Yes, typical trajectories are a good use case. Other ones are hospital-acquired infections, efficiency of treatment, occurrence of adverse events, cost of treatment. All these outcomes can be stratified by the VISIT_DETAIL. Benchmarks could be established, and even comparisons between provider institutions could be created.
But again, the vast majority of cases using any of the VISIT_* tables is to find out if a condition was treated in a hospital or outside. Most often, this is a surrogate for severity. An asthma attack the patient treated with a puff from his inhaler is a different kind of thing than a status asthmaticus requiring an ambulance to the A&E and a subsequent hospital stay. Those need to be kept simple (where exists (select 1 from VISIT_OCCURRENCE where person_id=patient_id and visit_start_date=event_date and visit_concept_id in (inpatient, ER, both)))
Where are you located? I can add a local toll-free number for pretty much every country except North Korea. Also, I need your email address.
In the initial proposal _date was removed, in the proposal as it currently is we will keep both _date and _datetime and drop _date in version 6.0.0
visit_detail_concept_id: Is it possible to add guidance stating the expected concept domain? In fact, it will be an aid to ETL developers if the expected concept domain where provided for all the concept id in Visit Detail.
preceding_visit_detail_id: Description says 'visit immediately preceding this visit'. Should this say the visit_detail immediately preceding this visit_detail? Also, suggest adding guidance for what to put for first visit_detail record in the series (no predecessor), should it be NULL or Zero?
visit_detail_parent_id: Again suggest guidance for top level visit_detail. should the value be 0, NULL, or even the visit_occurrence_id of the associated visit?
Proposal for Visit_detail: Represent granular encounters or microvisits
Discussions: forum post 1, forum post 2
Proposal
New VISIT_DETAIL table
This table will have the same structure as current VISIT_OCCURRENCE table, except for two changes:
Relationship between VISIT_DETAIL and clinical events tables We will add a new optional foreign key pointing from a clinical-event table to visit_detail table.
PROCEDURE_OCCURRENCE
DRUG_EXPOSURE
DEVICE_EXPOSURE
CONDITION_OCCURRENCE
MEASUREMENT
NOTE
OBSERVATION
Conventions
Representation of US claim data
US claims data generally has two-levels
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.
Use Cases