udsm-dhis2-lab / dim-api

DHIS2 Integration Mediator API for inteorperability between systems. Data Sent to API endpoints.
GNU Lesser General Public License v3.0
0 stars 0 forks source link

DHIS2 Integration Mediator API(DIM API)

DIM API for interoperability between systems. API will provide access to receive data from other systems.

Greetings

Introduction

University of Dar es salaam(UDSM), College of Information and Communication Technologies(CoICT) - DHIS2 Team which is under Department of Computer Science and Engineering has initiated development of DHIS2 Integration Mediator(DIM Mediator) to facilitate interoperability activities across systems with the essence of establishing interoperability layer to address challenges faced during interoperability process across systems. Initiative has three components which are

DIM API is the main component here which abstract all the requirements for data exchange for system that decided to sent data towards the API. The development of all there components will go parallel to achieve what we pictured it as a straight forward solution for data exchange. As for any big system which involve innovation is not an overnight thing. DIM Mediator and all its components is evolving, The team will make sure all the requirements are accomodated to bring quality software as possible.

Usage

API Endpoints

DIM API has the following API Endpoints

All the Endpoints are locked for the following reuest methods from external GET, DELETE and PUT. Only POST is allowed for the extenal use. Also the above mentioned API Endpoints are not allowed to be used for public but only http://localhost:3000/api/payloads is allowed in order to allow systems to send their data through API.

Sending Data

In order to send data to the API so that they can be used during data exchange, The followin API is used.

http://localhost:3000/api/payloads

Payload Format

{
    "name": "ANC - January 2020",
    "dataSet": "sXeLVvspZVA",
    "completeDate": "2020-01-01",
    "period": "202001",
    "orgUnit": "U6NmybxRwTk",
    "attributeOptionCombo": "DegnLZuuGor",
    "dataValues": [
        {
            "name": "ANC First Visit",
            "dataElement": "NtmbXqbvoVN",
            "categoryOptionCombo": "Rd0xfkPYDE3",
            "value": "123",
            "comment": "",
        }
    ]
}

Report Generation

In order too use the API to get the report of already integrated data between two systems, the following syntax must be adhered in order to get desired results.

localhost:3000/api/reports?dx=xXrwhpYL4UD;itIVeB2QV3B&pe=2018Q1;2018Q2;2018Q3;2018Q4&startDate=2020-06-27&endDate=2020-06-27&sourceSystem=FcFgmDqcw2S&destinationSystem=BYNWZGXQ8ZL&filter=status:failure&filter=dataSet:KmqsOeVELPT

To generate the report based on the above mentioned API, need some generic parameters that can be used to narrow down the results returned. Those parameters includes: