Claim¶
Claim is the Guidewire-facing read model of a claim (OP-DOM-18): it combines the legacy InjuryClaim entity with live data pulled on demand from ClaimCenter through IClaimDataApiClient (contacts, MCO, medical conditions, financial reserves) and ICCClaimApiService, translating Guidewire's vocabulary into the legacy shape via GuidewireToLegacyMapper and ClaimsMappingHelper. Bill.Claim, BillRegenerator, and SAIF.Services all construct Claim instances to answer questions about policy, worker, adjuster, status, reserves, and security attributes for a claim, so this type is the primary aggregation point between the legacy claim record and Guidewire ClaimCenter.
Purpose¶
- Loads Guidewire ClaimCenter data on demand — contacts (adjuster, supervisor, legal representative), MCO eligibility, medical conditions, and financial reserves — and merges it with the legacy
InjuryClaimentity so callers see one unified claim view (OP-DOM-18). - Derives claim classification flags (OD claim, preferred worker, federal/inmate/state jurisdiction, DCS full/partial) directly from claim entity fields per DOM-BR-181–DOM-BR-185.
- Builds
SecureClaimAttributesfrom the worker's conflict flag and the claim's secured flag, feeding downstream security enforcement in SAIF.Services (DOM-BR-193). - Translates Guidewire claim and MCO status codes into their legacy single-character equivalents via
GuidewireToLegacyMapper, throwing on an untranslated Guidewire status (DOM-BR-194, DOM-BR-195).
Context¶
- Namespace:
SAIF.Domain.Model.Claims - Assembly/package:
SAIF.Domain(packaged inSAIF.SAIFCode.Core)
Public members¶
| Member | Signature | Purpose |
|---|---|---|
| Claim (constructor by claim id) | public Claim(IRepositoryFactory factory, IUserProfileService profile, IClaimQueryProvider queryProvider, IWorkerQueryProvider workerQueryProvider, ICCClaimApiService claimApiService, long claimId, IClaimDataApiClient gwClaimDataApiClient) |
Loads the claim by claimId from queryProvider. |
| Claim (constructor by claim number) | public Claim(IRepositoryFactory factory, IUserProfileService profile, IClaimQueryProvider queryProvider, IWorkerQueryProvider workerQueryProvider, ICCClaimApiService claimApiService, string claimNumber, IClaimDataApiClient gwClaimDataApiClient) |
Loads the claim by parsing claimNumber into a ClaimIdentifier and resolving its numeric ID. |
| Claim (constructor from entity, no GW client) | public Claim(IRepositoryFactory factory, IUserProfileService profile, IClaimQueryProvider queryProvider, IWorkerQueryProvider workerQueryProvider, ICCClaimApiService claimApiService, InjuryClaim injuryClaim) |
Wraps an already-loaded InjuryClaim entity without configuring a Guidewire data-API client; Guidewire-backed members (ResponsibleAdjuster, MedicalConditions, etc.) will fail if invoked on an instance built this way*. |
| Claim (constructor from entity id, with GW client) | public Claim(IRepositoryFactory factory, IUserProfileService profile, IClaimQueryProvider queryProvider, IWorkerQueryProvider workerQueryProvider, ICCClaimApiService claimApiService, InjuryClaim injuryClaim, IClaimDataApiClient gwClaimDataApiClient) |
Re-loads the claim by injuryClaim.Id (rather than reusing the passed-in entity) and configures the Guidewire data-API client. |
| Mco | public ClaimModel.McoLocation Mco() |
Retrieves the claim's MCO location from Guidewire and merges the current claim-eligibility status onto it; returns null when Guidewire has no MCO data. |
| ClaimLegalRepresentative | public ClaimLegalRepresentative ClaimLegalRepresentative { get; } |
The claim's worker legal representative and their provider location, resolved from Guidewire claim contacts; an empty representative when none is on file. |
| BuildClaimIdentifier | public static ClaimIdentifier BuildClaimIdentifier(InjuryClaim claim) |
Builds a ClaimIdentifier (ID, check character, claim number) from an InjuryClaim entity. |
| BuildNavigationLink | public static NavigationLink BuildNavigationLink(InjuryClaim claim, string email) |
Builds a mailto: navigation link for the claim, using the worker's first-formatted name and the claim's full number in the subject line; returns an empty link for a null claim. |
| BuildSecurityAttributes | public static SecureClaimAttributes BuildSecurityAttributes(InjuryClaim claim) |
Builds SecureClaimAttributes from the claim's worker conflict flag and secured flag (DOM-BR-193); returns default (non-conflict, non-secure) attributes when the claim or its worker is null. |
| Data | public InjuryClaim Data { get; } |
Exposes the underlying InjuryClaim entity. |
| Identifier | public ClaimIdentifier Identifier { get; } |
The claim's identifier, built via BuildClaimIdentifier(Data). |
| Worker | public Worker Worker { get; } |
The claim's worker, wrapped as a Worker domain object built from Data.Worker. |
| GetWorker | public Worker GetWorker() |
Loads the worker fresh by Data.Worker.PersonId rather than wrapping the already-attached entity. |
| PolicyName | public string PolicyName { get; } |
The claim's policy or non-policy account name: for policy numbers below 18 it looks up a non-policy account name, otherwise the policy's name (DOM-BR-180). |
| IsOdClaim | public bool IsOdClaim { get; } |
true when the claim's occupational-disease code is "D" (DOM-BR-181). |
| IsPreferredWorker | public bool IsPreferredWorker { get; } |
true when the claim has data and its SAIF payroll sub-code is "P" (DOM-BR-182). |
| WorkStatus | public ClaimWorkStatus WorkStatus { get; } |
The claim's current work status, from IClaimQueryProvider.GetWorkStatus. |
| WorkReleaseStatus | public ClaimWorkReleaseStatus WorkReleaseStatus { get; } |
The most recent work-release entry (by release date) from the claim's work-release history, or null when there is none. |
| ResponsibleAdjuster | public IAdjuster ResponsibleAdjuster { get; } |
The claim's responsible adjuster, resolved from Guidewire claim contacts and formatted with contact info via Employee lookup when the adjuster has no direct Guidewire user ID. |
| Supervisor | public ClaimSupervisor Supervisor { get; } |
The claim's supervisor's mail ID from Guidewire claim contacts, or an empty supervisor when there is none. |
| CompensableAdjuster | public IAdjuster CompensableAdjuster { get; } |
The compensable adjuster resolved the same way as ResponsibleAdjuster, from the same Guidewire claim-contacts call. |
| VocationalAdjuster | public IAdjuster VocationalAdjuster { get; } |
The claim's vocational-responsibility adjuster, resolved from Data.VocationalResponsibility and enriched via Employee lookup; an empty adjuster when there is no vocational responsibility. |
| GetSecurityAttributes | public SecureClaimAttributes GetSecurityAttributes() |
Instance form of BuildSecurityAttributes(DataItem), returning default attributes when the claim has no data or no worker. |
| HasActiveSupportOrder | public bool HasActiveSupportOrder { get; } |
true when the claim has data and HasSupportOrderData is set. |
| IsFederalClaim | public bool IsFederalClaim { get; } |
true when the claim has data and its jurisdiction is federal. |
| IsInmateClaim | public bool IsInmateClaim { get; } |
true when the claim has data and its jurisdiction code is "2" (DOM-BR-183). |
| IsStateClaim | public bool IsStateClaim { get; } |
true when the claim has data and its jurisdiction code is "1" (DOM-BR-183). |
| OdInjuryDate | public DateTime? OdInjuryDate { get; } |
For OD claims, the earlier of the disability date and the initial treatment date; otherwise the claim's plain injury date (DOM-BR-184). |
| SettlementInformation | public SettlementInformation SettlementInformation { get; } |
The claim's CDA/DCS settlement flags and issue dates, with DCS full/partial derived from DataItem.DcsType.Code (DOM-BR-185). |
| DetailContract | public ClaimDetail DetailContract { get; } |
Maps the claim to the ClaimDetail contract via AutoMapper, setting IsOverpayment from RecoverableBalance; an empty contract when the claim has no data. |
| MedicalConditions | public IEnumerable<Condition> MedicalConditions { get; } |
The claim's medical conditions from Guidewire, excluding conditions whose type is "not properly initiated" (DOM-BR-186). |
| ClaimRequestDecisions | public IEnumerable<ClaimRequestDecision> ClaimRequestDecisions() |
The claim's request decisions, mapped to contracts and ordered by effective date; empty when the claim has no data. |
| GetGwReserves | public Reserves GetGwReserves() |
Builds the claim's reserve categories from Guidewire financial data, dropping legal/other non-chargeable expenses and merging burial into death-benefit reserves, throwing on an untranslated cost category (DOM-BR-187). |
| AttendingPhysicianName | public string AttendingPhysicianName { get; } |
The attending physician's provider business name, or empty when there is none. |
| GetAttendingPhysician | public ClaimModel.AttendingPhysician GetAttendingPhysician() |
The claim's attending physician record from IClaimQueryProvider. |
| ClaimStatusDate | public DateTime? ClaimStatusDate { get; } |
The effective date of the claim's latest status, or null when there is none. |
| FirstClosureDate | public DateTime? FirstClosureDate { get; } |
The earliest non-removed "C" (closed) status effective date in the claim's status history, or null when there is none (DOM-BR-189). |
| GetLastPayment | public DatedNumericValue GetLastPayment() |
The claim's most recent payment date and the summed TD/VocTD/SupTD amount on it (DOM-BR-188); an empty value when the claim has no data or no last payment. |
| AggravationDates | public ClaimAggravationDates AggravationDates { get; } |
The claim's aggravation-right start and end dates, from Data.AggRightStartDate/AggRightEndDate. |
| GetLatestClaimTypeActivity | public SAIF.Data.Model.Claims.ClaimTypeActivity GetLatestClaimTypeActivity() |
The claim's most recent claim-type activity entry. |
| GetLatestClaimStatusActivity | public SAIF.Core.Contracts.Claims.ClaimStatusActivity GetLatestClaimStatusActivity() |
The claim's most recent status activity, mapped to the ClaimStatusActivity contract. |
| ClaimStatusCode | public SAIF.Data.Model.Claims.CodeTables.ClaimStatusCode ClaimStatusCode() |
The claim's current status code, mapped from the latest Guidewire claim status. |
| CompensabilityStatus | public SAIF.Data.Model.Claims.CompensabilityStatusCode CompensabilityStatus() |
The claim's current compensability status. |
| GetThirdPartyCase | public ThirdPartyCase GetThirdPartyCase() |
The claim's third-party liability case, if any. |
| GetVocationalDetails | public IList<VocationalDetail> GetVocationalDetails() |
The claim's vocational-rehabilitation detail records; an empty list when the query returns none. |
| HasLegalRepresentativeHistory | public bool HasLegalRepresentativeHistory() |
true when the claim has ever had a legal-representative history entry. |
| GetMcoEligibility | public ClaimMCOEligibility GetMcoEligibility() |
The claim's MCO eligibility, mapped from Guidewire MCO data; null when Guidewire returns no MCO records. |
| GetPharmacyEligibilityReport | public SAIF.Core.Contracts.Claims.PharmacyEligibilityReport GetPharmacyEligibilityReport() |
The claim's pharmacy eligibility date and status, built directly from InjuryClaim fields. |
| MyClaimLastLogin | public DateTime? MyClaimLastLogin { get; } |
The worker's last MyClaim portal login, from IUserProfileService; null when the claim has no worker, and also null (rather than throwing) when the lookup fails with a specific "no row with the given identifier" data error (DOM-BR-190). |
| RecoverableBalance | public decimal RecoverableBalance { get; } |
The claim's recoverable overpayment balance; 0 when the claim has no data. An overpayment condition is RecoverableBalance > 0 (DOM-BR-191). |
Inherited public members¶
Members in this section are inherited from DomainBase<TItem> in SAIF.Domain. They are available on this type through inheritance (via the intermediate DomainRepositoryBase<TItem> base).
| Member | Signature | Purpose | Origin |
|---|---|---|---|
| HasData | public virtual bool HasData { get; } |
Reports whether the wrapped InjuryClaim entity is present, evaluated as !DataItem.IsNull(). |
SAIF.Domain — DomainBase<TItem> |
Behavioral notes¶
- The static constructor configures the
ClaimsMappingHelperandGuidewireToLegacyMapperAutoMapper maps once per process, so the firstClaimconstructed anywhere pays that one-time registration cost*. ResponsibleAdjuster,CompensableAdjuster, andSupervisorall independently callIClaimDataApiClient.GetGWClaimContactsrather than sharing one cached call, so reading all three for the same claim issues the same Guidewire request multiple times*.MyClaimLastLogindeliberately swallows an exception whose message contains "No row with the given identifier", treating it as a known test-environment data issue rather than a real failure (DOM-BR-190).
Constraints and usage notes¶
GetGwReservesthrows when a Guidewire reserve category cannot be translated byClaimCostCategoryCode.GetByDescription, so callers must handle claims whose Guidewire cost categories are not yet mapped.- Constructors that accept an
InjuryClaimbut noIClaimDataApiClientleave Guidewire-backed members unusable; callers needing contacts, MCO, condition, or reserve data must use a constructor that suppliesgwClaimDataApiClient*.
Note: Statements marked with
*were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.
Sources¶
Domain/SAIF.Domain/Model/Claims/Claim.csDomain/SAIF.Domain/Mappers/GuidewireToLegacyMapper.csDomain/SAIF.Domain/Model/Claims/ClaimsMappingHelper.csDomain/SAIF.Domain/DomainBase.csDomain/SAIF.Domain/DomainRepositoryBase.cs