Table of Contents | ||||
---|---|---|---|---|
|
...
Request to process the request using a token in the headers
Headers
Наприклад:
Content-Type:application/json
Authorization:Bearer {{access_token}}
API-key:{{mis_client_secret}}
...
if activity kind = medication_request:
Check there is no medication request requests in status
NEW
based on the activityin 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 activityin case of error - return 409 (Unable to cancel activity with active Medication requests).
if activity kind = service_request:
Check availability of service requests withstatus = active.If such service requests exist, then needs to check availability of service requests withprogram_processing_status:ifprogram_processing_statusis 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)ifprogram_processing_statusis defined, then needs to check thatprogram_processing_status = complete. Otherwise, return error 409 (Unable to cancel activity with Service requests in status <status value> and program processing status is NULL or not completed)
Check all related service requests in final status: completed, recalled or entered_in_error.
in case at least one is active - return error 409 (Unable to cancel activity with Service requests in active status)
Validate content
Signed content must match with activity in DB in order to be changed
...