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 create activity from medication administration #9

Open tjbiel85 opened 1 year ago

tjbiel85 commented 1 year ago

To start with, just be able to go through medications and add timedeltas before and after the administration time, plus extract the patient for whom the activity is being extracted..

Perhaps down the line: define these based on things like medication name, dose, route, in order to allow for more precise control and batched definitions.

These mostly need to be definable for medications administered outside of the operating room, predominantly on L&D. For example, bolus dose medication to a labor epidural (i.e. "top ups"), which would constitute provider activity but fall outside of a Cesarean section, epidural/spinal placement, or ECV performed in the room.

tjbiel85 commented 1 year ago

Added the most basic version of this in 00fed2c4a79d10563ad53de0efcaddd4484dd580 via AnesthesiaCaseMedicationDataSet.to_activity_dataset(). This issue will be kept open for now, might build more handling for things like medication name, dose, route, etc., if these might impact the logic of how much time should be credited.