<aside> 💡 This guide is intended for software developers who are working on electronic data retrieval from DHIS2 based EWARS and integrate the information in other systems such as information portals and dashboards. This guide is based on the DHIS2 version 2.30 (currently adopted for EWARS). This document is work-in-progress and being continuously updated for improved usefulness, conciseness and completeness.
</aside>
Before you start getting data from any DHIS2 instance, define the following basic elements clearly:
Each basic elements described above will have associated unique identifier in DHIS2 system. For example each data variables, indicators and organization units will have 11 digit alphanumeric unique identifier. For relevant metadata information click here (or contact EDCD).
EWARS is based on event reporting system of DHIS2. To access analytical, aggregated event data in DHIS2 you can work with the analytics resource. The analytics resource is powerful as it lets you query and retrieve event data aggregated along all available data dimensions. It allows retrieve the aggregated data for a combination of any number of dimensions based on data elements, periods and organisation units.
GET *[BASE_URL]/api/analytics/events/aggregate/[programUID].[dataType]?[queryParameters]&stage=[programStageUID]&displayProperty=NAME&outputType=EVENT&outputIdScheme=NAME*
BASE_URL**:** http://ewars.edcd.gov.np/ewarsdemo (Demo server URL, contact EDCD for live server URL)
programUID: uoCswKjfyiM (This is UID for EWARS)
dataType: json | csv | xml
programStageUID: ****uTJBFFVYXqA (This UID is for EWARS)
queryParameters: The analytics resource lets you specify a range of query parameters (most useful mentioned below):