---
title: Claim search via API
summary: Searches CCClaimDataApi for Online 801 claims matching policy number, name, SSN, claim number, status, and date-range criteria.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-07-30
library: SAIF.Business.Claim.Entry
reference_type: package
operation_id: OP-CE-16
trigger: clsClaimSearchResultCollection.GetResults, delegating to clsClaimSearchApi
---

# Claim search via API

Claims examiners and submitters need to find existing Online 801 claims before starting a new submission, to avoid duplicate entry. This operation builds a search request from the caller's criteria, requires a policy number to scope the search, posts the request to CCClaimDataApi, and translates the raw response into display-friendly claim search results.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-CE-16 |
| **Trigger** | `clsClaimSearchResultCollection.GetResults`, called when a caller searches for existing Online 801 claims |
| **Inputs** | `PolicyNum`, name, SSN, claim number, status flags, injury-date range |
| **Outputs** | Sorted `clsClaimSearchResult` collection with display-translated claim number and status |
| **Primary components** | `clsClaimSearchResultCollection.GetResults`, `clsClaimSearchApi`, `CCClaimDataApiClaimSearchCriteria` |
| **Entry point** | `Business\SAIF.Business.Claim.Entry\Online801\Search\clsClaimSearchResult.vb` |

## Steps

1. **Validate that a policy number was supplied** ([BR-CE-024](../business-rules.md#br-ce-024-claim-search-requires-a-policy-number-greater-than-zero)). `GetResults` requires `PolicyNum` to be greater than zero before proceeding; a request without a valid policy number is rejected before the API call is made.
   - If `PolicyNum` is not greater than zero: return without calling the API, or raise a broken rule (per the caller's validation contract).*
2. **Build the search criteria payload.** `CCClaimDataApiClaimSearchCriteria` maps the caller's name, SSN, claim number, status flags, and date-range fields into the DTO shape expected by the CCClaimDataApi claim-search endpoint.
3. **Call the CCClaimDataApi claim-search endpoint.**
   - Sub-step: `clsClaimSearchApi` issues the REST call and deserializes the response into a collection of raw claim-search result records.
4. **Translate raw result codes for display.** Each returned claim number and status code is translated into a display format expected by the UI/consuming caller, using code-table lookups from `mdlCodeTables`.*
5. **Sort the resulting collection** — by relevance or a caller-specified field — before returning it.
6. **Return the sorted, display-translated collection** to the caller.

## Process flow

```mermaid
flowchart TD
	Start([Caller searches for<br>Online 801 claims]) --> PolicyCheck{PolicyNum > 0?}
	PolicyCheck -->|No| Reject([Reject search;<br>no API call made])
	PolicyCheck -->|Yes| Build[Build search criteria<br>payload]
	Build --> Call[Call CCClaimDataApi<br>claim-search endpoint]
	Call --> Translate[Translate claim number<br>and status codes for display]
	Translate --> Sort[Sort result collection]
	Sort --> Return([Return search results])
```

## Failure and edge-case behavior

- The policy-number requirement ([BR-CE-024](../business-rules.md#br-ce-024-claim-search-requires-a-policy-number-greater-than-zero)) means a search cannot be scoped by name/SSN/date alone; every search must be anchored to a policy.
- This operation makes an outbound REST call with no local database read or write of its own; failures in the REST call itself (timeouts, non-success status codes, empty result payloads) were not shown to have explicit handling in the traced source.*
- Code-table translation for claim number/status display depends on `mdlCodeTables` staying in sync with the values CCClaimDataApi actually returns; a code without a matching translation entry could display as blank or raw.*

## 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.

## Sources

- `Business\SAIF.Business.Claim.Entry\Online801\Search\clsClaimSearchResult.vb`
- `Business\SAIF.Business.Claim.Entry\Online801\Search\clsClaimSearchCriteria.vb`
- `Business\SAIF.Business.Claim.Entry\Online801\Search\CCClaimDataApi\clsClaimSearchApi.vb`
- `Business\SAIF.Business.Claim.Entry\Online801\Search\CCClaimDataApi\CCClaimDataApiClaimSearchCriteria.vb`
- `Business\SAIF.Business.Claim.Entry\Online801\mdlCodeTables.vb`
