ClaimCustomRepoService¶
Implements IClaimCustomRepoService, retrieving a claim's OnBase-facing representation by first querying Guidewire via ICCClaimApiService.GetClaimForOnBase, and — if that returns a 404 — falling back to IClaimDataApiClient.GetNonConvertedClaim for claims that have not yet been converted into Guidewire. It enriches the mapped result with ILegalService.LegalCaseExistsAndHasImageAlertsFlag to indicate whether the claim has legal information with image alerts.
Purpose¶
- Retrieves claim data for the OnBase integration by calling the Guidewire claim API service first.
- Falls back to a non-converted-claim lookup when the primary Guidewire call returns HTTP 404, distinguishing between converted and non-converted claim sources on the resulting DTO (
IsNonConvertedClaim). - Maps Guidewire and non-converted claim payloads into the common
ClaimForOnBasecontract, including worker name and secure/conflict flags. - Flags whether the claim has legal information with active image alerts via
ILegalService. - Returns a structured error
ResponseData<ClaimForOnBase>(with status code/description) when the non-converted-claim lookup throws, rather than propagating the exception.
Context¶
- Namespace:
SAIF.Services.Claims.Information - Assembly/package:
SAIF.Services(packaged inside theSAIF.SAIFCode.CoreNuGet package)
Public members¶
| Member | Signature | Purpose |
|---|---|---|
| ClaimCustomRepoService(legalService, claimApiService, gwClaimDataApiClient) | public ClaimCustomRepoService(ILegalService legalService, ICCClaimApiService claimApiService, IClaimDataApiClient gwClaimDataApiClient) |
Stores the legal service, Guidewire claim API service, and Guidewire claim data API client used to retrieve and enrich claim data. |
| GetClaimForOnBaseAsync(claimNumber) | public async Task<ResponseData<ClaimForOnBase>> GetClaimForOnBaseAsync(string claimNumber) |
Retrieves the claim from Guidewire; on success maps and returns it with a 200 status. On a 404, attempts a non-converted-claim lookup, returning a mapped 200 result, a 500 error result if the fallback call throws, or the original Guidewire error response otherwise. |
Behavioral notes¶
- The 404 fallback path wraps
GetNonConvertedClaimin a try/catch, converting any exception into aResponseData<ClaimForOnBase>withStatusCode = 500and a message that includes the original claim-number lookup failure text and the caught exception's message. MapGwClaimToOnBasesetsHasLegalInformationby callingILegalService.LegalCaseExistsAndHasImageAlertsFlag(claimData.ClaimId), whileMapNonConvertedGwClaimToOnBasedoes not set this flag (non-converted claims have no Guidewire claim ID to check against).*- Boolean flags (
IsSecureClaim,IsConflictClaim) from the Guidewire response are converted via aToBoolean()extension rather than a direct cast.
Constraints and usage notes¶
- If the Guidewire claim result is neither a data hit nor a 404, the method returns the original Guidewire error response (status code, description, and detail message) unchanged.
- Numeric fields on the non-converted-claim path (
ClaimId,PolicyNumber) default to0when the source string values fail to parse.
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/ClaimCustomRepoService.cs