---
title: EAIP service period retrieval
summary: Retrieves Early Assistance and Intervention Program (EAIP) service period header data for a claim, and resolves the associated EAIP specialist contact.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-07-30
library: SAIF.Business.View.Claim
reference_type: package
operation_id: OP-VC-11
trigger: Caller reads `clsClaimData.EAIPData(periodSeqNum)`, which constructs `clsEAIPData`
---

# EAIP service period retrieval

This operation retrieves Early Assistance and Intervention Program (EAIP) service period header data for a claim — service period status and dates, the assigned EAIP user, and the policy-level EAIP/return-to-work (RTW) contact — from the EAIP integration API, and resolves the current EAIP specialist and policy RTW consultant as employee contacts.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-VC-11 |
| **Trigger** | Caller reads `clsClaimData.EAIPData(inPeriodSeqNum)`, which constructs `clsEAIPData(dataPortalInfo, claimId, periodSeqNum)` |
| **Inputs** | Claim ID; optional period sequence number |
| **Outputs** | `EAIPUser`, `ServicePeriodStatusCode`/`ServicePeriodStatus`/`ServicePeriodStatusDate`, `PolicyEAIPUser`, `RTWLoad`, `PolicyRTWMailID`; resolved `EAIPSpecialist`/`PolicyRTWConsultant` employee objects |
| **Primary components** | `clsEAIPData.New`, `clsEAIPData.BeforeRetrieve`/`AfterRetrieve`, `clsEAIPData.EAIPSpecialist` |
| **Entry point** | `Business\SAIF.Business.View.Claim\clsEAIPData.vb`, `Business\SAIF.Business.View.Claim\EaipApi\EaipHeader.vb` |

## Steps

1. **Select exactly one identifier.** The criteria clears the claim ID when a period sequence number is supplied, and clears the period sequence number otherwise, so exactly one identifier is sent to the EAIP API ([BR-008](../business-rules.md#br-008-eaip-header-retrieval-accepts-either-a-period-sequence-number-or-a-claim-id-not-both)).
2. **Build the EAIP API route.** `BeforeRetrieve` formats the route `V1/Integration/EAIPHeader/?eaipPeriodSeqNum={0}&claimId={1}` using the selected identifier.
3. **Call the EAIP API.** The framework dispatches the request and returns results deserialized as `EaipHeader`.
   - If no results are returned: `AfterRetrieve` returns the object unpopulated.
4. **Populate the header.** If the first result's `EaipUser` is non-blank, the object copies `EAIPUser`, `ServicePeriodStatusCode`, `ServicePeriodStatus`, `ServicePeriodStatusDate`, `PolicyEAIPUser`, `RTWLoad`, and `PolicyRTWMailID` from the response.
   - On failure: if `EaipUser` is blank, an error message is added (`"An Error occurred when EaipApi was called"`).
5. **Resolve the EAIP specialist contact.** Reading `EAIPSpecialist` resolves the assigned employee by mail ID; if that employee's job title does not contain "EAIP" or the employee is not active, the property falls back to the policy-level EAIP user or a pseudo-employee placeholder ([BR-009](../business-rules.md#br-009-eaip-specialist-resolution-falls-back-when-the-assigned-user-is-not-an-active-eaip-specialist)).
6. **Resolve the policy RTW consultant contact.** `PolicyRTWConsultant` follows the same resolution pattern against the policy RTW mail ID.

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
	Start([Caller reads EAIPData]) --> Select{Period sequence number supplied?}
	Select -->|Yes| ClearClaim[Clear claim ID from criteria]
	Select -->|No| ClearPeriod[Clear period sequence number from criteria]
	ClearClaim --> Route[Format EAIP header route]
	ClearPeriod --> Route
	Route --> Call[Call EAIP API]
	Call --> HasResults{Results returned?}
	HasResults -->|No| Empty([Return unpopulated object])
	HasResults -->|Yes| HasUser{EaipUser non-blank?}
	HasUser -->|No| ErrAdd([Add error message])
	HasUser -->|Yes| Populate[Populate service period fields]
	Populate --> Done([Return populated clsEAIPData])
	Done --> Specialist[Resolve EAIPSpecialist /<br>PolicyRTWConsultant on access]
```

## Failure and edge-case behavior

- Supplying neither a period sequence number nor a claim ID results in both criteria fields being cleared by the mutually-exclusive selection logic, which would resolve to an ambiguous or empty route.*
- A blank `EaipUser` in an otherwise successful API response is treated as an error rather than a valid "no EAIP assignment" state.
- Employee resolution fallback (pseudo-employee placeholder) means `EAIPSpecialist`/`PolicyRTWConsultant` always return a usable object even when no real active EAIP specialist is assigned, which can mask a missing assignment if the caller does not check the underlying job title.

## Related documentation

- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)

> **Note:** Statements marked with `*` were inferred from code structure, naming
> conventions, or contextual evidence where direct confirmation was not available
> in source artifacts.

## Sources

- `Business\SAIF.Business.View.Claim\clsEAIPData.vb`
- `Business\SAIF.Business.View.Claim\EaipApi\EaipHeader.vb`
