Table of Contents | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
Compare Confidant persons
documents_relationship
data with each birth act data using comparison process:get documents_relationship.number (with type = BIRTH_CERTIFICATE) from confidant person
get certificates.cert_serial + certificates.cert_number with certificates.cert_status = 1 from birth act
perform normalization of found numbers (remove special symbols, bring to lower register)
compare found numbers:
if at least one act is equal – proceed with all valid acts data to next comparison step
if all acts are not equal – skip this confidant person, if Person does not have other confidant persons – proceed to Step 5
Compare Confidant persons personal data with each birth act data (compared from previous comparison step) using comparison process:
get last_name, first_name, second_name, tax_id and birth_date from confidant person
get father_surname, father_name, father_patronymic, father_numident, father_date_birth, mother_surname, mother_name, mother_patronymic, mother_numident, mother_date_birth from birth act
perform normalization of found fields (remove special symbols, bring to lower register)
compare confidant person with parents by following steps:
compare last_name, first_name, second_name, birth_date with father_surname, father_name, father_patronymic, father_date_birth or mother_surname, mother_name, mother_patronymic, mother_date_birth
if at least one act is equal – compare tax id on the next step
if all acts are not equal – skip this confidant person, if Person does not have other confidant persons – proceed to Step 5.
compare tax_id (if exists) with corresponding father_numident or mother_numident (if exists)
if does not exist or exists and at least one act is equal – proceed with all valid acts data to next comparison step
if not equal – skip this confidant person, if Person does not have other confidant persons – proceed to Step 5
Check compared Confidant persons parent rights from birth acts (compared from previous comparison step):
get father_parent_rights and mother_parent_rights from birth act
check that father_parent_rights <> 183 or mother_parent_rights <> 185 for corresponding confidant person
if father_parent_rights <> 183 or mother_parent_rights <> 185 for Confidant person – proceed to next step
if father_parent_rights = 183 or mother_parent_rights = 185 for any Confidant person – skip this confidant person, if Person does not have other confidant persons – proceed to Step 5
Search for active person using Active person search algorithm with successfully compared confidant person last_name, first_name, second_name and tax_id (if exists)
if tax_id does not exists or search returns ‘No active person found’ or ‘Impossible to clearly identify an active person’ messages – skip this confidant person, if Person does not have other confidant persons – proceed to Step 5
if one active person is found – check that it can be used as confidant person using following validations https://e-health-ua.atlassian.net/wiki/spaces/CSIEH/pages/17612832814/18000249948/RC_+CSI-1323+_Create+Confidant+Person+relationship+request#Validate-confidant-person
if no validation fails – create Confidant person relationship as described https://e-health-ua.atlassian.net/wiki/spaces/CSIEH/pages/17613422651/18000249998/RC_+CSI-1323+_Approve+Confidant+Person+relationship+request#Create-confidant-person-relationship-(action-%3D-INSERT) here, only set:
verification_status = ‘VERIFIED’
verification_reason = ‘AUTO’
dracs_birth_synced_at = now()
remove confidant person data from
persons.confidant_person
field
...