All Implemented Interfaces:
Composite, Type, Visitable, Serializable

public class PN extends AbstractComposite

Represents an HL7 PN (person name) data type. This type consists of the following components:

  • family name (ST)
  • given name (ST)
  • middle initial or name (ST)
  • suffix (e.g. JR or III) (ST)
  • prefix (e.g. DR) (ST)
  • degree (e.g. MD) (ST)
See Also:
  • Constructor Details

    • PN

      public PN(Message message)
      Creates a new PN type
  • Method Details

    • getComponents

      public Type[] getComponents()
      Returns an array containing the data elements.
    • getComponent

      public Type getComponent(int number) throws DataTypeException
      Returns an individual data component.
      Parameters:
      number - The component number (0-indexed)
      Throws:
      DataTypeException - if the given element number is out of range.
    • getFamilyName

      public ST getFamilyName()
      Returns family name (component 1). This is a convenience method that saves you from casting and handling an exception.
    • getPn1_FamilyName

      Returns family name (component 1). This is a convenience method that saves you from casting and handling an exception.
    • getGivenName

      public ST getGivenName()
      Returns given name (component 2). This is a convenience method that saves you from casting and handling an exception.
    • getPn2_GivenName

      public ST getPn2_GivenName()
      Returns given name (component 2). This is a convenience method that saves you from casting and handling an exception.
    • getMiddleInitialOrName

      Returns middle initial or name (component 3). This is a convenience method that saves you from casting and handling an exception.
    • getPn3_MiddleInitialOrName

      Returns middle initial or name (component 3). This is a convenience method that saves you from casting and handling an exception.
    • getSuffixEgJRorIII

      Returns suffix (e.g. JR or III) (component 4). This is a convenience method that saves you from casting and handling an exception.
    • getPn4_SuffixEgJRorIII

      Returns suffix (e.g. JR or III) (component 4). This is a convenience method that saves you from casting and handling an exception.
    • getPrefixEgDR

      public ST getPrefixEgDR()
      Returns prefix (e.g. DR) (component 5). This is a convenience method that saves you from casting and handling an exception.
    • getPn5_PrefixEgDR

      Returns prefix (e.g. DR) (component 5). This is a convenience method that saves you from casting and handling an exception.
    • getDegreeEgMD

      public ST getDegreeEgMD()
      Returns degree (e.g. MD) (component 6). This is a convenience method that saves you from casting and handling an exception.
    • getPn6_DegreeEgMD

      Returns degree (e.g. MD) (component 6). This is a convenience method that saves you from casting and handling an exception.