tjbiel85 / pytiva

Python Tools for Investigating and Visualizing Activity (PyTIVA) within anesthetic records
GNU General Public License v3.0
0 stars 0 forks source link

Helper function to consolidate activity into non-overlapping chunks for a single patient #10

Closed tjbiel85 closed 1 year ago

tjbiel85 commented 1 year ago

Mostly inspired by looking into medication activity. If, for example, there are medications given every two minutes and we generate activity spanning 3 minutes before and after, there will be significant overlap and "double counting." Instead, we would want to find where concurrent activity is at least 1 per time period (likely 1Min by default), and then end up spitting out an activity record with activity_start and activity_end spanning each of those.

tjbiel85 commented 1 year ago

Added in 00fed2c4a79d10563ad53de0efcaddd4484dd580 via ActivityDataSet.fetch_unduplicated_concurrency()