cdac.medinfo.sdk.hl7282.baselibs

## Class XTN

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

- All Implemented Interfaces:
    IDataType

      public class XTN
      extends CompositeDataType

  XTN - Extended telecommunication number

  This data type specifies extended telecommunication number

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

  1. Telephone Number Withdrawn 2. Telecommunication Use Code (ID)Optional
  3. Telecommunication Equipment Type (ID)Required
  4. Communication Address (ST)Conditional
  5. Country Code (SNM)Optional
  6. Area/City Code (SNM)Optional
  7. Local Number (SNM)Conditional
  8. Extension (SNM)Conditional
  9. Any Text (ST)Optional
  10. Extension Prefix (ST)Optional
  11. Speed Dial Code (ST)Optional
  12. Unformatted Telephone number (ST)Conditional

  13. Effective Start Date (DTM)Optional

  14. Expiration Date (DTM)Optional

  15. Expiration Reason (CWE)Optional

  16. Protection Code (CWE)Optional

  17. Shared Telecommunication Identifier (EI)Optional

  18. Preference Order (NM)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
    `XTN()` Default Constructor for XTN
    `XTN(int iComponentType, IDataTypeMap objIDataTypeMap)` Constructor for XTN class which takes two arguments and sets the value in the respective member variable.
    `XTN(int iComponentType, int iMinLength, int iMaxLength, java.lang.String strCLength, IDataTypeMap objIDataTypeMap)` Constructor for XTN class which takes five arguments and sets the value in the respective member variable.
    `XTN(int iComponentType, int iMinLength, int iMaxLength, java.lang.String strCLength, int ITableNo, IDataTypeMap objIDataTypeMap)` Constructor for XTN class which takes six arguments and sets the value in the respective member variable.
    `XTN(int iMinLength, int iMaxLength, java.lang.String strCLength, int iComponentType)` Constructor for XTN class which takes four arguments and sets the value in the respective member variable.
    `XTN(int iMinLength, int iMaxLength, java.lang.String strCLength, int iTableNo, int iComponentType)` Constructor for XTN 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` | `getAnyText()` Returns Any Text
    `SNM` | `getAreaCityCode()` Returns Area/City Code
    `ST` | `getCommunicationAddress()` Returns Communication Address
    `SNM` | `getCountryCode()` Returns Country Code
    `DTM` | `getEffectiveStartDate()` Returns Effective Start Date
    `DTM` | `getExpirationDate()` Returns Expiration Date
    `CWE` | `getExpirationReason()` Returns Expiration Reason
    `SNM` | `getExtension()` Returns Extension
    `ST` | `getExtensionPrefix()` Returns Extension Prefix
    `SNM` | `getLocalNumber()` Returns Local Number
    `NM` | `getPreferenceOrder()` Returns Preference Order
    `CWE` | `getProtectionCode()` Returns Protection Code
    `EI` | `getSharedTelecommunicationIdentifier()` Returns Shared Telecommunication Identifier
    `ST` | `getSpeedDialCode()` Returns Speed Dial Code
    `ID` | `getTelecommunicationEquipmentType()` Returns Telecommunication Equipment Type
    `ID` | `getTelecommunicationUseCode()` Returns Telecommunication Use Code
    `ST` | `getUnformattedTelephonenumber()` Returns Unformatted Telephone number
    `void` | `setAnyText(ST objST)` Sets the AnyText.
    `void` | `setAnyText(java.lang.String strAnyText)` Sets the AnyText.
    `void` | `setAreaCityCode(SNM objSNM)` Sets the AreaCityCode.
    `void` | `setAreaCityCode(java.lang.String strAreaCityCode)` Sets the AreaCityCode.
    `void` | `setCommuinicationAddress(ST objST)` Sets the CommuinicationAddress.
    `void` | `setCommuinicationAddress(java.lang.String strCommuinicationAddress)` Sets the CommuinicationAddress.
    `void` | `setCountryCode(SNM objSNM)` Sets the CountryCode.
    `void` | `setCountryCode(java.lang.String strCountryCode)` Sets the CountryCode.
    `void` | `setEffectiveStartDate(DTM objDTM)` Sets the Effective Start Date.
    `void` | `setEffectiveStartDate(java.lang.String strEffectiveStartDate)` Sets the Effective Start Date.
    `void` | `setExpirationDate(DTM objDTM)` Sets the Expiration Date.
    `void` | `setExpirationDate(java.lang.String strExpirationDate)` Sets the Expiration Date.
    `void` | `setExpirationReason(CWE objCWE)` Sets the Expiration Reason.
    `void` | `setExtension(SNM objSNM)` Sets the Extension.
    `void` | `setExtension(java.lang.String strExtension)` Sets the Extension.
    `void` | `setExtensionPrefix(ST objST)` Sets the ExtensionPrefix.
    `void` | `setExtensionPrefix(java.lang.String strExtensionPrefix)` Sets the ExtensionPrefix.
    `void` | `setLocalNumber(SNM objSNM)` Sets the LocalNumber.
    `void` | `setLocalNumber(java.lang.String strLocalNumber)` Sets the LocalNumber.
    `void` | `setPreferenceOrder(NM objNM)` Sets the Preference Order.
    `void` | `setPreferenceOrder(java.lang.String strPreferenceOrder)` Sets the Preference Order.
    `void` | `setProtectionCode(CWE objCWE)` Sets the Protection Code .
    `void` | `setSharedTelecommunicationIdentifier(EI objEI)` Sets the Shared Telecommunication Identifier.
    `void` | `setSpeedDialCode(ST objST)` Sets the SpeedDialCode.
    `void` | `setSpeedDialCode(java.lang.String strSpeedDialCode)` Sets the SpeedDialCode.
    `void` | `setTelecommunicationEquipmentType(ID objID)` Sets the TelecommunicationEquipmentType.
    `void` | `setTelecommunicationEquipmentType(java.lang.String strTelecommunicationEquipmentType)` Sets the TelecommunicationEquipmentType.
    `void` | `setTelecommunicationUseCode(ID objID)` Sets the TelecommunicationUseCode.
    `void` | `setTelecommunicationUseCode(java.lang.String strTelecommunicationUseCode)` Sets the TelecommunicationUseCode.
    `void` | `setUnformattedTelephonenumber(ST objST)` Sets the UnformattedTelephonenumber.
    `void` | `setUnformattedTelephonenumber(java.lang.String strUnformattedPhNo)` Sets the UnformattedTelephonenumber.
    `boolean` | `validate()` The Method validates the Input value,and if validated properly then returns true.

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

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

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

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

- - ### Constructor Detail

    - #### XTN

          public XTN()

      Default Constructor for XTN

    - #### XTN

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

      Constructor for XTN 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.

    - #### XTN

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

      Constructor for XTN 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.

    - #### XTN

          public XTN(int iComponentType,
             IDataTypeMap objIDataTypeMap)

      Constructor for XTN 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.

    - #### XTN

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

      Constructor for XTN 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.

    - #### XTN

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

      Constructor for XTN 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

    - #### setTelecommunicationUseCode

          public void setTelecommunicationUseCode(java.lang.String strTelecommunicationUseCode)

      Sets the TelecommunicationUseCode.
      Parameters:
        `strTelecommunicationUseCode` - Specifies a code that represents a specific use of a telecommunication number. Suggested values are PRN,ORN,WPN,VHN,ASN,EMR,NET,BPN [Refer table 0201.]

    - #### setTelecommunicationUseCode

          public void setTelecommunicationUseCode(ID objID)

      Sets the TelecommunicationUseCode.
      Parameters:
        `objID` - Specifies a code that represents a specific use of a telecommunication number. Suggested values are PRN,ORN,WPN,VHN,ASN,EMR,NET,BPN [Refer table 0201.]

    - #### setTelecommunicationEquipmentType

          public void setTelecommunicationEquipmentType(java.lang.String strTelecommunicationEquipmentType)

      Sets the TelecommunicationEquipmentType.
      Parameters:
        `strTelecommunicationEquipmentType` - Specifies a code that represents the type of telecommunication equipment. Suggested values are PH,FX,MD,CP,BP,Internet,X.400,TDD,TTY [Refer table 0202.]

    - #### setTelecommunicationEquipmentType

          public void setTelecommunicationEquipmentType(ID objID)

      Sets the TelecommunicationEquipmentType.
      Parameters:
        `objID` - Specifies a code that represents the type of telecommunication equipment. Suggested values are PH,FX,MD,CP,BP,Internet,X.400,TDD,TTY [Refer table 0202.]

    - #### setCommuinicationAddress

          public void setCommuinicationAddress(java.lang.String strCommuinicationAddress)

      Sets the CommuinicationAddress.
      Parameters:
        `strCommuinicationAddress` - Specifies Email address.

    - #### setCommuinicationAddress

          public void setCommuinicationAddress(ST objST)

      Sets the CommuinicationAddress.
      Parameters:
        `objST` - Specifies Email address.

    - #### setCountryCode

          public void setCountryCode(java.lang.String strCountryCode)

      Sets the CountryCode.
      Parameters:
        `strCountryCode` - Specifies the Country code.

    - #### setCountryCode

          public void setCountryCode(SNM objSNM)

      Sets the CountryCode.
      Parameters:
        `objSNM` - Specifies the Country code.

    - #### setAreaCityCode

          public void setAreaCityCode(java.lang.String strAreaCityCode)

      Sets the AreaCityCode.
      Parameters:
        `strAreaCityCode` - Specifies the area /City Code.

    - #### setAreaCityCode

          public void setAreaCityCode(SNM objSNM)

      Sets the AreaCityCode.
      Parameters:
        `objSNM` - Specifies the area /City Code.

    - #### setLocalNumber

          public void setLocalNumber(java.lang.String strLocalNumber)

      Sets the LocalNumber.
      Parameters:
        `strLocalNumber` - Specifies an Local Number.

    - #### setLocalNumber

          public void setLocalNumber(SNM objSNM)

      Sets the LocalNumber.
      Parameters:
        `objSNM` - Specifies an Local Number.

    - #### setExtension

          public void setExtension(java.lang.String strExtension)

      Sets the Extension.
      Parameters:
        `strExtension` - Specifies an Extension.

    - #### setExtension

          public void setExtension(SNM objSNM)

      Sets the Extension.
      Parameters:
        `objSNM` - Specifies an Extension.

    - #### setAnyText

          public void setAnyText(java.lang.String strAnyText)

      Sets the AnyText.
      Parameters:
        `strAnyText` - Contains comments with respect to the telephone number.

    - #### setAnyText

          public void setAnyText(ST objST)

      Sets the AnyText.
      Parameters:
        `objST` - Contains comments with respect to the telephone number.

    - #### setExtensionPrefix

          public void setExtensionPrefix(java.lang.String strExtensionPrefix)

      Sets the ExtensionPrefix.
      Parameters:
        `strExtensionPrefix` - Specifies the characters established within a company's internal telephone system network used as a prefix to the Extension component for internal dialing.

    - #### setExtensionPrefix

          public void setExtensionPrefix(ST objST)

      Sets the ExtensionPrefix.
      Parameters:
        `objST` - Specifies the characters established within a company's internal telephone system network used as a prefix to the Extension component for internal dialing.

    - #### setSpeedDialCode

          public void setSpeedDialCode(java.lang.String strSpeedDialCode)

      Sets the SpeedDialCode.
      Parameters:
        `strSpeedDialCode` - Specifies The characters established within a company's internal telephone system used in place of the (external) telephone number.

    - #### setSpeedDialCode

          public void setSpeedDialCode(ST objST)

      Sets the SpeedDialCode.
      Parameters:
        `objST` - Specifies The characters established within a company's internal telephone system used in place of the (external) telephone number.

    - #### setUnformattedTelephonenumber

          public void setUnformattedTelephonenumber(java.lang.String strUnformattedPhNo)

      Sets the UnformattedTelephonenumber.
      Parameters:
        `strUnformattedPhNo` - Specifies an expression of the telephone number as an unparsible string.

    - #### setUnformattedTelephonenumber

          public void setUnformattedTelephonenumber(ST objST)

      Sets the UnformattedTelephonenumber.
      Parameters:
        `objST` - Specifies an expression of the telephone number as an unparsible string.

    - #### setEffectiveStartDate

          public void setEffectiveStartDate(java.lang.String strEffectiveStartDate)

      Sets the Effective Start Date.
      Parameters:
        `strEffectiveStartDate` - Specifies The first date, if known, on which the telecommunication number is valid and active.

    - #### setEffectiveStartDate

          public void setEffectiveStartDate(DTM objDTM)

      Sets the Effective Start Date.
      Parameters:
        `objDTM` - Specifies The first date, if known, on which the telecommunication number 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 telecommunication number is valid and active.

    - #### setExpirationDate

          public void setExpirationDate(DTM objDTM)

      Sets the Expiration Date.
      Parameters:
        `objDTM` - Specifies The last date, if known, on which the telecommunication number is valid and active.

    - #### setExpirationReason

          public void setExpirationReason(CWE objCWE)

      Sets the Expiration Reason.
      Parameters:
        `objCWE` - Specifies Indicates why this contact number/e-mail was marked as "ended".

    - #### setProtectionCode

          public void setProtectionCode(CWE objCWE)

      Sets the Protection Code .
      Parameters:
        `objCWE` - Indicates whether this information is considered sensitive or should be protected in some way.

    - #### setSharedTelecommunicationIdentifier

          public void setSharedTelecommunicationIdentifier(EI objEI)

      Sets the Shared Telecommunication Identifier.
      Parameters:
        `objEI` - A unique identifier for the phone number or e-mail address.

    - #### setPreferenceOrder

          public void setPreferenceOrder(java.lang.String strPreferenceOrder)

      Sets the Preference Order.
      Parameters:
        `strPreferenceOrder` - indicates which is the "most preferred" (lowest number) to "least preferred" (highest number).

    - #### setPreferenceOrder

          public void setPreferenceOrder(NM objNM)

      Sets the Preference Order.
      Parameters:
        `objNM` - indicates which is the "most preferred" (lowest number) to "least preferred" (highest number).

    - #### getTelecommunicationUseCode

          public ID getTelecommunicationUseCode()

      Returns Telecommunication Use Code
      Returns:
        ID - data type.

    - #### getTelecommunicationEquipmentType

          public ID getTelecommunicationEquipmentType()

      Returns Telecommunication Equipment Type
      Returns:
        ID - data type.

    - #### getCommunicationAddress

          public ST getCommunicationAddress()

      Returns Communication Address
      Returns:
        ST - data type.

    - #### getCountryCode

          public SNM getCountryCode()

      Returns Country Code
      Returns:
        SNM - data type.

    - #### getAreaCityCode

          public SNM getAreaCityCode()

      Returns Area/City Code
      Returns:
        SNM - data type.

    - #### getLocalNumber

          public SNM getLocalNumber()

      Returns Local Number
      Returns:
        SNM - data type.

    - #### getExtension

          public SNM getExtension()

      Returns Extension
      Returns:
        SNM - data type.

    - #### getAnyText

          public ST getAnyText()

      Returns Any Text
      Returns:
        ST - data type.

    - #### getExtensionPrefix

          public ST getExtensionPrefix()

      Returns Extension Prefix
      Returns:
        ST - data type.

    - #### getSpeedDialCode

          public ST getSpeedDialCode()

      Returns Speed Dial Code
      Returns:
        ST - data type.

    - #### getUnformattedTelephonenumber

          public ST getUnformattedTelephonenumber()

      Returns Unformatted Telephone number
      Returns:
        ST - data type.

    - #### getEffectiveStartDate

          public DTM getEffectiveStartDate()

      Returns Effective Start Date
      Returns:
        DTM - data type.

    - #### getExpirationDate

          public DTM getExpirationDate()

      Returns Expiration Date
      Returns:
        DTM - data type.

    - #### getExpirationReason

          public CWE getExpirationReason()

      Returns Expiration Reason
      Returns:
        CWE - data type.

    - #### getProtectionCode

          public CWE getProtectionCode()

      Returns Protection Code
      Returns:
        CWE - data type.

    - #### getSharedTelecommunicationIdentifier

          public EI getSharedTelecommunicationIdentifier()

      Returns Shared Telecommunication Identifier
      Returns:
        EI - data type.

    - #### getPreferenceOrder

          public NM getPreferenceOrder()

      Returns Preference Order
      Returns:
        NM - data type.

    - #### validate

          public boolean validate()
                           throws InvalidDataTypeException

      The Method validates the Input value,and if validated properly then returns true. Here the validation is based on the compulsory fields for the Datatype.
      Specified by:
        `validate` in interface `IDataType`
      Overrides:
        `validate` in class `CompositeDataType`
      Returns:
        boolean - true or false.
      Throws:
        `InvalidDataTypeException` - - if Invalid values is entered or Mandatory field is missing.

    - #### 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.