801 document management¶
Each Online 801 electronic submission can have one or more supporting documents (images) attached to it. cls801Document tracks the metadata for each document — file name, document type, and the sequence number that ties it back to CL_801_DOCUMENT — while the actual document content is managed elsewhere. Document delete is present in code but not operational.
| Field | Value |
|---|---|
| Operation ID | OP-CE-11 |
| Trigger | cls801Document CRUD lifecycle (BeforeCreate, BeforeInsert, BeforeUpdate) and cls801DocumentCollection retrieval |
| Inputs | ClaimID, ImageSeqNum, FileName, DocTypeCode, LastUpdateNum |
| Outputs | Persisted CL_801_DOCUMENT row, or a retrieved/sorted document collection |
| Primary components | cls801Document.BeforeCreate, cls801Document.BeforeInsert, cls801Document.BeforeUpdate, cls801DocumentCollection |
| Entry point | Business\SAIF.Business.Claim.Entry\Online801\Submission\cls801Document.vb |
Steps¶
- Reserve a document sequence number.
BeforeCreateissues a scalar stored-procedure call to obtain the nextImageSeqNumvalue (SQL-003). - Insert the document metadata row.
BeforeInsertbindsClaimID,ImageSeqNum,FileName, andDocTypeCode, and issues the insert throughPK82538_ONLINE_801_CLAIM.document_insert(SQL-011, CL_801_DOCUMENT). - Update the document metadata row under version checking (BR-PROC-003).
BeforeUpdatebinds the caller-suppliedLastUpdateNumalongside the updated fields, and the underlying procedure call rejects the update unless the supplied version matches the current row (SQL-023, CL_801_DOCUMENT). - If the rows-affected value is not
1: add anUpdateErrorbroken rule (BR-CE-011). - Retrieve and sort documents for a claim.
cls801DocumentCollectioncallsdocument_select(ordocument_select_by_imageseqnumfor a single document) to load the document metadata rows tied to a claim, then sorts the collection for display.* - Delete is prepared but not wired.
cls801Documentprepares delete parameters, but its criteria class throwsInvalidSQLPropertyforDeleteSQL, so calling delete on a document object does not reach a workingdocument_deleteprocedure call.*
Process flow¶
flowchart TD
Start([Caller manages an<br>Online 801 document]) --> Mode{Create, update,<br>or retrieve?}
Mode -->|Create| Seq[Reserve next<br>ImageSeqNum]
Seq --> Insert[Insert CL_801_DOCUMENT<br>via document_insert]
Mode -->|Update| Update[Update row via<br>document_update, checking LastUpdateNum]
Update --> Rows{RowsAffected = 1?}
Rows -->|No| Conflict([Raise UpdateError])
Rows -->|Yes| Done([Document updated])
Mode -->|Retrieve| Select[Call document_select /<br>document_select_by_imageseqnum]
Select --> Sort[Sort document collection]
Sort --> Return([Return document<br>collection])
Insert --> Return
Failure and edge-case behavior¶
- Deleting Online 801 documents is not operational: the criteria class throws
InvalidSQLPropertyforDeleteSQL, so nodocument_deleteprocedure is wired despite delete parameters being prepared incls801Document.* document_selectanddocument_select_by_imageseqnumare not individually catalogued asSQL-*documents in this run; they are traced fromcls801DocumentCollectioncall sites rather than linked to a numbered SQL catalog entry.*- Version checking on update relies entirely on the caller supplying an accurate
LastUpdateNum(BR-PROC-003); a stale value produces the sameUpdateErrorbroken rule as a genuine concurrent edit.
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\cls801Document.vb