Table of Contents | ||||
---|---|---|---|---|
|
...
Request to process the request using a token in the headers
Headers
Наприклад:
Content-Type:application/json
Authorization:Bearer c2778f3064753ea70de870a53795f5c9
api-key:uXhEczJ56adsfh3Ri9SUkc4en
...
Extract user_id from token.
Check user has an active declaration with a patient from URL (can get all approvals) or approval is granted to user (can get own approval: granted_to OR created_by):
Return 200 with empty array in case the employee doesn't have an active declaration with the patient or approval is granted to user
...
Get approval by patient_id and approval id from approvals collection (MongoDB)
Render a response according to specification
if
granted_resource_types
is not defined on resource in DB - render it as empty array on response according to specification
Block “authentication_method_current” represents the type of auth method and the telephone number (for methods with ability to specify it)
...