Re: [Dhis2-devs] Web API : Get Indicator Value

2015-11-16 Thread Julhas Sujan
Hi Pamod, Please check the following links: Download Guide: http://www.julhas.info/dhis2/dataextract/previousmonthdata.pdf Download Source Code: http://www.julhas.info/dhis2/dataextract/previousmonthdata.zip If you need more information please let me know. Thanks Julhas On Mon, Nov 16, 2015

Re: [Dhis2-devs] Web API : Get Indicator Value

2015-11-16 Thread Pamod Amarakoon
Hi Julhas, Thank you very much for the descriptive guide and the codes. Will try them out :) On Mon, Nov 16, 2015 at 6:15 PM, Julhas Sujan wrote: > Hi Pamod, > > Please check the following links: > > Download Guide: >

Re: [Dhis2-devs] Web API : Get Indicator Value

2015-11-16 Thread Julhas Sujan
Hi Pamod, Please paste the following code in your dataentry screen and check the result from console. It will show the selected organization unit and period: dhis2.util.on( 'dhis2.de.event.formReady', function( event, aglAzf2x2bF ) { var orgName = $( '#selectedOrganisationUnit' ).val();

Re: [Dhis2-devs] Web API : Get Indicator Value

2015-11-16 Thread Pamod Amarakoon
Dear Julhas, Thank you very much. I actually needed orgUnitId to call web-api. Iused the following code to get it done. Seems to work on data entry screen. var ouselect = $('.selected').attr('href'); var orgid = ouselect.match(/"([^"]+)"/)[1]; On Mon, Nov 16, 2015 at 3:39 PM, Julhas Sujan

Re: [Dhis2-devs] Web API : Get Indicator Value

2015-11-16 Thread Julhas Sujan
You will get period look like: November-2015. You need last day or month data. If month you may convert it as a simple way for 201510 as follows: if(periodName=='December 2015'){ var periodN="201511"; }else if(periodName=='November 2015'){ var periodN="201510"; }else if(periodName=='October

Re: [Dhis2-devs] Web API : Get Indicator Value

2015-11-16 Thread Pamod Amarakoon
Dear Julhas, Thanx a lot for the code. I'll check this out I was working on the following code. $(document).ready(function() { function getPreVal(){ var orgunit = selectedOrganisationUnit.value; console.log(orgunit); var ouselect = $('.selected').attr('href'); var orgid =

Re: [Dhis2-devs] Web API : Get Indicator Value

2015-11-16 Thread Julhas Sujan
Hi Pamod, I am sending you soon the whole code with a business scenario that will be helpful for you. You can easily adapt your business in this script. Thanks Julhas On Mon, Nov 16, 2015 at 5:04 PM, Pamod Amarakoon wrote: > Dear Julhas, > > Thanx a lot for the code. I'll

Re: [Dhis2-devs] Web API : Get Indicator Value

2015-09-20 Thread Julhas Sujan
Hi Pamod, Please check the following link as for indicators data: ../api/indicators.json?dataSet=XT5UDcXpXst=201506=ddTZZY0GhLW For value format as an array: $resultData1= Array ( 'resultData' => Array ( 'headers' => Array ( '0' =>

[Dhis2-devs] Web API : Get Indicator Value

2015-09-20 Thread Pamod Amarakoon
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

Re: [Dhis2-devs] Web API : Get Indicator Value

2015-09-20 Thread Pamod Amarakoon
Dear Julhas, Thank you for the reply. I'll try this. On Sun, Sep 20, 2015 at 2:57 PM, Julhas Sujan wrote: > Hi Pamod, > > Please check the following link as for indicators data: > > ../api/indicators.json?dataSet=XT5UDcXpXst=201506=ddTZZY0GhLW > > For value format as