---
title: Imaging lookup and alert support
summary: Resolves image identifiers, authorization state, alert workflows, and PDF-conversion error logging for imaging-related callers.
status: draft
owner: SAIF
last_reviewed: 2026-07-30
library: SAIF.Business
reference_type: package
operation_id: OP-SB-09
trigger: Caller requests image metadata, access checks, alert state, or imaging-side audit support.
---

# Imaging lookup and alert support

This operation combines the image lookup logic in `ImageInfo` with the security, alerting, and error-logging helpers in `ImageServices`. The library resolves image identifiers from several key types, derives access flags, and delegates alert workflows to Oracle packages.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-SB-09 |
| **Trigger** | Caller invokes image lookup, access, alert, tracking, or PDF-error helpers. |
| **Inputs** | Image sequence, IFN/IFNDS, tower ID, claim ID or claim number, image file code, mail ID, report metadata, PDF conversion error details |
| **Outputs** | `ImageInfo`, booleans, alert-recipient text, or insert success |
| **Primary components** | `ImageServices.GetImageInfo`, `ImageServices.AlertLegalonClaim`, `ImageServices.HasAccessToClaim`, `ImageServices.TrackInReport`, `ImageServices.WhoWasAlerted`, `ImageServices.LogPDFConversionError`, `ImageInfo.New` |
| **Entry point** | `Business\SAIF.Business\ImageServices.vb` |

## Steps

1. Image lookup starts from whichever identifier the caller has—image sequence, IFN, IFNDS, or tower ID—and uses the image lookup SQL family to resolve the matching `IMAGE` or `IMGSYS` row ([SQL-037](../sql/SQL-037-image-ifn-lookup-family.md), [IMAGE](../database-tables.md#image-imgsys), [IMGSYS](../database-tables.md#image-imgsys)).
2. `ImageInfo` hydrates sequence numbers, IFN forms, tower data, storage path fields, and file-extension metadata so later callers can request file location or format details from the same object ([SQL-037](../sql/SQL-037-image-ifn-lookup-family.md), [IMAGE](../database-tables.md#image-imgsys), [IMGSYS](../database-tables.md#image-imgsys)).
3. Claim-image alert checks call `pk80001_legalnet.alertlegalcase`, which returns `True` only when at least one legal case on the claim is flagged for image alerts ([SQL-038](../sql/SQL-038-imaging-helper-sql-procedure-family.md), [PROC-RULE-004](../business-rules.md#proc-rule-004-claim-image-alerting-is-enabled-only-when-at-least-one-flagged-legal-case-exists-for-the-claim)).
4. Claim-media and image-resource access helpers combine resource-code checks with claim-security flags to decide whether the requesting user may see the image for the claim.
5. `TrackInReport` forwards the image/report tuple to `pk73101_image.track_in_report`, which marks the image as included in downstream report output ([SQL-038](../sql/SQL-038-imaging-helper-sql-procedure-family.md)).
6. `WhoWasAlerted` calls `pk73101_image.who_was_alerted` and returns the comma-separated user summary produced by the procedure ([SQL-038](../sql/SQL-038-imaging-helper-sql-procedure-family.md), [PROC-RULE-001](../business-rules.md#proc-rule-001-alert-recipients-are-concatenated-only-while-the-output-buffer-remains-under-4000-characters), [PROC-RULE-002](../business-rules.md#proc-rule-002-missing-alert-tasks-produce-an-explicit-not-found-message), [PROC-RULE-003](../business-rules.md#proc-rule-003-the-result-message-uses-singular-or-plural-grammar-based-on-alert-count)).
7. PDF conversion failures are written to `PDF_CONVERSION_ERROR`, including the image identifiers, conversion context, and failure message supplied by the caller ([SQL-003](../sql/SQL-003-insert-into-pdf-conversion-error-values-pdf-conversion-error-seq-nextval.md), [PDF_CONVERSION_ERROR](../database-tables.md#pdf-conversion-error)).

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
    Start([Imaging request]) --> Kind{Lookup, access, alert, or log?}
    Kind -->|Lookup| Lookup[Resolve IMAGE or IMGSYS row]
    Kind -->|Access| Access[Evaluate claim and resource access]
    Kind -->|Alert| Alert[Call legalnet or image alert package]
    Kind -->|Log| Log[Insert PDF conversion error]
    Lookup --> Return1([Return image metadata])
    Access --> Return2([Return boolean])
    Alert --> Return3([Return alert state or message])
    Log --> Return4([Return insert result])
```

## Failure and edge-case behavior

- Image lookups return empty metadata when the supplied key cannot be matched in `IMAGE` or `IMGSYS`.
- Claim-image alerts only succeed when the underlying legal-case procedure finds at least one flagged case ([PROC-RULE-004](../business-rules.md#proc-rule-004-claim-image-alerting-is-enabled-only-when-at-least-one-flagged-legal-case-exists-for-the-claim)).
- Alert-recipient summaries can return an explicit not-found message instead of an empty list when the alert package finds no related task rows ([PROC-RULE-002](../business-rules.md#proc-rule-002-missing-alert-tasks-produce-an-explicit-not-found-message)).

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [SQL catalog](../sql/index.md)
- [Database tables](../database-tables.md)

## Sources
- `Business\SAIF.Business\ImageInfo.vb`
- `Business\SAIF.Business\ImageServices.vb`
