ClaimInformationApiService¶
Implements IClaimInformationApiService, the entry point that assembles the full set of Claim Information API response nodes (claim, worker, policy, MCO plan, attending physician, worker representative, reserves, conditions, contacts, legal, alerts, provider locations) for a given claim ID. It lazily creates and caches a single ClaimApiNodeBuilder per instance (via the private Builder(claimId) method) so repeated Build* calls for the same claim reuse the already-loaded Claim, and depends on IUnitOfWork, IUserProfileService, IPoliciesRepository, IClaimQueryProvider, IProviderInformationService, IWorkerQueryProvider, IPolicyQueryProvider, ICCClaimApiService, and IClaimDataApiClient. Its static constructor registers AutoMapper claim/worker/code-table mappings via ClaimsMappingHelper once per process.
Purpose¶
- Provides a single service surface that returns fully populated API node DTOs for each claim-information section.
- Reuses one
ClaimApiNodeBuilder/Claiminstance across calls for the same claim to avoid redundant data loads, invalidating the cache only inBuildWorkerNode. - Aggregates claim-related alert data (adjuster, claim assistant, voc coordinator, EAIP adjuster, legal image alerts) into a flat
AlertNodelist. - Returns default/empty node instances when the underlying claim has no data (
ValidClaimis false), rather than throwing.
Context¶
- Namespace:
SAIF.Services.Claims.Information.Api - Assembly/package:
SAIF.Services(packaged inside theSAIF.SAIFCode.CoreNuGet package)
Public members¶
| Member | Signature | Purpose |
|---|---|---|
| ClaimInformationApiService(...) | public ClaimInformationApiService(IUnitOfWork uow, IUserProfileService profile, IPoliciesRepository policyRepository, IClaimQueryProvider claimQueries, IProviderInformationService provider, IWorkerQueryProvider workerQueryProvider, IPolicyQueryProvider policyQueryProvider, ICCClaimApiService claimApiService, IClaimDataApiClient gwClaimDataApiClient) |
Validates required collaborators and stores them for use by all Build* methods. |
| BuildAttendingPhysicianNode(claimId) | public AttendingPhysicianNode BuildAttendingPhysicianNode(long claimId) |
Returns the attending physician's details, contact, and MCO memberships, or an empty node when the claim is invalid. |
| BuildClaimNode(claimId) | public ClaimNode BuildClaimNode(long claimId) |
Assembles the core claim node covering status, compensability, claim type, body part, region, work release/status, third-party status, vocational status, pharmacy eligibility, last payment, closures, aggravation dates, MyClaim login, and claim attributes. |
| BuildConditionsNode(claimId) | public ConditionsNode BuildConditionsNode(long claimId) |
Returns the claim's medical conditions split into accepted, denied, and deferred lists. |
| BuildContactsNode(claimId) | public ContactsNode BuildContactsNode(long claimId) |
Returns the claim's adjuster, adjuster supervisor, claim assistant, RTW adjuster, third-party adjuster, voc coordinator, and policy safety-management-consultant contacts. |
| BuildClaimAlertsNode(claimId) | public IList<AlertNode> BuildClaimAlertsNode(long claimId) |
Builds a flat alert list combining adjuster/claim-assistant/voc-coordinator/EAIP contact alerts and a legal image alert when applicable. |
| BuildLegalNode(claimId) | public LegalNode BuildLegalNode(long claimId) |
Returns the claim's open legal cases with mediation, hearing, attorney, and outside-counsel details. |
| BuildMcoPlanNode(claimId) | public McoPlanNode BuildMcoPlanNode(long claimId) |
Returns MCO eligibility date, plan/provider contact details, and status reason for the claim. |
| BuildPolicyNode(claimId) | public PolicyNode BuildPolicyNode(long claimId) |
Returns policy details, contacts, rate account, agency, group, relationship information, and standard premium for the claim's policy. |
| BuildReservesNode(claimId, sortOrder) | public ReservesNode BuildReservesNode(long claimId, string[] sortOrder = null) |
Returns reserve category details ordered per the supplied (or default) cost-category sort order. |
| BuildWorkerNode(claimId) | public WorkerNode BuildWorkerNode(long claimId) |
Resets the cached node builder, then returns the claim worker's personal data, contact, claim specifics, health insurance, and preferences. |
| BuildWorkerRepresentativeNode(claimId) | public WorkerRepresentativeNode BuildWorkerRepresentativeNode(long claimId) |
Returns the worker's legal representative details and representation history flag. |
| BuildClaimProviderLocationsNode(claimId) | public ProviderLocationsNode BuildClaimProviderLocationsNode(long claimId) |
Returns the list of provider locations paid on the claim. |
Behavioral notes¶
- The private
Builder(claimId)helper caches oneClaimApiNodeBuilderper service instance; onlyBuildWorkerNodeexplicitly clears this cache (_builder = null) before rebuilding, so callers reusing the same service instance across different claim IDs for otherBuild*methods risk stale-claim reuse.* - All
Build*methods checkbuilder.ValidClaimfirst and return a default/empty node when false, avoiding exceptions on missing claims. - The static constructor performs one-time AutoMapper configuration via
ClaimsMappingHelper, a process-wide side effect shared across all instances.
Constraints and usage notes¶
- Because the node builder is cached per claim ID only implicitly (the cache key is not the claim ID itself), callers should generally use one service instance per claim retrieval to avoid unintended reuse across different claim IDs.*
BuildClaimAlertsNodeandBuildLegalNodeboth depend onLegalNodeBuilder/ILegalQueryProviderstate, so legal-image-alert detection requires a valid legal query provider.
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¶
- Services/SAIF.Services/Claims/Information/Api/ClaimInformationApiService.cs