When I query the OpenFDA API, some queries which should be valid yield invalid results. I suspect this has to do with an error in how forward slashes are handled in queries on the FDA server (which appears to be fronted by nginx).

For example, say I am searching for the number of times a Hepatitis C Virus NS3/4A Protease Inhibitor was associated with an adverse event. That link is to a query on "Hepatitis C Virus". It shows me that "Hepatitis C Virus NS3/4A Protease Inhibitor [EPC]" should be a valid search term.

However, if I search for that term, I get an error. In fact, any query that I have tried without a forward-slash ("/") works fine, while any query that I have tried with the forward-slash fails in the same way.

  • 1
    I replaced the slash (%2F) with a space (+ or %20) in the query string, and it gave me a response, maybe the response you expected. Anyway, the slash is probably interpreted as a directory delimiter by nginx. Jan 30 '15 at 20:39
  • @WalterTross - that does work unless an ".exact" query is attempted. I agree that this looks like an nginx error (or, really, a consequence of how it works). Jan 30 '15 at 22:03

Carbocation couple things that may be of use to you. HEre is an open source site that allows you to searach in various ways. It might help you with what you are looking for - for example http://www.researchae.com/drugevent?from_date=2004-01-01&to_date=2015-01-31&from_age=&to_age=&search=&country=GLOBALLY&patientsex=&manufacturername=&drugbrandname=&druggenericname=&medicinalproduct=&reactionmeddrapt=&drugclass=Hepatitis+C+Virus+Protease+Inhibitor&drugindication=&indsubmit=&productndc=&safetyreportid=

Also the code is open source so the exact API calls are included in the app.rb file which you can see here - https://github.com/GeekNurse/ResearchAE-Open-Source/blob/master/app.rb

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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