The HL7 PN type is used to represent a person’s name.
The HL7 representation of a name recognizes that people can have multiple names. Each name has one or more parts (where parts are usually “given”, “family”, “prefix” or “suffix”).
Here’s a typical XML representation of a name:
<name> <given>Wilma</given> <family>Flintstone</family> </name>
A person may have multiple instances of a particular name part — for example, “middle names” are just another given name.
<name> <prefix>Mrs.</prefix> <given>Wilma</given> <given>Pebbles</given> <family>Flintstone</family> </name>
Names also have uses and qualifiers. A use applies to a whole name, and may indicate that the name is a legal name, a psuedonym, or religious name (among other options). Qualifiers apply to individual name parts, and might indicate that a name is birth name, spousal name, or initial (among other options).
<name use="L"> <prefix>Mrs.</prefix> <given>Wilma</given> <given>Pebbles</given> <family qualifier="BR">Slaghoople</family> <family qualifier="SP">Flintstone</family> </name>
Also, parts don’t necessarily have part types. The following is a legal name, for example, and might be how a name would be provided by a system that can’t determine how to separate parts:
<name> Wilma Flintstone </name>