Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Purpose

This WS is designed to search (get list) Requests for Medication request.

APIary

get-requests-for-medication-request-list

Input parameters (filters)

  • employee_id (optional)
  • legal_entity_id(optional)
  • status (optional)

Logic WS

  1. Verify the validity of access token
  2. Check user scopes in order to perform this action (scope = 'request_for_medication_request:read')
  3. Search Requests for Medication request by filters in WS url:
    1. SELECT * FROM requests_for_medication_request WHERE <filters>
    2. optional filters:
      1.  employee_id (uuid). By default returned all data.
      2.  status (Dictionary:  REQUEST_FOR_MEDICATION_REQUEST_STATUS). By default returned all rows with status=NEW.
      3. limit (limit response size - quantity of innm objects). By default returned 50 objects.
      4. starting_after (cursor to fetch next page)
      5. ending_before (cursor to fetch previous page)
    3. mandatory (hidden) conditions:
      1. if employee_id == NULL in payload, use condotion: legal_entity_id = $.context.legal_entity_id

Response (output)

  1. Return array with responce structure from WS Create Medication Request SP , without content attribute.
  2. If according to filters drugs are not found, WS returns empty data array.
  3. WS also returns pagination data - for tecnical info.