---
title: State insert extensions
summary: Resolves the county code for a claim's injury address and, for New-status claims with multiple employers, queues a multiple-employer letter request.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-07-30
library: SAIF.Business.Claim.Entry
reference_type: package
operation_id: OP-CE-07
trigger: clsStateClaimEntry.BeforeInsert / BeforeUpdate during Save() of a state-jurisdiction claim
---

# State insert extensions

`clsStateClaimEntry` extends the base claim-entry lifecycle with Oregon-specific behavior: resolving the county code from the injury address's ZIP code, and — for a New-status claim with more than one employer — queuing a letter request. Both extensions run as part of the same `Save()` call that persists the base claim header (see [Insert claim](insert-claim.md) and [Update claim](update-claim.md)); this operation documents only the state-specific additions layered on top of that base lifecycle.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-CE-07 |
| **Trigger** | `clsStateClaimEntry.BeforeInsert` / `BeforeUpdate`, invoked as part of `Save()` for a state-jurisdiction claim |
| **Inputs** | Injury address state code and ZIP code, `MultipleEmprFlag`, `SaifClaimNum` |
| **Outputs** | Resolved `County` value on the injury address; a conditional `CL_MULT_EMPLOYER_LETTER_REQ` row |
| **Primary components** | `clsStateClaimEntry.DetermineCountyCode`, `clsStateClaimEntry.BeforeInsert`, `clsStateClaimEntry.BeforeUpdate` |
| **Entry point** | `Business\SAIF.Business.Claim.Entry\clsStateClaimEntry.vb` |

## Steps

1. **Resolve the county code before the base insert/update executes.** `DetermineCountyCode` inspects the injury address's state code.
   - If the state code is not Oregon (`OR`): default `County` to `'37'` ([BR-CE-007](../business-rules.md#br-ce-007-non-oregon-state-defaults-county-code-to-37)).
   - If the state code is Oregon: look up the county from `ZIP_MCO_COUNTY` keyed by the injury address ZIP code ([BR-CE-008](../business-rules.md#br-ce-008-oregon-county-code-is-resolved-from-zip-via-zip_mco_county-table), [SQL-019](../sql/SQL-019.md), [ZIP_MCO_COUNTY](../database-tables.md#zip_mco_county)).
2. **Call the base insert or update.** After county resolution, the state subclass invokes the base `BeforeInsert`/`BeforeUpdate` to persist the claim header exactly as documented in [Insert claim](insert-claim.md) and [Update claim](update-claim.md).
3. **Queue a multiple-employer letter request when applicable** ([BR-CE-009](../business-rules.md#br-ce-009-multiple-employer-letter-request-is-inserted-when-claim-is-new-and-multipleemprflag-y)). If `ClaimStatusCode = "N"` (New) and `MultipleEmprFlag = "Y"`, insert a row into `CL_MULT_EMPLOYER_LETTER_REQ` keyed by the claim's `SaifClaimNum` ([SQL-015](../sql/SQL-015.md), [CL_MULT_EMPLOYER_LETTER_REQ](../database-tables.md#cl_mult_employer_letter_req)).
   - If the claim is not New, or `MultipleEmprFlag` is not `'Y'`: skip the letter-request insert entirely.
4. **Delegate work-release-status maintenance** to the shared child-object logic described in [Work release management](work-release-management.md), which runs as part of the same state-entry save.
5. **Delegate work-address maintenance** to `clsClaimEmployeeWorkAddress`.
   > **Origin**: `clsClaimEmployeeWorkAddress` is implemented in [`SAIF.Business.Claim`](../../saif-business-claim/overview.md), which has been migrated to the current documentation format. Its full CRUD lifecycle — retrieval, defaulting, address validation, and insert/update/delete — is documented as [Claim employee work address management](../../saif-business-claim/operations/claim-employee-work-address-management.md).

## Process flow

```mermaid
flowchart TD
	Start([Save called on state<br>claim entry object]) --> StateCheck{Injury address<br>state = Oregon?}
	StateCheck -->|No| Default[County = '37']
	StateCheck -->|Yes| Lookup[Resolve county from<br>ZIP_MCO_COUNTY by ZIP]
	Default --> BaseSave[Call base insert/update<br>claim header]
	Lookup --> BaseSave
	BaseSave --> LetterCheck{ClaimStatusCode = New<br>and MultipleEmprFlag = Y?}
	LetterCheck -->|Yes| Letter[Insert CL_MULT_EMPLOYER_LETTER_REQ row]
	LetterCheck -->|No| WorkRelease[Work release management]
	Letter --> WorkRelease
	WorkRelease --> WorkAddr[Claim employee work<br>address management]
	WorkAddr --> Return([Return saved<br>state claim])
```

## Failure and edge-case behavior

- If the injury address ZIP does not have a matching row in `ZIP_MCO_COUNTY`, `County` may be left unresolved or blank for an Oregon claim; no explicit fallback to `'37'` was found for that case in the traced source.*
- The multiple-employer letter request is queued unconditionally whenever the New/`MultipleEmprFlag` combination is met — there is no check for whether a letter request already exists for the claim, which could allow duplicate letter requests if the claim is saved multiple times while still New with the flag set.*
- County resolution and the letter-request insert both run inside the same `Save()` call as the base header persistence; a failure in either state-specific step is expected to be governed by the same transaction scope as the base insert/update.*

## 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\clsStateClaimEntry.vb`
