Skip to content

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

  1. Reserve a submission identifier. BeforeCreate issues a scalar stored-procedure call to obtain the next SubmissionID value (SQL-004).
  2. Default a new submission (BR-CE-021). BeforeCreate/AfterCreate sets the new submission's status to Incomplete, preseeds a default language, and populates PolicyNumber from the caller-supplied value.
  3. Insert the submission header. BeforeInsert binds the header fields and issues the insert through PK82538_ONLINE_801_CLAIM.submission_insert (SQL-012, CL_801_SUBMISSION).
  4. Update the submission header under version checking (BR-PROC-001). BeforeUpdate binds LastUpdateNum alongside the updated fields; the underlying procedure rejects the update unless the supplied version matches the current row (SQL-024, CL_801_SUBMISSION).
  5. If the rows-affected value is not 1: add an UpdateError broken rule (BR-CE-011).
  6. Block deletion of a submitted submission (BR-CE-020). BeforeDelete checks 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.
  7. Delete the submission header under version checking (BR-PROC-002). If the submission is not yet Submitted, BeforeDelete binds LastUpdateNum and issues the delete through PK82538_ONLINE_801_CLAIM.submission_delete (SQL-028, CL_801_SUBMISSION).
  8. If the rows-affected value is not 1: add a DeleteError broken rule (BR-CE-011).
  9. Retrieve submissions. BeforeRetrieve dispatches 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 as SQL-* documents in this run.*
  10. 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 as SQL-* 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.

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