---
title: "SQL-066: ClaimQueryProvider.GetActiveClaimsWithOutstandingReserves"
summary: Read operation for `ClaimQueryProvider.GetActiveClaimsWithOutstandingReserves`
status: draft
owner: SAIF.Core documentation team
last_reviewed: 2026-09-24
library: SAIF.Data
reference_type: package
---

# SQL-066: ClaimQueryProvider.GetActiveClaimsWithOutstandingReserves

This statement is a read operation invoked through ORM (NHibernate LINQ). Executed by `ClaimQueryProvider.GetActiveClaimsWithOutstandingReserves`.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-066 |
| **Operation type** | Read |
| **Execution method** | ORM (NHibernate LINQ) |
| **Database** | Oracle* |
| **Schema** | [unqualified]** |
| **Command type** | N/A (ORM-generated) |
| **Business object** | `ClaimQueryProvider` |
| **Criteria property** | N/A — ORM |
| **Lifecycle method** | `GetActiveClaimsWithOutstandingReserves` |


## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [CL_INJURY_CLAIM](../database-tables.md#cl_injury_claim) | SELECT | CLAIM_ID (projected); OUTSTANDING_RESERVE_FLAG, ACTIVE_CLAIM_FLAG (filter) |

## LINQ statement

Source: `Data/SAIF.Data/Queries/Claims/ClaimQueryProvider.cs:359`. The repository is a class field initialised from `Factory.GetRepository<InjuryClaim>()` at `Data/SAIF.Data/Queries/Claims/ClaimQueryProvider.cs:39`.

```csharp
return claimRepo.Where(x => x.HasOutstandingReserves && x.IsActive).Select(x => x.Id).ToList();
```

## Sample SQL

> **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
SELECT
  CIC.CLAIM_ID
FROM CL_INJURY_CLAIM CIC
WHERE CIC.OUTSTANDING_RESERVE_FLAG = 'Y'
  AND CIC.ACTIVE_CLAIM_FLAG = 'Y'
```

Translation notes:
- The projection selects only the Id, so the entity is not hydrated.
- There is no row limit, so this can return a large result set.

## Operations and processes

- [Claim status and compensability](../operations/claim-status-and-compensability.md)


## Sources
- `Data/SAIF.Data/Queries/Claims/ClaimQueryProvider.cs:359`
