I'm trying extract some summary information from openFDA and am receiving wildly different responses, and very different capabilities when attempting my search, and was hoping that someone could help me out syntactically.
Attempting to count the number of events that report "hypertension" for substance name "venlafaxine hydrochloride" by dose level.
I noticed that when searching against the drug indication, I am able to supply a logical +AND+
"search=patient.drug.drugindication:hypertension+AND+patient.drug.openfda.substance_name:"venlafaxine+hydrochloride"&count=drugdosagetext"
Attempting to do the same thing is prevented when applying the same type of searchfor the meddra preferred term (event outcome) an API failure occurs with a 'hard' +AND+
search=(patient.drug.openfda.substance_name:"venlafaxine+hydrochloride"+AND+patient.reaction.reactionmeddrapt = "HYPERTENSION")&count=drugdosagetext
fails, but curiously: (note the lower case and)
search=(patient.drug.openfda.substance_name:"venlafaxine+hydrochloride" +and+ patient.reaction.reactionmeddrapt = "HYPERTENSION")&count=drugdosagetext
...doesn't fail (it does appear to result in a Cartesian error in the results however.
Is this because the indication is on the same table as the other drug information, whereas the preferred term is on a patient reaction table? Any way to get around this, nest the query, or link the tables?