Overview and Definition

What is Program Data? A working definition:

We call it "Program Data" when:

In other words, it is data that is not tied to the OpenLMIS system (its business logic, calculations, notifications). The timing of when this data is received can be asynchronous (collected at a different time).

We may decide to pick a different name. Examples: user-defined data, custom data, non-logistics data, non-stock data, un-actionable data.

For OpenLMIS, there is a certain need to ensure program data has been collected during certain workflows, like requisition.

Requirements and Scope

Requirements for OpenLMIS to support program data, some must have and some nice to have:

RequirementSub-requirementMust Have / Nice to Have

Form design - determining what data needs to be captured and how, and designing a form to facilitate that data capture

  • This part of the system should be able to accommodate a user that is mostly non-technical (can use Excel or an interactive form designer tool to design forms)

Basic forms - enough to facilitate basic program data capture

  • A user can define the questions of the form, but the layout is just one question after another
Must Have

Complex forms - a fully featured form designer. Could potentially include (this list is not exhaustive):

  • Layout - how fields, labels and headers are organized
  • Skip - allowing fields or rows to be skipped
  • Validation - validating input is "correct"
  • Calculations - showing calculations in forms
Nice to Have

Data capture - entering data into and completing a form as part of a workflow

  • This part of the system should be able to accommodate a user that is completely non-technical (simple, straightforward form of entering relevant data; cues of what is incomplete)

Online data capture support (one way sync)

Must Have
Offline data capture support - easy to go offline, capture data and sync it back to the server once onlineVery Nice to Have

Mobile (tablet or smartphone) data capture - either through a web or native app

  • Note: this is not mutually exclusive with the offline sub-requirement
Nice to Have
Two way syncNice to Have

Reporting on data - taking the data, running reports and doing visualization on it

  • This part of the system should be able to accommodate a user that is mostly non-technical (can use reporting tool to generate reports or interact with tool

Must Have

Integrated "look and feel" - elements of program data look like part of the OpenLMIS system (users do not need to go to a separate system to fulfill program data requirements)

  • This requirement is most important during the data capture process

Nice to Have
Security - ensuring OpenLMIS users can access their program data and cannot access other program data for which they are not authorizedQuick to implement:
  • Within OpenLMIS UI, only see data for your facilities/programs
  • Users need to sign onto another system to enter program data
  • Admin maintains users in 2 systems
Must Have

Better:

  • Single sign-on (SSO) for OpenLMIS and Program Data system
  • Unified RBAC across OpenLMIS and Program Data system
Nice to Have

Proposal for Program Data Service

In order to create a loose coupling between logistics workflow and program data, there is a need to create a new Program Data microservice. This service is what the rest of the OpenLMIS system (Requisition, Stock Management, Informed Push) would talk to for its program data requirements.

We think that it's sufficient for other services to know whether data has been collected (e.g. to allow submitting a requisition) but not the contents of that data. Therefore we propose a very minimal service that only answers the question "was program data collected for a facility + program + period?"

Of course the program data must be collected, but the other services do not need to know the details of how this happens. Regardless of whether the program data is captured through the OpenLMIS UI, or through an external mobile or web tool, we should mediate all interactions that other services have through this thin service.

A diagram with the interactions:

Open Questions:

Proposal for DHIS2

We propose using DHIS2 as-is to capture data for facilities, programs and periods, because it is a mature product that already supports this use case. We will do a simple connection that allows OpenLMIS to query DHIS2 and determine whether data has been captured or not.

There are a number of upsides to using DHIS2 as a program data solution.

The weaknesses of this approach are that if we want it integrated into the OpenLMIS UI, we won't get the benefits that come out-of-the-box. Another weakness is that DHIS2 is another system that must be maintained (although often the country already maintains an instance).

MVP using Program Data Service and DHIS2

As a first step to exploring how program data would work in OpenLMIS, an MVP is proposed. It would have:

The new Program Data Service would be a lightweight service which has one API endpoint:

Benefits to doing this MVP with this new microservice and DHIS2:

Diagram of the interactions:

Component Diagram for the Program Data Service:

Next Steps

Some of this depends on findings in the MVP. However, a list of potential next steps: