Skip to content

File835Builder

File835Builder renders the outbound 835 remittance-advice EDI file (version constant "1.3") for an e-billing batch, as part of the EOB output chain in operation OP-DOM-12: it names the clearinghouse file, retrieves the clearinghouse and the "EOB distributed" bill status, and builds the full 835 segment structure via EdiBuildSegments — envelope segments (ISA, GS, ST, BPR, TRN, REF, DTM, N1, N3, N4, PER), the loop-1000 payee segments, per-EOB LX/CLP/NM1/REF/DTM/AMT segments, per-service SVC/DTM/CAS/REF/AMT/LQ segments, and closing SE/GE/IEA segments — that communicates payment and adjustment information back to the clearinghouse. Its segment-by-segment construction was not traced line by line in the source analysis, so the class's behaviour is documented from its single entry point's signature and surrounding calls*.

Purpose

  • Produces the complete outbound 835 remittance-advice IEdiFile for a batch, given the e-billing query provider, claim query provider, user profile, and Guidewire financial-data API client needed to resolve payment details.
  • Marks bills as EOB-distributed as part of building the file, using the "EOB distributed" bill status resolved from IEbillingQueryProvider*.

Context

  • Namespace: SAIF.Domain.Claims.Ebilling
  • Assembly/package: SAIF.Domain (Domain/SAIF.Domain/SAIF.Domain.csproj, .NET Framework 4.6.2 class library)

Public members

Member Signature Purpose
Version public const string Version = "1.3" Identifies the 835-remittance-file version this class implements.
CreateFile public static IEdiFile CreateFile(IEbillingQueryProvider ebillingQueryProvider, IClaimQueryProvider claimQueryProvider, IUserProfileService userProfileService, Model.Claims.Ebilling.Batch batch, bool isProductionRun, ILogWriter controlLog, ILogWriter segmentLog, ICCClaimApiService cCClaimApiService, IFinancialDataApiClient financialDataApiClient) Builds the outbound 835 file for the batch: assigns a clearinghouse file name if none is set, resolves the clearinghouse and EOB-distributed bill status, and writes the remittance-advice segment structure, logging progress to the supplied control/segment log writers*.

Behavioral notes

  • When the batch does not already have a ClearinghouseFileName, CreateFile assigns one via NameBuilder.GetFileName("835", isProductionRun) before building the file.
  • The detailed per-segment remittance content (adjustments, service lines, remittance advice codes) was not traced line by line from the source; readers needing exact 835 segment content should consult the source file directly**.

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • Domain/SAIF.Domain/Claims/Ebilling/File835Builder.cs