Skip to content

AttendingPhysicianNodeBuilder

Assembles an AttendingPhysicianNode for the Claim Information API by reading the attending physician off a Claim domain object and enriching it with contact and MCO-membership data resolved through IProviderInformationService. It resolves the attending physician's parent-provider business name and provider contact via ProviderContactBuilder, and populates MCO memberships by calling IProviderInformationService.GetMcoPlansForProvider for the physician's provider location.

Purpose

  • Builds the attending-physician section of a claim's API representation from Claim.GetAttendingPhysician() data.
  • Resolves and attaches the physician's business contact information and employer (WorksFor) via provider-location lookups.
  • Populates the list of MCO plan memberships associated with the physician's provider location.
  • Copies core attending-physician identifiers (Id, EffectiveDate, IsPrimaryAttendingPhysician) onto the output node.

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 AttendingPhysicianNode Node { get; } Exposes the node instance being populated by this builder for retrieval after chained Add* calls.
AttendingPhysicianNodeBuilder(...) public AttendingPhysicianNodeBuilder(Claim claim, IProviderInformationService service, AttendingPhysicianNode node) Initializes the builder by extracting the claim's attending physician via claim.GetAttendingPhysician() and storing the provider service and target node for later population.
AddContact() public AttendingPhysicianNodeBuilder AddContact() If an attending physician exists, builds and assigns its provider contact via ProviderContactBuilder and sets WorksFor to the parent provider's business name when present.
AddMcoList() public AttendingPhysicianNodeBuilder AddMcoList() Populates McoMemberships with the list of MCO plans returned for the physician's provider location.
AddDetails() public AttendingPhysicianNodeBuilder AddDetails() Copies the physician's Id, EffectiveDate, and IsPrimaryAttendingPhysician flag onto the node; no-ops if there is no attending physician.

Behavioral notes

  • All Add* methods return this, allowing fluent chaining (as done by ClaimInformationApiService).
  • Methods silently no-op when the underlying attending physician is null, rather than throwing.

Constraints and usage notes

  • Must be constructed with a Claim that has already loaded its attending-physician data; the constructor calls claim.GetAttendingPhysician() immediately.
  • AddMcoList() assumes _attending.ProviderLocation is non-null before calling GetMcoPlansForProvider.

Sources

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