3

I'm trying to get the number of reactions for a certain drug, but only where the drug was classified as suspect drug (drugcharacterization=1).

I tried: http://api.fda.gov/drug/event.json?search=patient.drug.medicinalproduct:Fish%20Oil+AND+patient.drug.drugcharacterization:1&count=patient.reaction.reactionmeddrapt.exact

Looking at the output, I believe the system is also returning cases where the Fish Oil was only listed as concomitant.

This is confirmed by the following, where fish oil is returned as concomitant drug:

http://api.fda.gov/drug/event.json?search=patient.drug.medicinalproduct:Fish%20Oil+AND+patient.drug.drugcharacterization:1

Is there a way to filter, so that I only get reactions where Fish Oil was listed as suspect drug?

1
  • I don't believe that is a feature of the current API Commented Oct 6, 2015 at 18:10

1 Answer 1

1

The query is returning the proper results given the single document approach that was taken on the openFDA, which is to say that your query is technically asking show me all of the documents that have both patient.drug.medicinalproduct:"Fish Oil" and at least one entry in patient.drug where drugcharacterization:1. It is not taking into account that they are on the same patient.drug record.

This is the result of a design decision of the mapping for adverse events. An alternative approach would have been to design the mapping as a parent/child or a nested document, in which case your query would behave the way that you expected. We chose the approach that we did for simplicity and stability reasons. We also were not sure how much this query pattern that you are speaking of would emerge. Please feel free to submit a feature request on the following file: https://github.com/FDA/openfda/blob/master/schemas/faers_mapping.json#L68, so that it is a nested mapping.

In the mean time, you can finish the filtering on the client-side by reading all of the search results and doing an additional filter in your code. There are some caps in place to protect the system, so you will have to break your query into reasonable chunks, years or months added to your criteria should do the trick.

Thanks for using openFDA, hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.