Purpose
This method is designed to get all Medication Dispense limited by user context
Specification
WS logic
Authorize user
- Verify the validity of access token
- Return 401 in case validation fails
- Check user scopes in order to perform this action (scope = 'medication_dispense:read')
- Return 403 in case invalid scope(s)
Validate request
Get legal entity from token
- Extract legal_entity_id (client_id) from token
Validate (apply) context
Return response to user limited by context from user's token
Token type | Limitation |
---|---|
TOKENS_TYPES_PERSONAL | Limited by Legal Entity (ID) |
TOKENS_TYPES_ADMIN | No limitations |
Query data
- Get all records from medication_dispenses filtered by:
- only active records: is_active = true
- context: user context