Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Purpose

Method returns a list of merge requests. Service returns only merge requests related to the same legal entity as the user.

Specification

...

TBD

...

Page Properties
idAPI_Specification

Link

https://ehealthmisapi1.docs.apiary.io/#reference/public.-medical-service-provider-integration-layer/merge-request/get-merge-requests

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

Resource

/api/merge_requests

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

Scope

merge_request:read

Scope для доступу

Components

Patient registry

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

Microservices

il/api

mpi/api

fe/admin-web

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

Protocol type

REST

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

Request type

GET

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

Sync/Async

Sync

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

Public/Private/Internal

Public

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

Logic

  1. Only authenticated and authorized

...

  1. SPECIALIST,

...

  1. ASSISTANT or RECEPTIONIST

...

  1. employees can use this WS.

  2. Usage of this WS allowed in EMERGENCY

...

  1. or OUTPATIENT legal entities.

  2. Service returns only merge requests related to the same legal entity as the user

  3. Search by next parameters allowed:

    1. status

    2. master_person_id

...

    1. merge_person_id

...

Filters

See on Apiary

Request structure

See on Apiary

Authorize

  1. Verify the validity of access token

    1. Return 401 in case validation fails

  2. Check scopes in order to perform this action (scope = '

...

  1. merge_request:read')

    1. Return 403 in case invalid scope(s)

Headers

Content-Type:application/json

Authorization:Bearer {{access_token}}

api-key:{{secret}}

Request data validation

See Logic

Processing

Prepare response

Service returns only preperson merge requests related to the same legal entity as the user

  1. Extract client_id from token

  2. Return entries filtered by 

...

  1. legal_entity_id and query params from merge_requests table

Response structure

See on Apiary

Example:

Expand
titleResponse example
Code Block
{
  "meta": {
    "code": 200,
    "url": "https://example.com/resource",
    "type": "object",
    "request_id": "6617aeec-15e2-4d6f-b9bd-53559c358f97#17810"
  },
  "data": [
    {
      "id": "7c3da506-804d-4550-8993-bf17f9ee0404",
      "master_person_id": "7c3da506-804d-4550-8993-bf17f9ee0402",
      "merge_person_id": "7c3da506-804d-4550-8993-bf17f9ee0403",
      "status": "NEW",
      "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_number": 2,
    "page_size": 50,
    "total_entries": 1000,
    "total_pages": 23
  }
}

HTTP status codes

Page Properties
idAPI_HTTP status codes

HTTP status code

Message

What caused the error

 200

 Response

 

 401

 

Access token validation failed

403

Invalid scope