How it works
The JeMPI Client Registry is a system that incorporates a microservice architecture, each microservice has a specific task such as data cleaning, data storing, etc. These various services communicate through a Kafka message bus, meaning that every service is storing and retrieving data from a specific Kafka topic.
Below the synchronous and asynchronous flow diagram.
Description: A microservice that sends the content of an uploaded csv file to the JeMPI_ETL service. the JeMPI_AsyncReciever service produces kafka messages where each message has a row from the CSV file uploaded. it will then be saved under a kafka topic.
The base version uses a reference implementation with the fields below:
String auxId, String givenName, String familyName, String gender, String dob, String city, String phoneNumber, String nationalId
Input
A CSV file located in the JeMPI_AsyncReciever associated volume, under */app/csv_ directory (this can be done through HTTP request). Example of input file:
Output
The service will save the data from the CSV file, one line at a time. Kafka topic: TOPIC_INTERACTION_ETL="JeMPI-interactions-etl"
Description: A microservice that pocesses the input coming from the JeMPI_AsyncReceiver. The JeMPI_ETL service will perform some data trasformation e.g. lower case the values for name of the patient or unformat the date for the date of birth. The resulting data will be sent as JSON (JSON Streaming) to the JeMPI_Controller service.
Input:
Data coming from the JeMPI_AsyncReciever service. Kafka topic: _TOPIC_INTERACTION_ETL="JeMPI-interaction-etl"*
Output:
Data transformed into JSON that will be sent to the JeMPI_Controller. It will be stored in the Kafka topic: _TOPIC_INTERACTION_CONTROLLER="JeMPI-interaction-controller"*
Example or a Kafka message coming from the interaction controller topic:
Description: The JeMPI_Controller service has multiple tasks:
Send the data coming from the JeMPI_ETL to either the JeMPI_Linker or the JeMPI_EM services, based on the workflow selection made by user on import. The data will be stored in their respective Kafka topics accessed (consumed) by those service.
Input: Data coming from the JeMPI_ETL service Kafka topic: _TOPIC_INTERACTION_CONTROLLER="JeMPI-interaction-controller"*.
Values of the M & U computed in the JeMPI_EM service Kafka topic: _TOPIC_MU_CONTROLLER="JeMPI-mu-controller"*
Output:
Send the data to the JeMPI_EM
Kafka topic: TOPIC_INTERACTION_EM="JeMPI-interaction-em"
MU process: Kafka topic: TOPIC_MU_LINKER="JeMPI-mu-linker"
Send the data to the JeMPI_Linker
Kafka topic: TOPIC_INTERACTION_LINKER="JeMPI-interaction-linker"
Description: A microservice that will create an object containing m&u of a patient against patient records that go into the EM algorithm (quality (m) and the uniqueness (u) per field). This object is used in the linker for matching patients. It uses a machine learning called Estimation maximisation (EM) algorithm to optimize that value, it is launched after receiving a number of records specified in the configuration.
Input: Kafka topic: TOPIC_INTERACTION_LINKER="JeMPI-interaction-linker"
Output: Kafka topic: TOPIC_MU_CONTROLLER="JeMPI-mu-controller"
Description: A microservice that will interact with Dgraph database to do the matching of the patients. The Linker uses thresholds to drive the linking and notifications for review processes. These thresholds are the following:
A single match or no match threshold : the interaction will automatically be linked to the highest golden record candidate above the threshold. If no candidate has a score above the threshold, a new golden record is created. This is typically used for fully autonomous linking.
Window around the match/no match threshold : if the highest score generated for the candidates falls within this window, a notification is sent for Admin to review the interaction.
Margin threshold : if another candidate falls within a margin from the highest score and this highest score is above the match threshold, a notification for review is sent for the Admin to review the linked interaction.
Input: Kafka topic: TOPIC_INTERACTION_EM="JeMPI-interaction-em"\
Output:
Interact with the Dgraph database using GraphQL queries/mutations, save the interactions and the links.
Send response of either the link info or the list of candidates to the Controller
Save response to Kafka topic: TOPIC_notifications=”JeMPI_notifications”
Description: The Dgraph database used for JeMPI to store the patient records. it is a graph database.
Component linked:
Dgraph Ratel: A tool for data visualization and cluster management. Ratel can be used with Dgraph to manage cluster settings, run DQL queries and mutations and see results of the mentioned operations.
Dgraph Alpha: Expose and host endpoints of the indexes.
Dgraph Zero: it is like a Zookeeper/KRaft in Kafka, it will control the instances of Alpha by assigning them to a group, and re-balances the data between them.
Description: Kafka the message queue bus, it contains all the topics used previously in the other components.
Description: The JeMPI_API service contains the endpoints needed to interact with JeMPI.
It performs the following functions:
Read data from the Kafka topic TOPIC_notifications=”JeMPI_notifications”
Save data related to the administration in PostgeSQL DB
Get the data from PostgreSQL when the JeMPI Web requests data.