Skip to content

EobExtensions

EobExtensions renders an already-assembled ExplanationOfBenefits contract (produced by OP-DOM-12 EOB generation and EobGenerator) into the fixed-schema legacy XML document (clsMedicalBill root, containing a clsAuditServiceCollection element whose child clsAuditService elements each carry one audited service's data) consumed by the downstream EOB print/distribution pipeline. It is the last step that turns in-memory bill, service, adjustment, and note data into the exact element names and formatting the legacy EOB renderer expects.

Purpose

  • Serializes an ExplanationOfBenefits contract's bill header, service lines, service adjustments, notes, and adjustment codes into the clsMedicalBill-shaped XML the EOB output process consumes.
  • Applies the legacy formatting conventions the downstream renderer depends on: zero-valued dates, quantities, and currency amounts are emitted as empty strings rather than "0" or a default date.

Context

  • Namespace: SAIF.Domain.Claims.Bills
  • Assembly/package: SAIF.Domain (packaged in SAIF.SAIFCode.Core)

Public members

Member Signature Purpose
ToEobXml public static string ToEobXml(this ExplanationOfBenefits eob) Extension method that builds the full Report XML document for one bill's EOB — header fields, ordered service lines with their adjustments, running totals, notes, and the distinct adjustment-code list — for consumption by the legacy EOB output process (OP-DOM-12).

Behavioral notes

  • Money values (ChargeAmt, PaidAmt) always render with the ###,##0.00 format even when zero, but McoAdminFee and total amounts render as an empty string when their underlying value is zero, matching legacy blank-when-zero display rules*.
  • Service lines are ordered by begin date then service code; adjustment codes are ordered by code, giving the XML a deterministic, sorted layout*.

Constraints and usage notes

  • The extension method assumes eob.Bill, eob.Services, eob.Notes, and eob.Adjustments are already populated (typically by EobGenerator.GenerateEob or EobBuilder.GenerateEobs); it performs no null-guarding on eob itself.

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.

Sources

  • Domain/SAIF.Domain/Claims/Bills/EobExtensions.cs