← Back to team overview

dhis2-devs team mailing list archive

DHIS EventReport Plugin

 

Hello Devs

We are leveraging the eventreport plugin for rendering the event reports in
one of our custom apps.

We want to get data for specific periods and these could very well be in
the past as well.
To achieve this we use the "pe" dimension and pass it as "rows" property
while making a call to the getEventReport function.

The event report is fetched alright in the Event Report web app but while
we try to get it through the plugin (the API query string as created by
this plugin) we get a 409 Conflict.

On further investigation we realize that there are two "pe" type dimensions
getting added which is apparently the cause of the conflict.

This is the way we are trying to make a call to the plugin:

DHIS.getEventReport({
                    url: dhisUrl, el: eventReport.id, id: eventReport.id,
                    *rows: [{dimension: "pe", items: dimensionPeriods}]*
                });

Here the items for the "pe" contains the iso periods for which we want data.


And this is the API query that gets generated:

http://localhost:8000/api/analytics/events/aggregate/FqtMkfZk93u.json?stage=SKQlKPszsak&dimension=ou:zOyMxdCLXBM&;
*dimension=pe:LAST_12_MONTHS&dimension=pe:201510;201511;201512;201601;201602;201603;201604;201605;201606;201607;201608;201609*
&outputType=EVENT&displayProperty=NAME

Can you help us identify the right way to invoke this plugin?

Thanks for the help in advance.


-- 
With Regards
Vanya
ThoughtWorks Technologies
Hyderabad

--Stay Hungry Stay Foolish!!