Day 4 – one particular drug

This post is a part of a series on drug shortages.

I didn’t mention it in my previous post, but I actually spent a long while yesterday attempting to match medicines from the proposed Canadian Essential Medicines List (EML) to the list of shortages. Initially I did not have ATC codes for each medicine and naively thought I might just be able to match on drug names (e.g. Alendronate is on the EML, so just find all of the shortages of “Alendronate”). It turns out this is a terrible idea no matter how clever I tried to get. Here are some of the problems I ran into:

  1. There are three fields in the shortage reports that look usable for matching: the “common” drug name, e.g. Alendronate, the “brand” drug name, e.g. “APO-alendronate”, and the drug ingredients, e.g. “alendronic acid”.
  2. Each of these fields may match with the medicines listed in the EML, e.g. Alendronate is on the EML (which matches the common drug name), but Bethamethasone is also on EML and often only matches on the ingredients field (because the drug name is listed as Betaderm).
  3. Sometimes the drug name is in french, even though it’s in the english column e.g. “Acide alendronique”
  4. What to do about combination drugs? e.g. Candesartan-HCT (both candesartan and HCTZ), or all of the opioids combined with acetaminophen. Surely they don’t count as being on the EML even if some of their constituents are, but what’s the rule for knowing whether a drug is a combination drug so it can be excluded?
  5. There are medicines on the EML that refer to many molecules/formulations, e.g. “Insulin – short acting” and “copper-containing IUD” so making a match just on name isn’t going to work.

I burned away much of the day struggling with these issues before deciding to a) ask for the ATC codes for the EML from Dr. Persaud, and b) trying my hand at manually assigning the codes myself using the WHO ATC index.

All of this is to say that I spent the morning today working on the EML analysis I wrote about earlier, and then in the afternoon I spent some time polishing up the results website in case it becomes useful to share my work in progress.

Then I decided to take a deeper dive into one particular medication, and look a bit more closely into related shortages. I think it’s important to look at raw data and get a feel for it. I also worked on putting together a way of visualizing the shortages for a specific medication (well, specific ATC code, in fact). On the EML, diltiazem, a calcium-channel blocker, has had 17 shortages in 2019. Here’s a chart I put together illustrating the timing and details of the shortages:

It’s a bit cluttered, I know. Two important things to note. First, only shortages are being displayed, so there are dosing forms and other manufacturer’s versions of the drug that do not appear because they weren’t in shortage in 2019. Second, the dotted line extending into 2020 indicates that the shortage is ongoing.

Looking at chart, it occurs to me that all of the shortages include the new year. Perhaps there is a seasonality to shortages? I might be something else I could look at.


Code used to make the chart above:

diltiazem = "C08DB01"
dsc_df  %>%
  filter(atc_number == diltiazem) %>%
  filter(int_overlaps("2019-01-01" %--% "2019-12-31", actual_start_date %--% end_date_no_na)) %>%
  mutate(
	actual_end_date_near = replace_na(actual_end_date, parse_datetime("2020-01-01")), 
	actual_end_date_far  = replace_na(actual_end_date, parse_datetime("2020-04-01")), 
	label = factor(id, labels = paste(en_drug_common_name, drug_strength))
	) %>%
  ggplot(aes(x=actual_start_date, y=label, yend=label, color = reason)) + 
	geom_segment(size=1, aes(xend=actual_end_date_far), linetype="dashed") + 
	geom_segment(size=4, aes(xend=actual_end_date_near), linetype="solid") + 
	facet_grid(company_name~., scales="free_y", space="free_y") + 
	scale_colour_brewer(palette = "Paired") + 
	theme(strip.placement="outside", 
		  strip.text.y = element_text(angle=0), 
		  strip.background = element_rect(color="white", fill="#EEEEEE")) +
	labs(y = NULL, x="Time", color="Reason for shortage", 
		 title="Shortages for Diltiazem in 2019") + 
	captionCode language: PHP (php)

1 Comment

Comments are closed.