Versions Compared

Key

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

Purpose

...

Purpose

This WS is designed to get declaration requests list.

Key features

  1. Only authenticated and authorized user can use declaration requestsemployee with appropriate scope can get declaration requests list.

  2. The service returns only a declaration requests that were created in the same legal entity as the user

  3. Method returns shortened declaration request details, to obtain full information - use Get Declaration request by ID method.

Specification

Link

https://

ehealthmisapi1

uaehealthapi.docs.apiary.io/#reference/public.-medical-service-provider-integration-layer/declaration-requests/get-declaration-requests-list-v3

Resource

/api/v3/declaration_requests

Scope

declaration_request:read

Components

Declarations

Microservices

API paragraph not found

il/api

ops/api

Protocol type

REST

Request type

GET

Sync/Async

API paragraph not found

Sync

Public/Private/Internal

Public

Logic

API paragraph not found

Filters

...

Filter

...

  1. Extract client_id from token. Filter declaration requests by client_id (legal_entity_id)

  2. Filter declaration requests to show only originated by legal entity or shared with legal entity (channel == MIS OR is_shareable == True)

  3. Filter declaration requests by search params (If legal_entity_id is differ from client_id in token - empty list must be returned)

  4. Render found declaration requests with shortened details according to specification

Filters

...

 employee

Parameter

Value

Type

Description

Example

employee_id

 

String

user_id of a doctor

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

(UUID)

Employee identifier

legal_entity_id

 

String

MSP ID

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

status

  • NEW

  • APPROVED

  • SIGNED

  • REJECTED

  • CANCELLED

Enum

 

active

page

(UUID)

Legal entity identifier

status

Dictionary:

DECLARATION_REQUEST_STATUSES

String

Declaration request status according to Status chart

/wiki/spaces/PCAB/pages/17513775491

channel

Dictionary:

DECLARATION_REQUEST_CHANNELS

String

Declaration request channel

page

 

Number

Page number

2

page_size

 

Number

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

50

50

Request structure

Authorize

  1. Verify the validity of access token

    Return 401
    • in case of error - return 401 (“Invalid access token”) in case of validation fails

  2. Verify that token is not expired

    • in case of error - return 401 (“Invalid access token”)

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

    Return 403 in case
    • return 403 (“Your scope does not allow to access this resource. Missing allowances: declaration_request:read”) in case of invalid scope(s)

Request to process the request using a token in the headers.

Headers

  • Content-Type:application/json

  • Authorization:Bearer c2778f3064753ea70de870a53795f5c9

Validation data request

API paragraph not found

Processing

API paragraph not found

...

  • {{access_token}}

  • X-Custom-PSK:{{secret}}

Response structure

See on Apiary

Expand
titleRequest example
Code Block
{
  "meta": {
    "code": 200,
    "url": "https://example.com/resource",
    "type": "object",
    "request_id": "6617aeec-15e2-4d6f-b9bd-53559c358f97#17810"
  },
  "data": [
    {
      "id": "b075f148-7f93-4fc2-b2ec-2d81b19a9b7b",
      "start_date": "2017-03-02",
      "end_date": "2025-03-02",
      "status": "NEW",
      "status_reason": "not relevant",
      "channel": "MIS",
      "person_id": "4fa9cac7-8950-44db-9294-0daba56eed58",
      "employee_id": "60a797bb-43c5-463d-86ee-68e354cb626b",
      "division_id": "4c9c9c6e-5230-444d-8b65-7678da1c1ab3",
      "legal_entity_id": "56b8bcd7-78b8-4ff7-8a60-a48e54a6ef57",
      "authorize_with": "cc949559-5dfe-420f-ac05-065e443b2cc6",
      "parent_declaration_id": "8c7753fc-a647-435f-8e43-4ff4546431f6",
      "system_declaration_limit": 900,
      "current_declaration_count": 675
    }
  ],
  "paging": {
    "page_number": 2,
    "page_size": 50,
    "total_entries": 1000,
    "total_pages": 23
  }
}

Post-processing processes

...

HTTP status codes

HTTP status code

Message

What caused the error

200

 Response

 

401

 

Access token validation failed

403

 

Invalid scope

Backward compatibility

This endpoint returns declaration requests that were created through V2 and V3. Field person_id will be empty for declaration request V2.