Skip to content

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 and Update claim); 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.
  2. If the state code is not Oregon (OR): default County to '37' (BR-CE-007).
  3. If the state code is Oregon: look up the county from ZIP_MCO_COUNTY keyed by the injury address ZIP code (BR-CE-008, SQL-019, ZIP_MCO_COUNTY).
  4. 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 and Update claim.
  5. Queue a multiple-employer letter request when applicable (BR-CE-009). If ClaimStatusCode = "N" (New) and MultipleEmprFlag = "Y", insert a row into CL_MULT_EMPLOYER_LETTER_REQ keyed by the claim's SaifClaimNum (SQL-015, CL_MULT_EMPLOYER_LETTER_REQ).
  6. If the claim is not New, or MultipleEmprFlag is not 'Y': skip the letter-request insert entirely.
  7. Delegate work-release-status maintenance to the shared child-object logic described in Work release management, which runs as part of the same state-entry save.
  8. Delegate work-address maintenance to clsClaimEmployeeWorkAddress.

    Origin: clsClaimEmployeeWorkAddress is implemented in SAIF.Business.Claim, 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.

Process flow

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.*

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