Insert claim¶
After a claim has been created and populated by the caller (see Create new claim), calling Save() for the first time routes through the insert lifecycle. This operation applies status-driven defaulting, runs the object's validation rules, and issues the insert statement(s) that create the persistent claim row (and, for New-status claims, cascades a status-history row).
| Field | Value |
|---|---|
| Operation ID | OP-CE-02 |
| Trigger | Save() invoked on a claim object where IsNew = True |
| Inputs | Fully populated claim header fields, ClaimStatusCode, acting worker/user context |
| Outputs | A new CL_INJURY_CLAIM row; for New-status claims, a companion status-history row; UpdateNum initialized to 1 |
| Primary components | clsClaimEntry.BeforeInsert, clsClaimEntry.AddNewStatusData, clsClaimEntryBusinessRules |
| Entry point | Business\SAIF.Business.Claim.Entry\clsClaimEntry.vb |
Steps¶
- Validate before insert.
Save()(inherited BOF lifecycle) checksIsValidbefore dispatching toBeforeInsert; because every rule body inclsClaimEntryBusinessRules.vbis commented out andAddBusinessRules()is empty, no field-level broken rules are actually raised at this stage.* - Apply New-status defaulting. If
ClaimStatusCode = "N"(New),AddNewStatusDatapopulates additional header fields expected for a New claim before the insert executes, including setting the active-claim flag to'Y'(BR-CE-004). - Bind and execute the insert statement.
BeforeInsertbuilds parameter bindings for the claim header fields and issues the insert againstCL_INJURY_CLAIM(SQL-010, CL_INJURY_CLAIM). - Initialize
UpdateNumto 1 as part of the same lifecycle call, establishing the optimistic-concurrency baseline used by subsequent updates (BR-CE-011; see Update claim). - Cascade auxiliary status rows for New-status claims (BR-CE-013). When
ClaimStatusCode = "N", the same save cycle also persists request-decision, status-activity, type-activity, MCO-eligibility, and policy-history rows via the New-status data bindings established in step 2 (SQL-005, SQL-006, SQL-007, SQL-008, SQL-009). - On failure: the insert is rolled back as a unit by the surrounding data-portal transaction; no partial claim/status-history state is expected to persist.*
- Detect other open claims for the same worker.
CheckForMultipleClaimsForWorkerqueries for the most recently updated other claim tied to the same worker within a 14-day injury-date window (BR-CE-012, SQL-016); see Check multiple claims for worker for the full detection logic. - Return the saved object with the newly assigned
ClaimID/UpdateNumto the caller.
Process flow¶
flowchart TD
Start([Save called on new claim]) --> Valid{IsValid?}
Valid -->|No| Errors([Return broken rules])
Valid -->|Yes| StatusCheck{ClaimStatusCode = New?}
StatusCheck -->|Yes| NewData[Apply New-status<br>defaults]
StatusCheck -->|No| Insert[Insert CL_INJURY_CLAIM row]
NewData --> Insert
Insert --> UpdateNum[Initialize UpdateNum = 1]
UpdateNum --> HistoryCheck{ClaimStatusCode = New?}
HistoryCheck -->|Yes| History[Insert status-history row]
HistoryCheck -->|No| Multi[Check multiple open<br>claims for worker]
History --> Multi
Multi --> Return([Return saved claim])
Failure and edge-case behavior¶
- Because business-rule bodies are commented out in
clsClaimEntryBusinessRules.vb, malformed or incomplete claim data is not blocked at the object level before the insert executes; any rejection would have to come from database constraints.* - The multiple-open-claims check in step 6 surfaces the matching claim number to the caller; it does not itself block the insert (BR-CE-012).
- If the New-status history insert (step 5) fails after the header insert succeeds within the same transaction scope, the data-portal transaction is expected to roll back both; no compensating logic exists in
clsClaimEntryitself.*
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\clsClaimEntry.vbBusiness\SAIF.Business.Claim.Entry\clsClaimEntryBusinessRules.vb