---
title: ImageServices
summary: API reference for ImageServices.
status: draft
owner: SAIF
last_reviewed: 2026-07-24
library: SAIF.Business
reference_type: package
---

# ImageServices

`ImageServices` is a public class in `SAIF.Business` that exposes shared imaging-related service operations for claim access checks, IFN conversion, image lookup, reporting, and PDF-conversion error logging.

## Purpose
- Calls stored procedures and SQL queries used by imaging workflows to detect legal alerts, media attachments, and audit-report tracking data.
- Bridges SAIF image identifiers to `ImageInfo` records and IFN/Vignette disk-set formats.
- Applies imaging security rules for claim access and Active Directory resource access based on mail IDs and image file codes.
- Records PDF conversion failures and retrieves alert-tracking results for imaging operations.

## Context
- Namespace: `SAIF.Business`
- Assembly/package: `SAIF.Business`

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| `AlertLegalonClaim` | `Public Shared Function AlertLegalonClaim(ByVal inDataPortalInfo As IDataPortalInfo, ByVal inClaimId As Decimal) As Boolean` | Calls `pk80001_LegalNet.AlertLegalCase` and returns whether the claim should alert Legal. |
| `ClaimHasMedia` | `Public Shared Function ClaimHasMedia(ByVal inDataPortalInfo As IDataPortalInfo, ByVal inClaimId As Decimal) As Boolean` | Counts matching `recording` rows to determine whether a claim has media files. |
| `GetNewImageSeqNum` | `Public Shared Function GetNewImageSeqNum() As Decimal` | Reserves a new policy image ID through the external imaging API client. |
| `GetImageInfo` | `Public Shared Function GetImageInfo(inDPI As IDataPortalInfo, imageSeqNum As Decimal) As ImageInfo` | Returns the `ImageInfo` loaded for an image sequence number. |
| `ConvertIFNDS` | `Public Shared Function ConvertIFNDS(ByVal inIFNDS As String) As Decimal` | Converts a formatted IFN disk-set string such as `387/4` into the configured Vignette decimal value. |
| `ConvertIFNDS` | `Public Shared Function ConvertIFNDS(ByVal inIFNDS As Decimal) As String` | Converts a configured Vignette decimal disk-set value back into the formatted IFN disk-set string. |
| `GetIFNDS` | `Public Shared Function GetIFNDS(ByVal inEnv As String) As String` | Returns the IFN disk-set string associated with `PROD` or `DEV`. |
| `setImageClaimAlertSecurity` | `Public Shared Function setImageClaimAlertSecurity(ByVal inIsConflict As Boolean, ByVal inIsExposure As Boolean, ByVal inIsHealthIssue As Boolean, ByVal inIsSecure As Boolean) As String` | Chooses the imaging claim alert security code for secure or conflict claims. |
| `FullIfndsIfnid` | `Public Shared Function FullIfndsIfnid(ByVal ifnds As Decimal, ByVal ifnid As String) As String` | Formats an IFN disk-set and ID into `IFN: <diskset>-<id>` text. |
| `HasAccessToClaim` | `Public Shared Function HasAccessToClaim(ByVal inDataPortalInfo As IDataPortalInfo, ByVal inMailid As String, ByVal inClaimNum As String) As Boolean` | Evaluates whether the supplied mail ID can access the claim based on claim-security flags and cached security checks. |
| `HasADAccessToImageResource` | `Public Shared Function HasADAccessToImageResource(ByVal inImageFileCode As String, ByVal inMailid As String) As Boolean` | Validates whether a mail ID can access the image resource required for a specific image file code. |
| `HasADAccessToImageResource` | `Public Shared Function HasADAccessToImageResource(ByVal inMailid As String) As Boolean` | Validates whether a mail ID can access the general Image resource. |
| `TrackInReport` | `Public Shared Function TrackInReport(ByVal inDataPortalInfo As IDataPortalInfo, _ ByVal inPolicyNum As Decimal, _ ByVal inAuditPeriodStartDate As Date _ ) As String` | Calls `pk73101_image.Track_In_Report` and returns its return value for a policy and audit period. |
| `WhoWasAlerted` | `Public Shared Function WhoWasAlerted(ByVal inDataPortalInfo As IDataPortalInfo, _ ByVal inImageSeqNum As Decimal _ ) As String` | Calls `pk73101_image.who_was_alerted` and returns the alert-recipient text for an image. |
| `LogPDFConversionError` | `Public Shared Function LogPDFConversionError(ByVal inDataPortalInfo As IDataPortalInfo, _ ByVal inImageSeqNum As Decimal, _ ByVal inApplicationID As String, _ ByVal inErrorMsg As String _ ) As Boolean` | Inserts a row into `PDF_CONVERSION_ERROR` for a PDF conversion failure and reports whether the insert succeeded. |

## Behavioral notes
- `AlertLegalonClaim` treats only an output flag of `Y` as `True` and wraps data-access failures in an `ApplicationException` prefixed with the legal-alert error message.
- `ClaimHasMedia` returns `True` only when the media query count is at least one and wraps failures in an `ApplicationException` prefixed with the media-check error message.
- `GetNewImageSeqNum` creates an `ImagingClient` from the `imagingapiurl` configuration setting and catches imaging API exceptions without rethrowing them.
- `setImageClaimAlertSecurity` only changes the result for `inIsSecure` and `inIsConflict`; the `inIsExposure` and `inIsHealthIssue` parameters are not used by the implementation.
- `HasADAccessToImageResource` hard-codes allowed group mail IDs for `CLAIM`, `EAIP`, and `POLCY` before falling back to `clsAccountMaintProxy` resource checks.

## Constraints and usage notes
- All members are `Shared`; callers do not create or maintain `ImageServices` state.
- Data-access members require a valid `IDataPortalInfo` and the referenced stored procedures, tables, and views.
- `ConvertIFNDS` and `GetIFNDS` return `0` or `String.Empty` for unsupported values rather than throwing their own validation exception.
- `HasAccessToClaim` assumes the input claim number is already valid and does not implement the `TODO` exception path noted in the source.

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