Table of Contents |
---|
...
Confidant_person is an object, not an array.
It is allowed to submit confidant person when person is created.
It is not allowed to submit confidant person when person is updated.
Validation of confidant person is updated: age, verification status and auth methods are important.
Validation of auth methods is updated: in case if person has confidant, as THIRD_PERSON in auth methods must be submitted confidant.
Validation of person documents is updated: if person`s age is between no_self_registration_age and person_full_legal_capacity_age, documents that prove legal capacity can be sumbitted. In case if legal capacity is provenoven by document, person can not have confidant.
Validate necessity of confidant person is added: in some cases (view on validations below) it is necessary to have confidant if person is created (in the request body) and if person is updated (in db https://e-health-ua.atlassian.net/wiki/spaces/EDDREH/pages/18048483381724729917/MPI#confidant_person_relationships#confidant_person_relationships ).
Links to save documents for confidant persons are updated.
When person, that is updated, must be authorized by confidant person - authentication method with type = THIRD_PERSON must be passed in
authorize_with
field.
...
Validate block confidant person. If
$.person.confidant_person
is not null:Generate URLs with type
confidant_person.{confidant_person.person_id}.documents_relationship.[:].{type}
Validate block of person documents. If one of the documents has document.type = BIRTH_CERTIFICATE_FOREIGN and there is no same document in {$.person_request.person.confidant_person.[:].documents_relationship.[:]}
and persons age < no_self_auth_age global parameter then
Generate URL with type
person.BIRTH_CERTIFICATE_FOREIGN
Validate block of person documents. If one of the documents has document.type = PERMANENT_RESIDENCE_PERMIT and persons age >= no_self_auth_age global parameter then
Generate URL with type
person.PERMANENT_RESIDENCE_PERMIT
Validate block of authentication methods. If authentication method type = OFFLINE
Generate URLs with type
person.{$.person.documents.[:].type}
for each persons document
Validate persons unzr. If$.person.unzr
is not emptyandfirst 8 digits of$.person.unzr != $.person.birth_date
Generate URL with typeperson.unzr
Invoke Media Content Storage to generate upload URL for each document obtained by executing logic above and save documents to DB.
...