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

Get Employee Requests List

Purpose

This WS is designed to search requests to registration employees by legal_entity_id and other filters

Specification

Link

 https://ehealthmisapi1.docs.apiary.io/#reference/public.-medical-service-provider-integration-layer/employee-requests/get-employee-requests-list

Посилання на Apiary або Swagger

Resource

 /api/employee_requests

Посилання на ресурс, наприклад: /api/persons/create

Scope

 employee_request:read

Scope для доступу

Components

Employees

Зазначається перелік бізнес компонентів, які використовують цей метод, наприклад: ePrescription

Microservices

 il/api

Перелік мікросервісів, які використовує метод API, наприклад: Auth, ABAC

Protocol type

 REST

Тип протоколу, який використовується запитом, наприклад: SOAP | REST

Request type

 GET

Тип запиту API, наприклад: GET, POST, PATCH…

Sync/Async

 Sync

Метод є синхронним чи асинхронним?

Public/Private/Internal

 Public

Потрібно зазначити тип методу за ступенем доступності

Logic

  1. Verify the validity of access token

  2. Check user scopes in order to perform this action

  3. If according to filters requests are not found, WS returns empty data array.

WS returns list of request objects include id and status, pagination data - for technical info.

Filters

See on Apiary

Filter

Values

Type

Description

Example

Filter

Values

Type

Description

Example

id

 

String

MPI identifier of the preperson. Required

d290f1ee-6c54-4b01-90e6-d701748f0851

edrpou

 

String

 

341086

legal_entity_name

 

String

 

Лимич Медікал

no_tax_id

 

Boolean

 

true

status

 

Enum

 

  • NEW

  • REJECTED

  • APPROVED

page

 

Number

 

2

page_size

 

Number

 

50

Authorize

Request to process the request using a token in the headers

Headers

  • Content-Type:application/json

  • Authorization:Bearer c2778f3064753ea70de870a53795f5c9

Request data validation

  • Verify the validity of access token

    • Return (401, 'Invalid access token') in case of validation fails

  • Verify that token is not expired

    • in case of error - return (401, 'Invalid access token')

  • Check user scopes in order to perform this action (scope = 'employee_request:read')

    • Return (403, 'Your scope does not allow to access this resource. Missing allowances: employee_request:read') in case of invalid scope(s)

Processing

Service returns specified Employee requests:

  1. Get Employee requests by ID from il.employee_requests

    1. Filter by search params

  2. Validate data consistency:

    1. Ensure that requested Employee requests relates to the legal entity from token:

      1. Return 403 ('Access denied') in case of error

  3. Render a response according to specification with found Employee requests:

    1. if according to filters requests are not found, WS returns empty data array

Response structure

See on Apiary

Example:

{ "meta": { "code": 200, "url": "https://example.com/resource", "type": "object", "request_id": "req-adasdoijasdojsda" }, "data": [ { "id": "d290f1ee-6c54-4b01-90e6-d701748f0851", "status": "NEW", "inserted_at": "2018-03-02T10:45:16.000Z", "edrpou": "5432345432", "legal_entity_name": "Клініка Ноунейм", "no_tax_id": true, "first_name": "Петро", "last_name": "Іванов", "second_name": "Миколайович" } ], "paging": { "page_number": 2, "page_size": 50, "total_entries": 1000, "total_pages": 23 } }

HTTP status codes

HTTP status code

Message

What caused the error

HTTP status code

Message

What caused the error

200

 Response

 

 

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