ProviderMatchBase¶
ProviderMatchBase is the shared base class every V2 provider-matching rule (PhysicalOnlyMatchRule, PhysicalOnlyMatchPhysicalWithPayment, PhysicalAndPaymentMatchRule, PhysicalAndFacilityMatchRule, PaymentAndFacilityMatchRule, PaymentOnlyMatchRule, PhysicalPaymentAndFacilityMatchRule, ThreeAddressNoFacilityMatchesMatchRule) extends: it splits a biller's e-bill addresses into physical/payment/facility roles, exposes address-combination predicates (which addresses the biller has, and whether pairs of them textually match), and provides the static address-comparison and filtering utilities the individual rules compose to implement operation OP-DOM-04's matching logic (DOM-BR-022).
Purpose¶
- Classifies a biller's e-bill addresses into physical (
PHY), payment (PAY), and facility (FAC) roles at construction, so every derived rule works from the same address classification. - Provides the address-presence and address-equality predicates (
BillerHasOnlyPhysicalAddress,BillerHasPhysicalAndPaymentAddresses,BillerPhysicalAndPaymentAddressesMatch, and their facility/payment counterparts) that each match rule uses to decide whether its specific matching strategy applies (DOM-BR-022, DOM-BR-023). - Implements the address-comparison algorithm shared by all rules: two addresses match when Line1 and City are equal (trimmed, case-insensitive) and the zip codes match after 5-digit zero-padding, with an option to concatenate a two-line bill address before comparing (DOM-BR-022, DOM-BR-029).
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 |
|---|---|---|
| ProviderMatchBase (constructor) | public ProviderMatchBase(IEnumerable<EbillAddress> ebillAddresses, IEnumerable<ProviderAddress> providerAddresses) |
Classifies the supplied e-bill addresses into physical/payment/facility roles and stores both address collections for use by the matching predicates. |
| BillerHasPhysicalPaymentAndFacilityAddresses | public bool BillerHasPhysicalPaymentAndFacilityAddresses() |
Reports whether the biller has all three address roles present, the condition ProviderIndexerV2 uses to select the wider PaymentAndFacility/ThreeAddressNoFacilityMatches rule set (DOM-BR-028). |
| EbillAddressAndProviderAddressMatch | public static bool EbillAddressAndProviderAddressMatch(EbillAddress ebillAddress, ProviderAddress providerAddress, bool concatenateTwoLineBillAddresses) |
Reports whether an e-bill address matches a candidate provider address on Line1 (optionally concatenated with Line2), City, and zero-padded zip code (DOM-BR-022). |
| TwoEbillAddressesMatch | public static bool TwoEbillAddressesMatch(EbillAddress addressOne, EbillAddress addressTwo) |
Reports whether two e-bill addresses match on Line1, City, and zero-padded zip code, used to decide whether two of the biller's own address roles coincide. |
| GetUniqueLocation | public static ProviderLocation GetUniqueLocation(IList<ProviderAddress> matchedAddressesListOne, IList<ProviderAddress> matchedAddressesListTwo) |
Intersects two matched-address lists by provider-location id and returns the single common ProviderLocation, or null when the intersection is not exactly one location (DOM-BR-025). |
| GetMatchingProviderAddresses (single address) | public static IEnumerable<ProviderAddress> GetMatchingProviderAddresses(EbillAddress ebillAddress, IEnumerable<ProviderAddress> providerAddresses, bool concatenateTwoLineBillAddresses) |
Filters the candidate provider addresses down to those matching the given e-bill address. |
| GetMatchingProviderAddresses (address set) | public static IEnumerable<ProviderAddress> GetMatchingProviderAddresses(IEnumerable<EbillAddress> ebillAddresses, IEnumerable<ProviderAddress> providerAddresses, bool concatenateBillAddresses) |
Filters the candidate provider addresses down to those matching any address in the given e-bill address set. |
| RemoveSpecialCharacters | public static string RemoveSpecialCharacters(string input) |
Strips every character except letters, digits, and spaces from the input, returning null for a null input, so address text can be compared without punctuation differences. |
Behavioral notes¶
EbillAddressAndProviderAddressMatchandTwoEbillAddressesMatchboth pad the zip code to 5 digits before comparing, so a 4-digit zip on either side still matches its 5-digit counterpart (DOM-BR-022).- The protected
BillerHas*/BillerPhysicalAnd*Matchpredicates are only usable from a derived rule class; onlyBillerHasPhysicalPaymentAndFacilityAddressesis exposed publicly.
Sources¶
Domain/SAIF.Domain/Claims/Ebilling/Indexing/ProviderMatchBase.cs