Another quick question related to this. not related to dates but related to visit_occurrence_ids
Are all lab/condition/drug records always have an associated visit? I understand ideally we expect it to be tied to a visit.
Because I see in our source data, there are lab/drug/condition records which stand isolated from our visit records.
Meaning patient A has visited hospital as outpatient on Jan 1st 2010 and left on the same day. Similarly he has 5 different outpatient visits on different days (ex: Jan 1st, Feb 21st, Mar 23rd, Apr 25th, Jun 26th) and he has corresponding lab/drugs/conditions data for these 5 visits…
But if I dig further his lab records, I see that he has records associated with 10 unique visit_ids (visit_occurrence_ids) implying 10 visits to hospital. So it’s like we have additional lab information for 5 more visits which aren’t recorded in the visit table at all. And these visit times are away from the recorded 5 visits by more number of days like 2 months, 3 months etc
Have you encountered in your experience where records outside/not related to visit_ids in the visit table are present in other domain tables like lab, drugs, conditions etc.?
If yes, how do you handle such scenarios? Can you share some suggestions on how to address this?
@Chris_Knoll - Another question related to this w.rt to Atlas part.
Does Atlas/OHDSI tools consider visit_occurrence_ids while running the queries in back end?
Meaning, for the records which are outside (by more number of days like 2 months, 3 months) of recorded visit, I am planning to leave the visit_ids as null (in domain tables like measurement, condition, drug_exposure). For rest of the records, I will anyway have the visit_ids from visit_occurrence table because they are present in lab as well as in visit table (as given by source data).
So will ATLAS while running cohort generation (with visit_occurrence domain in criteria), I guess it will consider visit_occurrence_id to join records as well.
If yes, then do you recommend to drop these records (which are present in lab with a visit_id but not present in visit table) ?
I have reached out to data source owners as well but just wanted to check and know from you veterans whether it is common issue, how do you address this while data transformation or it’s unusual thing happening only with our data?