Skip to content

ServiceCodeManager

ServiceCodeManager is the single lookup point CBP generation (OP-DOM-06) and other Ebilling code use to resolve a raw service-code string to a CBP service code and its type code, backed by IEbillingQueryProvider's CBP bill queries (operation OP-DOM-08). It implements IServiceCodeManager so callers can be composed against the interface, and GenerateCbpBills receives it through dependency injection rather than resolving codes itself.

Purpose

  • Resolves a service-code string to its CBP service-type code, preferring a non-expired code over an expired one, and returning Unknown when there is no service date or the date falls outside the code's effective/expiration range (DOM-BR-080, DOM-BR-081).
  • Resolves a service-code string to its canonical CBP service code, again preferring the non-expired match and falling back to the expired one, or to the original input when neither is found.

Context

  • Namespace: SAIF.Domain.Claims.Ebilling
  • Assembly/package: SAIF.Domain (Domain/SAIF.Domain/SAIF.Domain.csproj, .NET Framework 4.6.2 class library)

Public members

Member Signature Purpose
ServiceCodeManager (constructor) public ServiceCodeManager(IEbillingQueryProvider queryProvider) Initializes the manager with the query provider used to look up CBP service codes; throws if queryProvider is null.
GetServiceTypeCode public string GetServiceTypeCode(string serviceCodes, DateTime? serviceDate) Returns the service's type code: Unknown when no service date is supplied, the matched code's type when the service date falls within its effective/expiration range, otherwise Unknown (DOM-BR-081).
GetServiceCode public string GetServiceCode(string serviceCodes) Returns the canonical CBP service code for the input, preferring a non-expired match, then an expired match, then the original input unchanged (DOM-BR-080).

Behavioral notes

  • GetServiceTypeCode always looks up the non-expired code first and only falls back to the expired code when no non-expired match exists, matching the preference rule used by GetServiceCode (DOM-BR-080).

Sources

  • Domain/SAIF.Domain/Claims/Ebilling/ServiceCodeManager.cs