---
title: EAIP specialist lookup
summary: Looks up the assigned EAIP specialist for a claim period and builds the EAIP period drop-down list used during image indexing.
status: draft
owner: <owner>
last_reviewed: 2026-07-30
library: SAIF.Business.Imaging
reference_type: package
operation_id: OP-IMG-04
trigger: Caller invokes clsEAIP.BuildEAIPPeriodDropDown or clsEAIPMessages.GetEAIPSpecialist with a claim ID or claim number
---

# EAIP specialist lookup

This operation resolves EAIP period and specialist information for a claim, used to populate the EAIP period drop-down in the imaging UI and to determine which specialist user should be notified or assigned for a claim's EAIP-related documents. The expansion of the "EAIP" abbreviation is not confirmed anywhere in the traced source.**

| Field | Value |
| --- | --- |
| **Operation ID** | OP-IMG-04 |
| **Trigger** | Caller invokes `clsEAIP.BuildEAIPPeriodDropDown` with a claim ID or claim number, or `clsEAIPMessages.GetEAIPSpecialist`/`clsEAIP.GetEAIPSpecialist` with a claim ID |
| **Inputs** | Claim ID (`inClaimID`) or claim number (`inClaimNum`) |
| **Outputs** | A `Dictionary(Of String, String)` of EAIP period sequence numbers to display descriptions (drop-down), or a specialist user ID string (specialist lookup) |
| **Primary components** | `clsEAIP.BuildEAIPPeriodDropDown`, `clsEAIP.GetEAIPSpecialist`, `clsEAIPMessages.SQLGetEAIPSpecialist` |
| **Entry point** | `Business\SAIF.Business.Imaging\clsEAIP.vb` |

## Steps

1. **Caller invokes `clsEAIP.BuildEAIPPeriodDropDown`** with either a claim ID or a claim number.
2. **Query EAIP periods for the claim.** By claim ID, [SQL-013](../sql/SQL-013-saif-business-imaging.md) joins [CL_INJURY_CLAIM](../database-tables.md#cl_injury_claim), [EAIP_PERIOD](../database-tables.md#eaip_period), and [EAIP_STATUS_CODE](../database-tables.md#eaip_status_code); by claim number, [SQL-014](../sql/SQL-014-saif-business-imaging.md) performs the equivalent join filtered by `saif_claim_num`.
3. **Order and prioritize results.** Both queries assign a `status_code_order` (New=1, Active=2, Inactive=3, Closed=4) and a `begin_date_order` (the period's effective date, or `SYSDATE` if null), then sort by status priority ascending and begin-date order descending, so the drop-down presents new/active periods first.
4. **Build the dictionary.** Each result row is added to the returned dictionary keyed by `EaipPeriodSeqNum` with the formatted description (status description plus effective/expiration date range).
   - On error: an `ApplicationException` is thrown wrapping `clsEAIPMessages.ErrCodeBuildEAIPeriodDropDown` and the underlying exception message.
5. **Caller invokes `clsEAIP.GetEAIPSpecialist`** with a claim ID to resolve the assigned specialist user.
6. **Look up the specialist.** [SQL-015](../sql/SQL-015-saif-business-imaging.md) retrieves `eaip_user` from [EAIP_PERIOD](../database-tables.md#eaip_period) where `eaip_status_code` is `'A'` or `'N'`, ordered by `eaip_period_eff_date` ascending ([BR-IMG-01](../business-rules.md#br-img-01-eaip-specialist-selection-by-activenew-period-status)).
7. **Fall back when no specialist is found.** If the scalar result is empty after trimming, the result defaults to `clsMessages.EAIP_MAILID` (a shared mailbox/group identifier) instead of a specific user.*
   - On error: an `ApplicationException` is thrown wrapping `clsEAIPMessages.ErrCodeGetEAIPSpecialist` and the underlying exception message.
8. **Note on invocation path.** `clsEAIP` does not inherit from the BOF base business-object classes (its base-class inheritance is commented out in source), so the calling mechanism that triggers this lookup from the broader imaging UI/workflow was not located in this analysis pass.**

## Process flow

The following diagram visualizes the EAIP specialist lookup and period drop-down build flow.

```mermaid
flowchart TD
	Start([Caller invokes BuildEAIPPeriodDropDown<br>or GetEAIPSpecialist]) --> Which{Which entry point?}
	Which -->|Drop-down, by claim ID| QueryByID[Query EAIP periods]
	Which -->|Drop-down, by claim num| QueryByNum[Query EAIP periods]
	QueryByID --> Order[Order by status priority,<br>then begin-date descending]
	QueryByNum --> Order
	Order --> BuildDict([Return dictionary of<br>period seq num to description])
	Which -->|Specialist lookup| QuerySpecialist[Query active/new period<br>eaip_user, ordered by eff date]
	QuerySpecialist --> Found{Result found?}
	Found -->|Yes| ReturnUser([Return eaip_user])
	Found -->|No| Fallback([Return EAIP_MAILID fallback])
```

## Failure and edge-case behavior

- `BuildEAIPPeriodDropDown` and `GetEAIPSpecialist` both wrap query failures in an `ApplicationException` with an operation-specific error code, rather than allowing the underlying data-access exception to propagate directly.
- If no `EAIP_PERIOD` row has status `'A'` or `'N'` for the claim, the specialist lookup returns the `clsMessages.EAIP_MAILID` fallback rather than an empty result.*
- `clsEAIP`'s BOF base-class inheritance is commented out in source, so this class does not participate in the standard `IPortalRequest`/rule-checking lifecycle used elsewhere in this library; its methods are called directly as shared functions.

## 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. Statements marked with `**` could not be confirmed; treat
> as unknown until verified.

## Sources

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