NEWFree ROI Calculators — quantify what prior auth and siloed data are costing your organization.Prior Auth ROI Siloed Data ROI
HL7 v2Segment9 min read

HL7 PID Segment: Patient Identification

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.

SeqNameData TypeLengthReqRepeatTable #Description
PID-1Set ID – PIDSIOSequence number when multiple PIDs appear; usually 1.
PID-2Patient IDCXODeprecated single id; superseded by PID-3.
PID-3Patient Identifier ListCXRYOne or more patient ids (MRN, SSN, enterprise id). The matching key.
PID-4Alternate Patient ID – PIDCXODeprecated alternate id.
PID-5Patient NameXPNRYHL70200Legal name (family^given^middle^suffix^prefix). The most-displayed field.
PID-6Mother's Maiden NameXPNOYUsed for identity matching.
PID-7Date/Time of BirthDTMOBirth date (YYYYMMDD or full DTM).
PID-8Administrative SexCWEOHL70001M/F/O/U/A/N.
PID-9Patient AliasXPNOYDeprecated; aliases now in PID-5 with name-type.
PID-10RaceCWEOYHL70005Patient race.
PID-11Patient AddressXADOYHome and mailing addresses.
PID-12County CodeIDOHL70289Deprecated; use the PID-11 county component.
PID-13Phone Number – HomeXTNOYHome phone or email.
PID-14Phone Number – BusinessXTNOYWork phone or email.
PID-15Primary LanguageCWEOHL70296Preferred language.
PID-16Marital StatusCWEOHL70002Marital status.
PID-17ReligionCWEOHL70006Religious affiliation.
PID-18Patient Account NumberCXOAccount or visit financial id.
PID-19SSN Number – PatientSTODeprecated; put SSN in PID-3 with type SS.
PID-20Driver's License NumberDLNODeprecated; use PID-3.
PID-21Mother's IdentifierCXOYLinks a newborn to the mother.
PID-22Ethnic GroupCWEOYHL70189Patient ethnicity.
PID-23Birth PlaceSTOFree-text birth place.
PID-24Multiple Birth IndicatorIDOHL70136Y/N.
PID-25Birth OrderNMOOrder in a multiple birth.
PID-26CitizenshipCWEOYHL70171Country of citizenship.
PID-27Veterans Military StatusCWEOHL70172Military or veteran status.
PID-28NationalityCWEOHL70212Deprecated.
PID-29Patient Death Date and TimeDTMODate and time of death.
PID-30Patient Death IndicatorIDOHL70136Y/N.
PID-31Identity Unknown IndicatorIDOHL70136Patient identity unknown.
PID-32Identity Reliability CodeCWEOYHL70445Reliability of demographics.
PID-33Last Update Date/TimeDTMOLast demographic update.
PID-34Last Update FacilityHDOFacility that last updated.
PID-35Taxonomic Classification CodeCWEOHL70446Animal species (veterinary).
PID-36Breed CodeCWEOHL70447Animal breed (veterinary).
PID-37StrainSTOAnimal strain.
PID-38Production Class CodeCWEOYHL70429Animal production class.
PID-39Tribal CitizenshipCWEOYHL70171Tribal affiliation.
PID-40Patient Telecommunication InformationXTNOYConsolidated 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 U rather 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 YYYYMMDD only 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 fieldFHIR target
PID-3 Patient Identifier ListPatient.identifier
PID-5 Patient NamePatient.name
PID-6 Mother's Maiden NamePatient.extension (mothersMaidenName)
PID-7 Date/Time of BirthPatient.birthDate
PID-8 Administrative SexPatient.gender
PID-11 Patient AddressPatient.address
PID-13/14 Phone NumbersPatient.telecom
PID-15 Primary LanguagePatient.communication.language
PID-16 Marital StatusPatient.maritalStatus
PID-21 Mother's IdentifierRelatedPerson
PID-24/25 Multiple BirthPatient.multipleBirth[x]
PID-29 Death DatePatient.deceasedDateTime
PID-30 Death IndicatorPatient.deceasedBoolean
PID-35/36 Taxonomic/BreedPatient.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.

  • 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.

Sources

← Back to HL7 v2 Guide

Ready to Integrate This Into Your Workflow?

Talk to a Vorro expert about implementing HL7 v2 in your specific environment.

Browse HL7 v2 Guides
HL7 PID Segment: Patient Identification | Vorro Academy | Vorro