Skip to content

ProviderIndexerV2

ProviderIndexerV2 is the current (v2) implementation of IProviderIndexer for operation OP-DOM-04: after resolving the provider by tax ID, it excludes correspondence and expired addresses, applies the institutional filter, builds four address candidate lists (all, filtered by facility name, filtered by provider type, filtered by both), selects an ordered IProviderMatchRule set based on which address roles the biller has, and asks a ProviderMatcher for the first unique match — retrying with two-line address concatenation if the first pass finds none. It supersedes the simpler ProviderIndexer (v1) algorithm.

Purpose

  • Requires the billing provider's tax ID to resolve to a known SAIF provider, recording "Provider Tax Id not found" otherwise, matching v1's requirement (DOM-BR-020).
  • Excludes correspondence-type and expired provider addresses before matching, then applies the same institutional (NU/HO/HH) filter as v1 when the bill is institutional (DOM-BR-021, DOM-BR-026).
  • Further filters candidate addresses by provider type — Pharmacy PH, Dental DE, Hospital HO/NU/HH, Professional everything else — to build the facility-name/provider-type-filtered candidate lists (DOM-BR-027).
  • Chooses the applicable IProviderMatchRule ordering: billers with physical, payment, and facility addresses get the PaymentAndFacility/ThreeAddressNoFacilityMatches rule chain; others get the PaymentAndFacility/PhysicalAndPayment/PhysicalAndFacility/PhysicalOnly/PhysicalOnlyMatchPhysicalWithPayment chain (DOM-BR-028).
  • Retries the match with the biller's Line1+Line2 addresses concatenated when the first pass finds no unique match and any address has a Line2, and records "Provider location match not found" when neither pass succeeds (DOM-BR-029, DOM-BR-029a).

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
IndexProvidersToLocation public ResultCount IndexProvidersToLocation(long batchId, IEbillingQueryProvider queryProvider, IErrorConditionHandler errorConditionHandler, string updateUser) Indexes every non-indexed e-billing provider in the batch using the v2 rule-set matcher, tallying successes/failures into a ResultCount and rethrowing any per-provider exception with the provider id attached.

Behavioral notes

  • The private IndexProviderToLocation builds the candidate rule set through GenerateMatchRuleset and hands it to a fresh ProviderMatcher, retrying once with concatenateTwoLineBillAddresses = true before giving up and recording "Provider location match not found" (DOM-BR-029a).
  • Provider-type detection (GetProviderType) derives the type from the first e-bill patient/bill pair matching the provider, so a provider linked to multiple patients with different bill set types uses only that first match's type**.
  • Only public surface is exposed through IProviderIndexer; all rule-set construction, address filtering, and location-assignment helpers are private implementation details of this class*.

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

  • Domain/SAIF.Domain/Claims/Ebilling/Indexing/ProviderIndexerV2.cs