4

Is it possible to get counts nested by 2 fields ? For example adverse events by patient sex and reaction type. The result would be something like a 2 dim array.

edit (since this account doesn't have enough reputation to comment on my own question) - not possible yet: thanks, that's what I needed to know. - why do I need it: to build graphics with more than 1 dimension involved (for example stacked bars). - the drilldown possibility: that's certainly useful, but not what I need here. Basically that would require 1 call to the API for each bar in the chart.

3
  • 1
    What would be the reason you would want to do this as opposed to just doing two different queries? We're aiming to reduce complexity whenever possible, but if this feature is important to you for a specific reason it would be great to list it as a feature request as Mark noted. Thanks! Jun 16, 2014 at 15:21
  • 1
    @SeanHerron : I would assume it'd be like the SQL query select count(*), field1, field2 from table group by field1, field2.
    – Joe
    Jun 16, 2014 at 18:03
  • @Joe & Etienne - if you end up bringing up your own OpenFDA ElasticSearch (ES) instance, check out this answer to a very similar question on how to do this using ES: stackoverflow.com/questions/18449703/… Jun 16, 2014 at 18:12

1 Answer 1

2

Not at this time. I'm not 100% sure how the team behind OpenFDA is fielding feature requests but I've been putting ideas and requests like this on Github and they have been labeling them as "enhancements.".

Link to OpenFDA github: https://github.com/fda/openfda/issues

EDIT: While OpenFDA was in beta, I built a drill down tool (see http://recordit.co/Hn65jq.gif for screencast) but it's currently broken because the API changed quite a bit.. if something like that seems useful to you I can work to resurrect it :)

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.