Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

...

This WS is designed to cancel previously created Service request.

Specification

Apiary

Authorization

  1. Verify the validity of access token

    • in case of error - return 401 (“Invalid access token”) in case of validation fails

  2. Verify that token is not expired

    • in case of error - return 401 (“Invalid access token”)

  3. Check user scopes in order to perform this action (scope = 'service_request:cancel')

    • return 403 (“Your scope does not allow to access this resource. Missing allowances: service_request:cancel”) in case of invalid scope(s)

...

  1. Save signed content to media storage

  2. Update service request status to entered_in_error (update also updated_at, updated_by)

  3. Write record to status history

  4. Send SMS to patient (if authentication_method_current == SMS, do NOT send sms in case performer is present in SR)

  5. Async! Revoke all approvals made by this service request

  6. If the service request is based on the activity with quantity:

    1. Recalculate and set remaining_quantity for the activity as described at https://e-health-ua.atlassian.net/wiki/spaces/EH/pages/17629119560/RC.+PreQualify+Service+Request+EN