Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

REST API method / Метод REST API (настанова) /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-004-002-0073

Microservices (namespace)

IL

Component

Declarations

Component ID

COM-005-004

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

https://ehealthmisapi1.docs.apiary.io/#reference/public.-medical-service-provider-integration-layer/declaration-requests/create-declaration-request-v3

Resource

{{host}}/api/v3/declaration_requests

Scope

declaration_request:write

Protocol type

REST

Request type

POST

Sync/Async

Sync

Public/Private

Public

...

  1. This method method allows to create a declaration only for an existing person.

  2. To create declaration request based on active declaration in reorganized legal entity, parent_declaration_id must be passed in request.

Logic

Description of the working algorithm of the API method and the interaction of services with each other add Service logic (if necessary)

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

Input parameter

Mandatory

Type

Description

Example

1

2

...

where IL.Declaration_request.mpi_id = :($.person.id) and status in ('NEW' or 'APPROVED)
Cancel declaration requests

Change status and status reason of all found declaration requests:

  • status: CANCELED

  • status_reason: request_cancelled

Code Block
SET   IL_DB.declaration_requests.status = 'CANCELED'
WHERE IL_DB.declaration_requests.id IN (:LIST)

...

  1. Insert record to IL.declaration_request:

    1. status 'NEW'

    2. is_shareable: false

Generate upload URL

If auth_method_requests.auth_method_current = OFFLINE

...

Response code

HTTP Status code

Message

Internal name

Description

1

Базові

2

201

Response

 

3

401

 

Access token validation failed

4

403

Access denied. Party is not verified

5

403

Access denied. Party is deceased

6

403

 

Invalid scopes

7

403

forbidden

8

404

Active parent declaration was not found

9

404

 

Validation error

10

404

Such person doesn't exist

11

409

 

Validation error

12

409

Employee of parent declaration and current employee are not the same

13

409

Legal entities of parent declaration and current are not in reorganization process

14

409

Parent declaration does not belong to this person

15

422

 

Validation error

16

401

Unauthorized

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

17

409

Patient is not verified

18

422

Сannot be confirmed by a method with type= NA. Use a different method.

19

422

Person must have authentication method

20

422

such authentication method doesn't exist

21

422

such authentication method does not belong to this person

22

Специфічні

23

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"

...