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 22:08] – [Common types of data] Jonna Quismundo | integration:dhis2_integration [2024/10/17 11:29] (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 | + | The 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 |
- | - Value 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 | ||
- 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 36: | Line 41: | ||
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. | 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 Dhis2_code | + | To do this, add a " |
For details on how to set store custom codes see the [[other_stuff: | For details on how to set store custom codes see the [[other_stuff: | ||
Line 49: | Line 54: | ||
* **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:** 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 |
+ | * **No. of items per payload:** Enter the number of pieces of information to send in a particular call to the DHIS2 server. If there are more than this number of pieces to send then they will be split up into separate calls with this number of pieces of information in them. Helpful if there is a lot of information to send but the DHIS2 server can't handle the volume of information (which usually results in internal errors being returned). | ||
* **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: | ||
Line 86: | Line 92: | ||
\\ | \\ | ||
\\ | \\ | ||
- | | // Previous: | + | | // Previous: |
---- struct data ---- | ---- struct data ---- |