Table of Contents | ||||
---|---|---|---|---|
|
Purpose
API paragraph not found
Specification
Page Properties | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Logic
If authentication_method_current.type = OTP
system checks verification code via otp_verification service PATCH /verifications/:phone_number/actions/complete
if verification code matches - change status to active
If not - return error
If approval was created on child_resources or resource:Check if there are itemsMedical Events filtration by Forbidden groups#Medical-events-to-filterfor child_resource.identifier.value and/or resource.identifier.value included to the forbidden groupsif there are active items from forbidden groupcreate approval on each forbidden_group block whose elements appear in child_resource.identifier.value and/or resource.identifier.valueset status = activeset reason = id of the approval which was verifiedset created_by - the same user as for approval, which is verifiedset granted_to - the same employee as for approval, which is verifiedset granted_by - the same patient as for approval, which is verified
Check if there are items Medical Events filtration by Forbidden groups#Medical-events-to-filter for entities from granted_resource and\or from reason included to the forbidden groups
if there are active items from forbidden group
create approval on each forbidden_group block whose elements appear entities from granted_resource and\or from reason
set status = active
set reason = id of the approval which was verified
set created_by - the same user as for approval, which is verified
set granted_to - the same employee as for approval, which is verified
set granted_by - the same patient as for approval, which is verified
If authentication_method_current.type = offline or null
change status to active
Input parameters
Input parameter | Values | Type | Description | Example |
---|---|---|---|---|
patiend_id | String | mpi_id. Required | aff00bf6-68bf-4b49-b66d-f031d48922b3 | |
id | String | approval_id. Required | aff00bf6-68bf-4b49-b66d-f031d48922b3 |
Request structure
See on Apiary
Example:
Expand | ||
---|---|---|
| ||
|
Authorize
Verify the validity of access token
Check user scope approval:create in order to perform this action
Headers
Наприклад:
Content-Type:application/json
Authorization:Bearer d368a4b0-4a0e-457a-b267-32359fa6288f
Request data validation
API paragraph not found
Processing
API paragraph not found
Response structure
API paragraph not found
Post-processing processes
API paragraph not found
HTTP status codes
Page Properties | ||||||
---|---|---|---|---|---|---|
|