Skip to content

DtmSegment

DtmSegment models the X12 DTM date/time reference segment, a generic single-date carrier used throughout 837/835/277 transactions to attach a qualified date (e.g. service date, statement date) to a claim or loop, delegating all date/time string conversion to DateMaker.

Purpose

  • Represents the DTM segment identity via SegmentId returning the literal "DTM" (BR-020).
  • Carries DateTimeQualifier identifying what the date represents, paired with DateValue holding the actual date.
  • Delegates date/time string formatting and parsing to DateMaker.EdiFileDateString/DateMaker.MakeDateTime.

Context

  • Namespace: SAIF.Common.Files.Edi.Segments
  • Assembly/package: SAIF.Framework.Common.Files

Public members

Member Signature Purpose
SegmentId string SegmentId { get; } Returns the literal X12 segment identifier "DTM".
DateTimeQualifier string DateTimeQualifier { get; set; } The code qualifying what DateValue represents (DTM01), element 1.
DateValue DateTime DateValue { get; set; } The qualified date/time value (DTM02), formatted via DateMaker.EdiFileDateString on Build() and parsed via DateMaker.MakeDateTime on Fill().
Build IEdiSegment Build() Creates a SegmentBuilder("DTM"), adds DateTimeQualifier at element 1 and DateMaker.EdiFileDateString(DateValue, null) at element 2, returning the built segment.
Fill void Fill(IEdiSegment segment) Reads elements 1-2 via GetChildValue, parsing element 2 via DateMaker.MakeDateTime, into DateTimeQualifier and DateValue.
Parse static DtmSegment Parse(IEdiSegment segment) Instantiates a new DtmSegment, calls Fill(segment) on it, and returns it.

Sources

  • Common\SAIF.Common.Files\Edi\Segments\DtmSegment.cs