I have performed a query. I was planning to get the adverse report based on medicine name and age. So I did this" https://api.fda.gov/drug/event.json?search=patient.drug.openfda.brand_name:advil+AND+patient.patientonsetage:64&limit=5". I just want to know that whether I have wrote the right query or not. Please help me in this case. I have gone through the JSON data. I was convinced that the data was right. But I want to make sure from openFDA people or the others who is using openFDA API like me. Thank you in advance.
3
-
it might be easier to download the whole data set to your computer and just work with it there. – Anthony Damico Sep 30 '14 at 11:19
-
Now it makes sense to me. It seems like I cannot further proceed your query because I have to proceed the same query based on gender. – pradeep Sep 30 '14 at 14:45
-
May I know why it was downvoted? I'll try to rewrite in different way. Thank you. – pradeep Sep 30 '14 at 22:54
Add a comment
|
Yes, that API query looks correct but note the following:
- You can get a count of the adverse event reactions through the API by adding
&count=..
to the end of your URL like this: https://api.fda.gov/drug/event.json?search=patient.drug.openfda.brand_name:advil+AND+patient.patientonsetage:64&count=patient.reaction.reactionmeddrapt.exact - You should be aware that 45% (1,734,133 of the 3,814,280) adverse events on openFDA as of right now do not have any age set. You can see this at https://api.fda.gov/drug/event.json?search=missing:patient.patientonsetage for openFDA in general and at https://api.fda.gov/drug/event.json?search=missing:patient.patientonsetage%20AND%20patient.drug.openfda.brand_name:advil for your
advil
query - Age is not always (but usually is) denoted in years by openFDA
-
I appreciate your help. It seems like my query and your query(regarding count or limit in first point of yours) are very similar. But the JSON data is drastically changed. May I know what it made changed? Which one is more appropriate to find the adverse reports based on medicine name and age. In my query I can get directly total number of adverse reports in total field(total=414 for the query I mentioned). – Mike Sep 30 '14 at 2:46
-
@Mike - what changed in my first bullet point is that I added
&count
which will have the API do a count on the field specified (in this casepatient.reaction.reactionmeddrapt.exact
). This is useful and should save you time if all you want is the count of adverse event reactions for the query.If you want to go through all 414 results and count the adverse event reactions and other things such as sex and weight, then you should omit the&count=..
. Does this make sense? – Mark Silverberg Sep 30 '14 at 12:52