ЕСОЗ - публічна документація
[DRAFT] REST API Reject Person Request [API-010-001-005-0377]
Сторінка знаходиться в процесі розробки. Інформація на ній може бути застарілою.
https://e-health-ua.atlassian.net/wiki/spaces/EN/pages/17591304241 (remove the link block before publishing the document)
- 1 Properties of a REST API method document
- 2 Purpose
- 3 Logic
- 4 Configuration parameters
- 5 Dictionaries
- 6 Input parameters
- 7 Request structure
- 8 Headers
- 9 Request data validation
- 10 Processing
- 11 Response structure examples
- 12 HTTP status codes
- 13 Post-processing processes
- 14 Technical modules where the method is used
Properties of a REST API method document
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-010-001-005-0377 |
Microservices (namespace) | MPI |
Component | Master Patient Index |
Component ID | COM-010-001 |
Link на API-специфікацію | |
Resource |
|
Scope | person_request:write |
Protocol type | REST |
Request type | PATCH |
Sync/Async | Sync |
Public/Private | Public |
Purpose
Use this method to reject previously created Person Request.
Logic
Key features:
Only authenticated and authorized user can use this service;
New and Approved person request can be rejected;
The request can be rejected only by the employee who works in the same legal entity in which the request was made.
Configuration parameters
Description of the configuration parameters that are used when processing a request in the system
Dictionaries
GENDER
DOCUMENT_TYPE
ADDRESS_TYPE
COUNTRY
SETTLEMENT_TYPE
STREET_TYPE
PHONE_TYPE
CONFIDANT_PERSON_TYPE
PREFERRED_WAY_COMMUNICATION
DOCUMENT_TYPE
DOCUMENT_RELATIONSHIP_TYPE
AUTHENTICATION_METHOD
Provides a list of links to dictionaries that are available in Confluence
Input parameters
Input parameter | Mandatory | Type | Description | Example | |
---|---|---|---|---|---|
1 | id |
| String | Required | eeebb86d-5cba-43c9-885b-6482ecaf826b |
2 |
|
|
|
|
|
Request structure
See on API-specification
Headers
Key | Value | Mandatory | Description | Example | |
---|---|---|---|---|---|
1 | Content-Type | application/json |
| Тип контенту | Content-Type:application/json |
2 | Authorization | Bearer {access_token} |
| Перевірка користувача | Authorization:Bearer {access_token} |
3 | api-key | {secret} |
| Секретний ключ | api-key: {secret} |
Request data validation
Validate person request
Check that person request with such ID exists in the system (is_active = true)
In case of error - return 404.
Check that person request belongs to the same legal entity as the user
In case of error - return 403.
Processing
Change person request
Change entity status in IL_DB.person_request to REJECTED
Set updated_at - now() (Get current date-time)
Set updated_by - user_id (Extract user from token).
Response structure examples
See on API-specification
HTTP status codes
Response code | HTTP Status code | Message | Internal name | Description | |
---|---|---|---|---|---|
1 | Базові | ||||
2 |
| 201 | Response |
|
|
3 |
| 401 |
| Access token validation failed |
|
4 |
| 403 |
| Invalid scope Validation failed |
|
5 |
| 404 |
| Validation failed |
|
6 | Специфічні | ||||
7 |
|
|
|
|
|
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
ЕСОЗ - публічна документація