ЕСОЗ - публічна документація

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

  1. If authentication_method_current.type = OTP

    1. system checks verification code via otp_verification service PATCH /verifications/:phone_number/actions/complete

    2. if verification code matches - change status to active

    3. If not - return error

    4. If approval was created on child_resources or resource:

      1. 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

        1. if there are active items from forbidden group

          1. create approval on each forbidden_group block whose elements appear in child_resource.identifier.value and/or resource.identifier.value

            1. set status = active

            2. set reason = id of the approval which was verified

            3. set created_by - the same user as for approval, which is verified

            4. set granted_to - the same employee as for approval, which is verified

            5. set granted_by - the same patient as for approval, which is verified

    5. 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

      1. if there are active items from forbidden group

        1. create approval on each forbidden_group block whose elements appear entities from granted_resource and\or from reason

          1. set status = active

          2. set reason = id of the approval which was verified

          3. set created_by - the same user as for approval, which is verified

          4. set granted_to - the same employee as for approval, which is verified

          5. set granted_by - the same patient as for approval, which is verified

  2. If authentication_method_current.type = offline or null

    1. change status to active

 

Input parameters

Input parameter

Values

Type

Description

Example

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:

{ "code": 3782 }

 

Authorize

  1. Verify the validity of access token

  2. 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

HTTP status code

Message

What caused the error

 200

 Response

 

 

 

ЕСОЗ - публічна документація