Versions Compared

Key

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

Table of Contents

Anchor
Declaration Request JSON Schema
Declaration Request JSON Schema
Validate request

...

  • ADULT_AGE
  • DECLARATION_TERM
  • MAXphone_number_PHONEauth_NUMBERlimit


Code Block
languagesql
titlecURL example
curl -X GET \
  {:host}/prm/api/global_parameters

...

Validate phone number limit

USE_PHONE_NUMBER_AUTH_LIMIT is a flag in ehealth.charts that shows whether we count phones or not.

  • in case person is found, and person_id will be saved to declaration_request, and person has the same authentication_methods.phone_number, we do not count phone numbers and do not compare the phone number with global_parameters.max_phone_number_auth_limit. So that we can update person, but still can not use phone over limit.
  • In case person is not found
    • Check if (SELECT count(*) from persons where authentication_methods::json->0->>'phone_number'='$.phone_number' and persons.status='active' and is_active=true)<global_parameters.max_phone_number_auth_limit
      in case error return 422, msg "This phone number is present more then $.global_parameters.max_phone_number_auth_limit times in the system"

Validate declaration  limit

...