X12 837P DTP Segment Guide: Fields, Format, and Testing Gotchas
DTP isn't one date field, it's a reusable container that shows up a dozen different ways on the same claim. Miss the qualifier in DTP01 and your parser has no idea whether it just read an onset-of-illness date or a hospital discharge date — even though the segment itself looks identical.
DTP (Date or Time or Period) is a generic date segment reused throughout an X12 837P claim to carry many different kinds of dates. DTP01 is a qualifier code that says which date this instance represents, DTP02 states the format the date is written in, and DTP03 holds the actual date or date range value in that format.
The elements that actually matter in practice
Example
A synthetic DTP reporting qualifier 431 (onset of current illness), format D8 (single date), with the illness beginning on 2026-06-10.
Where this trips people up
Because DTP is one segment type reused for many purposes, test suites often build fixtures around a single qualifier — usually whichever date the happy-path claim needs — and treat the rest of the parser's DTP handling as implicitly correct. It isn't. A claim can legitimately carry several DTP segments back to back, each with a different qualifier and possibly a different date format, and a parser that assumes 'the DTP segment' means one specific date will silently overwrite one value with another when a second DTP shows up in a position it wasn't expecting.