Versions Compared

Key

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

...

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

Logic

  1. if tax_id is not null and age>=16
    1. search via tax_id + first_name + last_name
  2. if tax_id is null and age>=16
    1. search via first_name + last_name + birth_date
  3. if age<16
    1. search via birth_certificatebirth_date



Calculate age

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


Search existing MPI entity

...