Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel6
outlinefalse
styledefault
typelist
printabletrue

Purpose

This job is designed for getting personal information from the EIS MVS registry by UNZR.

Key points

  1. Job executes by request for a single unzr at once.

  2. Job doesn’t make any corrections in person’s unzr before sending it to the service.

  3. It is assumed that unzr is unique within EIS MVS register. So if such record does not exists in unzr_info table (MIMIR db) it will be created, if exists - updated.

  4. The data received from the job is saved, but not linked to the Person.

  5. The job has no influence on person’s verification and related to isolated process.

Data flow

Job is triggered for a single UNZR by [NEW] (GraphQL) Sync UNZR info https://e-health-ua.atlassian.net/wiki/spaces/EH/pages/18213699885/draft_RC_+GraphQL+Sync+UNZR+info+DMS mutation. It starts an oban job, which in turn executes a call to the unzr service and awaits a response from it. Result and status of the job is stored in the https://e-health-ua.atlassian.net/wiki/spaces/EDDREH/pages/1804917155518237915151/RC_MVS+integration+data+model+model#unzrDMS#unzr_info table, which can always be retrieved by [NEW] (GraphQL) Get UNZR info https://e-health-ua.atlassian.net/wiki/spaces/EH/pages/18213765626/draft_RC_+GraphQL+Get+UNZR+info+DMS query.

UML

Get UNZR info job v2.drawio.png

View file
nameGet UNZR info job v2.drawio

Step description

Step 1. Create or update unzr_info

Get record from mimir.unzr_data table by unzr:

...

Expand
titleSet data to EXISTING record
  • job_status - status of the new job that is equal to “pending“ according to JOB_PROCESSING_STATUS dictionary

  • updated_by - employee’s user who called the “unzr” api from admin panel

  • updated_at - current date and time

Step 2. Call unzr service

Get information related to UNZR in the EIS MVS register - invoke RPC call with third-party “unzr“ service https://e-health-ua.atlassian.net/wiki/spaces/EDDREH/pages/1805251387918229035067/RC_MVS+Trembita+methods_EN+methods#unzrDMS#unzr using the following request params:

  • unzr - unzr from input

Step 3. Update unzr_info

If information was found at Step 2 and job was successfully completed by obtaining filled info from the register, then update unzr_info record with following data:

  • job_status = processed, according to JOB_PROCESSING_STATUS dictionary

  • info = info, received from response of the “unzr“ service

  • synced_at = current date and time

  • updated_at = current date and time

  • updated_by = user, related to an employee triggered the job

Step 4. Update unzr_info

If information was not found at Step 2 and job was successfully completed , but obtained info from the register was empty, then update unzr_info record with following data:

  • job_status = processed, according to JOB_PROCESSING_STATUS dictionary

  • info = null, received empty info in response from the “unzr“ service

  • synced_at = current date and time

  • updated_at = current date and time

  • updated_by = user, related to an employee triggered the job

Step 5. Update unzr_info

If error received at Step 2 from the “unzr” service or job was failed by another reasons, then update unzr_info record with following data:

...