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

Get Employee details

Purpose

Use this end-point to obtain all Employees of the legal entity specified by the legal_entity_id

Specification

Link

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

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

Resource

/api/employees/{{employee_id}}

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

Scope

employee:details

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. Search in the legal_entity by :legal_entity_id (legal_entity_id from Context)

  2. return error if not found

  3. Search in the employee by :employee_id and is_active = true

    1. return error if not found

  4. Check employee.employee_type

    1. employee_type in (DOCTOR, PHARMACIST)

      1. Return doctor, pharmacist response structure

    2. employee_type in (HR, ACCOUNTANT, OWNER, PHARMACY_OWNER)

      1. Return other employee type response structure.

Input parameters

Input parameter

Values

Type

Description

Example

Input parameter

Values

Type

Description

Example

employee_id

 

String

Required

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

Filters

See on Apiary

Dictionaries

  • +DIVISION_TYPE

  • LEGAL_FORM

  • OWNER_PROPERTY_TYPE

  • EMPLOYEE_TYPE

  • +DOCUMENT_TYPE

  • PHONE_TYPE

  • EDUCATION_DEGREE

  • COUNTRY

  • QUALIFICATION_TYPE

  • SPECIALITY_TYPE

  • SPECIALITY_LEVEL

  • SPEC_QUALIFICATION_TYPE

  • SCIENCE_DEGREE

  • LEGAL_ENTITY_TYPE_V2

Authorize

Request to process the request using a token in the headers

Headers

Content-Type:application/json

Authorization:Bearer c2778f3064753ea70de870a53795f5c9

Response structure

  1. Additional info with educations, qualifications, science degree and specialities are stored in prm.parties, however speciality.speciality_officio=true is also saved to prm.employees.

  2. For Get Employee Details 

    1. get employees.speciality

    2. get parties.specialities, for each  parties.specialities.speciality check condition if parties.specialities.speciality<>employee.speciality.speciality then set speciality_officio=false and add to employees.speciality else don't add to response.

    3. form array of specialities as in example below

DOCTOR, PHARMACIST

Response body
{ "data": { "division": { "id": "1e24e73c-835f-44a5-9726-b6c4bd81225b", "legal_entity_id": "1ee3e298-4d6a-4c41-be48-a7b646477f60", "mountain_group": false, "name": "Відділення Клініки NoName", "status": "ACTIVE", "type": "CLINIC" }, "doctor": { "educations": [ { "city": "Київ", "country": "UA", "degree": "MASTER", "diploma_number": "DD123543", "institution_name": "Академія Богомольця", "issued_date": "2017-08-05", "speciality": "Педіатр" } ], "qualifications": [ { "certificate_number": "2017-08-05", "institution_name": "Академія Богомольця", "issued_date": "2017-08-05", "speciality": "Педіатр", "type": "STAZHUVANNYA" } ], "science_degree": { "city": "Київ", "country": "UA", "degree": "CANDIDATE_OF_SCIENCE", "diploma_number": "DD123543", "institution_name": "Академія Богомольця", "issued_date": "2017-08-05", "speciality": "FAMILY_DOCTOR" }, "specialities": [ { "attestation_date": "2017-08-05", "attestation_name": "Академія Богомольця", "certificate_number": "AB/21331", "level": "FIRST", "qualification_type": "AWARDING", "speciality": "FAMILY_DOCTOR", "speciality_officio": true, "valid_to_date": "2017-08-05" } ] }, "employee_type": "DOCTOR", "end_date": null, "id": "91b5d4ea-a443-44ff-b048-a5b36f4d3e8c", "legal_entity": { "edrpou": "3173108921", "id": "1ee3e298-4d6a-4c41-be48-a7b646477f60", "legal_form": "140", "mis_verified": "VERIFIED", "name": "Клініка NoName", "owner_property_type": "STATE", "public_name": "NoName Медікал", "short_name": "NoName Медікал", "status": "ACTIVE", "type": "MSP" }, "party": { "about_myself": null, "birth_date": "1983-07-11", "declaration_count": 0, "declaration_limit": 0, "documents": [ { "number": "120518", "type": "PASSPORT" } ], "first_name": "Виктор", "gender": "MALE", "id": "431f8bab-0aaf-45ac-9839-1434165d424e", "last_name": "Квітка-Основ'яненко", "no_tax_id": false, "phones": [ { "number": "+380503410870", "type": "MOBILE" } ], "second_name": "Сергеевич", "tax_id": "3067305998", "working_experience": null }, "position": "P1", "start_date": "2017-03-02", "status": "APPROVED" }, "meta": { "code": 200, "request_id": "ed5924b9-ed79-46f2-bfc2-9142a621fb15#71181", "type": "object", "url": "http://api-svc.il/api/employees/91b5d4ea-a443-44ff-b048-a5b36f4d3e8c" } }

HR, ACCOUNTANT, OWNER, PHARMACY_OWNER

Response body
{ "meta": { "url": "http://example.com/resource", "type": "object", "code": 200, "idempotency_key": "idemp-ssjssdjoa8308u0us0", "request_id": "req-adasdoijasdojsda" }, "data": { "legal_entity_id": "d290f1ee", "division_id": "b075f148-7f93-4fc2-b2ec-2d81b19a9b7b", "title": "рекрутер", "speciality": "рекрутинг", "start_date": "2017-03-02T10:45:16.000Z", "end_date": "2018-03-02T10:45:16.000Z", "active": true, "status": "pending_verification", "employee_type": "hr", "party": { "first_name": "Петро", "last_name": "Іванов", "second_name": "Миколайович", "birth_date": "1991-08-19T00:00:00.000Z", "gender": "MALE", "tax_id": "3126509816", "national_id": "CC7150985243", "email": "email@example.com", "documents": [ { "type": "PASSPORT", "number": "120518", "issue_date": "2015-04-07T00:00:00.000Z", "expiry_date": "2015-04-07T00:00:00.000Z", "issued_by": "DMSU" } ], "phones": [ { "type": "MOBILE", "number": "+380503410870" } ] }, "id": "d290f1ee-6c54-4b01-90e6-d701748f0851" } }

HTTP status codes

HTTP status code

Message

What caused the error

HTTP status code

Message

What caused the error

200

Response

 

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