ЕСОЗ - публічна документація

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Data flow

Scheduller starts according to UNZR_PERSON_SYNCHRONIZATION_SCHEDULE cron parameter. It creates oban job that selects UNZR_PERSONS_SYNCHRONIZATION_BATCH_SIZE Persons that match to some filter parameters. For each the job receives Person data on input and returns the result of reconciliation with the MVS registry to output (details in “Step description” section below):

  • if UNZR is found - set verification status to VERIFIED along with verification reason AUTO. The unzr_data is saved and linked to the Person.

  • if UNZR is not found for the person - set verification status to NOT_VERIFIED and verification reason is set to AUTO. The unzr_data is not saved and not linked to the Person;

  • if person has no UNZR - set verification status to VERIFICATION_NOT_NEEDED and verification reason to INITIAL AUTO_DATA_ABSENT. Sync isn't performed, unzr_data is not saved and not linked to the Person;

  • if UNZR is incorrect - set verification status to NOT_VERIFIED and verification reason to INITIAL AUTO_INCORRECT_DATA. In this case UNZR value will be cleared, sync isn't performed.

  • if technical error received - the verification status and reason doesn’t change. The unzr_data is not saved, Person is not updated;

UNZR data process for Persons v3.drawio(1).png

Step description

Step 1.1 Update Person

Invoke the Step If person_verifications.unzr_verification_status still IN_REVIEW

Make data pre-estimation for a synchronization:

  1. If a person has no UNZR (persons.unzr is empty), then update person_verifications record by person_id:

    • unzr_data_id = null

    • unzr_data_status = null

    • unzr_synced_at = null

    • unzr_verification_status = VERIFICATION_NOT_NEEDED

    • unzr_verification_reason = INITIAL AUTO_DATA_ABSENT

    • unzr_unverified_at = null

  2. If the person has UNZR, but it does not match a regex ^[0-9]{8}-[0-9]{5}$, then:

    1. Update person_verifications record by person_id:

      1. unzr_data_id = null

      2. unzr_data_status = null

      3. unzr_synced_at = null

      4. unzr_verification_status = NOT_VERIFIED

      5. unzr_verification_reason = INITIAL AUTO_INCORRECT_DATA

      6. unzr_unverified_at = current datetime

    2. Update persons record by id:

      • unzr = null

  • No labels