cdac.medinfo.sdk.hl7282.baselibs

## Class XPN

- java.lang.Object
- - cdac.medinfo.sdk.hl7282.baselibs.CompositeDataType
  - - cdac.medinfo.sdk.hl7282.baselibs.XPN

- All Implemented Interfaces:
    IDataType

      public class XPN
      extends CompositeDataType

  XPN - Extended person name

  This data type specifies extended person name

  Represents an HL7 XPN data type. This data type has the following attributes:

  1. Family Name (FN)RequiredButMayBeEmpty
  2. Given Name (ST)Optional
  3. Second and Further Given Names or Initials Thereof (ST)Optional
  4. Suffix (e.g., JR or III) (ST)Optional
  5. Prefix (e.g., DR) (ST)Optional
  6. Degree Withdrawn
  7. Name Type Code (ID)Optional
  8. Name Representation Code (ID)Optional
  9. Name Context (CWE)Optional
  10. Name Validity Range Withdrawn 11. Name Assembly Order (ID)Optional
  12. Effective Date (DTM)Optional
  13. Expiration Date (DTM)Optional
  14. Professional Suffix (ST)Optional
  15. Called By (ST)Optional

  This class provides accessors & mutators for the elements mentioned above. This class override the equal method, to check whether some other object is "equal to" this one.

  User can also create Data Type through `DataElementFactory`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `XPN()` Default Constructor for XPN
    `XPN(int iComponentType, IDataTypeMap objIDataTypeMap)` Constructor for XPN class which takes two arguments and sets the value in the respective member variable.
    `XPN(int iComponentType, int iMinLength, int iMaxLength, java.lang.String strCLength, IDataTypeMap objIDataTypeMap)` Constructor for XPN class which takes five arguments and sets the value in the respective member variable.
    `XPN(int iComponentType, int iMinLength, int iMaxLength, java.lang.String strCLength, int ITableNo, IDataTypeMap objIDataTypeMap)` Constructor for XPN class which takes six arguments and sets the value in the respective member variable.
    `XPN(int iMinLength, int iMaxLength, java.lang.String strCLength, int iComponentType)` Constructor for XPN class which takes four arguments and sets the value in the respective member variable.
    `XPN(int iMinLength, int iMaxLength, java.lang.String strCLength, int iTableNo, int iComponentType)` Constructor for XPN class which takes five arguments and sets the value in the respective member variable.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object objObject)` This method checks the equality of Object.
    `ST` | `getCalledBy()` Returns Called By
    `DTM` | `getEffectiveDate()` Returns Effective Date
    `DTM` | `getExpirationDate()` Returns Expiration Date
    `FN` | `getFamilyName()` Returns Family Name
    `ST` | `getGivenName()` Returns Given Name
    `ID` | `getNameAssemblyOrder()` Returns Name Assembly Order
    `CWE` | `getNameContext()` Returns Name Context
    `ID` | `getNameRepresentationCode()` Returns Name Representation Code
    `ID` | `getNameTypeCode()` Returns Name Type Code
    `ST` | `getPrefix()` Returns Prefix (e.g., DR)
    `ST` | `getProfessionalSuffix()` Returns Professional Suffix
    `ST` | `getSecondGivenNamesInitials()` Returns Second and Further Given Names or Initials Thereof
    `ST` | `getSuffix()` Returns Suffix (e.g., JR or III)
    `void` | `setCalledBy(ST objST)` Sets the Called By.
    `void` | `setCalledBy(java.lang.String strCalledBy)` Sets the Called By.
    `void` | `setEffectiveDate(DTM objEffectiveDate)` Sets the Effective Date.
    `void` | `setEffectiveDate(java.lang.String strEffectiveDate)` Sets the Effective Date.
    `void` | `setExpirationDate(DTM objExpirationDate)` Sets the Expiration Date.
    `void` | `setExpirationDate(java.lang.String strExpirationDate)` Sets the Expiration Date.
    `void` | `setFamilyName(FN objFamilyName)` Sets the Family Name.
    `void` | `setGivenName(ST objST)` Sets the Given Name.
    `void` | `setGivenName(java.lang.String strGivenName)` Sets the Given Name.
    `void` | `setNameAssemblyOrder(ID objID)` Sets the Name Assembly Order.
    `void` | `setNameAssemblyOrder(java.lang.String strNameAssemblyOrder)` Sets the Name Assembly Order.
    `void` | `setNameContext(CWE objNameContext)` Sets the Name Context.
    `void` | `setNameRepresentationCode(ID objID)` Sets the Name Representation Code.
    `void` | `setNameRepresentationCode(java.lang.String strNameRepresentationCode)` Sets the Name Representation Code.
    `void` | `setNameTypeCode(ID objID)` Sets the Name Type Code.
    `void` | `setNameTypeCode(java.lang.String strNameTypeCode)` Sets the Name Type Code.
    `void` | `setPrefix(ST objST)` Sets the Prefix.
    `void` | `setPrefix(java.lang.String strPrefix)` Sets the Prefix.
    `void` | `setProfessionalSuffix(ST objST)` Sets the Professional Suffix.
    `void` | `setProfessionalSuffix(java.lang.String strProfessionalSuffix)` Sets the Professional Suffix.
    `void` | `setSecondNameOrInitials(ST objST)` Sets the Second Name Or Initials.
    `void` | `setSecondNameOrInitials(java.lang.String strSecondNameOrInitials)` Sets the Second Name Or Initials.
    `void` | `setSuffix(ST objST)` Sets the Suffix.
    `void` | `setSuffix(java.lang.String strSuffix)` Sets the Suffix.

    - ### Methods inherited from class cdac.medinfo.sdk.hl7282.baselibs.CompositeDataType

      `copy, dumpDataType, getAttributes, getDataTypeName, getLength, getValue, isPrimitive, read, setValue, validate, write, writeToXML`

    - ### Methods inherited from class java.lang.Object

      `getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### XPN

          public XPN()

      Default Constructor for XPN

    - #### XPN

          public XPN(int iMinLength,
             int iMaxLength,
             java.lang.String strCLength,
             int iComponentType)
              throws InvalidComponentTypeException

      Constructor for XPN class which takes four arguments and sets the value in the respective member variable.
      Parameters:
        `iMinLength` - The Minimum length the DataType can have.
        `iMaxLength` - The Maximum length the DataType can have.
        `iCLength` - The Conformance length the DataType can have.
        `iComponentType` - The Type of the component i.e Component or a subcomponent.
      Throws:
        `InvalidComponentTypeException` - - if Component Type is not specified or valid.

    - #### XPN

          public XPN(int iMinLength,
             int iMaxLength,
             java.lang.String strCLength,
             int iTableNo,
             int iComponentType)
              throws InvalidComponentTypeException

      Constructor for XPN class which takes five arguments and sets the value in the respective member variable.
      Parameters:
        `iMinLength` - The Minimum length the DataType can have.
        `iMaxLength` - The Maximum length the DataType can have.
        `iCLength` - The Conformance length the DataType can have.
        `iTableNo` - The Table number to which the value for the component is specified.
        `iComponentType` - The Type of the component i.e Component or a subcomponent.
      Throws:
        `InvalidComponentTypeException` - - if Component Type is not specified or valid.

    - #### XPN

          public XPN(int iComponentType,
             IDataTypeMap objIDataTypeMap)

      Constructor for XPN class which takes two arguments and sets the value in the respective member variable.
      Parameters:
        `objIDataTypeMap` - object of Data Type Map.
        `iComponentType` - The Type of the component i.e Component or a subcomponent.
      Throws:
        `InvalidComponentTypeException` - - if Component Type is not specified or valid.

    - #### XPN

          public XPN(int iComponentType,
             int iMinLength,
             int iMaxLength,
             java.lang.String strCLength,
             IDataTypeMap objIDataTypeMap)

      Constructor for XPN class which takes five arguments and sets the value in the respective member variable.
      Parameters:
        `objIDataTypeMap` - object of Data Type Map.
        `iComponentType` - The Type of the component i.e Component or a subcomponent.
        `iMinLength` - The Minimum length the DataType can have.
        `iMaxLength` - The Maximum length the DataType can have.
        `iCLength` - The Conformance length the DataType can have.
      Throws:
        `InvalidComponentTypeException` - - if Component Type is not specified or valid.

    - #### XPN

          public XPN(int iComponentType,
             int iMinLength,
             int iMaxLength,
             java.lang.String strCLength,
             int ITableNo,
             IDataTypeMap objIDataTypeMap)

      Constructor for XPN class which takes six arguments and sets the value in the respective member variable.
      Parameters:
        `objIDataTypeMap` - object of Data Type Map.
        `iComponentType` - The Type of the component i.e Component or a subcomponent.
        `iMinLength` - The Minimum length the DataType can have.
        `iMaxLength` - The Maximum length the DataType can have.
        `iCLength` - The Conformance length the DataType can have.
        `iTableNo` - The Table number to which the value for the component is specified.
      Throws:
        `InvalidComponentTypeException` - - if Component Type is not specified or valid.

  - ### Method Detail

    - #### setFamilyName

          public void setFamilyName(FN objFamilyName)

      Sets the Family Name.
      Parameters:
        `objFamilyName` - Specifies the surname of a person.

    - #### setGivenName

          public void setGivenName(java.lang.String strGivenName)

      Sets the Given Name.
      Parameters:
        `strGivenName` - Specifies First name.

    - #### setGivenName

          public void setGivenName(ST objST)

      Sets the Given Name.
      Parameters:
        `objST` - Specifies First name.

    - #### setSecondNameOrInitials

          public void setSecondNameOrInitials(java.lang.String strSecondNameOrInitials)

      Sets the Second Name Or Initials.
      Parameters:
        `strSecondNameOrInitials` - Specifies multiple middle names that may be included by separating them with spaces.

    - #### setSecondNameOrInitials

          public void setSecondNameOrInitials(ST objST)

      Sets the Second Name Or Initials.
      Parameters:
        `objST` - Specifies multiple middle names that may be included by separating them with spaces.

    - #### setSuffix

          public void setSuffix(java.lang.String strSuffix)

      Sets the Suffix.
      Parameters:
        `strSuffix` - Used to specify a name suffix (e.g., Jr. or III).

    - #### setSuffix

          public void setSuffix(ST objST)

      Sets the Suffix.
      Parameters:
        `objST` - Used to specify a name suffix (e.g., Jr. or III).

    - #### setPrefix

          public void setPrefix(java.lang.String strPrefix)

      Sets the Prefix.
      Parameters:
        `strPrefix` - Used to specify a name prefix (e.g., Dr.).

    - #### setPrefix

          public void setPrefix(ST objST)

      Sets the Prefix.
      Parameters:
        `objString` - Used to specify a name prefix (e.g., Dr.).

    - #### setNameTypeCode

          public void setNameTypeCode(java.lang.String strNameTypeCode)

      Sets the Name Type Code.
      Parameters:
        `strNameTypeCode` - Specifies a code that represents the type of name. Suggested values are A,B,C,D,I,L,M,N,P,R,S,T,U...[Refer table 0200.]

    - #### setNameTypeCode

          public void setNameTypeCode(ID objID)

      Sets the Name Type Code.
      Parameters:
        `objID` - Specifies a code that represents the type of name. Suggested values are A,B,C,D,I,L,M,N,P,R,S,T,U...[Refer table 0200.]

    - #### setNameRepresentationCode

          public void setNameRepresentationCode(java.lang.String strNameRepresentationCode)

      Sets the Name Representation Code.
      Parameters:
        `strNameRepresentationCode` - specifies representations of the same name/address Suggested values are I,A,P [Refer table 0465]

    - #### setNameRepresentationCode

          public void setNameRepresentationCode(ID objID)

      Sets the Name Representation Code.
      Parameters:
        `objID` - specifies representations of the same name/address Suggested values are I,A,P [Refer table 0465]

    - #### setNameContext

          public void setNameContext(CWE objNameContext)

      Sets the Name Context.
      Parameters:
        `objNameContext` - Designates the context in which a name is used. [Refer User-defined Table 0448 ]

    - #### setNameAssemblyOrder

          public void setNameAssemblyOrder(java.lang.String strNameAssemblyOrder)

      Sets the Name Assembly Order.
      Parameters:
        `strNameAssemblyOrder` - Specifies a code that represents the preferred display order of the components of this person name. Suggested values are G,F[Refer table 0444.]

    - #### setNameAssemblyOrder

          public void setNameAssemblyOrder(ID objID)

      Sets the Name Assembly Order.
      Parameters:
        `objID` - Specifies a code that represents the preferred display order of the components of this person name. Suggested values are G,F[Refer table 0444.]

    - #### setEffectiveDate

          public void setEffectiveDate(java.lang.String strEffectiveDate)

      Sets the Effective Date.
      Parameters:
        `strEffectiveDate` - Specifies the first date, if known, on which the address is valid and active.

    - #### setEffectiveDate

          public void setEffectiveDate(DTM objEffectiveDate)

      Sets the Effective Date.
      Parameters:
        `objEffectiveDate` - Specifies the first date, if known, on which the address is valid and active.

    - #### setExpirationDate

          public void setExpirationDate(java.lang.String strExpirationDate)

      Sets the Expiration Date.
      Parameters:
        `strExpirationDate` - Specifies the last date, if known, on which the address is valid and active.

    - #### setExpirationDate

          public void setExpirationDate(DTM objExpirationDate)

      Sets the Expiration Date.
      Parameters:
        `objExpirationDate` - Specifies the last date, if known, on which the address is valid and active.

    - #### setProfessionalSuffix

          public void setProfessionalSuffix(java.lang.String strProfessionalSuffix)

      Sets the Professional Suffix.
      Parameters:
        `strProfessionalSuffix` - Used to specify an abbreviation, or a string of abbreviations, denoting qualifications that support the person's profession, (e.g., licenses).

    - #### setProfessionalSuffix

          public void setProfessionalSuffix(ST objST)

      Sets the Professional Suffix.
      Parameters:
        `objST` - Used to specify an abbreviation, or a string of abbreviations, denoting qualifications that support the person's profession, (e.g., licenses).

    - #### setCalledBy

          public void setCalledBy(java.lang.String strCalledBy)

      Sets the Called By.
      Parameters:
        `strCalledBy` - Specifies First name.

    - #### setCalledBy

          public void setCalledBy(ST objST)

      Sets the Called By.
      Parameters:
        `objST` - Specifies First name.

    - #### getFamilyName

          public FN getFamilyName()

      Returns Family Name
      Returns:
        FN - data type.

    - #### getGivenName

          public ST getGivenName()

      Returns Given Name
      Returns:
        ST - data type.

    - #### getSecondGivenNamesInitials

          public ST getSecondGivenNamesInitials()

      Returns Second and Further Given Names or Initials Thereof
      Returns:
        ST - data type.

    - #### getSuffix

          public ST getSuffix()

      Returns Suffix (e.g., JR or III)
      Returns:
        ST - data type.

    - #### getPrefix

          public ST getPrefix()

      Returns Prefix (e.g., DR)
      Returns:
        ST - data type.

    - #### getNameTypeCode

          public ID getNameTypeCode()

      Returns Name Type Code
      Returns:
        ID - data type.

    - #### getNameRepresentationCode

          public ID getNameRepresentationCode()

      Returns Name Representation Code
      Returns:
        ID - data type.

    - #### getNameContext

          public CWE getNameContext()

      Returns Name Context
      Returns:
        CWE - data type.

    - #### getNameAssemblyOrder

          public ID getNameAssemblyOrder()

      Returns Name Assembly Order
      Returns:
        ID - data type.

    - #### getEffectiveDate

          public DTM getEffectiveDate()

      Returns Effective Date
      Returns:
        DTM - data type.

    - #### getExpirationDate

          public DTM getExpirationDate()

      Returns Expiration Date
      Returns:
        DTM - data type.

    - #### getProfessionalSuffix

          public ST getProfessionalSuffix()

      Returns Professional Suffix
      Returns:
        ST - data type.

    - #### getCalledBy

          public ST getCalledBy()

      Returns Called By
      Returns:
        ST - data type.

    - #### equals

          public boolean equals(java.lang.Object objObject)

      This method checks the equality of Object.
      Overrides:
        `equals` in class `java.lang.Object`
      Parameters:
        `objObject` - object of Object class.
      Returns:
        boolean - shows success or failure of the comparison.