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

RC__Get Device dispenses by search params

Purpose

This method intended to get all Device dispenses by legal entity from token.

 

Specification

Link

https://ehealthmedicaleventsapi.docs.apiary.io/#reference/device-dispenses/get-device-dispenses-by-search-params/get-device-dispenses-by-search-params

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

Resource

/api/device_dispenses

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

Scope

device_dispense:read

Scope для доступу

Components

Devices

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

Microservices

 

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

Protocol type

REST

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

Request type

GET

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

Sync/Async

Sync

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

Public/Private/Internal

Public

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

 

Logic

Service returns specified Device dispenses related to the legal entity from token:

  • Get Device dispenses from device_dispenses (MongoDB)

  • Filter list above by submitted search parameters

  • Render a response according to specification.

 

Filters

Filter

Values

Type

Description

Example

Filter

Values

Type

Description

Example

based_on

 

String

 

9075e0e2-6b57-47fd-aff7-324806efa7e6

performer_legal_entity

 

String

 

9075e0e2-6b57-47fd-aff7-324806efa7e6

location

 

String

 

9075e0e2-6b57-47fd-aff7-324806efa7e6

performer

 

String

 

9075e0e2-6b57-47fd-aff7-324806efa7e6

status

 

String

 

completed

when_handed_over_from

 

String

date of dispense

2023-08-02T10:45:16.000Z

when_handed_over_to

 

String

date of dispense

2023-08-02T10:45:16.000Z

page

 

Number

Page number

2

page_size

 

Number

A limit on the number of objects to be returned, between 1 and 300. Default: 50

50

 

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

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

 

Headers

  • Content-Type:application/json

  • Authorization:Bearer mF_9.B5f-4.1JqM

  • api-key:aFBLVTZ6Z2dON1V

 

Request data validation

Validate User

  • Extract client_id (performer_legal_entity) from token.

    • Return empty array in case employee has no access to medication dispense.

 

Response structure

See on Apiary

{ "meta": { "code": 200, "url": "http://example.com/resource", "type": "object", "request_id": "req-adasdoijasdojsda" }, "data": [ { "id": "b075f148-7f93-4fc2-b2ec-2d81b19a9b7b", "based_on": { "identifier": { "type": { "coding": [ { "system": "eHealth/resources", "code": "device_request" } ] }, "value": "b4a6d991-0bf7-476f-b3cf-bec83f044b1b" }, "display_value": "null" }, "status": "completed", "subject": { "identifier": { "type": { "coding": [ { "system": "eHealth/resources", "code": "patient" } ] }, "value": "9183a36b-4d45-4244-9339-63d81cd08d9c" }, "display_value": "null" }, "performer": { "identifier": { "type": { "coding": [ { "system": "eHealth/resources", "code": "employee" } ] }, "value": "b4a6d991-0bf7-476f-b3cf-bec83f044b1b" }, "display_value": "Мельник Микола Микитович" }, "location": { "identifier": { "type": { "coding": [ { "system": "eHealth/resources", "code": "division" } ] }, "value": "b4a6d991-0bf7-476f-b3cf-bec83f044b1b" }, "display_value": "Перше відділення" }, "when_handed_over": "2018-08-02T10:45:16.000Z", "note": "Some notes", "performer_legal_entity": { "identifier": { "type": { "coding": [ { "system": "eHealth/resources", "code": "legal_entity" } ] }, "value": "c5a6d991-0bf7-476f-b3cf-bec83f044b2a" }, "display_value": "Комунальне підприємство Медлаб" }, "program": { "identifier": { "type": { "coding": [ { "system": "eHealth/resources", "code": "medical_program" } ] }, "value": "c5a6d991-0bf7-476f-b3cf-bec83f044b2a" }, "display_value": "Доступні медичні вироби" }, "details": [ { "device": { "identifier": { "type": { "coding": [ { "system": "eHealth/resources", "code": "device_definition" } ] }, "value": "b4a6d991-0bf7-476f-b3cf-bec83f044b1b" }, "display_value": "null" }, "program_device": { "identifier": { "type": { "coding": [ { "system": "eHealth/resources", "code": "program_device" } ] }, "value": "b4a6d991-0bf7-476f-b3cf-bec83f044b1b" }, "display_value": "null" }, "quantity": { "value": 10, "system": "device_unit", "code": "piece", "unit": "шт" }, "sell_price": 18.65, "discount_amount": 150, "reimbursement_amount": 450 } ], "payment_id": "1239804", "payment_amount": 50, "inserted_at": "2017-04-20T19:14:13Z", "inserted_by": "e1453f4c-1077-4e85-8c98-c13ffca0063e", "updated_at": "2017-04-20T19:14:13Z", "updated_by": "2922a240-63db-404e-b730-09222bfeb2dd" } ], "paging": { "page": 2, "page_size": 50, "total_entries": 1000, "total_pages": 20 } }

 

HTTP status codes

HTTP status code

Message

What caused the error

HTTP status code

Message

What caused the error

200 

 

 

 

 

 

 

 

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