---
title: "SQL-356: Update PharmacyEligibilityReport via UpdatePharmElig"
summary: Update operation against PharmacyEligibilityReport via NHibernate ORM.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-09-24
library: SAIF.Services
reference_type: package
---

# SQL-356: Update PharmacyEligibilityReport via UpdatePharmElig

This ORM statement updates a `CL_PHARMACY_ELIGIBILITY_REPORT` row's transmission dates and eligibility status/effective-date fields for a claim, executed from `Services/SAIF.Services/Claims/PharmacyElilgbility/PharmacyEligibilityService.cs (L235)`. The SQL below is inferred from the `IRepository<PharmacyEligibilityReport>.Update` call and the `PharmacyEligibilityReport` NHibernate mapping, not literal SQL text in source.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-356 |
| **Operation type** | Update |
| **Execution method** | ORM (IRepository.Update) |
| **Database** | Oracle |
| **Schema** | [unqualified]** |
| **Command type** | N/A (ORM-generated) |
| **Business object** | `PharmacyEligibilityReport` |
| **Criteria property** | N/A — ORM |
| **Lifecycle method** | `UpdatePharmElig` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:ClaimId` | Input | long | N/A | Identifier of the PharmacyEligibilityReport being updated (`CLAIM_ID`) |
| `:UpdateDate` | Input | DateTime | N/A | New value of `UPDATE_DATE` |
| `:UpdateNumber` | Input | int | N/A | New value of `UPDATE_NUM` |
| `:UpdateUser` | Input | string | N/A | New value of `UPDATE_USER` |
| `:TransmitDate` | Input | DateTime? | N/A | New value of `TRANSMIT_DATE` |
| `:MedImpactTransmitDate` | Input | DateTime? | N/A | New value of `MEDIMPACT_TRANSMIT_DATE` |
| `:EligibilityEffectiveDate` | Input | DateTime | N/A | New value of `ELIGIBILITY_EFF_DATE` |
| `:PrevEligibilityEffectiveDate` | Input | DateTime? | N/A | New value of `PREV_ELIGIBILITY_EFF_DATE` |
| `:PrevEligibilityStatusCode` | Input | String | N/A | New value of `PREV_ELIGIBILITY_STATUS_CODE` |
| `:EligibilityStatus` | Input | PharmacyEligibilityStatusCode | N/A | New value of `ELIGIBILITY_STATUS_CODE` |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [CL_PHARMACY_ELIGIBILITY_REPORT](../database-tables.md#cl_pharmacy_eligibility_report) | UPDATE | `CLAIM_ID`, `UPDATE_DATE`, `UPDATE_NUM`, `UPDATE_USER`, `TRANSMIT_DATE`, `MEDIMPACT_TRANSMIT_DATE`, `ELIGIBILITY_EFF_DATE`, `PREV_ELIGIBILITY_EFF_DATE`, `PREV_ELIGIBILITY_STATUS_CODE`, `ELIGIBILITY_STATUS_CODE` |

## LINQ statement

Source: `Services/SAIF.Services/Claims/PharmacyElilgbility/PharmacyEligibilityService.cs:235`

```csharp
// Services/SAIF.Services/Claims/PharmacyElilgbility/PharmacyEligibilityService.cs:235
_unitOfWork.GetRepository<PharmacyEligibilityReport>().Update(firstFillClaim);
```

## 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
UPDATE CL_PHARMACY_ELIGIBILITY_REPORT
SET
  UPDATE_DATE = :UpdateDate,
  UPDATE_NUM = :UpdateNumber,
  UPDATE_USER = :UpdateUser,
  TRANSMIT_DATE = :TransmitDate,
  MEDIMPACT_TRANSMIT_DATE = :MedImpactTransmitDate,
  ELIGIBILITY_EFF_DATE = :EligibilityEffectiveDate,
  PREV_ELIGIBILITY_EFF_DATE = :PrevEligibilityEffectiveDate,
  PREV_ELIGIBILITY_STATUS_CODE = :PrevEligibilityStatusCode,
  ELIGIBILITY_STATUS_CODE = :EligibilityStatus
WHERE CLAIM_ID = :ClaimId
```

Translation notes:

- No `Version(...)` mapping, so the UPDATE has no optimistic-concurrency predicate.
- `Update(entity)` emits an explicit UPDATE of every updatable mapped column (no `DynamicUpdate()` on this map).
- `:EligibilityStatus` is the identifier of the referenced `PharmacyEligibilityStatusCode` (looked up at line 229).

## Operations and processes
- PharmacyEligibilityService.UpdatePharmElig — see [Operations and processes](../operations-processes.md)

## Sources
- `Services/SAIF.Services/Claims/PharmacyElilgbility/PharmacyEligibilityService.cs (L235)`
