Table of Contents |
---|
...
Validation | |
---|---|
1 | Validate parallel editings (new)Whether Person data were not changed by other users (MSP, NHS) of NHS system. By preliminary keeping value
|
2 | Validate Person’s status id in DB and deduplication controls
|
3 | Check “patient_signed” flag.This field should not be transferred. And therefore BE should not overwrite this field in DB |
4 | Check “process_disclosure_data_consent” flag.This field should not be transferred. And therefore BE should not overwrite this field in DB |
5 | Validate confidant person
Validate confidant person age >= prm.global_parameters.no_self_auth_age:
validate presence of a secret word:
Check that confidant person document type (in
|
6 | Validate "tax_id"
|
7 | Check "no_tax_id" flag
|
8 | Validate person documents
|
9 | Validate NHS request fields
|
...
Set person verification according to logic https://e-health-ua.atlassian.net/wiki/spaces/EH/pages/18201706567/RC_Sign+person+request+v2+DRACS+2.0#DRACS-death-acts-registry-verification
DRACS birth acts registry verification
Set person verification according to logic https://e-health-ua.atlassian.net/wiki/spaces/EH/pages/18201706567/RC_Sign+person+request+v2+DRACS+2.0#DRACS-birth-acts-registry-verification
DRACS name change acts registry verification
Set person verification according to logic: https://e-health-ua.atlassian.net/wiki/spaces/EH/pages/18201706567/RC_Sign+person+request+v2+DRACS+2.0#DRACS-name-change-acts-registry-verification
Legal capacity verification
Set person verification according to logic: https://e-health-ua.atlassian.net/wiki/spaces/EH/pages/18201706567/RC_Sign+person+request+v2+DRACS+2.0#Calculate-cumulative-verification-status
...
Calculate persons cumulative verification status according to logic https://e-health-ua.atlassian.net/wiki/spaces/DRACS2/pages/17858101317/UPD+Sign+person+request+v2#Calculate-cumulative-verification-status
Update confidant person relationships
In case if person is updated (person.id
exists in person_data for person request) and 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 | confidanthttps://e-health-ua.atlassian.net/wiki/spaces/EH/pages/724271171/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 | confidanthttps://e-health-ua.atlassian.net/wiki/spaces/EH/pages/724729917/MPI#confidant_person_relationships table where person_id =
person.id
and is_active = true. Set:active_to = now()
updated_at = now()
updated_by = user_id (from token)
For each relationship from previous step - deactivate person authentication methods with type = THIRD_PERSON and value =
confidant_person_relationships.confidant_person_id
, set values: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 existence 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 existence 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()
Response
Updated personal data of a Person:
...