Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
REST API method / Метод REST API (настанова)
Info

/wiki/spaces/EN/pages/17591304241 (remove the link block before publishing the document)

...

Page Properties
idpage_properties_method_REST API

Document type

Метод REST API

Document title

[Document status] REST API [Назва методу] [ID методу]

Guideline ID

GUI-0011

Author

@

Document version

1

Document status

DRAFT

Date of creation

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

Date of update

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

Method API ID

API-005-002-002-0045

Microservices (namespace)

IL

Component

Contracts

Component ID

COM-005-002

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

Resource

{{host}}/api/contract_requests/{{id}}

Scope

contract_request:update

Protocol type

REST

Request type

PATCH

Sync/Async

Sync

Public/Private

Private

...

  • NHS employee with scopes 'contract_request:update' can change contract request

  • Contract request only in status 'IN_PROCESS' could be changed

  • NHS employee can change only several field of the contract request but not all of them

  • In case of reimbursement contract, nhs_contract_price shouldn`t be filled.

Configuration parameters

Description of the configuration parameters that are used when processing a request in the system

Dictionaries

Provides a list of links to dictionaries that are available in Confluence

Input parameters

Description of input parameters

Input parameter

Mandatory

Type

Description

Example

1

id

 

String

Contract request identifier. Required

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

2

Request structure

See on API-specification (посилання на сторінку з API-специфікацією)

Description of the REST API request structure, example

Expand
titleExample
Code Block
{
  "contract_type": "CAPITATION",
  "nhs_signer_id": "df9f70ee-4b12-4740-b0f5-bb5aea116863",
  "nhs_signer_base": "на підставі наказу",
  "nhs_contract_price": 50000,
  "nhs_payment_method": "prepayment",
  "issue_city": "Київ",
  "miscellaneous": "Жодна зі сторін не має права передавати права і зобов’язання за цим контрактом третій стороні без письмової на те згоди іншої сторони"
}

...

Response structure examples

Description of the REST API response structure, example

Expand
Code Block
{
  "meta": {
    "code": 201,
    "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",
      "name": "Клініка Ноунейм",
      "edrpou": "32323454",
      "addresses": [
        {
          "type": "RESIDENCE",
          "country": "UA",
          "area": "Житомирська",
          "region": "Бердичівський",
          "settlement": "Київ",
          "settlement_type": "CITY",
          "settlement_id": "b075f148",
          "street_type": "STREET",
          "street": "вул. Ніжинська",
          "building": "15",
          "apartment": "23",
          "zip": "02090"
        }
      ]
    },
    "contractor_owner": {
      "id": "b075f148-7f93-4fc2-b2ec-2d81b19a9b7b",
      "party": {
        "first_name": "Петро",
        "last_name": "Іванов",
        "second_name": "Миколайович"
      }
    },
    "contractor_base": "на підставі закону про Медичне обслуговування населення",
    "contractor_payment_details": {
      "bank_name": "Банк номер 1",
      "MFO": "351005",
      "payer_account": "32009102701026"
    },
    "id_form": "RMB-1",
    "nhs_signer": {
      "id": "b075f148-7f93-4fc2-b2ec-2d81b19a9b7b",
      "party": {
        "first_name": "Петро",
        "last_name": "Іванов",
        "second_name": "Миколайович"
      }
    },
    "nhs_legal_entity": {
      "id": "df9f70ee-4b12-4740-b0f5-bb5aea116863",
      "name": "Клініка Ноунейм",
      "edrpou": "32323454",
      "addresses": [
        {
          "type": "RESIDENCE",
          "country": "UA",
          "area": "Житомирська",
          "region": "Бердичівський",
          "settlement": "Київ",
          "settlement_type": "CITY",
          "settlement_id": "b075f148",
          "street_type": "STREET",
          "street": "вул. Ніжинська",
          "building": "15",
          "apartment": "23",
          "zip": "02090"
        }
      ]
    },
    "nhs_signer_base": "на підставі наказу",
    "nhs_contract_price": 50000,
    "nhs_payment_method": "BACKWARD",
    "status": "NEW",
    "status_reason": "Не відповідає попереднім домовленостям",
    "issue_city": "Київ",
    "contract_number": "0000-9EAX-XT7X-3115",
    "contract_id": "df9f70ee-4b12-4740-b0f5-bb5aea116863",
    "parent_contract_id": "22e416c4-5747-41cd-9f73-c3a85cdee885",
    "start_date": "2017-04-20",
    "end_date": "2017-04-20",
    "printout_content": "Contract request content",
    "previous_request_id": "df9f70ee-4b12-4740-b0f5-bb5aea116863",
    "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"
  }
}

...

Response code

HTTP Status code

Message

Internal name

Description

1

Базові

2

200

 Response

 

3

401

Error

4

401

Token is expired

  1. Access token validation failed

45

401

Unauthorized

Помилка підтвердження

56

403

User is not allowed to perform this action

67

403

User

Client is not active

8

403

Client

User is not active

  • Your scope does not allow to access this resource. Missing allowances: contract_request:update

  •  

    79

    403

    Your scope does not allow to access this resource. Missing allowances: contract_request:update

    810

    404

    Contract request with id=$id doesn't exist

     

    911

    1000

    404

    Composition not found

    COMPOSITION_NOT_FOUND_404

    Не знайдено медичний висновок

    1012

    409

     

    Validation failed

    1113

    409

    Contract_type does not correspond to previously created content

    1214

    409

    nhs_contract_price is unavailable for reimbursement contract requests

    1315

    422

     

    Validation failed

    1416

    422

    Contract price could not be negative

    1517

    422

    Employee doesn't belong to legal_entity

    1618

    422

    Employee must be active

    1719

    422

    validation failed

    1820

    422

    Incorrect status of contract_request to modify it

    1921

    Специфічні

    2022

    422

    Only for active MPI record can be created medication request!

    Post-processing processes

    Description of actions performed on data after processing

    Technical modules where the method is used

    List of pages describing technical modules where the method is used

    Page Properties Report
    headingsID ТМ, Статус
    cqllabel = "tr-mis"

    ...