Versions Compared

Key

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

This method searches and returns request to registration employees by id with status != New

According to requirements: 

  • Legal entity can see only employee_requests that were made by this legal entity.
  • NHS Admin can see all employee_requests

Specification


Input parameters

  • id

Validate request

  1. Verify the validity of access token
    1. in case error return 401
  2. Check user scopes in order to perform this action (scope = 'employee_request:read')
    1. in case error return 403

Validate status

  1. In case status='NEW' skip validation. Use Get new employee request by ID.

...

  1.  

WS logic for `client_type` = MSP, Pharmacy

  1. Get legal_entity.id from '$.context'. Filter employee requests by legal_entity.id
    1. in case error return 404

WS logic for `client_type` = NHS_Admin

  1. Search employee_request by id='$.id'