---
title: "SQL-242: ClaimBuilder.ClaimStatus"
summary: Create operation for `ClaimBuilder.ClaimStatus`
status: draft
owner: SAIF.Core documentation team
last_reviewed: 2026-09-24
library: SAIF.Data
reference_type: package
---

# SQL-242: ClaimBuilder.ClaimStatus

This statement is a create operation invoked through ORM (IRepository.Add). Executed by `ClaimBuilder.ClaimStatus`.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-242 |
| **Operation type** | Create |
| **Execution method** | ORM (IRepository.Add) |
| **Database** | Oracle* |
| **Schema** | [unqualified]** |
| **Command type** | N/A (ORM-generated) |
| **Business object** | `ClaimBuilder` |
| **Criteria property** | N/A — ORM |
| **Lifecycle method** | `ClaimStatus` |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [CL_CLAIM_STATUS_ACTIVITY](../database-tables.md#cl_claim_status_activity) | INSERT (hypothetical) | CLAIM_ID, CLAIM_STATUS_CODE, CLAIM_STATUS_ACTIVITY_SEQ_NUM, UPDATE_NUM, EFF_DATE, UPDATE_USER, UPDATE_DATE |

## LINQ statement

Source: `Data/SAIF.Data/TestRepository/RepositoryBuilders/ClaimBuilder.cs:62`.

```csharp
// Data/SAIF.Data/TestRepository/RepositoryBuilders/ClaimBuilder.cs:62
var repo = Uow.GetRepository<ClaimStatusActivity>();

// Data/SAIF.Data/TestRepository/RepositoryBuilders/ClaimBuilder.cs:65-77
var activity = new ClaimStatusActivity
{

    ClaimId = Item.Id,
    ClaimStatusCode = claimStatus,
    SubId = subId,
    EffectiveDate = effectiveDate ?? Item.InjuryDate.GetValueOrDefault().AddDays(5),
    UpdateDate = DateTime.Now,
    UpdateUser = "TEST",
    UpdateNumber = 0
};

repo.Add(activity);
```

## Sample SQL

> **Test double — no runtime SQL.** This statement executes against `TestUnitOfWork`/`TestRepository<T>` (in-memory, `List<TEntity>`-backed test doubles in `SAIF.Framework.Core`); no NHibernate session is opened and no SQL is issued at runtime. The SQL below is the hypothetical statement the same expression would produce against a real NHibernate `IUnitOfWork` using the in-repo mappings, shown to document the mapping shape only — **no database table is accessed when this code runs.**

> **Inferred SQL:** This SQL was inferred from the LINQ statement above and the NHibernate mappings. It is not concrete SQL from source code; NHibernate generates the executed statement at runtime, so aliases, column order, join syntax, and bind-parameter names may differ.

```sql
-- Inferred from LINQ (NHibernate mapping translation); not concrete SQL
INSERT INTO CL_CLAIM_STATUS_ACTIVITY (
  CLAIM_ID,
  CLAIM_STATUS_CODE,
  CLAIM_STATUS_ACTIVITY_SEQ_NUM,
  UPDATE_NUM,
  EFF_DATE,
  UPDATE_USER,
  UPDATE_DATE)
VALUES (
  :ClaimId,
  :ClaimStatusCode,
  :SubId,
  :UpdateNumber,
  :EffectiveDate,
  :UpdateUser,
  :UpdateDate)
```

Translation notes:
- Scope split: SQL-242 and SQL-259 cite the same line (62). SQL-242 documents the **INSERT** (`repo.Add(activity)`, line 77); SQL-259 documents the **Any/Max** reads at line 63.
- Composite id is assigned by the caller (`SubId` computed at line 63).

## Sources

- `Data/SAIF.Data/TestRepository/RepositoryBuilders/ClaimBuilder.cs:62`
