ProviderMatcher¶
ProviderMatcher implements IProviderMatcher by evaluating an ordered list of IProviderMatchRule implementations and returning the first one that produces a unique match, implementing the rule-precedence part of operation OP-DOM-04's address matching (DOM-BR-029). Its default constructor builds a fixed four-rule fallback chain (PhysicalPaymentAndFacilityMatchRule, PhysicalAndPaymentMatchRule, PhysicalAndFacilityMatchRule, PhysicalOnlyMatchRule); ProviderIndexerV2 instead supplies its own larger rule set (per DOM-BR-028) through the second constructor.
Purpose¶
- Evaluates a set of
IProviderMatchRuleinstances in order and stops at the first one that returns a non-null uniqueProviderLocation, implementing the "first unique rule match wins" precedence rule (DOM-BR-029). - Provides a convenience constructor that builds the default four-rule fallback chain directly from e-bill and provider addresses, for callers that do not need
ProviderIndexerV2's larger, filtered rule set.
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 |
|---|---|---|
| ProviderMatcher (constructor) | public ProviderMatcher(IEnumerable<EbillAddress> ebillAddresses, IEnumerable<ProviderAddress> providerAddresses) |
Builds the default rule chain — PhysicalPaymentAndFacilityMatchRule, PhysicalAndPaymentMatchRule, PhysicalAndFacilityMatchRule, PhysicalOnlyMatchRule, in that order — from the given e-bill and provider addresses. |
| ProviderMatcher (constructor) | public ProviderMatcher(IEnumerable<IProviderMatchRule> providerMatchRules) |
Builds the matcher from a caller-supplied, already-ordered rule set, letting ProviderIndexerV2 provide its own filtered/expanded rule chain (DOM-BR-028). |
| UniqueProviderLocationMatch | public ProviderLocation UniqueProviderLocationMatch(bool concatenateTwoLineBillAddresses) |
Evaluates the configured rules in order and returns the first rule's non-null unique match, or null if none of the rules match uniquely (DOM-BR-029). |
Behavioral notes¶
- Rule evaluation stops at the first non-null match, so rule ordering directly determines which candidate location wins when more than one rule could otherwise 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/ProviderMatcher.cs