2

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?

2
  • 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)
    – user3856
    Commented Dec 5, 2016 at 21:19
  • openFDA is in Elasticsearch; there's no SQL. Commented Dec 6, 2016 at 12:30

1 Answer 1

1

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.

1
  • 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 Commented Dec 22, 2016 at 8:09

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.