...
Search existing MPI entity
Search only active persons - MPI.persons.is_active=true.
We are looking for such parameters:
- tax_id and phone_number
- tax_id and last_name( by MetaPhoneRu)
- birth_certificate and phone_number
- birth_certificate and last_name( by MetaPhoneRu)
- phone_number and last_name( by MetaPhoneRu)
- birth_date and last_name( by MetaPhoneRu) and first_name( by MetaPhoneRu)
After the search we get the clusters (maximum 6) and display them one by one - persons from the first cluster, then from the second, etc.
And within each cluster we sort:
- last_name_distance == 0
- birth_date_distance + first_name_distance == 0
- last_name_distance + first_name _distance + birth_date
- _distance + tax_id_distance (Ascending)
Return empty array if no data found
Return only requested params (if equal tax_id, birth_certificate, birth_date), id, first_name, second_name, last_name, birth_place and merged_ids if data found.