ЕСОЗ - публічна документація
RCC_UNZR data synchronization for Person (EDDR-132)
- 1 Data flow
- 1.1 Step description
- 1.1.1 Step 1.1 Update Person
- 1.1 Step description
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;
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:
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
If the person has UNZR, but it does not match a regex
^[0-9]{8}-[0-9]{5}$
, then:Update person_verifications record by person_id:
unzr_data_id = null
unzr_data_status = null
unzr_synced_at = null
unzr_verification_status = NOT_VERIFIED
unzr_verification_reason = INITIAL AUTO_INCORRECT_DATA
unzr_unverified_at = current datetime
Update persons record by id:
unzr = null
ЕСОЗ - публічна документація