This page documents the software requirements and outlines the integration for the OpenSRP-OpenLMIS proof of concept that will be demonstrated to GAVI the week of 26th March 2018.

High Level Workflows

This section was copied from the previous page for reference. This section defines the minimum functional workflows for the proof of concept demo. Stretch activities are clearly marked with (Stretch)

  1. (Current Functionality) OpenSRP Android Client Demo prep to show current functionality
  2. (New) OpenSRP Android Client Requesting Stock
  3. (Current Functionality) OpenLMIS Demo to convert Order to Shipment
  4. (New) OpenSRP Android Client Receiving Shipment

Software Development Required

This section defines the software development required to deliver the two core features that are outlined in the above workflow.

Core Feature 1: OpenSRP Client Request Stock

This feature requires development in the Android Client, OpenSRP Server and NiFi.

OpenSRP Android Client

The Android Client will need to be enhanced with a push button that requests stock in the Stock Management module. This button will store the datetime, user and facility information for the stock request and it will sync with the OpenSRP server.

1.1 Data Model Enhancement:

1.2 UI Enhancement: (See Separate Section)

1.3 Sync Enhancement:

OpenSRP Server

OpenSRP Server will need to store the Order data in the server, update the REST API and expose one new API endpoint to track these orders.

1.4 Data Model Enhancement:

1.5 REST API Enhancement:

1.6 Sync Enhancement:

NiFi

NiFi will be responsible for querying the /getOrders API endpoint and kicking off the orders in OpenLMIS. The getOrders API will be queried on a regular schedule for new orders. When a new order is received, a NiFi Flow is run that ultimately creates an order in the /api/Orders endpoint in OpenLMIS. The structure of orders in OpenLMIS are defined by the project and we will need to hard code these for the demo.

Once an order is created, the order number will be stored in NiFi for future use.

NiFi can not store any permanent data

NiFi will need to create a number of maps:

Business Logic:

Core Feature 2: OpenSRP Android Client Receiving Shipment

The second core feature focuses on receiving a Shipment from OpenLMIS, sending it to the Android Client, notifying the user and allowing them to receive the stock in their inventory.

OpenSRP Android Client

The Android client will need to be enhanced to include a data model and user interface that presents a list of "Shipments". The shipments will require a data model enhancement in the client to be able to sync them from the server. Once a shipment is "Accepted" it generates "Received" events in the Android client for all of the antigens that are mapped in the shipment payload.

2.1 Data Model Enhancement:

2.2 UI Enhancement: (See Separate Section)

2.3 Sync Enhancement:

OpenSRP Server

The OpenSRP server will need to be enhanced to include the idea of "Shipments". Once the Shipment gets sent to the Android client, it becomes a "Receipt" at the lowest level of the supply chain, a facility who will consume the stock item.

2.4 Data Model Enhancement:

2.5 REST API Enhancement:

2.6 Sync Enhancement:

NiFi

NiFi is responsible for querying the OpenLMIS Shipments API to identify if there are any shipments that are on the way. When a shipment is received, NiFi, queries further for the shipment content, performs the correct business logic and posts a shipment to the OpenSRP Server /rest/stockresource/shipment/add endpoint.

Business Logic:

Android Client UI Enhancements

This section includes a unified view of the UI enhancements that are required to deliver both features. We will need to create the following:

  1. A new "Orders" view that has two actions:
    1. View Orders
    2. New Order
  2. Orders view
    1. Allows a user to view orders, shipments that are available and completed orders
  3. Shipment Receipt View
    1. Allows a user to receive a shipment and apply it to their stock on hand

Screens


New Order Button

Orders(s) View

This view shows a list of all orders, shipments and completed that have been sent from this facility. The user can only touch items in the shipments dropdown that haven't yet been accepted.

Shipment Receipt View

This view allows users to take action on the shipment and apply it to their stock on hand.