Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

...

  • If equals - check that person must not be authorized by confidant person, so it doesn’t correspond to following rules:

    • persons age < no_self_registration_age global parameter;

    • persons age between no_self_registration_age and person_full_legal_capacity_age global parameters and person does not have document with type from PIS_PERSON_LEGAL_CAPACITY_DOCUMENT_TYPES config parameter or person has document with type from PIS_PERSON_LEGAL_CAPACITY_DOCUMENT_TYPES config parameter and legal_capacity_verification_status <> VERIFIED or VERIFICATION_NOT_NEEDED;

    • persons age > person_full_legal_capacity_age global parameter and exists at least one active and approved confidant person relationship for person (using following process  /wiki/spaces/PCAB/pages/17415995422 Check confidant person relationship with person_id = person from request - expected :ok, :approved response)

    • In case of error - return 409 (‘Request must be authorized by confidant person’)

  • If not equal - validate relationship with following steps:

    • Check that there is registered relationship between person_id and applicant_person_id(MPI.confidant_person_relationships)

    • Check that relationship is VERIFIED

      • In case of error - return 409 (‘Can’t confirm relationship’)

    • Check that applicant_person_id exists (status = 'active' & is_active = 'true') and has verification_status any but NOT_VERIFIED

      • In case of error - return 409 (‘Confidant person not found or is not verified’)

...

Submit person on Manual NHS verification according to following logic: https://e-health-ua.atlassian.net/wiki/spaces/DRACS2EH/pages/1785810131718201706567/UPD+RC_Sign+person+request+v2#Manualv2+DRACS+2.0#Manual-NHS-verification

DRFO registry verification

Submit person on DRFO registry verification according to following logic: https://e-health-ua.atlassian.net/wiki/spaces/DRACS2EH/pages/1785810131718201706567/UPD+RC_Sign+person+request+v2#DRFOv2+DRACS+2.0#DRFO-registry-verification

DRACS death acts registry verification

Submit person on DRACS death acts registry verification according to following logic: https://e-health-ua.atlassian.net/wiki/spaces/DRACS2EH/pages/1785810131718201706567/UPD+RC_Sign+person+request+v2#DRACSv2+DRACS+2.0#DRACS-death-acts-registry-verification

DRACS birth acts registry verification

Submit person on DRACS birth acts registry verification according to following logic: https://e-health-ua.atlassian.net/wiki/spaces/DRACS2EH/pages/1785810131718201706567/UPD+RC_Sign+person+request+v2#DRACS+v2+DRACS+2.0#DRACS-birth-acts-registry-verification

DRACS name change acts registry verification

Submit person on DRACS name change acts registry verification according to following logic: https://e-health-ua.atlassian.net/wiki/spaces/DRACS2EH/pages/1785810131718201706567/UPD+RC_Sign+person+request+v2#DRACS+v2+DRACS+2.0#DRACS-name-change-acts-registry-verification

Legal capacity verification

Submit person on Legal capacity verification according to following logic: https://e-health-ua.atlassian.net/wiki/spaces/DRACS2EH/pages/1785810131718201706567/UPD+RC_Sign+person+request+v2_EN#Legal+DRACS+2.0#Legal-capacity-verification

Calculate cumulative verification status

Calculate cumulative person verifiation status according to following logic: https://e-health-ua.atlassian.net/wiki/spaces/DRACS2EH/pages/1785810131718201706567/UPD+RC_Sign+person+request+v2#Calculatev2+DRACS+2.0#Calculate-cumulative-verification-status

Update relationship between confidant person and updated person

In case if at least one of submitted person document types exist in PERSON_LEGAL_CAPACITY_DOCUMENT_TYPES config parameter and legal_capacity_verification_status = VERIFIED or VERIFICATION_NOT_NEEDED according to Legal capacity verification - deactivate all existing confidant person relationships for person:

  • Deactivate all records in IL.confidant_person_relationship_requests table where person_id = person.id and status = NEW, set values:

    • status = CANCELLED

    • updated_at = now()

    • updated_by = user_id (from token)

  • Deactivate all records in MPI.confidant_person_relationship table where person_id = person.id and is_active = true, set values:

    • is_active = false

    • updated_at = now()

    • updated_by = user_id (from token)

  • For each relationship from previous step - deactivate person authentication methods in https://e-health-ua.atlassian.net/wiki/spaces/EH/pages/724729917/MPI#person_authentication_methods table with type = THIRD_PERSON and value = confidant_person_relationships.confidant_person_id, set values:

    • is_active = false

    • ended_at = now()

    • updated_at = now()

    • updated_by = user_id (from token)

In case if person has active Confidant person relationships with relationship document with type='BIRTH_CERTIFICATE' and following person fields are updated:

  • first_name

  • last_name

  • second_name

  • birth_date

Update found active Confidant person relationships as those that need online verification with DRACS birth acts registry, set values:

  • verification_status = “VERIFICATION_NEEDED”

  • verification_reason = “ONLINE_TRIGGERED”

  • updated_at = now()

  • updated_by = user_id

Check existance of verification candidates for updated confidant_person_relationship_id with status = ‘NEW’ and entity_type = ‘dracs_birth_act' in confidant_person_relationship_verification_candidates table, if found - deactivate them, set:

  • status = ‘DEACTIVATED’

  • status_reason = ‘PERSON_UPDATED’

  • updated_at = now()

In case if person exists in the system as confidant person in active confidant person relationship with relationship document with type='BIRTH_CERTIFICATE' and following person fields are updated:

  • first_name

  • last_name

  • second_name

  • birth_date

  • tax_id

Update found active Confidant person relationships as those that need online verification with DRACS birth acts registry, set values:

  • verification_status = “VERIFICATION_NEEDED”

  • verification_reason = “ONLINE_TRIGGERED”

  • updated_at = now()

  • updated_by = user_id

Check existance of verification candidates for updated confidant_person_relationship_id with status = ‘NEW’ and entity_type = ‘dracs_birth_act' in confidant_person_relationship_verification_candidates table, if found - deactivate them, set:

  • status = ‘DEACTIVATED’

  • status_reason = ‘CONFIDANT_PERSON_UPDATED’

  • updated_at = now()

Render a response

Render a response according to specification.