---
title: Create new claim
summary: Generates a new CLAIM_ID from an Oracle sequence and initializes all claim-entry defaults before the caller populates the claim.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-07-30
library: SAIF.Business.Claim.Entry
reference_type: package
operation_id: OP-CE-01
trigger: Data-portal create pipeline invoked when a caller requests a brand-new claim object
---

# Create new claim

Before a caller can populate and save a new claim, `clsClaimEntry` must obtain a unique claim identifier and seed every field with a known default so that later validation and save logic can rely on a fully initialized object. This operation is the data-portal `Create` lifecycle for the claim-entry aggregate.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-CE-01 |
| **Trigger** | Caller invokes the data-portal create pipeline for `clsClaimEntry` (or a state/inmate/federal subclass) |
| **Inputs** | Acting worker ID (`MyCriteria.WorkerID`), jurisdiction code |
| **Outputs** | A new in-memory claim object with a reserved `ClaimID`, default status/coverage/flag values, and an empty injury address |
| **Primary components** | `clsClaimEntry.BeforeCreate`, `clsClaimEntry.AfterCreate`, `clsStateClaimEntry.AfterCreate` |
| **Entry point** | `Business\SAIF.Business.Claim.Entry\clsClaimEntry.vb` |

## Steps

1. **Reserve a claim identifier.** `BeforeCreate` builds a scalar data-portal request and assigns `MyCriteria.CreateSQL`, which executes `SELECT CLAIM_ID_SEQ.NEXTVAL FROM DUAL` ([SQL-001](../sql/SQL-001.md), [DUAL](../database-tables.md#dual)).
2. **Store the generated identifier.** `AfterCreate` reads the scalar result and assigns it to both the object's `ClaimID` and the criteria's `ClaimID`.
3. **Initialize the injury address.** `SetUpInjuryAddress()` builds the address child object; address formatting is temporarily disabled while default values are seeded, then re-enabled.
4. **Seed claim-header defaults**, including:
   - `AgeDoiYears = 0`, `ClaimStatusCode = "I"` (Incomplete), `ClaimTypeCode = "0"`, `CoverageCode = "A"`, `InjOccupationalDiseaseCode = "I"`, `HighSeasFlag = "N"`, `TinAuthorizedUseFlag = "N"`, `McoID = "  "` (two spaces).
   - Audit/update fields default to the current create context.
   - `WorkerID = MyCriteria.WorkerID`, copying the acting worker onto the new claim.
5. **Clear nullable smart-string fields** so the object does not carry stale defaults from the object pool.
6. **Create an empty claim-employee work-address object** via `clsClaimEmployeeWorkAddress.EmptyAddress(...)`.
   > **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 is documented as [Claim employee work address management](../../saif-business-claim/operations/claim-employee-work-address-management.md); only the empty-address shell is created here.
7. **Assign a state-specific jurisdiction (state subclass only).** `clsStateClaimEntry.AfterCreate` calls the base `AfterCreate` (steps 1–6) first, then sets `m_JurisdictionCode` from `JurisdictionMap(Jurisdictions.State).Code`.
8. **Return the initialized object** to the data-portal caller, ready for the caller to populate and save (see [Insert claim](insert-claim.md)).

## Process flow

```mermaid
flowchart TD
	Start([Caller requests new claim]) --> Reserve[Reserve CLAIM_ID from<br>CLAIM_ID_SEQ sequence]
	Reserve --> Store[Store ClaimID on<br>object and criteria]
	Store --> Address[Initialize empty<br>injury address]
	Address --> Defaults[Seed status, coverage,<br>flag, and audit defaults]
	Defaults --> WorkAddr[Create empty claim<br>employee work address]
	WorkAddr --> StateCheck{State subclass?}
	StateCheck -->|Yes| Jurisdiction[Set jurisdiction code<br>to State]
	StateCheck -->|No| Return([Return initialized<br>claim object])
	Jurisdiction --> Return
```

## Failure and edge-case behavior

- `NumberClaim`'s optional `inClaimNumber` argument is declared but never read; claim numbering is a separate step performed by the caller after creation (see [Number claim / manual claim validation](number-claim.md)).*
- Because `AddBusinessRules()` is empty in `clsClaimEntry` and every rule body in `clsClaimEntryBusinessRules.vb` is commented out, no BOF business rules are actively registered against the freshly created object; validation for this object relies on the shared cross-object helpers documented on [Insert claim](insert-claim.md) and [Update claim](update-claim.md).*
- If the sequence call fails or returns no scalar result, the object is left without a valid `ClaimID`, which would cause the subsequent insert to fail its primary-key binding; no explicit guard is present in `AfterCreate`.*

## 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\clsClaimEntry.vb`
- `Business\SAIF.Business.Claim.Entry\clsStateClaimEntry.vb`
