---
title: SAIF.Business.Imaging operations and processes
summary: Business and technical operations supported by this library.
status: draft
owner: <owner>
last_reviewed: 2026-07-30
library: SAIF.Business.Imaging
reference_type: package
---

# SAIF.Business.Imaging operations and processes

This page is the operation catalog and cross-operation hub for this library. Each operation's detailed, step-by-step logic lives in its own page under `operations/`.

## Operation catalog

| Operation | Intent | Trigger | Inputs | Outputs | Rules | Tables | SQL |
| --- | --- | --- | --- | --- | --- | --- | --- |
| [Image indexing](operations/image-indexing.md) | Index a document image and its optional EAIP/agency/group sub-records | Caller populates a `clsImageIdx` instance and calls `Save()` | Image metadata, file/category/type codes, optional EAIP/agency/group context | Persisted IMAGE row with optional IMAGE_EAIP, IMAGE_AGENCY, IMAGE_GROUP rows | [BR-IMG-02](business-rules.md#br-img-02-image-index-required-fields), [BR-IMG-03](business-rules.md#br-img-03-image-document-date-cannot-be-in-the-future), [BR-IMG-04](business-rules.md#br-img-04-document-type-must-belong-to-the-selected-category-and-file-group), [BR-IMG-05](business-rules.md#br-img-05-external-view-visibility-conflicts-with-discovery-and-security-level) | [IMAGE](database-tables.md#image), [IMGSYS](database-tables.md#imgsys), [IMAGE_EAIP](database-tables.md#image_eaip), [IMAGE_AGENCY](database-tables.md#image_agency), [IMAGE_GROUP](database-tables.md#image_group) | [SQL-002](sql/SQL-002-saif-business-imaging.md), [SQL-010](sql/SQL-010-saif-business-imaging.md), [SQL-028](sql/SQL-028-saif-business-imaging.md), [SQL-029](sql/SQL-029-saif-business-imaging.md), [SQL-036](sql/SQL-036-saif-business-imaging.md) |
| [Image affiliation](operations/image-affiliation.md) | Link an image to a business entity or claim context, with full CRUD | Caller creates, retrieves, updates, or deletes a `clsImageAffiliation` (or collection) | Image sequence number, affiliation context identifier | Persisted IMAGE_AFFILIATION row | — | [IMAGE_AFFILIATION](database-tables.md#image_affiliation) | [SQL-001](sql/SQL-001-saif-business-imaging.md), [SQL-004](sql/SQL-004-saif-business-imaging.md), [SQL-017](sql/SQL-017-saif-business-imaging.md), [SQL-018](sql/SQL-018-saif-business-imaging.md), [SQL-033](sql/SQL-033-saif-business-imaging.md), [SQL-039](sql/SQL-039-saif-business-imaging.md) |
| [External view update tracking](operations/external-view-update-tracking.md) | Track when an image file's external view needs to be, or was, updated | Caller creates, retrieves, or updates a `clsImageFileExternalViewUpdate` instance | Image file code, image file key, external view date | Persisted IMAGE_FILE_EXT_VIEW_UPDATE row | — | [IMAGE_FILE_EXT_VIEW_UPDATE](database-tables.md#image_file_ext_view_update) | [SQL-006](sql/SQL-006-saif-business-imaging.md), [SQL-027](sql/SQL-027-saif-business-imaging.md), [SQL-035](sql/SQL-035-saif-business-imaging.md) |
| [EAIP specialist lookup](operations/eaip-specialist-lookup.md) | Look up the assigned EAIP specialist and build the EAIP period drop-down for a claim | Caller invokes `clsEAIP.BuildEAIPPeriodDropDown` or `GetEAIPSpecialist` | Claim ID or claim number | EAIP period dropdown data or specialist user ID | [BR-IMG-01](business-rules.md#br-img-01-eaip-specialist-selection-by-activenew-period-status) | [CL_INJURY_CLAIM](database-tables.md#cl_injury_claim), [EAIP_PERIOD](database-tables.md#eaip_period), [EAIP_STATUS_CODE](database-tables.md#eaip_status_code) | [SQL-013](sql/SQL-013-saif-business-imaging.md), [SQL-014](sql/SQL-014-saif-business-imaging.md), [SQL-015](sql/SQL-015-saif-business-imaging.md) |
| [Image collection retrieval](operations/image-collection-retrieval.md) | Retrieve a filtered, capped list of image records with joined code descriptions | Caller populates `clsImageCollection.Criteria` and retrieves, or requests external document info | Filter criteria (category, doc type, file type, claim, date ranges, EAIP period, external view code) | Collection of IMAGE rows with joined code descriptions (capped at 300); externally-viewable document metadata | — | [IMAGE](database-tables.md#image), [IMGSYS](database-tables.md#imgsys), [IMAGE_CATEGORY_CODE](database-tables.md#image_category_code), [IMAGE_DOCUMENT_TYPE_CODE](database-tables.md#image_document_type_code), [PDF_CACHE](database-tables.md#pdf_cache) | [SQL-021](sql/SQL-021-saif-business-imaging.md), [SQL-016](sql/SQL-016-saif-business-imaging.md) |
| [Code table management](operations/code-table-management.md) | Manage imaging code tables (category, document name/type, file type) | Caller creates, retrieves, updates, or deletes a code-table object | Code, description, file/category/type context | Persisted or retrieved code table rows | — | [IMAGE_CATEGORY_CODE](database-tables.md#image_category_code), [IMAGE_DOCUMENT_NAME_CODE](database-tables.md#image_document_name_code), [IMAGE_DOCUMENT_TYPE_CODE](database-tables.md#image_document_type_code), [IMAGE_FILE_CODE](database-tables.md#image_file_code) | [SQL-005](sql/SQL-005-saif-business-imaging.md), [SQL-019](sql/SQL-019-saif-business-imaging.md), [SQL-023](sql/SQL-023-saif-business-imaging.md), [SQL-025](sql/SQL-025-saif-business-imaging.md) |
| [Imaging system management](operations/imaging-system-management.md) | Manage IMGSYS records that own image TOWID references and the batch indexing worklist | Caller creates, retrieves, updates, or deletes a `clsImgsys`, `clsIndexBatch`, or `clsIndexBatchCollection` instance | IMGSYS field values (BATID, CRTRID, SLEVEL, etc.) | Persisted IMGSYS row; batch summary/list; soft-deleted batch | [BR-IMG-06](business-rules.md#br-img-06-index-batch-retrieval-excludes-automated-import-batches) | [IMGSYS](database-tables.md#imgsys) | [SQL-003](sql/SQL-003-saif-business-imaging.md), [SQL-012](sql/SQL-012-saif-business-imaging.md), [SQL-030](sql/SQL-030-saif-business-imaging.md), [SQL-031](sql/SQL-031-saif-business-imaging.md), [SQL-032](sql/SQL-032-saif-business-imaging.md), [SQL-038](sql/SQL-038-saif-business-imaging.md), [SQL-044](sql/SQL-044-saif-business-imaging.md) |

## Process flow diagram

The following diagram visualizes the image indexing operational flow, the library's primary create path.

```mermaid
flowchart TD
    Start([Start: Index image]) --> Validate[Validate required fields,<br>document date, cat/type match,<br>external-view visibility]
    Validate --> VOk{Rules pass?}
    VOk -->|No| Fail([Broken rules returned])
    VOk -->|Yes| GenSeq[BeforeCreate: generate IMAGE_SEQ_NUM]
    GenSeq --> InsertImage[BeforeInsert: INSERT IMAGE row]
    InsertImage --> RowCheck{AfterInsert:<br>exactly 1 row?}
    RowCheck -->|No| Error([Error: insert failed])
    RowCheck -->|Yes| EAIPCheck{IsEAIP<br>= True?}
    EAIPCheck -->|Yes| InsertEAIP[Insert IMAGE_EAIP]
    EAIPCheck -->|No| AgencyCheck{ImageFileCode<br>= AGNCY?}
    InsertEAIP --> AgencyCheck
    AgencyCheck -->|Yes| InsertAgency[Insert IMAGE_AGENCY]
    AgencyCheck -->|No| GroupCheck{ImageFileCode<br>= GROUP?}
    InsertAgency --> GroupCheck
    GroupCheck -->|Yes| InsertGroup[Insert IMAGE_GROUP]
    GroupCheck -->|No| Done([Done: image indexed])
    InsertGroup --> Done
```

## Database interactions

The following table maps each operation to its underlying database read/write activity. Per-step SQL and table citations live in each operation's detail page under `operations/`.

| Operation | SQL | Tables | Type |
| --- | --- | --- | --- |
| [Image indexing](operations/image-indexing.md) | [SQL-002](sql/SQL-002-saif-business-imaging.md), [SQL-010](sql/SQL-010-saif-business-imaging.md), [SQL-007](sql/SQL-007-saif-business-imaging.md), [SQL-008](sql/SQL-008-saif-business-imaging.md), [SQL-009](sql/SQL-009-saif-business-imaging.md), [SQL-028](sql/SQL-028-saif-business-imaging.md), [SQL-029](sql/SQL-029-saif-business-imaging.md), [SQL-036](sql/SQL-036-saif-business-imaging.md) | [IMAGE](database-tables.md#image), [IMAGE_EAIP](database-tables.md#image_eaip), [IMAGE_AGENCY](database-tables.md#image_agency), [IMAGE_GROUP](database-tables.md#image_group), [IMAGE_DOCUMENT_TYPE_CODE](database-tables.md#image_document_type_code) | Read/Write |
| [Image affiliation](operations/image-affiliation.md) | [SQL-001](sql/SQL-001-saif-business-imaging.md), [SQL-004](sql/SQL-004-saif-business-imaging.md), [SQL-017](sql/SQL-017-saif-business-imaging.md), [SQL-018](sql/SQL-018-saif-business-imaging.md), [SQL-033](sql/SQL-033-saif-business-imaging.md), [SQL-039](sql/SQL-039-saif-business-imaging.md) | [IMAGE_AFFILIATION](database-tables.md#image_affiliation) | Read/Write |
| [External view update tracking](operations/external-view-update-tracking.md) | [SQL-006](sql/SQL-006-saif-business-imaging.md), [SQL-027](sql/SQL-027-saif-business-imaging.md), [SQL-035](sql/SQL-035-saif-business-imaging.md) | [IMAGE_FILE_EXT_VIEW_UPDATE](database-tables.md#image_file_ext_view_update) | Read/Write |
| [EAIP specialist lookup](operations/eaip-specialist-lookup.md) | [SQL-013](sql/SQL-013-saif-business-imaging.md), [SQL-014](sql/SQL-014-saif-business-imaging.md), [SQL-015](sql/SQL-015-saif-business-imaging.md) | [CL_INJURY_CLAIM](database-tables.md#cl_injury_claim), [EAIP_PERIOD](database-tables.md#eaip_period), [EAIP_STATUS_CODE](database-tables.md#eaip_status_code) | Read |
| [Image collection retrieval](operations/image-collection-retrieval.md) | [SQL-021](sql/SQL-021-saif-business-imaging.md), [SQL-016](sql/SQL-016-saif-business-imaging.md) | [IMAGE](database-tables.md#image), [IMGSYS](database-tables.md#imgsys), [IMAGE_CATEGORY_CODE](database-tables.md#image_category_code), [IMAGE_DOCUMENT_TYPE_CODE](database-tables.md#image_document_type_code) | Read |
| [Code table management](operations/code-table-management.md) | [SQL-005](sql/SQL-005-saif-business-imaging.md), [SQL-019](sql/SQL-019-saif-business-imaging.md), [SQL-020](sql/SQL-020-saif-business-imaging.md), [SQL-022](sql/SQL-022-saif-business-imaging.md), [SQL-023](sql/SQL-023-saif-business-imaging.md), [SQL-024](sql/SQL-024-saif-business-imaging.md), [SQL-025](sql/SQL-025-saif-business-imaging.md), [SQL-026](sql/SQL-026-saif-business-imaging.md), [SQL-034](sql/SQL-034-saif-business-imaging.md), [SQL-040](sql/SQL-040-saif-business-imaging.md) | [IMAGE_CATEGORY_CODE](database-tables.md#image_category_code), [IMAGE_DOCUMENT_NAME_CODE](database-tables.md#image_document_name_code), [IMAGE_DOCUMENT_TYPE_CODE](database-tables.md#image_document_type_code), [IMAGE_FILE_CODE](database-tables.md#image_file_code) | Read/Write |
| [Imaging system management](operations/imaging-system-management.md) | [SQL-003](sql/SQL-003-saif-business-imaging.md), [SQL-012](sql/SQL-012-saif-business-imaging.md), [SQL-030](sql/SQL-030-saif-business-imaging.md), [SQL-031](sql/SQL-031-saif-business-imaging.md), [SQL-032](sql/SQL-032-saif-business-imaging.md), [SQL-038](sql/SQL-038-saif-business-imaging.md), [SQL-044](sql/SQL-044-saif-business-imaging.md) | [IMGSYS](database-tables.md#imgsys) | Read/Write |

## Failure and edge-case behavior

- `AfterInsert`/`AfterUpdate` methods on `clsImageDocumentNameCode`, `clsImageFileExternalViewUpdate`, `clsImgsys`, and `clsIndexBatch` enforce exactly-one-row-affected checks and raise error messages on failure.
- `clsImageIdx.AfterInsert` requires exactly one IMAGE row; each secondary insert request (EAIP, agency, group) is also individually checked. See [Image indexing](operations/image-indexing.md#failure-and-edge-case-behavior).
- `clsImageFileExternalViewUpdate.BeforeUpdate` uses `UPDATE_NUM` for optimistic concurrency; concurrent updates by different sessions will fail. See [External view update tracking](operations/external-view-update-tracking.md#failure-and-edge-case-behavior).
- `clsImageIdx.DeleteSQL` exists but `clsImageIdx` does not implement a live `BeforeDelete`/`AfterDelete` pair, so direct deletion of IMAGE rows through this class is not functional in current code.**
- `clsImageDocumentNameCode.UpdateSQL` and `DeleteSQL` end with bare WHERE clauses unless separately assigned, suggesting those paths are incomplete or dead code.** See [Code table management](operations/code-table-management.md#failure-and-edge-case-behavior).
- `clsIndexBatchCollection.BeforeRetrieve` excludes batches with BATID `AUTOIMPORT` or `FAXIMPORT` ([BR-IMG-06](business-rules.md#br-img-06-index-batch-retrieval-excludes-automated-import-batches)).
- Image collection retrieval caps results at 300 rows regardless of match count.* See [Image collection retrieval](operations/image-collection-retrieval.md#failure-and-edge-case-behavior).

## Inherited operations and processes

`SAIF.Business.Imaging` classes inherit from `clsBusinessBase` and `clsBusinessCollectionBase` (from `SAIF.BOF.Business`). No inherited operations or processes from these base classes can be documented here: the Legends CLI documentation index does not contain indexed content for the BOF framework base classes, so any lifecycle operations defined in the framework layer (e.g., base-class `Save`, `Delete`, validation orchestration, or portal dispatch behaviour) cannot be confirmed or enumerated from available analysis artifacts.*

## Related documentation
- [Index](index.md)
- [Overview](overview.md)
- [Architecture](architecture.md)
- [Dependencies](dependencies.md)
- [Business rules](business-rules.md)
- [Database tables](database-tables.md)
- [SQL catalog](sql/index.md)
- [API reference](api/index.md)
- [Configuration](configuration.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\clsImage.vb`
- `Business\SAIF.Business.Imaging\clsImageAffiliation.vb`
- `Business\SAIF.Business.Imaging\clsImageAffiliationCollection.vb`
- `Business\SAIF.Business.Imaging\clsImageCollection.vb`
- `Business\SAIF.Business.Imaging\clsImageDocumentNameCode.vb`
- `Business\SAIF.Business.Imaging\clsImageFileExternalViewUpdate.vb`
- `Business\SAIF.Business.Imaging\clsImageIdx.vb`
- `Business\SAIF.Business.Imaging\clsImageMsgConst.vb`
- `Business\SAIF.Business.Imaging\clsImgsys.vb`
- `Business\SAIF.Business.Imaging\clsIndexBatch.vb`
- `Business\SAIF.Business.Imaging\clsIndexBatchCollection.vb`
- `Business\SAIF.Business.Imaging\clsEAIP.vb`
- `Business\SAIF.Business.Imaging\clsExternalImageInfo.vb`
