Versions Compared

Key

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

...

  • if activity kind = medication_request:

    • Check there is no medication request requests in status NEW based on the activity

      • in case of error - return 409 (Unable to cancel activity with new Medication Request requests).

    • Check there is no medication requests in status ACTIVE based on the activity

      • in case of error - return 409 (Unable to cancel activity with active Medication requests).

  • if activity kind = service_request:

    • Check there is no availability of service requests  in with status =  active AND active.If such service requests exist, then needs to check availability of service requests with program_processing_status !=completed based on the activity:

      in case of error - return

      :

      1. if program_processing_status is undefined (NULL), then return error 409 (Unable to cancel activity with Service requests in status <status value> and program processing status is NULL or not completed)

      2. if program_processing_status is defined, then needs to check that program_processing_status = complete. Otherwise, return error 409 (Unable to

      complete
      1. cancel activity with Service requests in status <status value> and program processing status is NULL or not completed

      or undefined
      1. )

      .

Validate content

Signed content must match with activity in DB in order to be changed

...