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

# WorkerQueryProvider

Query provider exposing 3 data-access operation(s) (`GetActiveSupportOrderCount`, `GetHealthInsuranceProviderName`, `GetPreferredContactMethod`) 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 3 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`
- Assembly/package: `SAIF.Data`

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| GetWorker | `ClaimPerson GetWorker(long workerId)` | Retrieves worker.* |
| GetActiveSupportOrderCount | `long GetActiveSupportOrderCount(long workerId)` | Executes an ORM query ([SQL-237](../../sql/SQL-237-worker-query-provider-get-active-support-order-count.md)) against [CL_CLAIM_SUPPORT_ORDER](../../database-tables.md#cl_claim_support_order), [CL_CLAIM_PERSON](../../database-tables.md#cl_claim_person). |
| GetClaimCount | `int GetClaimCount(long workerId)` | Retrieves claim count.* |
| GetPreferredContactMethod | `string GetPreferredContactMethod(PreferredContactMethodCode code)` | Executes an ORM query ([SQL-238](../../sql/SQL-238-worker-query-provider-get-preferred-contact-method.md)) against [cl_pref_contact_method_code](../../database-tables.md#cl_pref_contact_method_code). |
| GetHealthInsuranceProviderName | `string GetHealthInsuranceProviderName(string claimNumber)` | Executes an ORM query ([SQL-239](../../sql/SQL-239-worker-query-provider-get-health-insurance-provider-name.md)) against [CL_INJURY_CLAIM](../../database-tables.md#cl_injury_claim). |
| GetWorkerAge | `string GetWorkerAge(DateTime? dob)` | Retrieves worker age.* |
| WorkerQueryProvider(IRepositoryFactory factory, IOverpaymentQueryProvider overpaymentQueryProvider, ICCClaimApiService claimApiService) | `WorkerQueryProvider(IRepositoryFactory factory, IOverpaymentQueryProvider overpaymentQueryProvider, ICCClaimApiService claimApiService)` | 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/WorkerQueryProvider.cs`
