Reference·X12 837P·DTP
X12 837P Reference

X12 837P DTP Segment Guide: Fields, Format, and Testing Gotchas

Jul 28, 2026 · 5 min read

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.

Quick answer

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

DTP01 →
Date/Time Qualifier — identifies which date this occurrence represents — onset of illness, statement period, discharge, and more — see the dedicated page below
DTP02 →
Date Time Period Format Qualifier — tells the parser whether DTP03 is a single date or a range — see the dedicated page below
DTP03 →
Date Time Period — the actual date value, formatted according to DTP02 — see the dedicated page below

Example

Synthetic example Generated by Synthibase
DTP*431*D8*20260610

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.

What is X12 837P? Complete Format and Field Guide
How to Write EDI Test Cases That Actually Catch Go-Live Failures
Generate every DTP date scenario your claims actually need
Synthibase generates synthetic 837P claims with the full range of DTP qualifiers and both single-date and date-range formats, so your parser gets tested against more than the one date field a happy-path fixture happens to include.
Start free trial →
This page is written independently by Synthibase for testing and informational purposes. It is not an official publication of HL7 International or X12/Washington Publishing Company, and is not a substitute for reviewing the official standard or your trading partner's companion guide. See our Terms of Service for full legal terms.