ЕСОЗ - публічна документація

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »


When flag `USE_DEDUPLICATION_MODEL` is turn on, use this logic.

Validate request

    1. Validate mandatory query params
      1. first_name
      2. last_name
      3. birth_date
    2. Validate optional query params
      1. second_name
      2. tax_id
      3. birth_certificate
      4. phone_number

Search existing MPI entity

Search only active persons - MPI.persons.is_active=true.

We are looking for such parameters:

  1. tax_id and phone_number
  2. tax_id and last_name( by MetaPhoneRu)
  3. birth_certificate and phone_number
  4. birth_certificate and last_name( by MetaPhoneRu)
  5. phone_number and last_name( by MetaPhoneRu)
  6. 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:

  1. last_name_distance == 0
  2. last_name_distance + first_name_distance + tax_id_distance (Ascending)


Return empty array if no data found

Return only requested params (if equal tax_id, birth_certificate, birth_date), last_na,e(if match by metaphone ) id, first_name, second_name, birth_place and merged_ids if data found.


Tests - https://e-health-ua.atlassian.net/wiki/x/MgHfIg


  • No labels