I was planning to get the results where brand name is aspirin and whose drug result has property dosage_and_administration_table.

So I did this

https://api.fda.gov/drug/label.json?search=brand_name:aspirin+AND+_exists_:dosage_and_administration_table&limit=100

It returns no results (no matches found). But there are results where dosage_and_administration_table exists. And one more interesting thing is _exists_ works with every other parameter like active_ingredient, dosage_and_administration etc., but not with dosage_and_administration_table.

What's wrong with the query?

  • This is unhelpful, but I'm guessing the table is actually an SQL join, and The FDA's interface isn't handling it correctly. You get the same problem for "precautions_table" and "pharmacokinetics_table" and "adverse_reactions_table". (note to self: cross off bucket list: use "pharmacokinetics" in a stackexchange post) – Barry Carter Dec 5 '16 at 21:19
  • openFDA is in Elasticsearch; there's no SQL. – Denis Krylov Dec 6 '16 at 12:30
up vote 1 down vote accepted

I have looked at the openFDA code: it appears dosage_and_administration_table element is explicitly excluded from indexing in Elasticsearch along with a bunch of other table elements, which is why you can't query on it, but still are able to see it in some search results.

I'll need to go back to the team to understand why dosage_and_administration_table is being excluded from indexing; most likely because it contains HTML markup and is redundant to the dosage_and_administration element. In the meantime, I'd recommend that you use dosage_and_administration in your _exists_ clause.

  • Thank you denis. But i want that Html representation only instead of blob of text as in dosage_and_administration.Look like dosage_and_administration and dosage_and_administration_table are not duplicates – user1389169 Dec 22 '16 at 8:09

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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