Table of Contents |
---|
Purpose
This WS is designed to qualify Device Request: check the ability of dispense Device Request within the Medical program. This method is used to qualify (possibility to use device definition for the program) Device request by Id . Fields descriptions are listed in request Example view.
Key points
Only authenticated and authorized users with appropriate scope can invoke Qualify Device Request
This method returns for existing Device Request the result of data validation within each submitted medical program, but not creates any entities in the system.
Each Medical program may have its unique conditions for the Device Dispense. They can be based on analysis of personal info, device definition list, terms, locations and combinations of them.
Any Medical program can have separate block of branching logic configured at /wiki/spaces/CSI/pages/17467605147 by NHS administrator.
Сompatibility is checked only for programs which are available in payload (array).
Successful invocation of the method returns decision for each program if it is valid or not to create Device dispense with submitted combination of parameters in the payload. If program is invalid, the reason must be returned in the response.
Allowed for existing and active Device Requests
Also medical program provision is checked for the division of the pharmacy.
Specification
Specification
Link | Посилання на Apiary або Swagger | |
Resource | /api/device_requests/{{device_request_id}}/actions/qualify | Посилання на ресурс, наприклад: /api/persons/create |
Scope | device_request:read | Scope для доступу |
Components | Devices | Зазначається перелік бізнес компонентів, які використовують цей метод, наприклад: ePrescription |
Microservices | Перелік мікросервісів, які використовує метод API, наприклад: Auth, ABAC | |
Protocol type | REST | Тип протоколу, який використовується запитом, наприклад: SOAP | REST |
Request type | POST | Тип запиту API, наприклад: GET, POST, PATCH… |
Sync/Async | Sync | Метод є синхронним чи асинхронним? |
Public/Private/Internal | Public | Потрібно зазначити тип методу за ступенем доступності |
Input parameters
Input parameter | Values | Type | Description | Example |
---|---|---|---|---|
device_request_id | String |
|
|
Request structure
See on Apiary
Example:
Request example
|
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 = 'device_request:read')
return 403 (“Your scope does not allow to access this resource. Missing allowances: device_request:read”) in case of invalid scope(s)
...
If general error found at Validate division section, that doesn’t depend on medical program, then return corresponding error code with error message
If general validation passed, then collect array for all programs in payload with status for each (VALID or INVALID) and rejection_reason
For each program return a list of appropriate program participants found at Validate Device Definitions step
Generate response according to specification
Response structure
See on Apiary
Example:
Response example
|
Response example
|
HTTP status codes
HTTP status code | Message | What caused the error |
---|---|---|
200 |
|
|
422 |
|
|