ЕСОЗ - публічна документація
RC._Get Service requests in Specimen context_EN
Purpose
This WS allows to get a list of Service Requests referenced on or referenced by the Specimen resource directly when the diagnostic investigation is requested.
Specification
Link | |
Resource | api/specimens/specimen_id/service_requests |
Scope | service_request:read_impersonal |
Components | service request |
Microservices |
|
Protocol type | REST |
Request type | Get |
Sync/Async | Sync |
Public/Private/Internal | Public |
Key points
Only authenticated and authorized employee with appropriate scope can get a list of Specimen.
Method returns a list of Service Requests referenced on or referenced by the specified Specimen
Service requests can be additionally filtered by status.
ABAC rules and forbidden group filtration are not used here.
Service Request entities does not contain any information about a Patient, only its age and gender.
Logic
Service returns all impersonal Service Requests related to the Specimen:
Get all Service Requests from service_requests collection (MongoDB) that includes the Specimen. Get even those containing forbidden elements.
Get all Service Requests from service_requests collection (MongoDB) that included in the Specimen. Get even those containing forbidden elements.
Additionally, filter the list of Service requests by submitted search params
Render a response according to specification with a list of found Service Request entities. Do not show info about the Patient identity, except age and gender.
Filters
Filter | Values | Type | Description | Example |
---|---|---|---|---|
specimen_id |
| String | Unique Specimen identifier | 7075e0e2-6b57-47fd-aff7-324806efa7e5 |
status | String | status of the Specimen | available |
Dictionaries
RC._Specimen dictionaries and configurable parameters_EN | Dictionaries
Request structure
See on Apiary
Authorization
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 and client scopes in order to perform this action (scope = 'service_request:read_impersonal')
return 403 “Your scope does not allow to access this resource. Missing allowances: service_request:read_impersonal” in case of invalid scope(s)
Search params
All search params are optional. Search with a few params executes according to the logical AND rule.
status
filter list by specimen.status
Response structure
See on Apiary
HTTP status codes
HTTP status code | Message | What caused the error |
---|---|---|
200 |
|
|
401 | Invalid access token |
|
403 |
|
|
ЕСОЗ - публічна документація