dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #48580
Re: [Dhis2-users] Generate data output
Hi Tantely,
we introduced a new analytics web API resource in 2.26 for "raw" data which
you might find interesting. Docs:
https://docs.dhis2.org/master/en/developer/html/webapi_analytics.html#webapi_analytics_raw_data
It follows the same syntax as the regular analytics resource (at
/api/analytics) but it does not perform any aggregation (e.g. in the org
unit hierarchy dimension), and instead gives you the raw data in a
tabular/grid format.
You can use the pivot table > download to browse your metadata, and then
use the /api/analytics/rawData as base URL instead. Note that this might
return a ton of data so you might want to split up into multiple requests.
Example:
https://play.dhis2.org/demo/api/26/analytics/rawData.json?dimension=dx:s46m5MS0hxu;UOlfIjgN8X6&dimension=pe:THIS_YEAR&dimension=ou:YuQRtpLP10I
You can use the outputIdScheme param to give you names instead of IDs:
https://play.dhis2.org/demo/api/26/analytics/rawData.json?dimension=dx:s46m5MS0hxu;UOlfIjgN8X6&dimension=pe:THIS_YEAR&dimension=ou:YuQRtpLP10I&outputIdScheme=NAME
You can also use the startDate and endDate params for more flexibility.
regards,
Lars
On Tue, Feb 7, 2017 at 6:41 PM, Raminosoa Rabemanantsoa, Tantely <
traminosoa@xxxxxxxxxx> wrote:
> Dear community,
>
> I would like to output data in a tabular format (data elements in columns,
> orgUnits and periods per row) at the lowest level of orgUnits. In which way
> should I do that as data in text format could not be displayed through
> pivot table?
>
> Thank you for your support!
>
> Regards.
>
> Tantely.
>
> *This message and its attachments are confidential and solely for the
> intended recipients. If received in error, please delete them and notify
> the sender via reply e-mail immediately.*
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help : https://help.launchpad.net/ListHelp
>
>
--
Lars Helge Øverland
Lead developer, DHIS 2
University of Oslo
Skype: larshelgeoverland
lars@xxxxxxxxx
http://www.dhis2.org <https://www.dhis2.org/>
Follow ups
References