msberends / AMR

Functions to simplify and standardise antimicrobial resistance (AMR) data analysis and to work with microbial and antimicrobial properties by using evidence-based methods, as described in https://doi.org/10.18637/jss.v104.i03.
https://msberends.github.io/AMR/
Other
83 stars 12 forks source link

Drug mapping for co-fluampicil #55

Closed peterdutey closed 1 year ago

peterdutey commented 2 years ago

Hello Have you considered mapping co-fluampicil (flucloxacillin + ampicillin) J01CR50? Apologies in advance if this has already been considered. Best wishes Peter

msberends commented 2 years ago

Hi Peter,

Not yet, but nice addition! I didn’t know the combination. Will be added shortly!

msberends commented 2 years ago

Hi Peter,

I see on the WHOCC website https://www.whocc.no/ddd/list_of_ddds_combined_products/:

image

As you can see, J01CR50 is 'misused' for many different combinations with ampicillin and amoxicillin.

On the WHOCC specific J01CR50-page, it also seems very generic:

image

So I'm not sure what to do with it. I cannot add J01CR50 to more than one row in the antibiotics data set, since every row should have unique ATC codes (although one row can have more than one ATC code) and I cannot add all of the above combinations with the same ATC code.

Do you think that this ATC code is a kind of temporary placeholder? If I look at the other J01CR* codes, J01CR50 is clearly an exception...

peterdutey commented 2 years ago

Hi Matthijs, I had not appreciated you were enforcing uniqueness of ATC codes in antibiotics, I can see this is making my request more complicated than intended! Apologies for that...

One consideration you may well already have given thought to: I guess there are other hotchpotch codes, such as J01CA51 ampicillin, combinations and J01CE30 combinations, and the latter has a DDD for benzylpenicillin/procain/benzathine combos. Meaning J01CR50 might in theory not be an isolated case, which is potentially relevant to #57?

I also looked at changes planned for 2023 and the WHO collaborating centre is not showing signs of reforming J01CR50 yet at this stage. I'm must confess I am not sufficiently knowledgeable about the editorial policy of ATC to understand the implications here.

I'll think about it some more over coming days!

peterdutey commented 2 years ago

Also I should add co-fluampicil seems to be a very exotic medicine to give - I've worked extensively with two large hospitals for years and I only just recently stumbled across a couple of lonely medication orders for those. Meaning co-fluampicil itself is pretty far down the list of user needs I reckon. What is more important however is to determine whether or not it raises a wider design consideration for your excellent package.

msberends commented 1 year ago

Today I implemented a function to add custom antimicrobial agents, using add_custom_antimicrobials().

This allows to add a code, name and any property you like, e.g. for co-fluampicil:

# doesn’t work - code does not exist
as.ab("COFLU")
#> Class <ab>
#> [1] NA

# add a custom code
add_custom_antimicrobials(
  data.frame(ab = "COFLU",
             name = "Co-fluampicil",
             atc = "J01CR50")
)

# now works
as.ab("COFLU")
#> Class <ab>
#> [1] COFLU

as.ab("J01CR50")
#> Class <ab>
#> [1] COFLU

ab_name("J01CR50")
#> [1] "Co-fluampicil"

ab_atc("Co-fluampicil")
#> [1] "J01CR50"

I think this is pretty close to what we ideally can get to support custom AB codes/names. What do you think? Any feedback appreciated, also if you don’t like it :)

peterdutey commented 1 year ago

Hi Matthijs, Thanks for the update, this looks like an elegant solution. I’ve set some time aside this week to take a deeper look will get back to you! Best wishes Peter

peterdutey commented 1 year ago

Hi Matthijs, I put this to the test and found it very easy and intuitive to use. It's also consistently documented where I'd expect to find it, so nothing to add really :) Many thanks for this cool new feature! Peter

msberends commented 1 year ago

Perfect!