Skip to content

ContactsNodeBuilder

Builds a ContactsNode listing every role-specific contact associated with a claim (adjuster, adjuster supervisor, claim assistant, EAIP adjuster, third-party adjuster, return-to-work adjuster, policy safety-management consultant, vocational coordinator) by combining claim responsibility/vocational-coordinator lookups from IClaimQueryProvider with user profile resolution through IUserProfileService. Each Add* method resolves a mail ID or pseudo-user identifier to a ContactItem via the internal GetUserContactInfo helper, which first tries IUserProfileService.GetSaifUser and falls back to GetApplicationUser.

Purpose

  • Resolves the claim's responsible adjuster contact, including pseudo-user fallback name/phone when no directory user ID exists.
  • Resolves the adjuster's supervisor contact, applying special handling for secure claims (looks up the manager of the adjuster's SAIF user record instead of the claim responsibility's stored supervisor).
  • Resolves claim assistant, EAIP adjuster, third-party adjuster, return-to-work adjuster, and policy safety-management-consultant contacts from their respective claim query provider lookups.
  • Resolves the vocational coordinator contact via IClaimQueryProvider.GetVocationalCoordinator.
  • Sets the claim identifier, worker name, and a formatted "standard email subject" string on the node when claim/worker data is present.

Context

  • Namespace: SAIF.Services.Claims.Information.Api
  • Assembly/package: SAIF.Services (packaged inside the SAIF.SAIFCode.Core NuGet package)

Public members

Member Signature Purpose
Node public ContactsNode Node { get; } Exposes the node instance being populated by this builder.
ContactsNodeBuilder(claim, profile, query, node) public ContactsNodeBuilder(Claim claim, IUserProfileService profile, IClaimQueryProvider query, ContactsNode node) Stores dependencies; sets the node's Claim identifier when claim data exists, and sets WorkerName/StandardEmailSubject when worker data exists.
AddAdjuster() public ContactsNodeBuilder AddAdjuster() Resolves the claim's responsibility record and adds an "Adjuster" contact, filling in pseudo-user phone/name when the responsibility uses a pseudo user rather than a directory mail ID.
AddVocCoordinator() public ContactsNodeBuilder AddVocCoordinator() Resolves the vocational coordinator via GetVocationalCoordinator and adds a "Voc Coordinator" contact, falling back to the raw user ID as the formatted name when no directory name is found.
AddAdjusterSupervisor() public ContactsNodeBuilder AddAdjusterSupervisor() Adds a "Claim supervisor" contact; for secure claims it looks up the adjuster's manager via IUserProfileService, otherwise it uses the responsibility record's stored supervisor mail ID (skipping if the supervisor is the same person as the adjuster).
AddClaimAssistant() public ContactsNodeBuilder AddClaimAssistant() Adds a "Claim assistant" contact resolved from the responsibility record's claim-assistant mail ID.
AddEaipAdjuster() public ContactsNodeBuilder AddEaipAdjuster() Adds an "EAIP Adjuster" contact from the first active/new EAIP period (status code "A" or "N") for the claim.
AddThirdPartyAdjuster() public ContactsNodeBuilder AddThirdPartyAdjuster() Adds a "3rd Party" contact resolved from the claim's third-party case adjuster user name.
AddRtwAdjuster() public ContactsNodeBuilder AddRtwAdjuster() Adds a "Return to work" contact resolved from IClaimQueryProvider.GetRTWAdjusterMailId.
AddPolicySafetyManagementConsultant() public ContactsNodeBuilder AddPolicySafetyManagementConsultant() Adds a "Safety Mgt Consultant" contact resolved from the policy's safety-management-consultant team function.
BuildPhoneNumber(phone, type, description) public static PhoneNumber BuildPhoneNumber(string phone, string type, string description) Constructs a PhoneNumber with the given number and a PhoneType (code/description); reused elsewhere (e.g. ProviderContactBuilder) to build phone entries consistently.

Behavioral notes

  • Every Add* method returns this to support fluent chaining, as used by ClaimInformationApiService.
  • AddAdjusterSupervisor() diverges from the general lookup pattern for secure claims, deliberately bypassing the stored supervisor and instead resolving the adjuster's organizational manager.
  • Contact resolution consistently prefers SAIF employee directory data (GetSaifUser) before falling back to application user records (GetApplicationUser).

Constraints and usage notes

  • Each Add* method no-ops (returns this without adding a contact) when its underlying responsibility/case lookup is null or missing the relevant identifier field.

Sources

  • Services/SAIF.Services/Claims/Information/Api/ContactsNodeBuilder.cs