integration:dhis2_integration

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
integration:dhis2_integration [2024/08/13 22:10] – [Stores] Jonna Quismundointegration:dhis2_integration [2024/08/15 14:32] (current) – [mSupply preferences] Gary Willetts
Line 4: Line 4:
  
  
-===== Requisites =====+===== DHIS2 data =====
 DHIS2 stores data values that have 3 dimensions: DHIS2 stores data values that have 3 dimensions:
 ^ DHIS2 Dimension ^ Description ^ mSupply typical mapping ^ ^ DHIS2 Dimension ^ Description ^ mSupply typical mapping ^
Line 14: Line 14:
  
  
-===== Common types of data ===== +Common types of data that you can send to DHIS2 from mSupply for an item: 
-  - Stock on hand +  - Current stock on hand 
-  - Stock expiring+  - Current months of stock on hand 
 +  - The amount of stock in adjustments 
 +  - The amount of stock received 
 +  - The amount of stock issued 
 +  - The amount of stock expiring within 90 days 
 +  - The amount of stock expired
   - Value of stock on hand   - Value of stock on hand
   - Average monthly consumption   - Average monthly consumption
   - Days out of stock   - Days out of stock
-  - Stock beginning of the month +  - Stock at the beginning of the month 
-  - Stock end of the month+  - Stock at the end of the month 
 +  - Whether the item is currently stocked out
  
  
Line 49: Line 55:
   * **Basic authentication checkbox:** If checked then mSupply will use basic authentication in the call headers when sending data to DHIS2. If it is unchecked then mSupply will use authentication in the body of the calls. This setting should match the way the DHIS2 instance has been configured.   * **Basic authentication checkbox:** If checked then mSupply will use basic authentication in the call headers when sending data to DHIS2. If it is unchecked then mSupply will use authentication in the body of the calls. This setting should match the way the DHIS2 instance has been configured.
   * **URL:** The URL of the DHIS2 database including the port if any.   * **URL:** The URL of the DHIS2 database including the port if any.
-  * **Username:** The username mSupply will use to access the DHIS2 database +  * **Username:** The username mSupply will use to access the DHIS2 database. 
-  * **Password:** The password mSupply will use to access the DHI2 database +  * **Password:** The password mSupply will use to access the DHI2 database. 
-  * **Client:** The client name mSupply must use to access the database. +  * **Client:** Only visible and used if **Basic authentication** is checked. The client name mSupply must use to access the database. 
-  * **Secret:** The secret that is used for mSupply to access the DHIS2 database. No need to enter this if none was provided. +  * **Secret:** Only visible and used if **Basic authentication** is checked. The secret that is used for mSupply to access the DHIS2 database. No need to enter this if none was provided. 
-  * **Setup** +  * **Setup:** Here you choose how to identify the elements of data that you send to DHIS2 must be identified. Your choice depends on how DHIS2 is configured. 
-    * **Using category option combo:** +    * **Using category option combo:** Choose this if DHIS2 is using attribute option combos where there is one category option combo assigned per data element (AMC, stock on hand etc.) for an entire data set. For this option, you need to tell mSupply what the DHIS2 category option combo ID is for each data element you want to push (i.e. //Active// column is checked) in the //Data elements to push// table. 
-    * **Different data elements per item:** +    * **Different data elements per item:**  Choose this if there is a different identifier for each data element for each item. These identifiers need to be entered for each item in item user fields or item custom fields - you enter the name of the field the value is stored in into the //Data elements to push// table in the //Custom field name// column. 
-    * **Push only 1 data element:**+    * **Push only 1 data element:** Choose this if you are only pushing a single data element (e.g. AMC, stock on hand etc.) for each item to DHIS2. In the //Data elements to push// table you must check only a single box in the //Active// column and no values need to be entered in the //Category option ID// or //Custom field name// columns.
   * **Data elements to push** In this table, select the data elements that you want to push for each mSupply item.   * **Data elements to push** In this table, select the data elements that you want to push for each mSupply item.
     * **Active column:** Check the checkbox for each data element you want to send for an item. Click on the checkbox to toggle it on and off.     * **Active column:** Check the checkbox for each data element you want to send for an item. Click on the checkbox to toggle it on and off.
-    * **Category option ID column:** Enter the ID of the item category option that represents this piece of data in mSupplyClick into the appropriate cell and type or paste the value into the cell+    * **Category option ID column:** Required if **Using category option combo** is selected in the //Setup// sectionThis is the DHIS2 category option ID for the data element.  
-    * **Custom field name column:** This is read only and filled in by mSupply+    * **Custom field name column:** Required if **Different data elements per item** is selected in the //Setup// section. Enter the corresponding item custom field name used to identify the item corresponding DHIS2 data element code
-    * **Interval column:** Select the interval between successive sends of the data element. Select one of //monthly//, //weekly//, //daily//, //first day of the month// and //last day of the month// by clicking on the down arro in the cell and selecting the appropriate option. +    * **Interval column:** Select the interval between successive sends of the data element. Select one of //monthly//, //weekly//, //daily//, //first day of the month// and //last day of the month// by clicking on the down arrow in the cell and selecting the appropriate option. 
-    * **Push data basis column:** Select the basis of the data to be sent, one of //previous month// or //current day//. Again, click on the dowen arro in the cell and click on the appropriate option to select it.+    * **Push data basis column:** Select the basis of the data to be sent, one of //previous month// or //current day//. Again, click on the down arrow in the cell and click on the appropriate option to select it.
   * **Data set ID:** Enter the ID of the dataset in DHIS2 that you want to push the data to.   * **Data set ID:** Enter the ID of the dataset in DHIS2 that you want to push the data to.
   * **Period format:** Enter the format to send the period information to DHIS2. Something like "YYYYMM", where YYYY represents the year, MM represents the month and DD represents the day.   * **Period format:** Enter the format to send the period information to DHIS2. Something like "YYYYMM", where YYYY represents the year, MM represents the month and DD represents the day.
-  * **Item field reference:** This tells mSupply where the DHIS2 item reference is stored in mSupply. If //Universal code// is selected then the code shown in the **Universal code** field of an item's details page is used (see the [[items:item_basics:tab_general|]] page for details). If //Custom field// is selected then the DHIS2 item reference is taken from the item custom field entered in the accompanying text field (which should contain one of "user_field_1", "user_field_2", "user_field_3" and "user_field_6" (see the [[items:item_basics:tab_general|]] page for details of these custom fields).+  * **Item field reference:** Required for "Using category option combo" and "Push only 1 data element" setup. This tells mSupply where the DHIS2 item reference is stored in mSupply. If //Universal code// is selected then the code shown in the **Universal code** field of an item's details page is used (see the [[items:item_basics:tab_general|]] page for details). If //Custom field// is selected then the DHIS2 item reference is taken from the item custom field entered in the accompanying text field (which should contain one of "user_field_1", "user_field_2", "user_field_3" and "user_field_6" (see the [[items:item_basics:tab_general|]] page for details of these custom fields).
   * **Data element ID scheme:** This tells mSupply what kind of DHIS2 item identifiers are stored in mSupply (in the place defined by the **Item field reference** section above), item codes or UIDs.   * **Data element ID scheme:** This tells mSupply what kind of DHIS2 item identifiers are stored in mSupply (in the place defined by the **Item field reference** section above), item codes or UIDs.
-  * **Round off checkbox:** If checked then mSupply will round numerical data values to the nearest whole number.+  * **Round off checkbox:** If checked then mSupply will round numerical data values to the nearest whole number as some DHIS2 setup only accept integers.
   * **Test connection button:** Click this to test the connection to the DHIS2 server. You will be shown a message that tells you whether mSupply was able to connect to the DHIS2 server with the credentials you have provided.   * **Test connection button:** Click this to test the connection to the DHIS2 server. You will be shown a message that tells you whether mSupply was able to connect to the DHIS2 server with the credentials you have provided.
   * **Manual push data button:** Click this button to immediately attempt to push the data as setup in this window to DHIS2. The data will, of course, be pushed on a //current day// basis. View the log (see the [[admin:the_log|]] section for details) to see the results of the attempt.   * **Manual push data button:** Click this button to immediately attempt to push the data as setup in this window to DHIS2. The data will, of course, be pushed on a //current day// basis. View the log (see the [[admin:the_log|]] section for details) to see the results of the attempt.
  • Last modified: 2024/08/13 22:10
  • by Jonna Quismundo