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

Therapy timeline #69

Closed emmavestesson closed 2 years ago

emmavestesson commented 3 years ago

Hi,

I get an error using therapy_timeline() 'Error: no such table: patients' when using it on an object of class TherapyEpisode. I've tried to compare my object to the uti_episode I can create using your mock data base and the only difference I can see is the type of connection where the one that doesn't work is stored in memory and the other one is stored locally. Could this be the issue?

peterdutey commented 3 years ago

Hi Emma

Thanks for your issue! The reason is that you probably only loaded the medications data. therapy_timeline() will also pull information from data imported via

Now that error message wasn't terribly helpful! I need to handle this more gracefully, either by allowing you to use it when only meds have been loaded, or by asking you to load those data.

I'll fix this in the next release and update this issue. Thank you for drawing attention to this!

Peter