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. second_name
      2. tax_id
      3. birth_certificate
      4. phone_number

Calculate age

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


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

...

    1. birth_date

...

Search existing MPI entity

...