Hello technical committee,
I wanted to kick-off a discussion on how we can most-rapidly pull in product data from PCMT to OpenLMIS’ Reference Data.
A starter user story
As an administrator I want to configure the address, credentials and product family of a PCMT instance so that a regularly occurring pull of products from the given family occurs and populates the OpenLMIS product list so that OpenLMIS product master data may be sourced from a product catalog.
PCMT API
PCMT has a REST API returning JSON (HATEOS) that has searching and paging capabilities built-in. Security is handled by OAuth2 using a simple web Bearer token, however we’ll need to support the refresh token workflow. We’ll also be able to find products that have changed since the last time the list has been polled by using a last-updated date-time. I’ll post more on the details of the API later as we get closer to a decision.
OpenLMIS’ Work
At the very least an OpenLMIS team would be responsible for:
- configuring how and when a component would pull data from PCMT.
- regularly pulling that data into Reference Data, and further configuring OpenLMIS’ Products. e.g. PCMT likely wouldn’t have a Program Orderable configuration as that’s OpenLMIS specific. So after a Product is pulled in from PCMT, someone in OpenLMIS would likely still want to configure that product/orderable to Programs.
To carry out this plumbing a number of options are apparent, however I’d like the team to weigh in on which could be accomplished soonest, and which we have the most confidence in right-now:
- Nifi. It’s still our go-to data-mover in the reporting stack and we know it’s robust at moving data, however I think a number of us are unhappy at how complex managing it’s deployment is.
- Build it in Java. Either in Reference Data or as another micro-service. We might be most comfortable with this coding and deployment-wise, however we’d be starting from scratch: scheduling, state storage between pulls, etc.
- Build a Mediator in OpenHIM. This would likely be most favorable longer-term and to the OpenHIE community, however our team hasn’t deployed OpenHIM yet nor built a Mediator. You can install via Docker and run locally pretty easily to explore.
Next steps
Longer-term we are likely to see steps made to standardize product master data in FHIR and to build re-usable mediators to more systems. In the meantime however with what’s happening around the world with COVID, there is a desire to make this work quickly and reliably. Personally I think option 3 will be useful for the team longer term, however I’d like to hear what the team thinks in terms of getting something done and potentially learning something new.
Best,
Josh