801 submission CRUD¶
cls801Submission is the header object for an Online 801 electronic claim submission — the entry point that ties together worker lookup, submission detail, and eventual ClaimCenter submission. This operation covers its own persistence lifecycle: creation with sensible defaults, insert/update/delete through the PK82538_ONLINE_801_CLAIM package, and the block that prevents deleting a submission that has already been sent.
| Field | Value |
|---|---|
| Operation ID | OP-CE-12 |
| Trigger | cls801Submission CRUD lifecycle (BeforeCreate, BeforeInsert, BeforeUpdate, BeforeDelete) and retrieval helpers |
| Inputs | PolicyNumber, ClaimID/SubmissionID, submission header fields (status, language, dates), LastUpdateNum |
| Outputs | Persisted CL_801_SUBMISSION row; a populated or claim-synthesized submission object |
| Primary components | cls801Submission.BeforeCreate, cls801Submission.BeforeInsert, cls801Submission.BeforeUpdate, cls801Submission.BeforeDelete, cls801Submission.BeforeRetrieve |
| Entry point | Business\SAIF.Business.Claim.Entry\Online801\Submission\cls801Submission.vb |
Steps¶
- Reserve a submission identifier.
BeforeCreateissues a scalar stored-procedure call to obtain the nextSubmissionIDvalue (SQL-004). - Default a new submission (BR-CE-021).
BeforeCreate/AfterCreatesets the new submission's status to Incomplete, preseeds a default language, and populatesPolicyNumberfrom the caller-supplied value. - Insert the submission header.
BeforeInsertbinds the header fields and issues the insert throughPK82538_ONLINE_801_CLAIM.submission_insert(SQL-012, CL_801_SUBMISSION). - Update the submission header under version checking (BR-PROC-001).
BeforeUpdatebindsLastUpdateNumalongside the updated fields; the underlying procedure rejects the update unless the supplied version matches the current row (SQL-024, CL_801_SUBMISSION). - If the rows-affected value is not
1: add anUpdateErrorbroken rule (BR-CE-011). - Block deletion of a submitted submission (BR-CE-020).
BeforeDeletechecks the submission's status before deleting; if the submission has already been marked Submitted, the delete is refused with a broken rule rather than being attempted. - Delete the submission header under version checking (BR-PROC-002). If the submission is not yet Submitted,
BeforeDeletebindsLastUpdateNumand issues the delete throughPK82538_ONLINE_801_CLAIM.submission_delete(SQL-028, CL_801_SUBMISSION). - If the rows-affected value is not
1: add aDeleteErrorbroken rule (BR-CE-011). - Retrieve submissions.
BeforeRetrievedispatches to one of several procedure calls depending on the caller's criteria — by submission ID, by claim ID, by policy number, or in a retention-date cleanup mode (submission_select,submission_claim_select,submission_policy_select,submission_cleanup_select,Incomplete_Submission_select); none of these five call sites are individually catalogued asSQL-*documents in this run.* - Delegate worker lookup and claim submission to the operations documented separately: see Worker lookup via API and Claim submission via API, both of which are invoked from methods on this same class.
Process flow¶
flowchart TD
Start([Caller manages an<br>Online 801 submission]) --> Mode{Create, update,<br>delete, or retrieve?}
Mode -->|Create| Seq[Reserve SubmissionID;<br>default status, language, policy number]
Seq --> Insert[Insert CL_801_SUBMISSION<br>via submission_insert]
Mode -->|Update| Update[Update row via<br>submission_update, checking LastUpdateNum]
Update --> URows{RowsAffected = 1?}
URows -->|No| UConflict([Raise UpdateError])
URows -->|Yes| UDone([Submission updated])
Mode -->|Delete| StatusCheck{Status = Submitted?}
StatusCheck -->|Yes| Blocked([Raise broken rule:<br>cannot delete submitted])
StatusCheck -->|No| Delete[Delete row via<br>submission_delete, checking LastUpdateNum]
Delete --> DRows{RowsAffected = 1?}
DRows -->|No| DConflict([Raise DeleteError])
DRows -->|Yes| DDone([Submission deleted])
Mode -->|Retrieve| SelectMode{By ID, claim,<br>policy, or cleanup?}
SelectMode --> SelectCall[Call matching<br>submission_*_select procedure]
SelectCall --> Return([Return submission object])
Insert --> Return
Failure and edge-case behavior¶
- The five retrieval call sites (
submission_select,submission_claim_select,submission_policy_select,submission_cleanup_select,Incomplete_Submission_select) are not individually catalogued asSQL-*documents; they are traced from source call sites rather than linked to numbered SQL catalog entries.* - The submitted-submission delete block (BR-CE-020) relies on the in-memory status value being current at the time of delete; a stale in-memory object could disagree with the persisted status.*
- Update and delete both apply the same optimistic-concurrency contract (BR-PROC-001, BR-PROC-002), surfacing a broken rule rather than throwing on a version mismatch.
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.vb