ProviderContactBuilder¶
Builds a ContactItem for a provider location (and optional parent provider), resolving the display name (preferring the provider's own business name, then the parent's), the address via IProviderInformationService.GetProviderAddress (using the parent ID when a parent is supplied), the provider type description as job title, and phone/fax/toll-free numbers — falling back to the parent location's phone numbers if the provider location itself has none.
Purpose¶
- Resolves a provider contact's display name, preferring the provider location's own business name and falling back to the parent provider's business name.
- Resolves the provider's mailing address, using the parent provider location's ID as a secondary lookup key when a parent is supplied.
- Sets the contact's job title from the provider's provider-type description.
- Populates phone, fax, and toll-free numbers from the parent provider location first, falling back to the provider location's own numbers only if the parent yielded none.
Context¶
- Namespace:
SAIF.Services.Claims.Information.Api - Assembly/package:
SAIF.Services(packaged inside theSAIF.SAIFCode.CoreNuGet package)
Public members¶
| Member | Signature | Purpose |
|---|---|---|
| ProviderContactBuilder(service) | public ProviderContactBuilder(IProviderInformationService service) |
Stores the provider-information service used to resolve addresses. |
| BuildContact(provider, parent) | public ContactItem BuildContact(DataModel.ProviderLocation provider, DataModel.ProviderLocation parent) |
Returns null if provider is null; otherwise builds a ContactItem with resolved name, address, job title, and phone numbers (parent numbers preferred, falling back to the provider's own numbers). |
Behavioral notes¶
- Phone-number resolution order is parent-first:
AddPhones(parent, contact)runs before the provider's own numbers are added, and the provider's numbers are only added if the contact still has no phone numbers after processing the parent. - Used by both
AttendingPhysicianNodeBuilderandWorkerRepresentativeNodeBuilderto build consistent provider/representative contact records.
Constraints and usage notes¶
BuildContactreturnsnullfor a nullproviderargument, so callers must null-check the result before use.
Sources¶
- Services/SAIF.Services/Claims/Information/Api/ProviderContactBuilder.cs