National-Clinical-Cohort-Collaborative / Data-Ingestion-and-Harmonization

Data Ingestion and Harmonization
41 stars 12 forks source link

CMS: Medicaid - LT visits needs to merge visit dates with 1 day differences as one #111

Closed stephanieshong closed 11 months ago

stephanieshong commented 1 year ago

LT - long term care claims are submitted in monthly, if the claim contains only one day difference in claim dates merge the visit dates into one such that we do not have multiple visit dates for one stay in a long term care for a patient that last more than a month.

stephanieshong commented 1 year ago

lt_visit_detail rollup to lt_visit_occurrence - Long term care claims come in monthly chunks even though the visit is continuous with one day difference. For example, as the calendar date moves from Feb 28 to March 1 to April, we have two or three claims instead of one. Therefore, these monthly claims should be merged to into one visit instead of having multiple visits from the claim dates found in the claim records for the same patient. They are continuous visit with one day difference for the same patient.

chrisroederucdenver commented 1 year ago

FYI, starting as my primary effort today. Branch is here.

chrisroederucdenver commented 1 year ago

re-started this week after some leave. Analysis workbook here.

chrisroederucdenver commented 12 months ago

Looks like the ancestor/descendant relationships in OMOP for in-patient and out-patient concepts (9201, 9202) to the medicare concept for hospital code A0 (38004515) are upside down. This makes code in cross-walk creation create a 1-to-many mapping that results in multiple rows. Ticket 120 here.

chrisroederucdenver commented 11 months ago

PR ready with a first() to pick one of the two alues.PR

Within just LT data, without a fix, you get 214k rows in visit_occurrence. With a fix you get 118k. This is confirmed when you see that there are either 95k or 2x 95k rows from A0. To set the context, within all of medicaid (no filter) the visit_occurrence table has 35m rows.

chrisroederucdenver commented 11 months ago

merged Nov. 10 @stephanieshong I don't have permission to close.

stephanieshong commented 11 months ago

@chrisroederucdenver -Thank you. Completed the merge and build over the weekend, 11/11/23! Closing.