Cancel
This operation allows to cancel a claim, which essentially means getting the claim to Finalized state as DENIED.
When a claim is not settled, a cancel link is added to the claim resource:
... claim properties ...
"links": [
{
"href": "http://[hostName]:[portNumber]/[api-context-root]/generic/claims/{id}",
"rel": "self"
},
{
"href": "http://[hostName]:[portNumber]/[api-context-root]/claims/{id}/cancel",
"rel": "claim:cancel",
"httpMethod": "POST"
}
]
}
The cancel operation has an optional parameter providerReference which sets the provider reference field on the claim that is cancelled.
This operation may require a payload that contains unfinalize reasons. The reason why it is not MUST, because a claim might be cancelled when it is not in finalized state in which case, unfinalize reasons are not needed.
{ "claimUnfinalizeReasonList": [ { "sourceReference": "<source reference value>", "unfinalizeReason": { "id": "<id of unfinalize reason>" } }, { "unfinalizeReason": { "code": "<code of 2nd unfinalize reason>" } } { "unfinalizeReason": { "id": "<id of 3rd unfinalize reason>" } }] }
The unfinalize reasons can be idenfitied by their "id" or their "code" attribute. If both are specified, the id is used to find the unfinalize reason. |
This operation also supports the data that is sent for unfinalize reason from the dynamic fields (added if any on OHI messages).` |
Cancelling Finalized Claims
If the claim is in the status PRICING FINALIZED or FINALIZED then the payload also has to specify one or more unfinalize reasons. If not, then the payload is rejected with message GEN-HTTP-016 or CLA-HTTP-003.
Otherwise, the claim is unfinalized with the specified reason before it is cancelled. In the event that the existing claim has the status FINALIZED and is also settled, then the request payload is rejected with message CLA-IP-CLAI-016.
Unfinalize steps are explained in Unfinalize Claim section of Claims Flow. Unfinalize reasons are always protected by access restrictions. HTTP API operations enforces those access restrictions:
-
HTTP status 403 is returned if the current user does not have the access rights for all the unfinalize reasons in the payload. Error as specified in the Unfinalize Claim section of Claims Flow for missing access grant on the unfinalize reason is also returned
-
If any rights are missing, no change is made at all to the claim or any of its details.
Cancelling Claims that are In Process
If the claim is in any other status than PRICING FINALIZED or FINALIZED, then any unfinalize reasons that may be in the request payload are ignored and the claim is directly cancelled. A ‘task done’ event is sent out if there are outstanding workflow tasks.
Cancelling Claims that have Tasks that are In Process or Pending
If the claim is currently being processed, then a fatal message (CLA-HTTP-005) with HTTP status 422 is sent in the response.
Cancelling Claims that have Tasks that are Errored
If the claim has tasks that are in Errored, the cancel process should mark the tasks as Shadowed.
Cancel Logic
All existing messages (user specific message or CLA-HTTP-002) with CANCEL origin are deleted.
A fatal message (with message origin "CANCEL") is attached to the claim, CLA-HTTP-002. If the claim has locked claim lines, they are unlocked.
It is also possible to attach a user specific cancel reason message. If such a message code is sent in the request, then it is also attached to the claim with message origin 'CANCEL'. This message indicates the reason for cancelling a particular claim.
All pend reasons, both resolved and unresolved, are removed from the claim and claim line(s). If the claim has pricing results and/or benefit results, those are cleaned up (this is described in more detail in the Clean Up Pricing Results and Clean Up Benefit Results description). The pricing/benefit results are cleaned up for all the (non replaced) claim lines regardless of the fatal messages, checked locked indicator, checked Keep Pricing indicator, checked Keep Benefits indicator and/or a Skip Tag for Allowed. This means the allowed amount is set to null and Keep Pricing/Keep Benefits indicator on the claim line is unchecked even if the claim line has Keep Pricing/Keep Benefits indicator checked. The status of all the claim lines is set to DENIED.
The claim is then finalized. The finalize step is described in more details in Finalize Claim section of Claims Flow. If the claim has external benefits flag set to true, then the claim is pricing finalized. The pricing finalize step is described in more detail in Pricing Finalization section of Claims Flow.
Authorization
The operation in this section is protected by access restriction "claims.cancel IP". A grant must be given with both the Read and Update flag set. A read grant must also be given to access restriction "claims API".
Response Messages
Success
HTTP Status Code 303 SEE OTHER after the operation is completed successfully, request is redirected to claims API.
Failure
Following Http Status code can be returned
Response | Description |
---|---|
HTTP 401 |
Unauthorized |
HTTP 403 |
User does not have access for the unfinalized reasons provided in the payload |
HTTP 404 |
Claim is unknown |
HTTP 409 |
Claim is not in a status that allows cancel |
HTTP 422 |
Other business errors, please refer to table below for possible error messages |
See Response Messages for more details.
Code | Sev | Internal Message |
---|---|---|
GEN-HTTP-016 |
Fatal |
{Unfinalize Reason} {unfinalize reason code} is unknown {Cancel reason message} {Cancel reason message code} is unknown |
CLA-IP-CLAI-016 |
Fatal |
The claim {code} cannot be unfinalized because it is settled |
CLA-HTTP-002 |
Fatal |
The claim {code} is cancelled |
CLA-HTTP-003 |
Fatal |
When cancelling a finalized claim {code}, at least one unfinalize reason should be specified |
CLA-HTTP-005 |
Fatal |
The claim {code} cannot be cancelled because the claim still has task(s) that are in Process/Pending |