RFI Browser

Back  RFI # 374: Leading Space in AN element

Formal vs. Informal Help Informal Formal


Ginger Wright


The definition of "String" according to the X12 documentation and in Appendix A of the IGs, state that "Leading spaces, when they occur, are presumed to be significant characters." Followed by the sentence "The significant characters shall be left justified." The only mention of suppression is regarding "Trailing spaces should be suppressed unless they are necessary to satisfy a minimum length." Should a string element, such as an N302, be rejected with a HIPAA syntax error if it has a leading space (example N3*1560 N CONNIE* 399~?)

Submitter Assigned Keywords

String, AN, syntax, space


In X12.6, Section String states:
A string data element is a sequence of any characters from the basic or extended character sets and contains at least one non-space character. The significant characters shall be left justified. Leading spaces, when they occur, are presumed to be significant characters. In the actual data stream trailing spaces should be suppressed. The representation for this data element type is AN. We conclude that the intent of the wording of this section is that in most cases, leading spaces should not be included. Inclusion of leading spaces is a statement by the sender that the data in a String data element actually requires the leading spaces to be properly interpreted, and that such leading spaces are an official part of the data. Thus, in N302, the sender is stating that the official address, as recognized by the U.S. Postal Service, includes the leading spaces.


It appears that the receiver may not consider such leading spaces to be non-compliant with the X12 standard because the receiver cannot interpret the intent of the sender in identifying leading spaces as an official part of the data. However, if the receiver believes that leading spaces are not an official part of an address, the receiver may refuse to process the transaction as non-compliant with the HIPAA implementation guide which requires that data sent be accurate. In the example stated, N302, the definition of these address lines states that the N302 contains an “address” line, therefore an address as recognized by the U.S. Postal Service.
Submission 1/9/2006
Status Date 3/24/2006
Status F - Final
Primary References
Document 004010X096A1
Set ID837
Segment IDN3
Element Position02