GEMINI-Medicine / Rgemini

A custom R package that provides a variety of functions to perform data analyses with GEMINI data
https://gemini-medicine.github.io/Rgemini/
Other
3 stars 0 forks source link

Add `remove_icu_tests` from MPR/OPR code #109

Open loffleraSMH opened 5 months ago

loffleraSMH commented 5 months ago

New Feature Request

The MPR/OPR code has a function that allows for exclusion of events that occurred while the patients was in the ICU (e.g., lab tests/transfusions etc.). The code has already been developed/reviewed during the MPR sprint (see physician_reports/backend/utils.R/remove_icu_tests()) , but we should add this function to Rgemini.

We should maybe rename the function slightly (as it doesn't just exclude tests, but also transfusions etc.).

Once the function has been added to Rgemini, please also open a new issue in the GEMINIreports repo to replace the existing code with the Rgemini function.

We can also consider adding a flag exlcude_ICU to n_imaging, n_bloodwork and n_rbc_transfusions to allow for exclusion of ICU (using the newly added function).