Skip to content
Contact Us

HL7 PID Segment: Patient Identification

The HL7 PID segment (Patient Identification) carries the patient’s demographic and identification data. It appears in virtually every HL7 v2 message type — ADT, ORM, ORU, SIU, DFT, and more. Correct PID mapping is critical for patient matching and record linkage across systems.

PID 39 fields
Seq Name Type Opt Description
PID-1 Set ID SI O Sequence number (usually 1)
PID-2 Patient ID (External) CX W Withdrawn in v2.3.1 — use PID-3
PID-3 Patient Identifier List CX R MRN and all identifiers (repeating)
PID-4 Alternate Patient ID CX W Withdrawn — use PID-3
PID-5 Patient Name XPN R Family^Given^Middle^Suffix^Prefix
PID-6 Mother's Maiden Name XPN O Used for identity verification
PID-7 Date/Time of Birth TS O YYYYMMDD format
PID-8 Administrative Sex IS O M, F, O, U, A, N
PID-9 Patient Alias XPN W Withdrawn in v2.5
PID-10 Race CE O HL7 table 0005
PID-11 Patient Address XAD O Street^City^State^Zip^Country
PID-12 County Code IS W Withdrawn — use PID-11
PID-13 Phone (Home) XTN O Home phone number
PID-14 Phone (Business) XTN O Work phone number
PID-15 Primary Language CE O Preferred language
PID-16 Marital Status CE O HL7 table 0002
PID-17 Religion CE O HL7 table 0006
PID-18 Patient Account Number CX O Visit/encounter account
PID-19 SSN (Patient) ST W Withdrawn — use PID-3
PID-20 Driver's License DLN W Withdrawn in v2.5
PID-21 Mother's Identifier CX O Links newborn to mother
PID-22 Ethnic Group CE O HL7 table 0189
PID-23 Birth Place ST O City/state of birth
PID-24 Multiple Birth Indicator ID O Y/N for twins, triplets
PID-25 Birth Order NM O 1, 2, 3 for multiples
PID-26 Citizenship CE O Country of citizenship
PID-27 Veterans Status CE O Military veteran indicator
PID-28 Nationality CE W Withdrawn in v2.5
PID-29 Patient Death Date TS O Date and time of death
PID-30 Patient Death Indicator ID O Y/N
PID-31 Identity Unknown ID O Y if patient cannot be identified
PID-32 Identity Reliability IS O AL (alias), UA (unknown), IT (temp)
PID-33 Last Update Date TS O When PID data was last modified
PID-34 Last Update Facility HD O Facility that last updated the record
PID-35 Taxonomic Classification CE O Species code (veterinary)
PID-36 Breed Code CE O Breed (veterinary)
PID-37 Strain ST O Strain (veterinary)
PID-38 Production Class CE O Production class (veterinary)
PID-39 Tribal Citizenship CWE O Added in v2.6
PID-1 O
Set ID SI

Sequence number (usually 1)

PID-2 W
Patient ID (External) CX

Withdrawn in v2.3.1 — use PID-3

PID-3 R
Patient Identifier List CX

MRN and all identifiers (repeating)

Primary matching key. Must include assigning authority (CX.4) and identifier type (CX.5). Repeat for multiple identifiers (MRN, EMPI, account number).

PID-4 W
Alternate Patient ID CX

Withdrawn — use PID-3

PID-5 R
Patient Name XPN

Family^Given^Middle^Suffix^Prefix

XPN data type. Can repeat for legal name, alias, maiden name. XPN.7 indicates name type (L=Legal, A=Alias, M=Maiden).

PID-6 O
Mother's Maiden Name XPN

Used for identity verification

PID-7 O
Date/Time of Birth TS

YYYYMMDD format

Critical for patient matching. Some systems send YYYYMMDDHHMMSS — receiving systems should handle both formats.

PID-8 O
Administrative Sex IS

M, F, O, U, A, N

PID-9 W
Patient Alias XPN

Withdrawn in v2.5

PID-10 O
Race CE

HL7 table 0005

PID-11 O
Patient Address XAD

Street^City^State^Zip^Country

PID-12 W
County Code IS

Withdrawn — use PID-11

PID-13 O
Phone (Home) XTN

Home phone number

PID-14 O
Phone (Business) XTN

Work phone number

PID-15 O
Primary Language CE

Preferred language

PID-16 O
Marital Status CE

HL7 table 0002

PID-17 O
Religion CE

HL7 table 0006

PID-18 O
Patient Account Number CX

Visit/encounter account

Often used as a secondary matching key. Maps to the encounter/visit-level account in the receiving system.

PID-19 W
SSN (Patient) ST

Withdrawn — use PID-3

Still populated by many legacy systems. Modern implementations should use PID-3 with identifier type SS.

PID-20 W
Driver's License DLN

Withdrawn in v2.5

PID-21 O
Mother's Identifier CX

Links newborn to mother

PID-22 O
Ethnic Group CE

HL7 table 0189

PID-23 O
Birth Place ST

City/state of birth

PID-24 O
Multiple Birth Indicator ID

Y/N for twins, triplets

PID-25 O
Birth Order NM

1, 2, 3 for multiples

PID-26 O
Citizenship CE

Country of citizenship

PID-27 O
Veterans Status CE

Military veteran indicator

PID-28 W
Nationality CE

Withdrawn in v2.5

PID-29 O
Patient Death Date TS

Date and time of death

PID-30 O
Patient Death Indicator ID

Y/N

PID-31 O
Identity Unknown ID

Y if patient cannot be identified

PID-32 O
Identity Reliability IS

AL (alias), UA (unknown), IT (temp)

PID-33 O
Last Update Date TS

When PID data was last modified

PID-34 O
Last Update Facility HD

Facility that last updated the record

PID-35 O
Taxonomic Classification CE

Species code (veterinary)

PID-36 O
Breed Code CE

Breed (veterinary)

PID-37 O
Strain ST

Strain (veterinary)

PID-38 O
Production Class CE

Production class (veterinary)

PID-39 O
Tribal Citizenship CWE

Added in v2.6

R = Required, O = Optional, C = Conditional, W = Withdrawn (backward compatibility only)

PID-3: Patient Identifier List (Critical Field)

Section titled “PID-3: Patient Identifier List (Critical Field)”

PID-3 is the most important field in the PID segment. It carries a repeating list of patient identifiers, each with its assigning authority and identifier type:

PID|||MRN12345^^^MAIN_HOSP^MR~SSN987654321^^^SSA^SS~ENT00567^^^MAIN_HOSP^AN||...
ComponentNameExample
CX.1ID NumberMRN12345
CX.2Check Digit(optional)
CX.3Check Digit Scheme(optional)
CX.4Assigning AuthorityMAIN_HOSP
CX.5Identifier TypeMR (Medical Record Number)
CX.6Assigning Facility(optional)
CodeMeaning
MRMedical Record Number
ANAccount Number
SSSocial Security Number
PIPatient Internal Identifier
PTPatient External Identifier
DLDriver’s License
MAMedicaid Number
MCMedicare Number
NPINational Provider Identifier
VNVisit Number

The assigning authority (CX.4) identifies which system or facility assigned the identifier. In a multi-facility health system, a patient may have different MRNs at each facility:

MRN12345^^^HOSP_A^MR~MRN67890^^^HOSP_B^MR~EMPI99999^^^ENTERPRISE^PI

The receiving system must know which assigning authority’s MRN to use for patient matching in its own database.

The XPN (Extended Person Name) data type structures the patient’s name:

DOE^JOHN^ALEXANDER^III^DR^PHD
ComponentNameExample
XPN.1Family NameDOE
XPN.2Given NameJOHN
XPN.3Middle NameALEXANDER
XPN.4SuffixIII
XPN.5PrefixDR
XPN.6DegreePHD
XPN.7Name TypeL (Legal), A (Alias), M (Maiden)

PID-5 can repeat — for example, legal name followed by alias:

DOE^JOHN^A^^^||~DOE^JACK^^^^A||
CodeMeaning
MMale
FFemale
OOther
UUnknown
AAmbiguous
NNot applicable

The most common PID-related integration errors:

  1. Wrong assigning authority: Mapping the wrong MRN when multiple facilities share an interface
  2. Missing identifier type: Not populating CX.5, leaving receiving systems unable to classify the identifier
  3. Name format mismatches: Sending “JOHN A” in the given name field vs separate given and middle components
  4. Date format inconsistency: Some systems send DOB as YYYYMMDD, others as YYYYMMDDHHMMSS
  5. SSN in PID-19 vs PID-3: Withdrawn field PID-19 is still populated by many legacy systems; modern implementations should use PID-3 with identifier type SS

In health systems with multiple facilities, each facility may assign its own MRN. The enterprise master patient index (EMPI) assigns a global identifier that links facility-specific MRNs together. PID-3 should contain both:

  • The facility-specific MRN (for local system matching)
  • The EMPI identifier (for cross-facility correlation)

When patient demographics change, the source system sends an ADT message with the updated PID segment. Receiving systems must:

  • Match on PID-3 identifiers to find the existing patient record
  • Update only the fields that changed (some systems send the full PID regardless)
  • Maintain audit history of demographic changes
  • Handle name changes carefully (marriage, legal name change) without creating duplicate records