Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

...

...

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

Calculate age

Code Block
age = MONTHS_BETWEEN (now(), $.birth_date) / 12


Search existing MPI entity

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

  1. if tax_id is not null and age>=1614
    1. search fields: tax_id, first_name, last_name, birthbirth_date
    2. additional fields: second_name, phone_number
  2. if tax_id is null and age>=1614
    1. search fields: first_name, last_name, birth_date
    2. additional fields: tax_id, second_name, phone_number
  3. if age<16age<14
    1. search fields: birth_certificate, birth_date
    2. additional fields:  first_name, last_name, second_name

...

Return only requested params, id, birthfirst_placename, second_name, last_name, birth_place and merged_ids if data found

...