The PID segment carries who the patient is — identifiers, name, birth date, sex, address, and contact info. It is the demographic anchor of almost every clinical message. Downstream systems match patients on PID-3 (the identifier list) and display PID-5 (the name), so these two fields receive more parsing attention than any others in HL7 v2.
Purpose
PID carries the patient's identifiers, name, birth date, sex, address, and contact information. Systems match patients on the PID-3 identifier list and display the PID-5 name, which makes those two fields the most consumed in all of HL7 v2.
Used in
PID appears in nearly every patient-centric message: ADT (all admit, transfer, and discharge events), ORM/OMG (orders), ORU (results), MDM (documents), SIU (scheduling), DFT (financial), BAR (billing), and VXU (immunizations). See ADT, ORU, ORM, MDM, and SIU.
Field-by-field reference
Source: official HL7 v2-to-FHIR IG. R = required (cardinality min ≥ 1). Repeat = field may repeat. Length pending authoritative v2.5.1 data.
| Seq | Name | Data Type | Length | Req | Repeat | Table # | Description |
|---|---|---|---|---|---|---|---|
| PID-1 | Set ID – PID | SI | — | O | — | — | Sequence number when multiple PIDs appear; usually 1. |
| PID-2 | Patient ID | CX | — | O | — | — | Deprecated single id; superseded by PID-3. |
| PID-3 | Patient Identifier List | CX | — | R | Y | — | One or more patient ids (MRN, SSN, enterprise id). The matching key. |
| PID-4 | Alternate Patient ID – PID | CX | — | O | — | — | Deprecated alternate id. |
| PID-5 | Patient Name | XPN | — | R | Y | HL70200 | Legal name (family^given^middle^suffix^prefix). The most-displayed field. |
| PID-6 | Mother's Maiden Name | XPN | — | O | Y | — | Used for identity matching. |
| PID-7 | Date/Time of Birth | DTM | — | O | — | — | Birth date (YYYYMMDD or full DTM). |
| PID-8 | Administrative Sex | CWE | — | O | — | HL70001 | M/F/O/U/A/N. |
| PID-9 | Patient Alias | XPN | — | O | Y | — | Deprecated; aliases now in PID-5 with name-type. |
| PID-10 | Race | CWE | — | O | Y | HL70005 | Patient race. |
| PID-11 | Patient Address | XAD | — | O | Y | — | Home and mailing addresses. |
| PID-12 | County Code | ID | — | O | — | HL70289 | Deprecated; use the PID-11 county component. |
| PID-13 | Phone Number – Home | XTN | — | O | Y | — | Home phone or email. |
| PID-14 | Phone Number – Business | XTN | — | O | Y | — | Work phone or email. |
| PID-15 | Primary Language | CWE | — | O | — | HL70296 | Preferred language. |
| PID-16 | Marital Status | CWE | — | O | — | HL70002 | Marital status. |
| PID-17 | Religion | CWE | — | O | — | HL70006 | Religious affiliation. |
| PID-18 | Patient Account Number | CX | — | O | — | — | Account or visit financial id. |
| PID-19 | SSN Number – Patient | ST | — | O | — | — | Deprecated; put SSN in PID-3 with type SS. |
| PID-20 | Driver's License Number | DLN | — | O | — | — | Deprecated; use PID-3. |
| PID-21 | Mother's Identifier | CX | — | O | Y | — | Links a newborn to the mother. |
| PID-22 | Ethnic Group | CWE | — | O | Y | HL70189 | Patient ethnicity. |
| PID-23 | Birth Place | ST | — | O | — | — | Free-text birth place. |
| PID-24 | Multiple Birth Indicator | ID | — | O | — | HL70136 | Y/N. |
| PID-25 | Birth Order | NM | — | O | — | — | Order in a multiple birth. |
| PID-26 | Citizenship | CWE | — | O | Y | HL70171 | Country of citizenship. |
| PID-27 | Veterans Military Status | CWE | — | O | — | HL70172 | Military or veteran status. |
| PID-28 | Nationality | CWE | — | O | — | HL70212 | Deprecated. |
| PID-29 | Patient Death Date and Time | DTM | — | O | — | — | Date and time of death. |
| PID-30 | Patient Death Indicator | ID | — | O | — | HL70136 | Y/N. |
| PID-31 | Identity Unknown Indicator | ID | — | O | — | HL70136 | Patient identity unknown. |
| PID-32 | Identity Reliability Code | CWE | — | O | Y | HL70445 | Reliability of demographics. |
| PID-33 | Last Update Date/Time | DTM | — | O | — | — | Last demographic update. |
| PID-34 | Last Update Facility | HD | — | O | — | — | Facility that last updated. |
| PID-35 | Taxonomic Classification Code | CWE | — | O | — | HL70446 | Animal species (veterinary). |
| PID-36 | Breed Code | CWE | — | O | — | HL70447 | Animal breed (veterinary). |
| PID-37 | Strain | ST | — | O | — | — | Animal strain. |
| PID-38 | Production Class Code | CWE | — | O | Y | HL70429 | Animal production class. |
| PID-39 | Tribal Citizenship | CWE | — | O | Y | HL70171 | Tribal affiliation. |
| PID-40 | Patient Telecommunication Information | XTN | — | O | Y | — | Consolidated telecom (v2.7+). |
Most-used fields
PID-3 Patient Identifier List is a repeating CX. Each value is ID^check-digit^check-scheme^assigning-authority^identifier-type-code. A real example is 123456^^^HOSP^MR~999-99-9999^^^USA^SS. The identifier-type-code (5th component, table HL70203) distinguishes MRN (MR) from SSN (SS) from enterprise id (PI) — get this wrong and you merge the wrong patients.
PID-5 Patient Name is a repeating XPN: family^given^second/middle^suffix^prefix^degree^name-type-code. The 7th component (name-type, HL70200) marks L legal, A alias, M maiden.
PID-7 Date/Time of Birth, PID-8 Administrative Sex, and PID-11 Address round out the core demographic match set.
Version differences (2.3 to 2.8.2)
- 2.3: PID-19 (SSN) and PID-20 (Driver's License) were live fields. From 2.5 they are deprecated in favor of typed entries in PID-3.
- 2.4: PID-29/30 (death date and indicator) added.
- 2.5: identity indicators (PID-31/32) and veterinary fields (PID-35 to PID-38) added.
- 2.7: PID-40 (consolidated telecom) added; PID-13/14 phone fields begin migrating to it.
- Sex coding (PID-8) expanded over versions; map unknown values to
Urather than dropping them.
Common mistakes
- Reading the wrong PID-3 repetition — assuming the first is the MRN when SSN comes first. Always select by identifier-type-code, not position.
- Putting SSN in the deprecated PID-19 instead of PID-3 with type
SS. - Collapsing repeating PID-5 names and losing the legal-versus-alias distinction.
- Parsing PID-7 as
YYYYMMDDonly and choking on a full timestamp with timezone.
Examples
Minimal valid PID (Set ID, identifier, name):
PID|1||123456^^^HOSP^MR||DOE^JOHN
Fully-populated PID:
PID|1||123456^^^HOSP^MR~999-99-9999^^^USA^SS||DOE^JOHN^A^^^^L||19800101|M||2106-3^White^CDCREC|123 MAIN ST^^METROPOLIS^IL^60601^USA^H||^PRN^PH^^^555^5551234|^WPN^PH^^^555^5559876|en^English^ISO639|M^Married^HL70002|||ACCT00042
Annotated breakdown (selected fields of the full example):
PID ← segment ID
1 ← PID-1 Set ID
← PID-2 empty (deprecated)
123456^^^HOSP^MR~999-99-9999^^^USA^SS ← PID-3 Identifier List (MRN ~ SSN)
← PID-4 empty
DOE^JOHN^A^^^^L ← PID-5 Name (family^given^mid^^^^type=L legal)
19800101 ← PID-7 Date of Birth
M ← PID-8 Administrative Sex
2106-3^White^CDCREC ← PID-10 Race
123 MAIN ST^^METROPOLIS^IL^60601^USA^H← PID-11 Address (type H = home)
In-context inside an ADT^A04 (register):
MSH|^~&|EPIC|HOSP_A|RECV|HOSP_B|20260609090000||ADT^A04^ADT_A01|MSG2201|P|2.5.1
EVN|A04|20260609090000
PID|1||123456^^^HOSP^MR||DOE^JOHN^A||19800101|M|||123 MAIN ST^^METROPOLIS^IL^60601
PV1|1|O|CLINIC^^^HOSP|||||||MED
In-context inside an ORU^R01 (result):
MSH|^~&|LAB|HOSP_B|EHR|HOSP_A|20260609131500||ORU^R01^ORU_R01|CTRL-9931|P|2.5.1
PID|1||123456^^^HOSP^MR||DOE^JOHN^A||19800101|M
OBR|1||ORD123|CBC^Complete Blood Count^L
OBX|1|NM|718-7^Hemoglobin^LN||13.5|g/dL|13.0-17.0|N|||F
FHIR mapping
Target resources: Patient (primary), plus Account, Appointment, RelatedPerson, Provenance. Official ConceptMap: ConceptMap-segment-pid-to-patient (JSON).
| PID field | FHIR target |
|---|---|
| PID-3 Patient Identifier List | Patient.identifier |
| PID-5 Patient Name | Patient.name |
| PID-6 Mother's Maiden Name | Patient.extension (mothersMaidenName) |
| PID-7 Date/Time of Birth | Patient.birthDate |
| PID-8 Administrative Sex | Patient.gender |
| PID-11 Patient Address | Patient.address |
| PID-13/14 Phone Numbers | Patient.telecom |
| PID-15 Primary Language | Patient.communication.language |
| PID-16 Marital Status | Patient.maritalStatus |
| PID-21 Mother's Identifier | RelatedPerson |
| PID-24/25 Multiple Birth | Patient.multipleBirth[x] |
| PID-29 Death Date | Patient.deceasedDateTime |
| PID-30 Death Indicator | Patient.deceasedBoolean |
| PID-35/36 Taxonomic/Breed | Patient.extension (animal) |
Local-extension only or not mapped: PID-10 Race and PID-22 Ethnic Group map to local implementation extensions (US Core uses its own race and ethnicity extensions). PID-32/33/34 and PID-38 are not mapped in the IG.
Engine considerations
- Always parse PID-3 by identifier-type-code, never by repetition order.
- Required in practice: PID-3 and PID-5 are required by the standard; most interfaces also mandate PID-7 and PID-8 for patient matching.
- The repetition separator (
~) matters in PID-3, PID-5, PID-11, and PID-13 — flattening repetitions silently drops identifiers, aliases, or addresses. - Escape pitfalls: names with apostrophes or ampersands (
O'BRIEN,SMITH & SONS) must use escape sequences; a raw&is the sub-component delimiter and will split the name.
How Vorro parses and produces PID
Vorro indexes every PID-3 repetition by assigning-authority and identifier-type so patient matching selects the correct MRN regardless of order. Repeating XPN, XAD, and XTN fields are preserved as arrays end-to-end, and deprecated fields (PID-19/20) are normalized into typed PID-3 entries on the produce side so downstream FHIR Patient.identifier output is clean.
Related pages
- PV1 — the visit segment that accompanies PID in most messages.
- NK1 — next of kin and emergency contacts for the patient.
- ADT messages — where PID establishes the patient context.
