Hi Sushil,

I've tried that the dataValueSets allows for reading data values, based on 
startDate and endDate... but not indicators.
http://www.dhis2.org/doc/snapshot/en/user/html/ch25s11.html

So you will have to calculate indicators based on their definition on your own.
There is a small bug that I remember seeing sometime back that throws a 
NullPointerException if you pass only one orgUnit. The workaround is that you 
will have to pass a dummy orgunit (say the root orgUnit) that will not have 
data for the required dataset.

Does this work for you??

---
Regards,
Saptarshi PURKAYASTHA
From: knu...@gmail.com
Date: Tue, 1 Oct 2013 13:05:43 +0200
To: larshe...@gmail.com
CC: sushilch...@gmail.com; dhis2-devs@lists.launchpad.net
Subject: Re: [Dhis2-devs] Hello, can you help me with a query with web api.

Hi Sushil,
The API does not have extensive support for daily data yet. There are no 
relative periods for days, so you have to list them each explicitly, using the 
yyyyMMdd format:

http://www.dhis2.org/doc/snapshot/en/user/html/ch25s03.html

Unfortunately, I think this means you cannot get daily data for a whole year in 
one query, because the URL would be more than 9*365 (over 3000) characters 
long. So you would probably have to split it.


I agree that for daily data (what is the use case?), start and end date would 
be much more convenient. But you could build that logic in the javascript that 
constructs the query URL.


Knut



On Tue, Oct 1, 2013 at 12:20 PM, Lars Helge Øverland <larshe...@gmail.com> 
wrote:


Thanks Namrata for the good explanation.
Sushil, you cannot use start and end dates for the /analytics resource, you 
must use the standard period types (frequencies) as described here. Note that 
you can define fixed and relative periods in your query. Docs here:



http://www.dhis2.org/doc/snapshot/en/user/html/ch25s21.html

Lars




On Mon, Sep 30, 2013 at 6:52 PM, Namrata Nehete <n.neh...@gmail.com> wrote:



Hi,

To get data for relative period (last week, last month etc) we use,

http://<serverURL>/api/analytics.json?dimension=dx:Uvn6LCg7dVU&dimension=pe:LAST_WEEK&filter=ou:ImspTQPwCqd






To get data by specifying period we use,

http://<serverURL>/api/analytics.json?dimension=dx:Uvn6LCg7dVU&dimension=pe:20130924;20130930&filter=ou:ImspTQPwCqd

I am not sure how to get data for indicator by specifying start date and end 
date.






You should ask on dev list for that. 
---
Regards,
Namrata Nehete.


On Mon, Sep 30, 2013 at 3:54 PM, Knut Staring <knu...@gmail.com> wrote:





Hi Sushil,
Remember you can also ask such questions on the dev list (are you a member)?
DHIS 2 developers <dhis2-devs@lists.launchpad.net>







Knut




On Mon, Sep 30, 2013 at 11:32 AM, Sushil Chitrakar <sushilch...@gmail.com> 
wrote:







Hello Namrata, I hope you are all doing well.
I was going though a issue in api checking if you know the solution.








I was trying to get data for couple of indicators on the daily basis from a 
startdate to a enddate or say a yearly data for a whole year daily basis.

I tried putting StartDate and enddate and chekced the daily parameter as well. 
But was not help, can you give a example for this if you have one or suggest me 
a solution.








Let me know.
Regards,Sushil


-- 
Knut StaringDept. of Informatics, University of Oslo+4791880522




http://dhis2.org





_______________________________________________

Mailing list: https://launchpad.net/~dhis2-devs

Post to     : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help   : https://help.launchpad.net/ListHelp






-- 
Knut StaringDept. of Informatics, University of Oslo+4791880522http://dhis2.org



_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to     : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp                               
          
_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to     : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp

Reply via email to