Purpose
This method allows to get detailed information of the Device dispense.
Specification
Logic
Service returns specified Device dispense related to the legal entity from token:
Get Device dispense by ID from device_dispenses (MongoDB)
Validate data consistency:
Ensure that requested Device dispense relates to requested legal entity
Return 404 ('not_found') in case of error
Render a response according to specification
Input parameters
Input parameter | Values | Type | Description | Example |
---|---|---|---|---|
patient_id | String | Unique patient identifier |
| |
device_dispense_id | String | Unique device dispense identifier |
|
Request structure
API paragraph not found
Authorize
Verify the validity of access token
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 = 'device_dispense:read')
Return (403, 'Your scope does not allow to access this resource. Missing allowances: device_dispense:read') in case of invalid scope(s)
Headers
Content-Type:application/json
Authorization:Bearer mF_9.B5f-4.1JqM
api-key:aFBLVTZ6Z2dON1V
Request data validation
Validate Device dispense
Get Device dispense identifier from the URL
Check Device dispense exists in device_dispenses (MongoDB)
Return 404 ('not_found') in case of error
Check Device dispense belongs to legal entity
Return 404 ('not_found') in case of error
Processing
API paragraph not found
Response structure
See on Apiary