ЕСОЗ - публічна документація
RC_Verify approval
Purpose
API paragraph not found
Specification
Link | https://medicaleventsmisapi.docs.apiary.io/#reference/approvals/verify-approval/verify-approval |
Resource | /api/patients/{{patiend_id}}/approvals/{{id}} |
Scope | approval:create |
Components | API paragraph not found |
Microservices | API paragraph not found |
Protocol type | REST |
Request type | PATCH |
Sync/Async | Async |
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 items Medical Events filtration by Forbidden groups#Medical-events-to-filter for child_resource.identifier.value and/or resource.identifier.value included to the forbidden groups
if there are active items from forbidden group
create approval on each forbidden_group block whose elements appear in child_resource.identifier.value and/or resource.identifier.value
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
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:
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
HTTP status code | Message | What caused the error |
---|---|---|
200 | Response |
|
ЕСОЗ - публічна документація