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

[DRAFT] Get Employees list [API-005-007-001-0097]

Сторінка знаходиться в процесі розробки. Інформація на ній може бути застарілою.

https://e-health-ua.atlassian.net/wiki/spaces/EN/pages/17591304241 (remove the link block before publishing the document)

Properties of a REST API method document

Document type

Метод REST API

Document title

[DRAFT] Get Employees list [API-005-007-001-0097]

Guideline ID

GUI-0011

Author

@

Document version

1

Document status

DRAFT

Date of creation

ХХ.ХХ.ХХХХ (дата фінальної версії документа – RC або PROD)

Date of update

ХХ.ХХ.ХХХХ (дата зміни версії)

Method API ID

API-005-007-001-0097

Microservices (namespace)

IL

Component

Employees

Component ID

COM-005-007

Link на API-специфікацію

GENERAL MIS API · Apiary

Resource

{{host}}/api/employees

Scope

employee:read

Protocol type

REST

Request type

GET

Sync/Async

Sync

Public/Private

Public

Purpose

This method is designed to obtain all Employees of the legal entity.

Logic

N/A

Configuration parameters

N/A

Dictionaries

  • EMPLOYEE_TYPE

  • SPECIALITY_TYPE

  • SPECIALITY_LEVEL

  • SPEC_QUALIFICATION_TYPE

  • POSITION

  • +DIVISION_TYPE

Input parameters

Input parameter

Mandatory

Type

Description

Example

Input parameter

Mandatory

Type

Description

Example

1

 

 

 

 

 

2

 

 

 

 

 

Request structure

See on API-specification

Headers

Headers

Request data validation

Authorize

  • 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:read')

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

Processing

Service returns specified Employees related to the legal entity from token:

  1. Get Employees from prm.employees

    1. Filter by medication_request_id and patient_id and status (optional)

  2. Filter list above by submitted search parameters

  3. Render a response according to specification with found Employees

    1. Return empty array if no data found.

Response structure examples

See on API-specification

{ "meta": { "code": 200, "url": "https://example.com/resource", "type": "object", "request_id": "req-adasdoijasdojsda" }, "data": [ { "id": "d290f1ee-6c54-4b01-90e6-d701748f0851", "position": "P1", "employee_type": "DOCTOR", "status": "APPROVED", "start_date": "2017-03-02T10:45:16.000Z", "end_date": "2018-03-02T10:45:16.000Z", "party": { "id": "b075f148-7f93-4fc2-b2ec-2d81b19a9b7b", "no_tax_id": true, "first_name": "Петро", "last_name": "Іванов", "second_name": "Миколайович", "declaration_limit": 0, "declaration_count": 0 }, "division": { "id": "d290f1ee-6c54-4b01-90e6-d701748f0851", "name": "Бориспільське відділення Клініки Ноунейм", "legal_entity_id": "d290f1ee", "type": "CLINIC", "status": "ACTIVE", "mountain_group": false, "dls_id": "2872985", "dls_verified": true }, "legal_entity": { "id": "b075f148-7f93-4fc2-b2ec-2d81b19a9b7b", "name": "Клініка Ноунейм", "short_name": "Ноунейм", "public_name": "Клініка Ноунейм", "type": "MSP", "edrpou": "5432345432", "status": "ACTIVE" }, "doctor": { "specialities": [ { "speciality": "THERAPIST", "speciality_officio": true, "level": "FIRST", "qualification_type": "AWARDING", "attestation_name": "Академія Богомольця", "attestation_date": "2017-02-28", "valid_to_date": "2020-02-28", "certificate_number": "AB/21331" } ] } } ], "paging": { "page_number": 2, "page_size": 50, "total_entries": 1000, "total_pages": 23 } }

HTTP status codes

Response code

HTTP Status code

Message

Internal name

Description

Response code

HTTP Status code

Message

Internal name

Description

1

Базові

2

 

200

Response

 

 

3

 

401

Invalid access token

 

 

4

 

403

Your scope does not allow to access this resource. Missing allowances: employee:read

 

 

5

Специфічні

6

 

 

 

 

 

Post-processing processes

N/A

Technical modules where the method is used

 

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