DHIS2 has been customized and fully operational for integrated health information management in Nepal since late 2016. DHIS2 allows direct data exchange with external software (service registers, EMRs etc.) through its web APIs. Current DHIS2 version used for HMIS is DHIS2.30

<aside> 💡 This guide is intended for software developers for direct data exchange with DHIS2 platform. This guide is based on the version of DHIS2 mentioned above.

</aside>

<aside> ❓ Demo system for functional testing can be found here.

</aside>

Getting Started

DHIS2 provides rich set of restful web APIs. Detail documentation for developers can be found here.

HMIS reporting application

Each system that needs to send data to national HMIS, must have internal application to generate the relevant reports in portable format (json, xml, csv etc.) so that each generated values can be mapped to the variables defined in HMIS.

Workflows

Useful workflows that are mandatory to implement are listed below. Expand each workflow to view the detail instructions.

Send data values

<aside> ❓ Official DHIS2 documentation for sending data values can be found here.

</aside>

The resource which is most appropriate for sending data values is the dataValueSets resource. A data value set represents a set of data values which have a logical relationship with relevant entities in DHIS2. We follow the API endpoint https://hmis.gov.np/hmisdemo/api/dataValueSets to send the data.

Sample JSON format to send:

{
  "dataSet": "dataSetID", // UID of dataset
  "completeDate": "date", // yyyy-mm-dd ISO date
  "period": "period", // yearmonth format, 207801 for 2078 Baisakh
  "orgUnit": "orgUnitID", // UID of the hospital
  "attributeOptionCombo": "aocID", // Only for ICD11 disease, UID of ICD11 disease
  "dataValues": [
    { "dataElement": "dataElementID", "categoryOptionCombo": "cocID", "value": "1", "comment": "comment1" },
    { "dataElement": "dataElementID", "categoryOptionCombo": "cocID", "value": "2", "comment": "comment2" },
    { "dataElement": "dataElementID", "categoryOptionCombo": "cocID", "value": "3", "comment": "comment3" },
		{..............  ..............  ...............  .............  ...............},
		{..............  ..............  ...............  .............  ...............},
		{..............  ..............  ...............  .............  ...............},
		{..............  ..............  ...............  .............  ...............},
		{..............  ..............  ...............  .............  ...............}
  ]
}

<aside> 💡 For UIDs of dataSets, orgUnits, attributeOptionCombos, dataElements and categoryOptionCombos, please refer to metadata library

</aside>


Sample XML format to send:

<dataValueSet xmlns="<http://dhis2.org/schema/dxf/2.0>" dataSet="dataSetID"
  completeDate="date" period="period" orgUnit="orgUnitID" [attributeOptionCombo="aocID"]>
  <dataValue dataElement="dataElementID" categoryOptionCombo="cocID" value="1" comment="comment1"/>
  <dataValue dataElement="dataElementID" categoryOptionCombo="cocID" value="2" comment="comment2"/>
  <dataValue dataElement="dataElementID" categoryOptionCombo="cocID" value="3" comment="comment3"/>
	<......... ............ ......................./>
	<......... ............ ......................./>
	<......... ............ ......................./>
	<......... ............ ......................./>
	<......... ............ ......................./>
</dataValueSet>