ЕСОЗ - публічна документація
RC_Rx_[TO BE DEPRECATED] Get Medication dispense details
Purpose
To be deprecated.
This method allows to get detailed information of the Medication dispense for the PHARMACY users. To obtain Medication dispense list Get Medication dispenses by search params by Pharmacy User should be used.
Specification
Authorization
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 = 'medication dispense:read')
Return (403, 'Your scope does not allow to access this resource. Missing allowances: medication dispense:read') in case of invalid scope(s)
Validations
Validate Medication dispense
Get Medication dispense identifier from the URL
Check Medication dispense exists in DB (OPS)
Return 404 ('not_found') in case of error
Check Medication dispense belongs to legal entity
Return 404 ('not_found') in case of error
Validate User
Extract client_id (legal_entity_id) from token.
Return 404 ('not_found') in case employee has no access to medication dispense.
Service logic
Service returns specified Medication dispense related to the legal entity from token:
Get Medication dispense by ID from medication_dispenses DB (OPS)
Validate data consistency:
Ensure that requested Medication dispense relates to requested legal entity
Return 404 ('not_found') in case of error
Render a response according to specification
ЕСОЗ - публічна документація