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 | 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, BR-IMG-03, BR-IMG-04, BR-IMG-05 | IMAGE, IMGSYS, IMAGE_EAIP, IMAGE_AGENCY, IMAGE_GROUP | SQL-002, SQL-010, SQL-028, SQL-029, SQL-036 |
| Image affiliation | 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 | SQL-001, SQL-004, SQL-017, SQL-018, SQL-033, SQL-039 |
| External view update tracking | 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 | SQL-006, SQL-027, SQL-035 |
| EAIP specialist lookup | 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 | CL_INJURY_CLAIM, EAIP_PERIOD, EAIP_STATUS_CODE | SQL-013, SQL-014, SQL-015 |
| Image collection retrieval | 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, IMGSYS, IMAGE_CATEGORY_CODE, IMAGE_DOCUMENT_TYPE_CODE, PDF_CACHE | SQL-021, SQL-016 |
| Code table management | 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, IMAGE_DOCUMENT_NAME_CODE, IMAGE_DOCUMENT_TYPE_CODE, IMAGE_FILE_CODE | SQL-005, SQL-019, SQL-023, SQL-025 |
| Imaging system management | 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 | IMGSYS | SQL-003, SQL-012, SQL-030, SQL-031, SQL-032, SQL-038, SQL-044 |
Process flow diagram¶
The following diagram visualizes the image indexing operational flow, the library's primary create path.
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 | SQL-002, SQL-010, SQL-007, SQL-008, SQL-009, SQL-028, SQL-029, SQL-036 | IMAGE, IMAGE_EAIP, IMAGE_AGENCY, IMAGE_GROUP, IMAGE_DOCUMENT_TYPE_CODE | Read/Write |
| Image affiliation | SQL-001, SQL-004, SQL-017, SQL-018, SQL-033, SQL-039 | IMAGE_AFFILIATION | Read/Write |
| External view update tracking | SQL-006, SQL-027, SQL-035 | IMAGE_FILE_EXT_VIEW_UPDATE | Read/Write |
| EAIP specialist lookup | SQL-013, SQL-014, SQL-015 | CL_INJURY_CLAIM, EAIP_PERIOD, EAIP_STATUS_CODE | Read |
| Image collection retrieval | SQL-021, SQL-016 | IMAGE, IMGSYS, IMAGE_CATEGORY_CODE, IMAGE_DOCUMENT_TYPE_CODE | Read |
| Code table management | SQL-005, SQL-019, SQL-020, SQL-022, SQL-023, SQL-024, SQL-025, SQL-026, SQL-034, SQL-040 | IMAGE_CATEGORY_CODE, IMAGE_DOCUMENT_NAME_CODE, IMAGE_DOCUMENT_TYPE_CODE, IMAGE_FILE_CODE | Read/Write |
| Imaging system management | SQL-003, SQL-012, SQL-030, SQL-031, SQL-032, SQL-038, SQL-044 | IMGSYS | Read/Write |
Failure and edge-case behavior¶
AfterInsert/AfterUpdatemethods onclsImageDocumentNameCode,clsImageFileExternalViewUpdate,clsImgsys, andclsIndexBatchenforce exactly-one-row-affected checks and raise error messages on failure.clsImageIdx.AfterInsertrequires exactly one IMAGE row; each secondary insert request (EAIP, agency, group) is also individually checked. See Image indexing.clsImageFileExternalViewUpdate.BeforeUpdateusesUPDATE_NUMfor optimistic concurrency; concurrent updates by different sessions will fail. See External view update tracking.clsImageIdx.DeleteSQLexists butclsImageIdxdoes not implement a liveBeforeDelete/AfterDeletepair, so direct deletion of IMAGE rows through this class is not functional in current code.**clsImageDocumentNameCode.UpdateSQLandDeleteSQLend with bare WHERE clauses unless separately assigned, suggesting those paths are incomplete or dead code.** See Code table management.clsIndexBatchCollection.BeforeRetrieveexcludes batches with BATIDAUTOIMPORTorFAXIMPORT(BR-IMG-06).- Image collection retrieval caps results at 300 rows regardless of match count.* See Image collection retrieval.
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
- Overview
- Architecture
- Dependencies
- Business rules
- Database tables
- SQL catalog
- API reference
- Configuration
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.vbBusiness\SAIF.Business.Imaging\clsImageAffiliation.vbBusiness\SAIF.Business.Imaging\clsImageAffiliationCollection.vbBusiness\SAIF.Business.Imaging\clsImageCollection.vbBusiness\SAIF.Business.Imaging\clsImageDocumentNameCode.vbBusiness\SAIF.Business.Imaging\clsImageFileExternalViewUpdate.vbBusiness\SAIF.Business.Imaging\clsImageIdx.vbBusiness\SAIF.Business.Imaging\clsImageMsgConst.vbBusiness\SAIF.Business.Imaging\clsImgsys.vbBusiness\SAIF.Business.Imaging\clsIndexBatch.vbBusiness\SAIF.Business.Imaging\clsIndexBatchCollection.vbBusiness\SAIF.Business.Imaging\clsEAIP.vbBusiness\SAIF.Business.Imaging\clsExternalImageInfo.vb