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

...

  1. if tax_id is not null and age>=16
    1. search
    via tax
    1. fields: tax_id
     +
    1. , first_name
     + 
    1. , last_name

...

    1. , birth_date
    2. additional fields: second_name, birth_certificate, phone_number
  1. if tax_id is null and age>=16
    1. search
    via 
    1. fields: first_name
     + 
    1. , last_name
    + birth
    1. , birth_date

...

  1. if age<16
    • search via birth_certificatebirth_date

...

Add optional query params to search if exist

...

    1. additional fields: tax_id, second_name, birth_certificate, phone_number
  1. if age<16
    1. search fields: birth_certificate, birth_date
    2. additional fields: tax_id, first_name, last_name, second_name, birth_certificate, phone_number

Return empty array if no data found

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


For example:

Code Block
languagexml
titleRequest
collapsetrue
http://ehealth.nebo15.com/api/persons?first_name=%D0%9F%D0%B5%D1%82%D1%80%D0%BE&last_name=%D0%86%D0%B2%D0%B0%D0%BD%D0%BE%D0%B2&birth_date=1991-08-19T00%3A00%3A00.000Z

...