← Back to team overview

dhis2-devs team mailing list archive

Re: Web API : Get Indicator Value

 

Dear Julhas,

Thank you for the reply. I'll try this.

On Sun, Sep 20, 2015 at 2:57 PM, Julhas Sujan <julhaspustcse@xxxxxxxxx>
wrote:

> Hi Pamod,
>
> Please check the following link as for indicators data:
>
> ../api/indicators.json?dataSet=XT5UDcXpXst&period=201506&orgUnit=ddTZZY0GhLW
>
> For value format as an array:
> $resultData1= Array
> (
>     'resultData' => Array
>         (
>             'headers' => Array
>                 (
>                     '0' => Array
>                         (
>                             'name' => 'dx',
>                             'column' => 'Data',
>                             'type' => 'java.lang.String'
>                         ),
>
>                     '1' => Array
>                         (
>                             'name' => 'pe',
>                             'column' => 'Period',
>                             'type' => 'java.lang.String'
>                         ),
>
>                     '2' => Array
>                         (
>                             'name' => 'ou',
>                             'column' => 'Organisation unit',
>                             'type' => 'java.lang.String'
>                         ),
>
>                     '3' => Array
>                         (
>                             'name' => 'value',
>                             'column' => 'Value',
>                             'type' => 'java.lang.Double'
>                         ),
>
>                 ),
>
>             'metaData' => Array
>                 (
>                    'names' => Array
>                         (
>                             'pe' => 'Period',
>                             'yAfJFLuVkEa' => 'Argariya CC, Gazipur Sadar',
>                             'ou' => 'Organisation unit',
>                             'dx' => 'Data',
>                             'JQt3QsxwLp5' => 'Zinc_ClosingBalance',
>                             '201506' => 'August 2015'
>                         )
>
>                 ),
>
>             'rows' => Array
>                 (
>                     '0' => Array
>                         (
>                             '0' => 'JQt3QsxwLp5',//indicator id
>                             '1' => 201508,
>                             '2' => 'yAfJFLuVkEa',// organization unit
>                             '3' => 1360.0// Indicator value
>                         )
>
>                 )
>
>         )
>
> );
>
> $indicatorId=$data['resultData']['rows'][0][0];
> $orgUnitServer=$data['resultData']['rows'][0][2];
> $indicatorValue=$data['resultData']['rows'][0][3];// Indicator Values
>
> Hope it will be helpful for you.
>
>
> Best Regards
> Julhas Sujan
> Management Science for Health(MSH)
> Dhaka, Bangladesh
> Skype: julhas08
> Web: www.julhas.info
>
> On Sun, Sep 20, 2015 at 1:22 PM, Pamod Amarakoon <pamodm@xxxxxxxxx> wrote:
>
>> Dear All,
>>
>> 1. what is the format to get a value of an aggregated indicator of a
>> particular data set using web - API. Is it stored in database or calculated
>> in real time
>>
>> 2. is the relative period available for Previous Day (yesterday).
>>
>> Thank you
>>
>> --
>> Regards,
>> Pamod Amarakoon
>>
>> Confidentiality Notice: the information contained in this email and any
>> attachments may be legally privileged and confidential. If you are not an
>> intended recipient, you are hereby notified that any dissemination,
>> distribution, or copying of this e-mail is strictly prohibited. If you have
>> received this e-mail in error, please notify the sender and permanently
>> delete the e-mail and any attachments immediately. You should not retain,
>> copy or use this e-mail or any attachments for any purpose, nor disclose
>> all or any part of the contents to any other person.
>>
>> [image: http://ehealthasia.org] <http://ehealthasia.org>
>>
>>
>> _______________________________________________
>> 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
>>
>>
>


-- 
Regards,
Pamod Amarakoon

Confidentiality Notice: the information contained in this email and any
attachments may be legally privileged and confidential. If you are not an
intended recipient, you are hereby notified that any dissemination,
distribution, or copying of this e-mail is strictly prohibited. If you have
received this e-mail in error, please notify the sender and permanently
delete the e-mail and any attachments immediately. You should not retain,
copy or use this e-mail or any attachments for any purpose, nor disclose
all or any part of the contents to any other person.

[image: http://ehealthasia.org] <http://ehealthasia.org>

References