Medical-Event-Data-Standard / meds_etl

A collection of ETLs from common data formats to Medical Event Data Standard
Apache License 2.0
16 stars 3 forks source link

"end" times in properties causes problems with generic property handling code #28

Open EthanSteinberg opened 1 month ago

EthanSteinberg commented 1 month ago

The current design has end times (for visits, procedures, etc) in properties, which is somewhat simple and matches the source data.

However, this can cause issues with generic property handling code as it will leak future information (the end of the visit) into the past.

This also makes certain types of operations cumbersome.

The solution here is to introduce a new event type, DISCHARGE, for visits. That DISCHARGE event would be linked to the visit via visit_id.

I would propose using code=MEDS/Discharge for these events, with no ontology linkages.

mmcdermott commented 1 month ago

I would recommend this for all "interval" type events (e.g., procedures, infusions, etc.) with appropriate non-linked codes.

EthanSteinberg commented 1 month ago

@mmcdermott Good point. Fixed.