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

(RC-1 MRIN) Get Medication request Requests List

Specification

Get Medication request Requests

Purpose

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

Input parameters (filters)

  • employee_id (optional)

  • person_id (optional)

  • status (optional)

  • intent (optional)

  • care_plan_id (optional)

  • page (optional)

  • page_size (optional)

Logic WS

  1. Verify the validity of access token

    1. Return 401 in case validation fails

  2. Check user scopes in order to perform this action (scope = 'medication_request_request:read')

    1. Return 403 in case invalid scope(s)

  3. Get `my_party_id`  from `$.context.user_id`

    1. Return 500 in case ("Not found party for this user!")  

  4. Get list of employees for this `party_id`  & `$.context.legal_entity_id` (if not NULL)

  5. Search Requests for Medication request by filters in WS url:

    1. SELECT * FROM requests_for_medication_request WHERE <filters>

    2. optional filters:

      1.  list employee_id (uuid). By default returned all data.

      2. person_id (uuid). By default returned all data.

      3.  status (Dictionary:  REQUEST_FOR_MEDICATION_REQUEST_STATUS). By default returned all rows with status=NEW.

      4. limit (limit response size - quantity of innm objects). By default returned 50 objects.

      5. starting_after (cursor to fetch next page)

      6. ending_before (cursor to fetch previous page)

Response (output)

  1. If according to filters requests are not found, WS returns empty data array.

    1. WS also returns pagination data - for technical info.

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