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
...
Verify the validity of access token
Check user scope person_request:write in order to perform this action
validate client_id belongs to legal_entity with type in ('MSP', 'OUTPATIENT', 'EMERGENCY', 'PRIMARY_CARE')
in case error return 409, "Invalid legal entity type"
validate user belongs to employee with type in "Doctor, Specialist, Receptionist, Assistant"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 ..."
...
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 = OTPif third_person.auth_method.type = OFFLINE - error `THIRD PERSON can't have OFFLINE self auth method type`
if third_person.auth_method.type doesn't have active auth method - error `THIRD PERSON doesn't have active valid authentication methods`
If third person >= prm.global_parameters.no_self_auth_age years
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.
...