OpenFn / godata-interoperability

Go.Data Interoperability toolkit & reference implementations
0 stars 0 forks source link

Getting Started

(1) Importing aggregate data to DHIS2

One of the first things you’ll need to do is identify the specific DHIS2 data set that you plan to integrate your Go.Data data with. In DHIS2, aggregate data captured as dataValueSets and is further defined across different dimensions called orgUnit, period, and dataElement & categories.

Data sets

Users will need to know the specific name and ID of the destination dataSet in DHIS2. You will need to obtain the ID from the test or production DHIS2 environment.

Organisation units

Aggregation by location in Go.Data is based on your Location hierarchy. Your Locations must align with DHIS2 organisation units. You will need to specify the DHIS2 orgUnit ID in order to upload aggregate results.

Period

All aggregate data reported is associated with a specific DHIS2 reporting period, which may be daily, weekly, monthly, yearly, etc. depending on the DHIS2 implementation. Examples: 20201205, 202012, 2020

Data elements

Calculations for DHIS2 indicators are based on dataElements. For each DHIS2 data element, you will need to calculate the summary value to send to DHIS2. You will need to know both the value and dataElement DHIS2 Id in order to upload new dataValues.

Categories

Categories are another dimension commonly used to define data elements in aggregate reporting...

Example steps for preparing data import for New Measles Cases

Step 1. Identify the orgUnit for which this data will be submitted

Step 2. Identify the period for which this data will be submitted

Step 3. Identify the dataSet associated with the data you will be uploading

Step 4. Identify the dataElement Id(s) (in this case the Id of Measles new data element)

Step 5. Identify the CategoryComboOptions(Disaggregate Options) associated with a given data element

Step 6. Based on the information collected in steps 1-5, design the payload to be uploaded to DHIS2 as shown below

Setp 7. Uploading data to DHIS2

a.) Upload data and associate it with a dataSet

Step 8. Tools for uploading to DHIS2

1. OpenFn DHIS2 Adaptor
2. Http Client
Notes
{
    "dataValues": [
        {
            "dataElement": "hfuTiKOkuKs",
            "categoryOptionCombo": "o2gxEt6Ek2C",
            "period": "202011",
            "orgUnit": "y77LiPqLMoq",
            "value": ""
        },
        {
            "dataElement": "hfuTiKOkuKs",
            "categoryOptionCombo": "ba1FkzknqS8",
            "period": "202011",
            "orgUnit": "y77LiPqLMoq",
            "value": ""
        },
        {
            "dataElement": "yqBkn9CWKih",
            "categoryOptionCombo": "o2gxEt6Ek2C",
            "period": "202011",
            "orgUnit": "y77LiPqLMoq",
            "value": ""
        },
        {
            "dataElement": "yqBkn9CWKih",
            "categoryOptionCombo": "ba1FkzknqS8",
            "period": "202011",
            "orgUnit": "y77LiPqLMoq",
            "value": ""
        },
        {
            "dataElement": "iIBbZPAqnMt",
            "categoryOptionCombo": "S34ULMcHMca",
            "period": "202011",
            "orgUnit": "y77LiPqLMoq",
            "value": ""
        },
        {
            "dataElement": "iIBbZPAqnMt",
            "categoryOptionCombo": "wHBMVthqIX4",
            "period": "202011",
            "orgUnit": "y77LiPqLMoq",
            "value": ""
        },
        ...
        // Removed some data elements here, for brevity
        ...
        {
            "dataElement": "GCvqIM3IzN0",
            "categoryOptionCombo": "jOkIbJVhECg",
            "period": "202011",
            "orgUnit": "y77LiPqLMoq",
            "value": ""
        }
    ]
}

Learn More

Read more about setting up DHIS2 aggregated reporting here, and learn about DHIS2 aggregation strategies.

(2) Fetching data from HealthSites.io api

You can fetch data from HealthSites.io api using the OpenFn 5a - GET Health Sites Data job:

  1. Login into OpenFn
  2. Go to the Jobs section
  3. Find a job named 5a - GET Health Sites Data
  4. Click on View
  5. Click on the pencil icon to edit the endpoint of the data you want to fetch, as in the steps below:
  1. Click on the disc icon to save the changes
  2. Click on the play icon to run the job and fetch the desired data
  3. Go to the inbox section and click on the respective messages
  4. Click on Message Body to view the details of the data returned from HealthSites.io