Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
integration:dhis2_integration [2024/08/13 14:24] – [mSupply connection to DHIS2] Gary Willetts | integration: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 13: | Line 13: | ||
With these DHIS2 has the power to show different types of data for different places of interest on various graphs. It can also aggregate those values in hierarchical groups. | With these DHIS2 has the power to show different types of data for different places of interest on various graphs. It can also aggregate those values in hierarchical groups. | ||
- | ===== Common types of data ===== | ||
- | | + | Common types of data that you can send to DHIS2 from mSupply for an item: |
- | - 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 | ||
+ | - The amount of stock expired | ||
- Value of stock on hand | - Value of stock on hand | ||
- | - Critical items availability | + | - Average monthly consumption |
+ | - Days out of stock | ||
+ | - Stock at the beginning of the month | ||
+ | - Stock at the end of the month | ||
+ | - Whether the item is currently stocked out | ||
- | ===== mSupply | + | |
- | Before you can send mSupply data to a DHIS2 instance, you need to tell mSupply where the data has to go, what data to send and where the information comes from. To do that, go to //File > Preferences// | + | ===== Setup ===== |
+ | ==== Items ==== | ||
+ | To send item details to DHIS2, | ||
+ | - Use the item's universal code. See the [[items: | ||
+ | - Use the DHIS2 UID or the DHIS2 code. Choose which one you want to use then enter those values in an item's custom field 1, 2, 3 or 6 (the 3 text custom fields). | ||
+ | |||
+ | The final step in setting up items is to tell mSupply which ones to send data to DHIS2 for. Do this by checking the **Include in DHIS2 data push** checkbox on an item's details window - see the [[items: | ||
+ | |||
+ | |||
+ | ==== Stores ==== | ||
+ | Stores in mSupply correspond to org units in DHIS2. mSupply needs to know the Org unit reference for each of the stores that data needs to be sent to DHIS2 for. | ||
+ | |||
+ | To do this, add a " | ||
+ | |||
+ | For details on how to set store custom codes see the [[other_stuff: | ||
+ | |||
+ | |||
+ | ==== mSupply preferences | ||
+ | Before you can send mSupply data to a DHIS2 instance, you need to tell mSupply where the data has to go, what data to send and where the information comes from. To do that, go to //File > Preferences// | ||
{{ : | {{ : | ||
Line 28: | 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: | + | * **Username: |
- | * **Password: | + | * **Password: |
- | * **Client:** The client name mSupply must use to access the database. | + | * **Client: |
- | * **Secret:** The secret that is used for mSupply to access the DHIS2 database. No need to enter this if none was provided. | + | * **Secret: |
- | * **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: |
- | * **Different data elements per item:** | + | * **Different data elements per item: |
- | * **Push only 1 data element:** | + | * **Push only 1 data element: |
* **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: | + | * **Category option ID column: |
- | * **Custom field name column: | + | * **Custom field name column: |
- | * **Interval column:** Select the interval between successive sends of the data element. Select one of // | + | * **Interval column:** Select the interval between successive sends of the data element. Select one of // |
- | * **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 " | * **Period format:** Enter the format to send the period information to DHIS2. Something like " | ||
- | * **Item field reference: | + | * **Item field reference: |
- | * **Data element ID scheme:** | + | * **Data element ID scheme: |
- | * **Round off checkbox: | + | * **Round off checkbox: |
* **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: | + | * **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: |
<WRAP info center round 90%> | <WRAP info center round 90%> | ||
Line 58: | Line 85: | ||
If the connection is not successful you will see a red " | If the connection is not successful you will see a red " | ||
- | Once configured, a scheduler will run and regularly send data from mSupply to DHIS2. | + | Once configured, a scheduler will run and regularly send data from mSupply to DHIS2. |
- | Contact our team to help you to create | + | Of course, once you have told mSupply where all the data is stored, |
- | This has been done already | + | Connections to DHIS2 have been configured successfully |
\\ | \\ | ||
\\ | \\ |