ЕСОЗ - публічна документація
RCC_(GraphQL) Update Confidant person relationship (DRACS2-105)
Status transitions
Allowed confidant person relationship verification status transitions for method:
from verification_status = NOT_VERIFIED and verification_reason = AUTO to verification_status = IN_REVIEW and verification_reason = MANUAL
from any verification_status to verification_status=VERIFICATION_NEEDED and verification_reason=ONLINE_TRIGGERED MANUAL
from verification_status = IN_REVIEW and verification_reason = MANUAL to verification_status = NOT_VERIFIED and verification_reason = MANUAL with required verification_comment
from verification_status = IN_REVIEW and verification_reason = MANUAL to verification_status = VERIFIED and verification_reason = MANUAL with required dracs_birth_act_id
Service logic
Update confidant person relationship based on submitted data:
if verificationStatus, verificationReason and verificationComment submitted, set fields in confidant_person_relationship table (mpi database):
verification_status = $.verification_status
verification_comment = $.verification_comment
verification_reason = $.verification_reason
unverified_at = now() (if $.verification_status <> NOT_VERIFIED)
dracs_birth_synced_at = null (if $.verification_status = VERIFICATION_NEEDED and $.verification_reason = ONLINE_TRIGGERED MANUAL)
dracs_birth_act_id = $.dracs_birth_act_id
updated_by = user_id (from token)
updated_at = current timestamp
if documentsRelationship submitted, set fields in confidant_person_relationship_documents table (mpi database) for document type = BIRTH_CERTIFICATE and confidant_person_relationship_id = $.confidantPersonRelationshipId:
number = $.documentNumber
issued_at = $.issuedAt (if exists in request, else skip update)
issued_by = $.issuedBy (if exists in request, else skip update)
updated_by = user_id (from token)
updated_at = current timestamp
In case if $.verification_status =
VERIFIED
- check existence of confidant person relationships verification candidates (where confidant_person_relationship_id == $.confidant_person_relationship_id and entity_type = ‘dracs_birth_act’ and status = ‘NEW’) in confidant_person_relationship_verification_candidates table (mpi database), if found - update them, set values:status =
CONFIRMED
updated_at = current timestamp
Render a response according to specification.
ЕСОЗ - публічна документація