Reference·NK1 Segment·NK1-4
HL7 v2 Reference

Testing HL7 v2 NK1-4: What Address Actually Needs to Handle

Jul 27, 2026 · 4 min read
← NK1-3 NK1-5 →

NK1-4 uses the exact same address structure as the patient's own address field, but almost none of the validation the patient address gets, because it's treated as a "nice to have."

Quick answer

NK1-4 carries the associated party's mailing address using the extended address (XAD) data type — street, second line, city, state, postal code, and country, separated by carets. It's structurally the same field type as PID-11, but it's populated far less consistently and validated far less often.

What this field contains

Component 1
Street Address — primary street line; sometimes holds a full unparsed address when upstream systems don't split components
Component 3
City — city name
Component 4
State — state or province, usually a two-letter code in US-based systems
Component 5
Zip/Postal Code — postal code; frequently missing or truncated on informally captured contacts

Example

Synthetic example Generated by Synthibase
NK1|1|DOE^JANE^M|SPO|482 OAK ST^^DENVER^CO^80202|3035550142|||EC

The synthetic address 482 OAK ST^^DENVER^CO^80202 shows street, city, state, and zip populated with the second address line left blank.

Where this trips people up

Because NK1-4 is rarely required by workflow, it's often left entirely blank, or filled with a single free-text component instead of properly split values — the whole address jammed into the street-line component with the rest empty. Code that assumes city and state are always separately available breaks on this input, and it's easy to miss in testing if fixtures only ever use cleanly structured addresses.

HL7 v2 NK1 Segment Guide: Fields, Format, and Testing Gotchas
Healthcare API Testing Guide: FHIR and X12
Synthetic Patient Data: Complete Guide for Software Testing
Test address parsing against real-world messiness
Synthibase varies NK1-4 between cleanly structured addresses and the free-text, partially blank entries seen in production, so your parsing logic is tested against both.
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.