Purpose
This method allows getting short information about the patient’s Medication dispense. Obtaining a medication dispenses list or receiving full information is restricted for the MSP side. Only short medication dispense information is allowed.
Specification
Logic
Service returns specified Medication dispense related to the patient:
Get Medication dispense by ID from medication_dispenses DB (OPS).
Validate data consistency:
Ensure that requested Medication dispense relates to requested Patient (from URL)
Return 404 ('not_found') in case of error.
Render a response according to specification.
Preconditions
No
Global and configurable parameters
No
Input parameters
Input parameter | Values | Type | Description | Example |
---|---|---|---|---|
person_id | ||||
id | String | Medication Dispense Response Identifier. Required. | a89f6a26-4221-4597-a1d2-542d5e40b565 |
Filters
No
Request structure
See on Apiary
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 = '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).
Headers
Content-Type:application/json
Authorization:Bearer c2778f3064753ea70de870a53795f5c9
Validate request
API paragraph not found
Request data validation
Validate Person
Get Person identifier from the URL.
Check it exists in DB
Return 404 ('not_found') in case of error.
Validate Medication dispense
Get Medication dispense identifier from the URL
Check it exists in DB
Return 404 ('not_found') in case of error;
Check Medication dispense belongs to patient
Return 404 ('not_found') in case of error.
Validate User
Extract user_id from token.
Check user has an active and approved employee from legal entity (token) that:
has an active declaration with the patient;
has access to connected with medication requests episode with the patient (created in current MSP or approval on Episode resource);
has access to connected with medication requests care plan with the patient (approval on Care plan resource)
Return 403 ('Access denied') in case employee has no declaration or access connected with medication requests episode or care plan.
Parameters that are used when processing the request
Configuration parameters
Access to the method is defined by the scope medication_dispense:read. Permission for this scope is determined by the System administrator by configuring scopes in the context of clients and roles.
Dictionaries
API paragraph not found
Processing
API paragraph not found
Response structure
See on Apiary
Example:
Post-processing processes
No
HTTP status codes
Backward compatibility
API paragraph not found