ЕСОЗ - публічна документація
RCC_Get Confidant Person relationships (DRACS2-101)
Service logic
Get relationships list from https://e-health-ua.atlassian.net/wiki/spaces/CSI/pages/17613488166/MPI#confidant_person_relationships table where:
person_id is equal to $.person_id
AND active_to > now() or null
AND is_active=true
Filter relationships list according to is_expired filter parameter:
if true: get records with active_to < now()
if false: get records with active_to > now() or null
For each relationship from previous step:
Get details of confidant person from https://e-health-ua.atlassian.net/wiki/spaces/CSI/pages/17613488166/MPI#persons table where id is equal to confidant_person_id.
Get documents of confidant person from https://e-health-ua.atlassian.net/wiki/spaces/CSI/pages/17613488166/MPI#person_documents table where person_id is equal to confidant_person_id.
Get documents of relationship from https://e-health-ua.atlassian.net/wiki/spaces/CSI/pages/17613488166/MPI#confidant_person_relationship_documents table where confidant_person_relationship_id equal to relationship id.
Mask personal information:
For name use combination: “{last_name} {first letter from first_name} {first letter from second_name}”
For phone number use already accepted masking: as example - "+38093*****85"
For other fields (tax_id, unzr, documents_person.number) show two last symbols only
Cast relationship active_to to date format.
Render a response according to specification.
ЕСОЗ - публічна документація