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

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 7 Next »

Status

Specification
SPECS
Apiary
DONE
JSON Schema request
ABSENT
JSON Schema response
SPECS

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
      • id
      • status
      • receipt_period_type
      • receipt_age_type
      • created_at
      • started_at
      • ended_at
      • dispense_valid_from
      • dispense_valid_to
      • legal_entity_id
      • division_id
      • employee_id
      • person_id
      • innm_id 
      • innm_route
      • innm_dosage
      • innm_container_dosage
      • request_qty
       
  2. If according to filters requests are not found, WS returns empty data array.
  3. WS also returns pagination data - for technical info.
  • No labels