/
RC_Rx_Get Medication dispenses by search params by Pharmacy User

ЕСОЗ - публічна документація

RC_Rx_Get Medication dispenses by search params by Pharmacy User

Purpose

This method intended to get all Medication dispenses for the PHARMACY users.

Specification

Apiary

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_pharm')

    • Return (403, 'Your scope does not allow to access this resource. Missing allowances: medication dispense:read') in case of invalid scope(s)

Validations

Validate User

  • Extract client_id (legal_entity_id) from token.

    • Return empty array in case employee has no access to medication dispense.

Service logic

Service returns specified Medication dispenses related to the legal entity from token:

  • Get Medication dispenses from medication_dispenses DB (OPS)

  • Filter list above by submitted search parameters

  • Render a response according to specification.

ЕСОЗ - публічна документація