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

Public. Get contracts list_EN

Purpose

This method is designed to obtain list of contracts with filters. This method return shorten information about contract, in order to see all information try to use 'get contract details'

 

Specification

Link

https://ehealthmisapi1.docs.apiary.io/#reference/public.-contracts/contracts/public.-get-contracts-list

Resource

/api/contracts/{{contract_type}}/

Scope

contract:read

Components

Contracts

Microservices

API paragraph not found

Protocol type

REST

Request type

GET

Sync/Async

Sync

Public/Private/Internal

Public

 

Logic

  1. Only authenticated and authorized user can use this service

  2. Deleted records won't be shown in response

 

Filters

Filter

Values

Type

Description

Example

Filter

Values

Type

Description

Example

id

 

String

id of contract request

b075f148-7f93-4fc2-b2ec-2d81b19a9b7b

contractor_legal_entity_id

 

String

id of legal entity which created contract request

b075f148-7f93-4fc2-b2ec-2d81b19a9b7b

edrpou

 

String

contractor legal entity EDRPOU

5432345432

contractor_owner_id

 

String

id of legal entity owner

b075f148-7f93-4fc2-b2ec-2d81b19a9b7b

nhs_signer_id

 

String

id of nhs employee

b075f148-7f93-4fc2-b2ec-2d81b19a9b7b

status

  • TERMINATED

  • VERIFIED

Enum

current contract status

VERIFIED

is_suspended

 

Boolean

wether contract is active

true

date_from_start_date

 

String

 

2018-01-01

date_to_start_date

 

String

 

2019-01-01

date_from_end_date

 

String

 

2018-01-01

date_to_end_date

 

String

 

2019-01-01

contract_number

 

String

human readable number of contract request

0000-9EAX-XT7X-3115

medical_program_id

 

String

id of a program that is a subject of a contract

2075f148-7f93-4fc2-b2ec-2d81b19a9b7b

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

 

Request structure

See Apiary

 

Authorize

  1. Verify the validity of api-key

    1. Return 401 in case validation fails

  2. Verify the validity of token

    1. Return 401 in case validation fails

  3. Check scopes in order to perform this action (scope = 'contract:read')

    1. Return 403 in case invalid scope(s)

 

Headers

  • Content-Type:application/json

  • Authorization:Bearer c2778f3064753ea70de870a53795f5c9

 

Request data validation

API paragraph not found

 

Processing

  1. Search contracts in DB according to requested query parameters

    1. If contractor_legal_entity_id from contract according to requested parameters not equal client_id from token, show 404 Not found instead

  2. Exclude deleted records (is_active = false)

Response structure

See Apiary

{ "meta": { "code": 200, "url": "https://example.com/resource", "type": "object", "request_id": "6617aeec-15e2-4d6f-b9bd-53559c358f97#17810" }, "data": [ { "id": "09106b70-18b0-4726-b0ed-6bda1369fd52", "contract_type": "CAPITATION", "contractor_legal_entity_id": "df9f70ee-4b12-4740-b0f5-bb5aea116863", "contractor_owner": { "id": "b075f148-7f93-4fc2-b2ec-2d81b19a9b7b", "party": { "first_name": "Петро", "last_name": "Іванов", "second_name": "Миколайович" } }, "contractor_base": "на підставі закону про Медичне обслуговування населення", "status": "VERIFIED", "contractor_divisions": [ { "id": "2922a240-63db-404e-b730-09222bfeb2dd", "name": "Бориспільське відділення Клініки Ноунейм" } ], "external_contractor_flag": true, "nhs_signer_id": "df9f70ee-4b12-4740-b0f5-bb5aea116863", "nhs_legal_entity_id": "df9f70ee-4b12-4740-b0f5-bb5aea116863", "nhs_signer_base": "на підставі наказу", "issue_city": "Київ", "nhs_contract_price": 50000, "contract_number": "0000-9EAX-XT7X-3115", "contract_request_id": "df9f70ee-4b12-4740-b0f5-bb5aea116863", "start_date": "2017-04-20", "end_date": "2018-04-20", "is_suspended": "false", "id_form": "PMD", "parent_contract_id": "09106b70-18b0-4726-b0ed-6bda1369fd52", "assignee_id": "22e416c4-5747-41cd-9f73-c3a85cdee885", "updated_at": "2017-04-20T19:14:13Z", "inserted_at": "2017-04-20T19:14:13Z" } ], "paging": { "page_number": 2, "page_size": 50, "total_entries": 1000, "total_pages": 23 } }

 

{ "meta": { "code": 200, "url": "https://example.com/resource", "type": "object", "request_id": "6617aeec-15e2-4d6f-b9bd-53559c358f97#17810" }, "data": [ { "id": "09106b70-18b0-4726-b0ed-6bda1369fd52", "contract_type": "REIMBURSEMENT", "contractor_legal_entity_id": "df9f70ee-4b12-4740-b0f5-bb5aea116863", "contractor_owner": { "id": "b075f148-7f93-4fc2-b2ec-2d81b19a9b7b", "party": { "first_name": "Петро", "last_name": "Іванов", "second_name": "Миколайович" } }, "contractor_base": "на підставі закону про Медичне обслуговування населення", "status": "VERIFIED", "contractor_divisions": [ { "id": "2922a240-63db-404e-b730-09222bfeb2dd", "name": "Бориспільське відділення Клініки Ноунейм" } ], "nhs_signer_id": "df9f70ee-4b12-4740-b0f5-bb5aea116863", "nhs_legal_entity_id": "df9f70ee-4b12-4740-b0f5-bb5aea116863", "nhs_signer_base": "на підставі наказу", "issue_city": "Київ", "nhs_contract_price": 50000, "contract_number": "0000-9EAX-XT7X-3115", "contract_request_id": "df9f70ee-4b12-4740-b0f5-bb5aea116863", "start_date": "2017-04-20", "end_date": "2018-04-20", "is_suspended": "false", "id_form": "RMB", "parent_contract_id": "09106b70-18b0-4726-b0ed-6bda1369fd52", "assignee_id": "22e416c4-5747-41cd-9f73-c3a85cdee885", "medical_programs": [ "3914a240-63db-404e-b730-09222bfeb2d0" ], "updated_at": "2017-04-20T19:14:13Z", "inserted_at": "2017-04-20T19:14:13Z" } ], "paging": { "page_number": 2, "page_size": 50, "total_entries": 1000, "total_pages": 23 } }

 

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

 

 

 

 

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