Skip to content

Check claim media presence

HasMedia is the only AudioVideoService operation usable on the "disabled services" instance — the AudioVideoService(IUnitOfWork uow) reduced constructor — and is deliberately exempted from the _enableServicesFlag gate that blocks every other operation (BR-AV-19).

Field Value
Operation ID OP-AV-HAS-MEDIA
Trigger Caller invokes AudioVideoService.HasMedia(long claimId)
Inputs long claimId
Outputs bool — true if any Recording row exists for the claim
Primary components AudioVideoService.HasMedia
Entry point Application\SAIF.Application.Services.AudioVideo\Services\Utilities\AudioVideo\AudioVideoService.cs

Steps

  1. Caller invokes HasMedia(long claimId) on any AudioVideoService instance, including one constructed via the reduced (IUnitOfWork-only) constructor.
  2. Executes _uow.GetRepository<Recording>().Query().Any(x => x.ClaimID == claimId) against the Recording entity set.
  3. Returns the boolean result directly to the caller — no exception path exists in this operation.

A documented external caller ("ClaimTasksNotes/DependencyMap.cs", outside this library's scope) uses this operation's result to decide whether to show a media-list icon.*

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start([HasMedia called]) --> Query[Query Recording rows by ClaimID]
    Query --> Result([Return true/false])

Failure and edge-case behavior

  • No error branch exists; an empty result set simply yields false.
  • Available regardless of which AudioVideoService constructor was used, unlike every other operation in this library (BR-AV-19).

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

  • Application\SAIF.Application.Services.AudioVideo\Services\Utilities\AudioVideo\AudioVideoService.cs