Versions Compared

Key

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

Table of Contents

Purpose

...

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

Dictionaries

  • GENDER

  • DOCUMENT_TYPE

  • ADDRESS_TYPE

  • COUNTRY

  • SETTLEMENT_TYPE

  • STREET_TYPE

  • PHONE_TYPE

  • AUTHENTICATION_METHOD

  • CONFIDANT_PERSON_TYPE

  • PREFERRED_WAY_COMMUNICATION

  • DOCUMENT_RELATIONSHIP_TYPE

Request structure

See on Apiary

...

  1. Verify the validity of access token

  2. Check user scope person_request:write in order to perform this action

  3. validate client_id belongs to legal_entity with type in ('MSP', 'OUTPATIENT', 'EMERGENCY', 'PRIMARY_CARE')

    1. in case error return 409, "Invalid legal entity type" 

  4. validate user belongs to employee with type in "Doctor, Specialist, Receptionist, Assistant"

    1. in case error return 409

Headers

Content-Type:application/json

...

  • in case error return 422 - msg "Confidant person is mandatory for children"

Validate confidant person age >= prm.global_parameters.no_self_auth_age:

  • in case error return 422 - msg "Incorrect person age for such an action"

Validate "tax_id"

  • tax_id has validation pattern - `^[0-9]{10}$`

    • if doesn't match, return error 422 "string does not match pattern ..."

...

  1. If person <prm.global_parameters.no_self_auth_age years, then person.auth_methods.type = third_person. Validate that third_person has auth method.type = OTP

  2. if third_person.auth_method.type = OFFLINE - error `THIRD PERSON can't have OFFLINE self auth method type`

  3. if third_person.auth_method.type doesn't have active auth method - error `THIRD PERSON doesn't have active valid authentication methods`

  4. If third person >= prm.global_parameters.no_self_auth_age years

    1. in case error return 422, msg "Incorrect person age for such an action"

Person.auth_methods.type = third_persont.id. But on get Person request or Person display third_person.auth_method.phone_number.

...

Each link is generated for one one-page document in .pdf, .jpg, .png, .bmp format. Document should be no more than 20 MB. For each type of documents, if couple of rules worked - only one single link is generated.

...