---
title: ReportQueryProvider
summary: API reference for ReportQueryProvider.
status: draft
owner: SAIF.Core documentation team
last_reviewed: 2026-09-24
library: SAIF.Data
reference_type: package
---

# ReportQueryProvider

Query provider exposing 4 data-access operation(s) (`GetActiveAttendingPhysicianRecordsForClaim`, `GetActiveLegalRepRecordsForClaim`, `GetAttendingClaimsWithRelationship`, `GetLegalRepClaimsWithRelationship`) against 4 distinct table(s); see [sql/index.md](../../sql/index.md) for the full ORM operation catalog.

## Purpose
- Provides read/write access to 4 table(s) via NHibernate `IQueryable<T>`/`GetRepository<T>()` calls documented in [sql/index.md](../../sql/index.md).
- Exposes 4 public query/command method(s) consumed by higher application layers; see [database-tables.md](../../database-tables.md) for the underlying schema.

## Context
- Namespace: `SAIF.Data.Queries.Claims.Reports`
- Assembly/package: `SAIF.Data`

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| GetAttendingClaimsWithRelationship | `IEnumerable<long> GetAttendingClaimsWithRelationship(long providerLocationId, long parentProviderLocationId)` | Executes an ORM query ([SQL-218](../../sql/SQL-218-report-query-provider-get-attending-claims-with-relationship.md)) against [ATTENDING_PHYSICIAN](../../database-tables.md#attending_physician), [PROVIDER_LOCATION](../../database-tables.md#provider_location), [CL_INJURY_CLAIM](../../database-tables.md#cl_injury_claim). |
| GetLegalRepClaimsWithRelationship | `IEnumerable<long> GetLegalRepClaimsWithRelationship(long providerLocationId, long parentProviderLocationId)` | Executes an ORM query ([SQL-219](../../sql/SQL-219-report-query-provider-get-legal-rep-claims-with-relationship.md)) against [CL_CLAIM_LEGAL_REPRESENTATIVE](../../database-tables.md#cl_claim_legal_representative), [PROVIDER_LOCATION](../../database-tables.md#provider_location). |
| GetActiveAttendingPhysicianRecordsForClaim | `IEnumerable<AttendingPhysician> GetActiveAttendingPhysicianRecordsForClaim(long claimId)` | Executes an ORM query ([SQL-220](../../sql/SQL-220-report-query-provider-get-active-attending-physician-records-for-claim.md)) against [ATTENDING_PHYSICIAN](../../database-tables.md#attending_physician), [CL_INJURY_CLAIM](../../database-tables.md#cl_injury_claim). |
| GetActiveLegalRepRecordsForClaim | `IEnumerable<ClaimLegalRepresentative> GetActiveLegalRepRecordsForClaim(long claimId)` | Executes an ORM query ([SQL-221](../../sql/SQL-221-report-query-provider-get-active-legal-rep-records-for-claim.md)) against [CL_CLAIM_LEGAL_REPRESENTATIVE](../../database-tables.md#cl_claim_legal_representative). |
| ReportQueryProvider(IRepositoryFactory factory, IClaimQueryProvider claimQueryProvider, IProviderQueryProvider providerQueryProvider) | `ReportQueryProvider(IRepositoryFactory factory, IClaimQueryProvider claimQueryProvider, IProviderQueryProvider providerQueryProvider)` | Initializes a new instance, wiring the repository factory used by this provider's query methods.* |

## Behavioral notes
- Query methods build LINQ expressions over `IQueryable<T>` obtained via `Factory.GetRepository<T>()` and execute them against the underlying NHibernate session.*

## Constraints and usage notes
- Instances are constructed with an `IRepositoryFactory` and are expected to be resolved through dependency injection rather than instantiated directly.*

> **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
- `Data/SAIF.Data/Queries/Claims/Reports/ReportQueryProvider.cs`
