ЕСОЗ - публічна документація
Get Service Requests by search params
Purpose
Service returns all Service requests related to the person filtered by submitted parameters.
Specification
Link | |
Resource | /api/patients/{{patient_id}}/service_requests |
Scope | service_request:read |
Components | Service request |
Microservices | API paragraph not found |
Protocol type | REST |
Request type | GET |
Sync/Async | Async |
Public/Private/Internal | Public |
Filters
Filter | Values | Type | Description | Example |
---|---|---|---|---|
patient_id |
| String | Unique patient identifier |
|
episode_id |
| String | Unique episode identifier |
|
status |
| String |
|
|
requester_legal_entity |
| String |
|
|
used_by_legal_entity |
| String |
|
|
code |
| String |
|
|
care_plan_id |
| String | Unique care plan identifier |
|
Request structure
See on Apiary
Authorize
Verify the validity of access token
Return (401, 'unauthorized') in case of validation fails
Verify that token is not expired
in case of error - return (401, 'unauthorized')
Check user scopes in order to perform this action (scope = 'service_request:read')
Return (403, 'invalid scopes') in case of invalid scope(s)
Request to process the request using a token in the headers
Headers
Наприклад:
Content-Type:application/json
Authorization:Bearer {{access_token}}
API-key:{{secret}}
Request data validation
API paragraph not found
Processing
Get all Service requests by person_id from service_request (MongoDB)
Validate data consistency:
Ensure that requested Service requests have ABAC context
Return 403 ('Access denied') in case of error
Filter list above by submitted search parameters
Render a response according to specification with found Service requests entities.
Response structure
See on Apiary
Example:
Post-processing processes
API paragraph not found
HTTP status codes
HTTP status code | Message | What caused the error |
---|---|---|
200 |
|
|
401 |
| Unauthorized |
403 |
| Invalid scopes |
404 |
| Episode or patient not found |
ЕСОЗ - публічна документація