BillServiceIndexer¶
BillServiceIndexer resolves the rendering-provider location for each service on a bill, implementing operation OP-DOM-05: for pharmacy set-type bills it uses the NPI identity location (falling back to the organizational NPI, taking the maximum location id), and for other services it either uses the billing location directly (when the provider type is service-provider-restricted) or looks up rendering-provider locations by NPI, works-for relationship, and service date, requiring exactly one match. After indexing, it marks the e-bill status Indexed.
Purpose¶
- Selects services with a rendering NPI and an already-resolved billing provider location as the ones eligible for rendering-location indexing.
- Resolves the pharmacy rendering location by preferring the identity matching the National Provider Id type over the organizational NPI type, taking the identity with the highest location id when more than one candidate exists (DOM-BR-040).
- Resolves the non-pharmacy rendering location either directly from the billing location (for service-provider-restricted provider types) or by requiring exactly one rendering-provider location match by NPI, works-for relationship, and service date, recording a "Multiple locations found" or "not found" error otherwise (DOM-BR-041, DOM-BR-042).
- Marks the e-bill status Indexed once its services have been processed (DOM-BR-043).
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 |
|---|---|---|
| IndexBillServiceProvidersToLocation (batch) | public static ResultCount IndexBillServiceProvidersToLocation(long batchId, IEbillingQueryProvider queryProvider, IErrorConditionHandler errorConditionHandler, string updateUser) |
Indexes rendering-provider locations for every non-indexed bill in the batch, tallying successes/failures into a ResultCount, rethrowing any per-bill exception with the bill id attached, and marking each processed bill Indexed (DOM-BR-043). |
| IndexBillServiceProvidersToLocation (single bill) | public static bool IndexBillServiceProvidersToLocation(Ebill bill, IEbillingQueryProvider queryProvider, IErrorConditionHandler errorConditionHandler, string updateUser) |
Resolves the rendering-provider location for each eligible service on the bill, taking the pharmacy path for set type "PHAR" and the standard rendering-lookup path otherwise (DOM-BR-040–DOM-BR-042). |
| UpdateBillStatusToIndexed | public static void UpdateBillStatusToIndexed(Ebill bill, IEbillingQueryProvider queryProvider, string updateUser) |
Sets the bill's status to Indexed and stamps the update user/date (DOM-BR-043). |
Behavioral notes¶
IndexBillServiceProvidersToLocation (batch)callsUpdateBillStatusToIndexedfor every bill regardless of whether that bill's per-service indexing succeeded, so a bill can be marked Indexed even when one of its services recorded an error*.- Services with no rendering NPI or no resolved billing-provider location are silently skipped rather than flagged as an error*.
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/BillServiceIndexer.cs