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

Preparing prescriptions data #68

Closed emmavestesson closed 3 years ago

emmavestesson commented 3 years ago

Hi,

A few questions/things I noticed preparing prescription data for use with Ramses.

The help file for daily_frequency() says that there are only two valid values -1 and -9, I assume this is in addition to positive integers actually indicating the daily frequency? what about drugs that are not administered daily? And drugs that are given continuously?

validate_prescriptions() requires a variable called frequency but this is not listed under 'Mandatory fields' in the helpfile.

In the example for creating ATC_route in the load data vignette the final statement should not be quoted ie TRUE ~ NA_character_ instead of TRUE ~ "NA_character_" or it will be a string instead of a missing value. Is there a reference for the abbrevations you have in your example in the vignette?

Thanks,

Emma

peterdutey commented 3 years ago

Hi Emma

Thanks for the very relevant issue.

  1. All correct. Please note daily_frequency can include values between 0 and 1 for meds administered less than daily. Drugs administered continuously is not something I've encountered much other than as PRNs. Can you tell me how they are represented in your hospital's warehouse? These could be coded as PRNs or as dedicated -7 code. More information would be useful.
  2. Well spotted!
  3. Also well spotted. As for abbreviations, they are documented in the reference_drug_frequency object.

Tip: since you're interested in the data modelling, here's a tip: the complete schema rules are available in CSV files here. This can also be found in your machine - the directory path can be found by typing system.file("Schema", package = "Ramses") in your R console.

Thanks for reporting those issues/questions.

On that basis here's what I'm planning for next minor release:

Peter

emmavestesson commented 3 years ago

Hi, Thanks for replying so quickly. I checked and continuous is only used for a handful out of more than 400,000 administrations so I'm just going to ignore them.