Claim submission via API¶
Once an Online 801 submission and its detail have been completed, SubmitClaim packages the submission into the payload ClaimCenter expects, adjusts dates to avoid a same-day rollback edge case, and posts it to CCClaimDataApi. A successful call returns a new ClaimCenter ClaimID, which is adopted onto the submission before it is marked Submitted.
| Field | Value |
|---|---|
| Operation ID | OP-CE-15 |
| Trigger | cls801Submission.SubmitClaim, called once a submission and its detail have passed validation |
| Inputs | Validated submission and submission-data objects, acting user |
| Outputs | ClaimCenter ClaimID; updated submission status Submitted; clsSubmissionResult |
| Primary components | cls801Submission.SubmitClaim, clsNewClaimModel, clsSubmitClaimByAPI.AfterInsert |
| Entry point | Business\SAIF.Business.Claim.Entry\Online801\Submission\cls801Submission.vb |
Steps¶
- Build the ClaimCenter payload.
clsNewClaimModelmaps the submission and submission-data fields into the DTO shape expected by the CCClaimDataApi new-claim endpoint. - Shift dates to avoid a same-day rollback (BR-CE-023). The loss (injury) date and the claimant's birth date are adjusted before submission when they would otherwise cause ClaimCenter to roll back the case on the same day it is created.*
- Post the payload to CCClaimDataApi.
- Sub-step:
clsSubmitClaimByAPIissues the REST call and receives a response array. - Handle the API response in
AfterInsert. - If the response array contains at least one element and it indicates success: read the new
ClaimIDfrom the response and adopt it onto the submission. - If the response array contains at least one element and it indicates failure: read the error/exception data from
response(0)and surface it as a broken rule. - Confirmed defect: if the response array has zero elements, the same failure-handling branch still attempts to read
response(0).ExceptionData, which throws an index/null-reference exception because there is no element at index 0 — this fallback path is not actually safe for a genuinely empty response. - Mark the submission Submitted. After the local save attempt,
SubmitClaimsetsIsSubmitted = Trueon the result object unconditionally — regardless of whether the adoptedClaimID/local save actually succeeded — which can mask a failed local persist behind an apparently successful submission flag.* - Persist the adopted
ClaimIDand Submitted status back onto the submission header (see 801 submission CRUD).
Process flow¶
flowchart TD
Start([SubmitClaim called]) --> Build[Build ClaimCenter<br>payload from submission/detail]
Build --> Shift[Shift loss date and<br>birth date if needed]
Shift --> Post[POST to CCClaimDataApi<br>new-claim endpoint]
Post --> RespCheck{Response array<br>has any elements?}
RespCheck -->|No| Defect([Defect: response(0) access<br>throws on empty response])
RespCheck -->|Yes| Success{Response indicates<br>success?}
Success -->|Yes| Adopt[Adopt returned ClaimID]
Success -->|No| Error([Surface error from<br>response(0)])
Adopt --> MarkSubmitted[Set IsSubmitted = True<br>unconditionally]
MarkSubmitted --> Persist([Persist ClaimID and<br>Submitted status])
Failure and edge-case behavior¶
- Confirmed defect:
clsSubmitClaimByAPI.AfterInsert's empty-response fallback branch dereferencesresponse(0)whenresponse.Length = 0, which throws rather than surfacing a graceful "no response received" error. IsSubmittedset unconditionally:SubmitClaimmarks the resultIsSubmitted = Trueafter the local save attempt regardless of whether that save succeeded, which can present a submission as successfully submitted even when the local persist step failed.*- The date-shifting logic in step 2 is a workaround for a downstream ClaimCenter rollback behavior rather than a data-correctness rule; the shifted dates are what get submitted to ClaimCenter, not what remains on the local submission record.*
Related documentation¶
Note: Statements marked with
*were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.
Sources¶
Business\SAIF.Business.Claim.Entry\Online801\Submission\cls801Submission.vbBusiness\SAIF.Business.Claim.Entry\Online801\Submission\clsSubmitClaimByAPI.vbBusiness\SAIF.Business.Claim.Entry\Online801\Submission\ApiNewClaimModels\clsNewClaimModel.vb