Table of Contents |
---|
Purpose
...
Link | |
Resource | /api/person_requests |
Scope | person_request:write |
Components | Patient registry |
Microservices | API paragraph not found |
Protocol type | REST |
Request type | POST |
Sync/Async | Sync |
Public/Private/Internal | Public |
...
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
Example:
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 jpeg format .pdf, .jpg, .png, .bmp format. Document should be no more than 10MB 20 MB. For each type of documents, if couple of rules worked - only one single link is generated.
...