What Is HL7 v2 PID-5? Patient Name, Explained for Testers
Patient name matching is one of the most common causes of duplicate medical records, and PID-5 is the field where those mismatches start — a missing middle initial or a suffix in the wrong component can be enough for a matching algorithm to miss a duplicate.
PID-5 is the fifth field of the HL7 v2 PID segment — it carries the patient’s legal name broken into components such as family name, given name, and middle name, separated by carets.
What this field contains
Example
PID-5 breaks the patient name into GARCIA (family), ELENA (given), and MARIE (middle), with an "L" legal-name-type code trailing after the empty suffix and prefix components. Synthetic patient — not a real person.
Where this trips people up
Teams often test name matching only against clean, fully-populated names. In production, feeds arrive with the middle name crammed into the given-name component, missing components entirely, or hyphenated surnames split across two components — any of which can cause an exact-match algorithm to treat the same patient as a new one.