---
title: 801 submission data CRUD
summary: Creates, updates, deletes, and retrieves Online 801 submission detail rows, including prefill of claim and worker data onto the submission's contact objects.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-07-30
library: SAIF.Business.Claim.Entry
reference_type: package
operation_id: OP-CE-13
trigger: cls801SubmissionData CRUD lifecycle and LoadFromClaim / LoadClaimWorker prefill
---

# 801 submission data CRUD

`cls801SubmissionData` holds the Box-field detail for an Online 801 submission — the employer, employee, physician, and other contact information required by the electronic claim form — spread across six contact child objects. This operation covers its persistence lifecycle and the prefill logic that copies known claim and worker data onto those contacts so a claims examiner does not have to re-key it.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-CE-13 |
| **Trigger** | `cls801SubmissionData` CRUD lifecycle (`BeforeCreate`, `BeforeInsert`, `BeforeUpdate`, `BeforeDelete`) and `LoadFromClaim` / `LoadClaimWorker` prefill |
| **Inputs** | `SubmissionID`, claim data, worker DTO/ID, Box-field detail for six contact objects, `LastUpdateNum` |
| **Outputs** | Persisted `CL_801_SUBMISSION_DATA` row and six contact objects |
| **Primary components** | `cls801SubmissionData.BeforeInsert`, `cls801SubmissionData.BeforeUpdate`, `cls801SubmissionData.BeforeDelete`, `cls801SubmissionData.LoadFromClaim`, `cls801SubmissionData.LoadClaimWorker` |
| **Entry point** | `Business\SAIF.Business.Claim.Entry\Online801\Submission\cls801SubmissionData.vb` |

## Steps

1. **Insert the submission detail row.** `BeforeInsert` binds the Box-field detail and the six contact objects' values, and issues the insert through `PK82538_ONLINE_801_CLAIM.submission_data_insert` ([SQL-013](../sql/SQL-013.md), [CL_801_SUBMISSION_DATA](../database-tables.md#cl_801_submission_data)).
2. **Retrieve the submission detail row.** `BeforeRetrieve` selects the detail row for a submission and fills all six contact objects from the returned columns ([SQL-018](../sql/SQL-018.md), [CL_801_SUBMISSION_DATA](../database-tables.md#cl_801_submission_data)).
3. **Update the submission detail row under version checking** ([BR-CE-011](../business-rules.md#br-ce-011-optimistic-concurrency-update-fails-if-rowsaffected-1)). `BeforeUpdate` binds `LastUpdateNum` alongside the updated detail fields ([SQL-025](../sql/SQL-025.md), [CL_801_SUBMISSION_DATA](../database-tables.md#cl_801_submission_data)).
   - If the rows-affected value is not `1`: add an `UpdateError` broken rule.
4. **Delete the submission detail row under version checking** ([BR-PROC-002](../business-rules.md#br-proc-002-deletes-only-succeed-when-the-caller-supplied-lastupdatenum-matches-the-current-row-vers)). `BeforeDelete` binds `LastUpdateNum` and issues the delete ([SQL-029](../sql/SQL-029.md), [CL_801_SUBMISSION_DATA](../database-tables.md#cl_801_submission_data)).
   - If the rows-affected value is not `1`: add a `DeleteError` broken rule.
5. **Prefill from an existing claim.** `LoadFromClaim` copies known claim-level data (e.g., policy number, employer information) onto the corresponding contact objects, reducing manual re-entry when a submission is created for an existing claim.*
6. **Prefill from a resolved worker.** `LoadClaimWorker` copies fields from the worker record resolved during [Worker lookup via API](worker-lookup-via-api.md) onto the employee contact object.

## Process flow

```mermaid
flowchart TD
	Start([Caller manages Online 801<br>submission detail]) --> Mode{Create, update,<br>delete, or retrieve?}
	Mode -->|Create/Insert| Insert[Insert CL_801_SUBMISSION_DATA<br>via submission_data_insert]
	Mode -->|Update| Update[Update row,<br>checking LastUpdateNum]
	Update --> URows{RowsAffected = 1?}
	URows -->|No| UConflict([Raise UpdateError])
	URows -->|Yes| UDone([Detail updated])
	Mode -->|Delete| Delete[Delete row,<br>checking LastUpdateNum]
	Delete --> DRows{RowsAffected = 1?}
	DRows -->|No| DConflict([Raise DeleteError])
	DRows -->|Yes| DDone([Detail deleted])
	Mode -->|Retrieve| Select[Select detail row;<br>fill six contact objects]
	Select --> Return([Return submission<br>data object])
	Insert --> Prefill{Prefill requested?}
	Prefill -->|From claim| LoadClaim[Copy claim data<br>onto contacts]
	Prefill -->|From worker| LoadWorker[Copy worker data<br>onto employee contact]
	Prefill -->|No| Return
	LoadClaim --> Return
	LoadWorker --> Return
```

## Failure and edge-case behavior

- `LoadFromClaim` and `LoadClaimWorker` overwrite contact-object fields with claim/worker data; if a claims examiner had already manually entered different values on those fields, the prefill would replace them rather than merge or warn.*
- Update and delete both enforce the same `LastUpdateNum` version check as [801 submission CRUD](801-submission-crud.md) ([BR-PROC-002](../business-rules.md#br-proc-002-deletes-only-succeed-when-the-caller-supplied-lastupdatenum-matches-the-current-row-vers)), surfacing a broken rule rather than throwing on a stale version.
- Splitting the six contact objects across a single detail row means a partial-fill failure on retrieve (e.g., an unexpected null in one contact's columns) could leave some contact objects populated and others empty rather than failing the whole retrieve atomically; no explicit atomicity guard was found in the traced source.*

## Related documentation

- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [SQL catalog](../sql/index.md)
- [Database tables](../database-tables.md)

> **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\cls801SubmissionData.vb`
