Table of Contents

23.06. NHLMIS integration

Before you turn on the NHLMIS integration two important setup steps must be taken:

  1. All store, item, customer and supplier codes must match those used in NHLMIS. If this step is not taken;
    1. stock data you send will be rejected by NHLMIS because the items the stock belongs to will not be recognised
    2. requisitions (orders) you receive from NHLMIS will not be added because the customer or items are not recognised by mSupply
  2. NHLMIS must be configured so that the API key relates to the correct stores in your mSupply installation.

Currently, there is no functionality to show the program a particular order is for or to force the selection of stock that belongs to the correct program. This might be added in a future upgrade.

mSupply has an interface with the Nigeria Health Logistics Information System. The interface allows the automatic sending of current stock and pulling of orders from NHLMIS.

The preferences that define how this interface works are managed on the NHLMIS tab of the File > Preferences menu. The tab looks like this:

General preferences

Send stock preferences

Fetch requisitions preferences

Click on the OK button to save any settings you have changed; changes will not be put into effect until they are saved by clicking this button

What it does

Sending stock

The current stock in each store selected in the Stores to send stock and receive requisitions for table is sent to NHLMIS automatically on the schedule defined by the No. of days between sends and Time to send field.

Each time a send is made the following is done in this order, one store at a time:

  1. all the batches in stock (i.e. where available stock is more than 0) are sent to NHLMIS by calling the /batches endpoint. If all successful then proceed to the next step. If not all are successful then record error and stop.
  2. all current stock lines (i.e. where available stock is more than 0) are sent to NHLMIS by calling the /stock-counts endpoint.
  3. The success or failure of each send for each store is logged.

Fetching requisitions

All the outstanding orders (which become requisitions in mSupply) for this mSupply installation which have become outstanding since the last “since marker” are automatically fetched from NHLMIS on a schedule defined by the No. of minutes between fetches field.

If there are more than 50 outstanding orders then mSupply will automatically ask NHLMIS to send the next 50 until all outstanding orders have been retrieved.

Each time orders are successfully retrieved, the “since” marker that mSupply uses for the request is updated with the value returned by NHLMIS. And if the “since” marker is for a different day to the last since marker stored, it is added to the Set “since” marker” to drop down list (only the 5 most recent markers are stored in this drop down list - if there are already 5 then the oldest is replaced with the new one).

Each order received from NHLMIS is saved as a requisition in the appropriate store in mSupply. The NHLMIs order ID is stored in the Their ref field of each requisition.

Any orders that have already been received from NHLMIS and saved in mSupply are not saved again, they are ignored.

Errors

If errors are encountered during the sending of stock or fetching orders then information about the error is saved in the log (see the 25.19. The system log page for details) and an email giving details of the error is sent to the email address stored in the Error email field.