task_cancel()
Function prototype | task_cancel (session, task) |
---|---|
API Version | 2.7.29 and higher |
SOAP, REST |
Description
Changes the status of a TASK to “CANCELLED”
Required permissions: The operation is only allowed if the active user:
Has active Role "Service" and also has role "Service" in the Subscription (independently of the status of the Admission)
Has active Role "Case manager", and is also "Case Manager" in the Subscription and the Admission is active (not dicharged nor paused)
Otherwise an INSUFFICIENT_PRIVILEGES error will be returned.
Input parameters: |
|
Output parameters: |
|
Request example
task_cancel ( “LCAAAAAAAAAAAA”, "54618")
Response
The response format is XML when the function has been invoked via the SOAP API, and JSON when it has been invoked via the REST API
Return Error codes
ERROR CODE |
|
---|---|
INVALID_TOKEN | The session token provided is not valid |
INSUFFICIENT_PRIVILEGES | The session user does not have the necessary privileges to change the status of the TASK |
TASK.NOT_FOUND | The TASK with the reference indicated in the parameter task was not found |
ADMISSION.NOT_FOUND | The TASK with the reference indicated in the parameter task does not belong to an ADMISSION |
ADMISSION.NOT_OPEN | Cannot change the status of the TASK because the ADMISSION is discharged or paused |
PROGRAM.LOCKED | Cannot change the status of the TASK because the PROGRAM is locked |