...
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;
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
andapplicant_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 butNOT_VERIFIED
In case of error - return 409 (‘Confidant person not found or is not verified’)
...
Prepare data for declaration request printout form
Call MAN service to render printout form
Get template id from config (
DECLARATION_REQUEST_PRINTOUT_FORM_TEMPLATE_ID
)Prepare printout content based on declaration request data
Render printout form and save to declaration request
If confidant person is required (see https://e-health-ua.atlassian.net/wiki/spaces/PCABEH/pages/1751344746517628660189/PIS.+Create+Declaration+request#Validate-confidant-person-and-relationship-(optional) ) then preload Confidant person object from MPI in the following structure
...
If confidant person is required (see https://e-health-ua.atlassian.net/wiki/spaces/PCABEH/pages/1751344746517628660189/PIS.+Create+Declaration+request#Validate-confidant-person-and-relationship-(optional)) then put only one authentication method that relates to this confidant person (select auth method where type 'THIRD_PERSON' and value = applicant_user_id
from token)
...
If confidant person is required (see https://e-health-ua.atlassian.net/wiki/spaces/PCABEH/pages/1751344746517628660189/PIS.+Create+Declaration+request#Validate-confidant-person-and-relationship-(optional) ) then preload Confidant person object from MPI in the following structure
...
Parameter | Source | Comments |
---|---|---|
id | Autogenerated | |
data |
| |
status | Const: NEW | |
inserted_by | Authenticated user (id) | |
inserted_at | Current date-time | |
updated_at | Current date-time | |
authentication_method_current | ||
documents | Empty list | |
printout_content | ||
updated_by | Authenticated user (id) | |
declaration_id | Autogenerated | |
mpi_id | person_id | |
overlimit | null | |
channel | Const: PIS | |
declaration_number | ||
data_legal_entity_id | data.legal_entity_id | |
data_employee_id | data.employee_id | |
data_start_date_year | Extract year from data.start_date | |
data_person_tax_id | null | |
data_person_first_name | null | |
data_person_last_name | null | |
data_person_birth_date | null | |
data_person_documents | null | |
authorize_with | null | |
data_to_be_signed | ||
parent_declaration_id | null | |
status_reason | null | |
current_declaration_count | null | |
system_declaration_limit | null | |
is_shareable | Const: false | |
data_division_id | data.division_id |