← Back to team overview

dhis2-devs team mailing list archive

Re: DHIS EventReport Plugin

 

Hi Jan

We are working with DHIS 2.24 and the plugin has been copied from our fork
of dhis-core. So, its from the master branch.
Please let know in case you need more info.

Regards
Vanya

On Fri, Sep 16, 2016 at 3:36 PM, Jan Henrik Øverland <jan@xxxxxxxxx> wrote:

> Hi Vanya,
>
> I will look at it, but I need to know the version of the plugin and the
> version of the dhis2 instance.
>
> Jan
>
> On 16 September 2016 at 11:58, Vanya Seth <vanyas@xxxxxxxxxxxxxxxx> wrote:
>
>> 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/FqtMkfZ
>> k93u.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!!
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
> Jan Henrik Øverland
> Software developer, DHIS 2
> University of Oslo
> http://www.dhis2.org <https://www.dhis2.org/>
>



-- 
With Regards
ThoughtWorks Technologies
Hyderabad

--Stay Hungry Stay Foolish!!

References