---
title: SAIF.Services overview
summary: High-level purpose, scope, and responsibilities for this library.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-09-24
library: SAIF.Services
reference_type: package
---

# SAIF.Services overview

> **Documentation context:** Packaged Component (NuGet)

SAIF.Services is the application/business-service layer of SAIF.Core: a .NET Framework 4.6.2 class library of 227 public types (221 classes, 5 interfaces, 1 enum), excluding generated proxy/designer classes, organized into functional areas — Claims, Legal, Policies/Certificates, Collections, Agencies, Groups, Documents, Investigations, and others — that implement the service contracts declared in `SAIF.SAIFCode.Core`, orchestrate transactions and authorization, delegate domain logic to `SAIF.Domain`, persist through `SAIF.Data`/`SAIF.Data.NHibernate`, integrate with external systems such as Guidewire ClaimCenter, OnBase imaging, a PDF merge API, CleanAddress, and email, and return DTOs (via AutoMapper) to the MVC web host and batch/console callers. (The [API reference](api/index.md) documents 236 public types, 9 more than this figure, because it additionally includes generated proxy/designer classes not counted here.) It is the largest library in this documentation run, with 227 public types, 165 database tables reached, 395 catalogued SQL/ORM operations, and 77 distinct AD authorization resources.

## Purpose
- Implement the business logic behind SAIF's claims, legal, policy/certificate, and collections workflows for the MVC web host and batch/console callers, as the concrete implementation of the service interfaces declared in `SAIF.SAIFCode.Core`.
- Orchestrate transaction boundaries, input validation, programmatic authorization, DTO mapping, and integration with external systems (Guidewire ClaimCenter, OnBase imaging, PDF merge, CleanAddress, email, xPressions batch files) on behalf of callers, while delegating domain-specific business logic to `SAIF.Domain` and persistence to `SAIF.Data`/`SAIF.Data.NHibernate`.
- Consumed directly by `Web/SAIF.Web.Mvc5` and exercised by `Tests/SAIF.Services.Tests`; shipped to package consumers inside the `SAIF.SAIFCode.Core` NuGet package.

## Responsibilities
- Implement 227 public service, validator, and helper types across Claims (86 types), Legal (28), Policies (27), Utilities (15), Collections (13), Groups (7), and smaller areas (Documents, Edi, Imaging, OnlineSupport, OutputDocuments, Rct, Agencies, Tasks, AddressVerificationService, Security, and others).
- Enforce 426 catalogued business rules (`SVC-BR-*`) covering bill lifecycle, claim authority, legal case/subpoena processing, certificate lifecycle, collections, and document/task workflows.
- Mediate all database access exclusively through the NHibernate ORM (`IUnitOfWork.GetRepository<T>()`), with zero raw SQL and zero stored-procedure calls originating in this library.
- Enforce authorization programmatically across 66 enforcement members and 77 distinct AD resource names, with no attribute-based (`[SaifAuthorize]`) checks.
- Read all configuration through `IEnvironmentService` (21 own keys plus 17 transitive keys pulled in by dependencies), with no `ConfigurationManager.AppSettings` or connection-string usage.

## Key components
- **Claims services** (`Claims/**`): bill entry/query/payment, e-billing/EDI, ICD-10 codes, claim authority, notes/tasks, RTW, security overrides, Medicare, pharmacy eligibility, and reporting.
- **Legal services** (`Legal/**`): legal bills, case costs, subpoenas, notes, and tasks for the legal division.
- **Policies/Certificates services** (`Policies/**`): policy security and association, certificate lifecycle (add/renew/resend/edit/delete), policy documents API, and DCBS Oregon business reporting.
- **Security components** (`Security/ClaimSecurityService`, `Policies/SecurityServices/PolicySecurityService`, `Policies/Certificates/CertificateSecurityService`): the cross-cutting authorization boundary documented in full in [Security and authorization](security-authorization.md).
- **Collections/misc services** (`Collections/**`, `Agencies/**`, `Groups/**`, `Documents/**`, `Imaging/**`, `Investigations/**`): collections/SOIL processing, agency/group management and imaging security, document templates and requests, fraud investigations, and address verification.

## Related documentation
- [Index](index.md)
- [Architecture](architecture.md)
- [Dependencies](dependencies.md)
- [Configuration](configuration.md)
- [Operations and processes](operations-processes.md)
- [Business rules](business-rules.md)
- [Security and authorization](security-authorization.md)
- [Database tables](database-tables.md)
- [SQL catalog](sql/index.md)
- [API reference](api/index.md)

## Sources
- `Services/SAIF.Services/SAIF.Services.csproj`
