Skip to content

WorkerRepresentativeNodeBuilder

Builds a WorkerRepresentativeNode from the claim's ClaimLegalRepresentative, attaching the representative's employer name and a contact record built via ProviderContactBuilder, but only when the representation has no expiration date or has not yet expired (expiration date is null, DateTime.MinValue, or in the future/today). It also reports whether the claim has any historical legal-representative assignments via Claim.HasLegalRepresentativeHistory().

Purpose

  • Attaches the worker's legal representative's employer name (WorksFor) and provider contact record, only for currently active (non-expired) representation.
  • Reports whether the claim has any legal-representative history, independent of whether a current representative exists.

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 WorkerRepresentativeNode Node { get; } Exposes the node instance being populated by this builder.
WorkerRepresentativeNodeBuilder(claim, provider, node) public WorkerRepresentativeNodeBuilder(Claim claim, IProviderInformationService provider, WorkerRepresentativeNode node) Stores the claim, provider-information service, and target node for later population.
AddWorkerRepresentativeNode() public WorkerRepresentativeNodeBuilder AddWorkerRepresentativeNode() If the claim has a non-null, non-expired legal representative, sets WorksFor from the parent provider's business name and builds WorkerRepContact via ProviderContactBuilder; no-ops entirely if there is no representative.
AddHistory() public WorkerRepresentativeNodeBuilder AddHistory() Sets HasHistory from Claim.HasLegalRepresentativeHistory() when the claim has data.

Behavioral notes

  • Expiration handling treats a null expiration date, DateTime.MinValue, or a date on/after today as "still active"; only a past expiration date suppresses the contact/employer population.

Constraints and usage notes

  • AddWorkerRepresentativeNode() leaves WorksFor and WorkerRepContact unset on the node if the representative's representation has expired, even though AddHistory() may still report HasHistory = true.

Sources

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