Check whether a claim has recorded media¶
This operation answers whether any Recording row exists for a given claim. It is the only operation available on an AudioVideoService instance constructed via the minimal AudioVideoService(IUnitOfWork uow) constructor.
| Field | Value |
|---|---|
| Operation ID | OP-AV-05 |
| Trigger | External caller invokes IAudioVideoService.HasMedia(long claimId). |
| Inputs | long claimId |
| Outputs | bool — whether at least one Recording row exists for the claim. |
| Primary components | AudioVideoService.HasMedia |
| Entry point | Application\SAIF.Application.Services.AudioVideo\Services\Utilities\AudioVideo\AudioVideoService.cs |
Steps¶
- No guard — this is the only method not gated by
_enableServicesFlag, so it works even whenAudioVideoServiceis constructed via the degradedAudioVideoService(IUnitOfWork uow)constructor. - Query
_uow.GetRepository<Recording>().Query().Any(x => x.ClaimID == claimId)against theRECORDINGtable and return the boolean result.
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start([HasMedia invoked]) --> Query[Query RECORDING for ClaimID]
Query --> Return([Return bool])
Failure and edge-case behavior¶
- No exceptions are thrown for a claim with no recordings — the query simply returns
false. - Available even when the service is constructed in degraded mode, unlike every other operation on this service.
Related documentation¶
Sources¶
Application\SAIF.Application.Services.AudioVideo\Services\Utilities\AudioVideo\AudioVideoService.cs