...
- 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)
When search by phone use mpi.person_phones.number and mpi.person_auth_method.phone_number. If person has auth_method = third_person, don't search by third_person.auth_method.phone_number
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.
...
Return only requested params (if equal tax_id, birth_certificate, birth_date, phone_number), last_name(if match by metaphone ) id, first_name, second_name, birth_place and merged_ids persons if data found.