...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
Required parameters are marked with "*"
...
Purpose*
Use this method to obtain list of Declaration Requests for an empolee_id
.
Specification*
...
Link
...
Purpose
This WS is designed to get declaration requests list.
Key features
Only authenticated and authorized employee with appropriate scope can get declaration requests list.
The service returns only a declaration requests that were created in the same legal entity as the user
Method returns shortened declaration request details, to obtain full information - use Get Declaration request by ID method.
Specification
Using Dictionaries
Потрібно вказати словники, які використовує метод API
Using Microservices
Вкажіть перелік мікросервісів, які використовує метод API. Наприклад: Auth, ABAC
Protocol type
Link | |
Resource | /api/v3/declaration_requests |
Scope | declaration_request:read |
Components |
Необхідно зазначити перелік компонентів, які використовують цей метод, наприклад: ePrescription
Declarations | |
Microservices | il/api ops/api |
Protocol type | REST |
Request type | GET |
Sync/Async |
Метод є синхронним чи асинхронним?
Logic*
Only authenticated and authorized user can use declaration requests
If you want to reduce amount of data that is going trough your application, use status
filter and show only requests that Doctor or Admin is interested in current UI section.
Also we suggest use employee_id
and legal_entity_id
to make sure that end-user understands context of actions that he or she will perform.
Method returns shortened details, to obtain full information - get Declaration Request it by it's ID.
Important
This endpoint shows the declaration requests which are created by V2 and V3. Due to the fact that structure of declaration request V3 is different from the structure of decl request V2 , so not all fields of declaration request v2 can be displayed. If declaration request is created by v2, the field person_id
will be empty
Filters
Filter
Values
Type
Description
Example
employee_id
String
user_id of a doctor
d290f1ee-6c54-4b01-90e6-d701748f0851
legal_entity_id
String
MSP ID
d290f1ee-6c54-4b01-90e6-d701748f0851
status
NEW
APPROVED
SIGNED
REJECTED
CANCELLED
Enum
active
page
Number
Page number
2
Sync | |
Public/Private/Internal | Public |
Logic
Extract
client_id
from token. Filter declaration requests byclient_id
(legal_entity_id
)Filter declaration requests to show only originated by legal entity or shared with legal entity (
channel
== MIS ORis_shareable
== True)Filter declaration requests by search params (If
legal_entity_id
is differ fromclient_id
in token - empty list must be returned)Render found declaration requests with shortened details according to specification
Filters
Parameter | Value | Type | Description |
---|---|---|---|
employee_id |
| String(UUID) | Employee identifier |
legal_entity_id |
| String(UUID) | Legal entity identifier |
status | Dictionary:
| String | Declaration request status according to Status chart |
channel | Dictionary:
| String | Declaration request channel |
page |
| Number | Page number |
page_size |
| Number | A limit on the number of objects to be returned, between 1 and 100. Default: |
50 |
...
See on Apiary
Authorize
...
Verify the validity of access token
...
in case of error - return 401 (“Invalid access token”) in case of validation fails
Verify that token is not expired
in case of error - return 401 (“Invalid access token”)
Check user scopes in order to perform this action (scope = 'declaration_request:read')
...
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
Validate request (JSON schema)*
Наприклад:
Validate request using JSON schema
In case validation failed - generate 422 error
Expand | ||
---|---|---|
| ||
|
Validation data request*
Processing*
Response structure*
{{access_token}}
X-Custom-PSK:{{secret}}
Response structure
See on Apiary
Expand | ||
---|---|---|
| ||
|
...
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.