SAIF.Data overview¶
Documentation context: Packaged Component (NuGet)
SAIF.Data is the data layer of the SAIF.SAIFCode.Core NuGet package: it defines roughly 450 NHibernate-mapped entity and DTO models, 37 query providers that read them through IRepositoryFactory/NHibernate LINQ, two outbound HTTP clients to Guidewire ClaimCenter and the Medical Billing API, an Autofac registration extension for those clients, and a set of in-memory test-data seeding helpers that ship in the production assembly (saif-data-analysis.md).
Purpose¶
- Define the entity and DTO model surface consumed and persisted through NHibernate, whose ClassMaps live in the sibling
SAIF.Data.NHibernateproject rather than in this library. - Provide 37 read-oriented query providers that encapsulate LINQ queries over
Factory.GetRepository<T>().Query(), plus related claim, bill, e-bill, legal, policy, provider, and task business logic. - Provide two outbound HTTP clients —
MedicalBillingApiServiceandCCClaimApiService— to the Medical Billing API and the Guidewire ClaimCenter claim data API. - Register the data API clients, a Polly cache policy, and Microsoft.Extensions Options/MemoryCache infrastructure through its sole Autofac entry point,
ContainerBuilderExtensions.AddDataClients. - It is consumed by
SAIF.Domain,SAIF.Services,SAIF.Services.ThirdPartyClaim,SAIF.Services.WCF, andSAIF.Web.Mvc5, and it depends onSAIF.Data.Guidewirefor its HTTP client infrastructure.
Responsibilities¶
- Model claim, bill, e-bill, collections, legal, policy, provider, document, output-document, task, and RCT domain entities under
Model/**(saif-data-analysis.mdPublic surface summary). - Encapsulate read access to Oracle-backed entities through 37 query providers deriving from the external
QueryProviderBase. - Combine Oracle entity reads with Guidewire REST data for hybrid claim, MCO, and financial queries (for example
ClaimQueryProvider,LegalQueryProvider.GetClaimIdForCase). - Resolve service base URLs and secure credentials for its HTTP clients via
IEnvironmentService, and cache responses through a Polly policy. - Ship
TestRepository/**in-memory seeding builders and extensions, even though they are compiled into the production assembly.
Key components¶
ContainerBuilderExtensions.AddDataClients: the library's only public Autofac entry point, registering the Guidewire data API clients,CCClaimApiService,MedicalBillingApiService, and the cache/options infrastructure.HttpClientBase(local): shared abstract base forMedicalBillingApiService, providing lazy URL/AuthKey resolution and Polly-cached GET/POST helpers.CCClaimApiService: the Guidewire ClaimCenter claim data client, deriving fromSAIF.Data.Guidewire.Clients.HttpClientBase.- 37 query providers under
Queries/**(for exampleClaimQueryProvider,BillQueryProvider,EbillQueryProvider,ProviderQueryProvider), each with a matchingI*QueryProviderinterface. Model/**: roughly 450 entity and DTO types mapped externally bySAIF.Data.NHibernate.TestRepository/**: in-memory seeding builders and repository extensions used by test setup.
Related documentation¶
- Index
- Architecture
- Dependencies
- Configuration
- Operations and processes
- Business rules
- Security and authorization
- Database tables
- SQL catalog
- API reference
Sources¶
Data/SAIF.Data/SAIF.Data.csprojData/SAIF.Data/Configuration/ContainerBuilderExtensions.csData/SAIF.Data/Clients/HttpClientBase.csData/SAIF.Data/Clients/MedicalBillingApiService.csData/SAIF.Data/Queries/Claims/CCClaimApiService.csCore/SAIF.Core/SAIF.SAIFCode.Core.nuspec