4.2.1. DHIS2
Last updated
Last updated
The process for registering a DHIS2 instance in GeoPrism Registry is as follows:
Navigate to the Settings page using the burger menu.\
Scroll down to the 'External Systems' section and click on the + button to open the Registration modal.\
Select DHIS2 from the Type dropdown and fill out the other fields (details on each field are provided in the table below).\
An OAuth client must first be created in the DHIS2 instance. See section 3.9 for more information.
At the bottom of the External System modal, you will see a section for OAuth. Click the Enable OAuth Integration button.\
A form for configuring the OAuth integration will expand. Client ID, Profile Location, Token Location and Authorization Location should be filled out automatically. It is not recommended to change these values.\
Enter the Secret Key from the DHIS2 OAuth Client in the OAuth Secret Key field. You will need to get this from the DHIS2 instance.\
Click Submit.
GeoPrism Registry's DHIS2 integration has not been tested on DHIS2 versions above 2.38 and below 2.31. It is not recommended to integrate with DHIS2 servers outside of this range, because GeoPrism Registry could throw unspecified errors during synchronization, or in the worst case scenario, it could corrupt your DHIS2 database..
Some GeoPrism Registry features may not work with some versions of DHIS2.
The following table lists the OAuth integration possibilities for each DHIS2 version, as tested by TerraFrame.
If Geo-Object data is already present as organization units in a DHIS2 instance, it must first be imported using the Import from an external system option in the Import module.
GeoPrism Registry supports using a DHIS2 external system synchronization to push data to a DHIS2 instance. The purpose of the external system synchronization is to define how Geo-Object Types in a specific hierarchy will map to organization units in a DHIS2 instance. The latest version of the Geo-Objects will be synchronized with DHIS2, as GeoPrism Registry currently does not support exporting at a specific date.
The following steps are to be followed to enable the synchronization:
Navigate to the Settings page.\
Find the External System Synchronizations section and click on the Register Synchronization button.\
Click the Create button on the Synchronization Configurations page.\
Fill out the fields in the Synchronization Configuration modal and click Submit.\
The Org Units section of the configuration modal allows you to map each organization unit level in DHIS2 to a Geo-Object Type in GeoPrism Registry. There is no limit to the number of levels that can be matched, however no more levels should be matched than exist in the DHIS2 instance being synchronized with. Additionally, the matched Geo-Object Type of each level should be a direct child of the level before it.
The Geo-Objects in GeoPrism Registry are matched to their DHIS2 counterparts using the external identifiers of the GeoPrism Registry Geo-Objects and the identifiers of the organization units in DHIS2. It is important to note that this matching does not use the Code properties from either system. If a Geo-Object does not have an external identifier, then it will be considered new and will be created as a new organization unit in DHIS2 if the synchronization type is set to ‘Org Units and Relationships’. GeoPrism Registry will then save the external identifier of that new organization unit in the database to be used for future updates. If the Geo-Object has an external identifier while DHIS2 does not have an organization unit with a matching identifier in their system, an error will be shown.
The DHIS2 Synchronization Type specifies what data will be synchronized to DHIS2.
Geo-Object Types (levels) can be matched to an organization unit group, so that only selected organization units within that group are synchronized. The ‘Org Unit Group’ dropdown lists all organization unit groups which currently exist in the DHIS2 instance. When a Geo-Object Type is matched to a group, all Geo-Objects that are of that Geo-Object Type will be assigned to the selected organization unit group the next time the system synchronizes with this configuration.
This behavior operates in an additive fashion only. Any organization units which are already assigned to the organization unit group will not be affected.
If a Geo-Object Type is matched which contains custom attributes, the custom attribute matcher will be displayed.
This attribute matching is specific to a Geo-Object Type and level. In order for a DHIS2 attribute to be a valid selection for the matching, it must be applied to organization units, and it must be close enough in Type to be a candidate. Here are the appropriate selection types:
The following DHIS2 value types cannot be mapped to attributes in GeoPrism Registry:
Tracker Associate
Coordinate
Organization Unit
File Resource
Image
If an attribute in GeoPrism Registry is not matched to one in DHIS2 (either because there were no valid selections, or the dropdown was intentionally left as ‘not matched’), then the data in that attribute will not be synchronized with DHIS2. It will not, however, prevent the rest of the attributes or relationships from being synchronized.
GeoPrism Registry Term-type attributes can be matched to DHIS2 option sets. When the Target Type is set to ‘Option Set’, the Target Attribute dropdown will populate with all DHIS2 attributes which contain an option set and are assigned to organization units. When a GeoPrism Registry Term-type attribute is matched to a valid option set in the DHIS2, then the user interface expands to allow matching between GeoPrism Registry terms and DHIS2 options.
If a Geo-Object does not have values for the Term-type attribute, then the attribute will not be set on the DHIS2 organization unit. Geo-Objects with terms which have not been matched (‘Not Mapped’) will not be exported and an error will occur.
Terms can also be mapped instead to organization unit groups. This can be done by selecting ‘Org Unit Group’ in the Target Type dropdown.
Geo-Objects will be assigned to the organization unit group as matched in the above screenshot. This provides some basic support for organization unit group synchronization.
Similar to option set matching, if a Geo-Object does not have a value for the Term-type attribute, then it will not be assigned to an organization unit group. Geo-Objects with terms which have not been matched (‘Not Mapped’) will not be exported and an error will occur.
This behavior operates in an additive fashion only. Any organization units which are already assigned to the organization unit group will not be affected.
If a level is matched to a DHIS2 organization unit group, and the Geo-Object Type also contains a term which is matched to DHIS2 organization unit groups, then the synchronized organization unit will be added to all organization unit groups which have been matched (in an additive fashion).
GeoPrism Registry provides a plugin which can be downloaded and installed onto a DHIS2 instance. When installed onto DHIS2, this plugin behaves as a standard DHIS2 app, which will redirect to the GeoPrism Registry instance configured in the external system.
To download the DHIS2 to GeoPrism Registry plugin:
Navigate to an existing DHIS2 external system configuration form from the GeoPrism Registry Settings page.
Click the Download DHIS2 Plugin button, which will download a zip file called “cgr-dhis2-app.zip” to your computer.\
Please refer to the official DHIS2 documentation to install the plugin.
Successful installation will display the link to GeoPrism Registry in DHIS2.
Field name | Description | Required? |
---|---|---|
DHIS2 version | Integration via OAuth possible? |
---|---|
Field | Description |
---|---|
Synchronization Type | Description |
---|---|
GeoPrism Registry data type | Appropriate DHIS2 value types |
---|---|