PatientIndexer¶
PatientIndexer matches an e-billing patient to a WCIS claim in ClaimCenter and validates the resulting claim state, implementing operation OP-DOM-02: it validates the claim number format, calls the Guidewire ICCClaimApiService to fetch the claim, compares worker and patient birth dates, sets the e-bill's ClaimId, and checks the indexed claim for void/draft status and non-complying-employer flags. All errors are reported through the supplied IErrorConditionHandler rather than thrown, except for a wrapping exception at the batch level.
Purpose¶
- Validates that a patient's claim number is present and correctly formatted before attempting to index it, rejecting
"UNKNOWN"and any number outside the 7–8 character rule (DOM-BR-010, DOM-BR-011). - Retrieves the claim from ClaimCenter and records specific error conditions for an API failure or a missing claim, so callers can distinguish "claim service unavailable" from "claim does not exist" (DOM-BR-012, DOM-BR-013).
- Confirms the worker's and patient's birth dates match before setting the e-bill's
ClaimId, and flags void/draft claim status and non-complying-employer claims once indexed (DOM-BR-014, DOM-BR-015, DOM-BR-016).
Context¶
- Namespace:
SAIF.Domain.Claims.Ebilling.Indexing - Assembly/package:
SAIF.Domain(Domain/SAIF.Domain/SAIF.Domain.csproj, .NET Framework 4.6.2 class library)
Public members¶
| Member | Signature | Purpose |
|---|---|---|
| IndexPatientsToClaim | public static ResultCount IndexPatientsToClaim(long batchId, IEbillingQueryProvider queryProvider, IErrorConditionHandler errorConditionHandler, string updateUser, ICCClaimApiService ccclaimApiService) |
Indexes every non-indexed patient on the batch to its claim, tallying successes/failures into a ResultCount and rethrowing any per-patient exception with the patient id attached. |
| IndexPatientToClaim | public static bool IndexPatientToClaim(EbillPatient patient, IEbillingQueryProvider queryProvider, IErrorConditionHandler errorConditionHandler, string updateUser, ICCClaimApiService ccclaimApiService) |
Validates the patient's claim number, fetches the claim from ClaimCenter, confirms the birth dates match, sets ClaimId, and delegates to CheckIndexedPatientForClaimErrors for post-index validation (DOM-BR-010–DOM-BR-014). |
| CheckIndexedPatientForClaimErrors | public static bool CheckIndexedPatientForClaimErrors(EbillPatient patient, InjuryClaim claim, IErrorConditionHandler errorConditionHandler) |
Flags an indexed claim as an error when its WCD status is void, its claim state is draft, or it is a non-complying-employer claim, recording each condition independently (DOM-BR-015, DOM-BR-016). |
Behavioral notes¶
- The ClaimCenter lookup calls
ICCClaimApiService.GetClaimsynchronously viaGetAwaiter().GetResult(), so a slow or failing call blocks the indexing loop for that patient*. IndexPatientToClaimreturnsfalseon every validation failure rather than throwing, so callers must check the return value (and the error condition recorded byIErrorConditionHandler) to detect a failed match.
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/Claims/Ebilling/Indexing/PatientIndexer.cs