ramses-antibiotics / ramses-package

R Package for Data-Driven Antimicrobial Stewardship & Surveillance in Hospitals
https://ramses-antibiotics.web.app/
GNU General Public License v3.0
10 stars 1 forks source link

bridge tables: be more conservative over data wrangling #104

Closed peterdutey closed 2 years ago

peterdutey commented 2 years ago

Bridge table functions should be improved to only work on a predictable set of fields. See for instance here

In a particular instance where encounter_id was included in the drug_prescriptions table, the left join with inpatient_episodes would create fields encounter_id.x and encounter_id.y and break the execution. This would have been avoided had tblz_prescriptions been built with a conservative select() statement.