java.lang.Object
org.openehealth.ipf.commons.ihe.xds.core.metadata.Hl7v2Based<T>
org.openehealth.ipf.commons.ihe.xds.core.metadata.Name<ca.uhn.hl7v2.model.v25.datatype.XCN>
org.openehealth.ipf.commons.ihe.xds.core.metadata.XcnName
All Implemented Interfaces:
Serializable

public class XcnName extends Name<ca.uhn.hl7v2.model.v25.datatype.XCN>
This class represents a name.

It is derived from the HL7v2 data type XCN. It only contains naming related fields of these data types.

All members of this class are allowed to be null. When transforming to HL7 this indicates that the values are empty. Trailing empty values are removed from the HL7 string.

Author:
Jens Riemschneider, Dmytro Rud
See Also:
  • Constructor Details

    • XcnName

      public XcnName()
    • XcnName

      public XcnName(ca.uhn.hl7v2.model.v25.datatype.XCN xcn)
    • XcnName

      public XcnName(String familyName, String givenName, String secondAndFurtherGivenNames, String suffix, String prefix, String degree)
      Constructs a name.
      Parameters:
      familyName - the family name (XCN.2.1).
      givenName - the given name (XCN.3).
      secondAndFurtherGivenNames - the second and further names (XCN.4).
      suffix - the suffix (XCN.5).
      prefix - the prefix (XCN.6).
      degree - academical degree (XCN.7).
  • Method Details

    • parse

      public static XcnName parse(String hl7String)
      Parses an HL7v2 string into an XcnName object.
      Parameters:
      hl7String - HL7v2 representation of an XcnName object.
      Returns:
      parsed XcnName object.
    • getFamilyName

      public String getFamilyName()
      Specified by:
      getFamilyName in class Name<ca.uhn.hl7v2.model.v25.datatype.XCN>
    • setFamilyName

      public void setFamilyName(String value)
      Specified by:
      setFamilyName in class Name<ca.uhn.hl7v2.model.v25.datatype.XCN>
    • getGivenName

      public String getGivenName()
      Specified by:
      getGivenName in class Name<ca.uhn.hl7v2.model.v25.datatype.XCN>
    • setGivenName

      public void setGivenName(String value)
      Specified by:
      setGivenName in class Name<ca.uhn.hl7v2.model.v25.datatype.XCN>
    • getSecondAndFurtherGivenNames

      public String getSecondAndFurtherGivenNames()
      Specified by:
      getSecondAndFurtherGivenNames in class Name<ca.uhn.hl7v2.model.v25.datatype.XCN>
    • setSecondAndFurtherGivenNames

      public void setSecondAndFurtherGivenNames(String value)
      Specified by:
      setSecondAndFurtherGivenNames in class Name<ca.uhn.hl7v2.model.v25.datatype.XCN>
    • getSuffix

      public String getSuffix()
      Specified by:
      getSuffix in class Name<ca.uhn.hl7v2.model.v25.datatype.XCN>
    • setSuffix

      public void setSuffix(String value)
      Specified by:
      setSuffix in class Name<ca.uhn.hl7v2.model.v25.datatype.XCN>
    • getPrefix

      public String getPrefix()
      Specified by:
      getPrefix in class Name<ca.uhn.hl7v2.model.v25.datatype.XCN>
    • setPrefix

      public void setPrefix(String value)
      Specified by:
      setPrefix in class Name<ca.uhn.hl7v2.model.v25.datatype.XCN>
    • getDegree

      public String getDegree()
      Specified by:
      getDegree in class Name<ca.uhn.hl7v2.model.v25.datatype.XCN>
    • setDegree

      public void setDegree(String value)
      Specified by:
      setDegree in class Name<ca.uhn.hl7v2.model.v25.datatype.XCN>
    • toString

      public String toString()
      Overrides:
      toString in class Name<ca.uhn.hl7v2.model.v25.datatype.XCN>