eth-mds / ricu

🏥 ICU data with R 🏥
https://eth-mds.github.io/ricu/
GNU General Public License v3.0
33 stars 11 forks source link

Fix AUMC difftime calculation #21

Closed prockenschaub closed 3 months ago

prockenschaub commented 1 year ago

This is a fix for the issue described in #20.

The current solution is mainly copy-paste of load_mihi with some small changes. This could/should be refactored to avoid code duplication, perhaps with a single function that can deal with all databases.

prockenschaub commented 9 months ago

After closer inspection of load_mihi and load_eiau (split into load_ei and load_au by one of the commits), it turned out that they only differ in the rounding function they apply. They can therefore be replace by a single function do_load_difftime that receives the rounding function as a paramter.

Technically, do_load_difftime unnecessarily merges the origin for eICU. However, the time overhead does not seem too bad and the simplifcation is worth it IMO.

prockenschaub commented 9 months ago

Note that this PR branches of #19 , which should be merged before this one.

prockenschaub commented 3 months ago

Closed in favour of #51