---
title: "SQL-015: EAIP specialist lookup by claim ID"
summary: Returns the EAIP_USER assigned to a claim by querying active or new EAIP period records ordered by effective date.
status: draft
owner: <owner>
last_reviewed: 2026-07-24
library: SAIF.Business.Imaging
reference_type: package
---

# SQL-015: EAIP specialist lookup by claim ID

This statement retrieves the `eaip_user` from `EAIP_PERIOD` for a given claim ID, restricted to rows where `eaip_status_code` is `'A'` (active) or `'N'` (new), ordered by `eaip_period_eff_date` ascending. It enforces the business rule that the EAIP specialist is determined by active/new period records. Called from `clsEAIPMessages.GetEAIPSpecialist`.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-015 |
| **Operation type** | Read |
| **Execution method** | Inline SQL |
| **Database** | Oracle |
| **Schema** | [unqualified]** |
| **Command type** | Text |
| **Business object** | `clsEAIPMessages` |
| **Criteria property** | `SQLGetEAIPSpecialist` |
| **Lifecycle method** | `GetEAIPSpecialist` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:inClaimID` | Input | [not specified]** | N/A | The claim ID for which to retrieve the assigned specialist. |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [EAIP_PERIOD](../database-tables.md#eaip_period) | SELECT | CLAIM_ID, EAIP_STATUS_CODE, EAIP_PERIOD_EFF_DATE, EAIP_USER |

## Sample SQL

```sql
select eaip_user
from eaip_period
where claim_id = :inClaimID
  and (eaip_status_code = 'A' OR eaip_status_code = 'N')
order by eaip_period_eff_date
```

## Operations and processes
- [EAIP specialist lookup](../operations/eaip-specialist-lookup.md)

## Business rules
- [BR-IMG-01: EAIP specialist selection by active/new period status](../business-rules.md#br-img-01-eaip-specialist-selection-by-activenew-period-status)

> **Note:** Statements marked with `**` could not be confirmed; treat as unknown until verified.

## Sources
- `Business\SAIF.Business.Imaging\clsEAIP.vb`
