cdac.medinfo.sdk.hl7282.baselibs

## Class CNN

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

- All Implemented Interfaces:
    IDataType

      public class CNN
      extends CompositeDataType

  CNN - Composite ID Number and Name Simplified

  This data type specifies a person using both an identifier and the person's name

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

  1. ID Number (ST)Optional
  2. Family Name (ST)Optional
  3. Given Name (ST)Optional
  4. Second and Further Given Names or Initials Thereof (ST)Optional
  5. Suffix (e.g., JR or III) (ST)Optional
  6. Prefix (e.g., DR) (ST)Optional
  7. Degree (e.g., MD (IS)Optional
  8. Source Table (IS)Conditional
  9. Assigning Authority - Namespace ID (IS)Conditional
  10. Assigning Authority - Universal ID (ST)Conditional
  11. Assigning Authority - Universal ID Type (ID)Conditional

  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
    `CNN()` Default Constructor for CNN
    `CNN(int iComponentType, IDataTypeMap objIDataTypeMap)` Constructor for CNN class which takes two arguments and sets the value in the respective member variable.
    `CNN(int iComponentType, int iMinLength, int iMaxLength, java.lang.String strCLength, IDataTypeMap objIDataTypeMap)` Constructor for CNN class which takes five arguments and sets the value in the respective member variable.
    `CNN(int iComponentType, int iMinLength, int iMaxLength, java.lang.String strCLength, int ITableNo, IDataTypeMap objIDataTypeMap)` Constructor for CNN class which takes six arguments and sets the value in the respective member variable.
    `CNN(int iMinLength, int iMaxLength, java.lang.String strCLength, int iComponentType)` Constructor for CNN class which takes four arguments and sets the value in the respective member variable.
    `CNN(int iMinLength, int iMaxLength, java.lang.String strCLength, int iTableNo, int iComponentType)` Constructor for CNN 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.
    `IS` | `getAssigningAuthorityNamespaceID()` Returns Assigning Authority - Namespace ID
    `ST` | `getAssigningAuthorityUniversalID()` Returns Assigning Authority - Universal ID
    `ID` | `getAssigningAuthorityUniversalIDType()` Returns Assigning Authority - Universal ID Type
    `IS` | `getDegree()` Returns Degree (e.g., MD
    `ST` | `getFamilyName()` Returns Family Name
    `ST` | `getGivenName()` Returns Given Name
    `ST` | `getIDNumber()` Returns ID Number
    `ST` | `getPrefix()` Returns Prefix (e.g., DR)
    `ST` | `getSecondGivenNamesInitials()` Returns Second and Further Given Names or Initials Thereof
    `IS` | `getSourceTable()` Returns SourceTable
    `ST` | `getSuffix()` Returns Suffix (e.g., JR or III)
    `void` | `setAssigningAuthorityNamespaceId(IS objIS)` Sets the Assigning Authority Namespace Id.
    `void` | `setAssigningAuthorityNamespaceId(java.lang.String strAssigningAuthorityNamespaceId)` Sets the Assigning Authority Namespace Id.
    `void` | `setAssigningAuthorityUniversalId(ST objST)` sets the Assigning Authority Universal Id.
    `void` | `setAssigningAuthorityUniversalId(java.lang.String strAssigningAuthorityUniversalId)` sets the Assigning Authority Universal Id.
    `void` | `setAssigningAuthorityUniversalIdType(ID objID)` Sets the Assigning Authority Universal Id Type.
    `void` | `setAssigningAuthorityUniversalIdType(java.lang.String strAssigningAuthorityUniversalIdType)` Sets the Assigning Authority Universal Id Type.
    `void` | `setDegree(IS objIS)` Sets the Degree
    `void` | `setDegree(java.lang.String strDegree)` Sets the Degree
    `void` | `setFamilyName(ST objST)` Sets the Family Name.
    `void` | `setFamilyName(java.lang.String strFamilyName)` Sets the Family Name.
    `void` | `setGivenName(ST objST)` Sets the Given Name.
    `void` | `setGivenName(java.lang.String strGivenName)` Sets the Given Name.
    `void` | `setIdNumber(ST objST)` Sets the Id Number.
    `void` | `setIdNumber(java.lang.String strIdNumber)` Sets the Id Number.
    `void` | `setPrefix(ST objST)` Sets the Prefix
    `void` | `setPrefix(java.lang.String strPrefix)` Sets the Prefix
    `void` | `setSecondNamesOrInitials(ST objST)` Sets the Second Names Or Initials.
    `void` | `setSecondNamesOrInitials(java.lang.String strSecondNamesOrInitials)` Sets the Second Names Or Initials.
    `void` | `setSourceTable(IS objIS)` Sets the Source Table
    `void` | `setSourceTable(java.lang.String strSourceTable)` Sets the Source Table
    `void` | `setSuffix(ST objST)` Sets the Suffix
    `void` | `setSuffix(java.lang.String strSuffix)` Sets the Suffix
    `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

    - #### CNN

          public CNN()

      Default Constructor for CNN

    - #### CNN

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

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

    - #### CNN

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

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

    - #### CNN

          public CNN(int iComponentType,
             IDataTypeMap objIDataTypeMap)

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

    - #### CNN

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

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

    - #### CNN

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

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

    - #### setIdNumber

          public void setIdNumber(java.lang.String strIdNumber)

      Sets the Id Number.
      Parameters:
        `strIdNumber` - Specifies coded ID according to a user-defined table.

    - #### setIdNumber

          public void setIdNumber(ST objST)

      Sets the Id Number.
      Parameters:
        `objST` - Specifies coded ID according to a user-defined table.

    - #### setFamilyName

          public void setFamilyName(java.lang.String strFamilyName)

      Sets the Family Name.
      Parameters:
        `strFamilyName` - Specifies the person's family name in a string format.

    - #### setFamilyName

          public void setFamilyName(ST objST)

      Sets the Family Name.
      Parameters:
        `objST` - Specifies the person's family name in a string format.

    - #### setGivenName

          public void setGivenName(java.lang.String strGivenName)

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

    - #### setGivenName

          public void setGivenName(ST objST)

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

    - #### setSecondNamesOrInitials

          public void setSecondNamesOrInitials(java.lang.String strSecondNamesOrInitials)

      Sets the Second Names Or Initials.
      Parameters:
        `strSecondNamesOrInitials` - Specifies second names or initials.

    - #### setSecondNamesOrInitials

          public void setSecondNamesOrInitials(ST objST)

      Sets the Second Names Or Initials.
      Parameters:
        `objST` - Specifies second names or initials.

    - #### setSuffix

          public void setSuffix(java.lang.String strSuffix)

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

    - #### setSuffix

          public void setSuffix(ST objST)

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

    - #### setPrefix

          public void setPrefix(java.lang.String strPrefix)

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

    - #### setPrefix

          public void setPrefix(ST objST)

      Sets the Prefix
      Parameters:
        `objST` - Specifies a name prefix (e.g., Dr.).

    - #### setDegree

          public void setDegree(java.lang.String strDegree)

      Sets the Degree
      Parameters:
        `strDegree` - Specifies an educational degree (e.g., MD).[Refer to User-defined Table 0360 Degree]

    - #### setDegree

          public void setDegree(IS objIS)

      Sets the Degree
      Parameters:
        `objIS` - Specifies an educational degree (e.g., MD).[Refer to User-defined Table 0360 Degree]

    - #### setSourceTable

          public void setSourceTable(java.lang.String strSourceTable)

      Sets the Source Table
      Parameters:
        `strSourceTable` - [Refer to User-defined Table 0297 - CN ID source]

    - #### setSourceTable

          public void setSourceTable(IS objIS)

      Sets the Source Table
      Parameters:
        `objString` - [Refer to User-defined Table 0297 - CN ID source]

    - #### setAssigningAuthorityNamespaceId

          public void setAssigningAuthorityNamespaceId(java.lang.String strAssigningAuthorityNamespaceId)

      Sets the Assigning Authority Namespace Id.
      Parameters:
        `strAssigningAuthorityNamespaceId` - Specifies a unique name of the system (or organization or agency or department) that creates the data.

    - #### setAssigningAuthorityNamespaceId

          public void setAssigningAuthorityNamespaceId(IS objIS)

      Sets the Assigning Authority Namespace Id.
      Parameters:
        `objIS` - Specifies a unique name of the system (or organization or agency or department) that creates the data.

    - #### setAssigningAuthorityUniversalId

          public void setAssigningAuthorityUniversalId(java.lang.String strAssigningAuthorityUniversalId)

      sets the Assigning Authority Universal Id.
      Parameters:
        `strAssigningAuthorityUniversalId` - If CNN.11 is valued, this component must be valued.

    - #### setAssigningAuthorityUniversalId

          public void setAssigningAuthorityUniversalId(ST objST)

      sets the Assigning Authority Universal Id.
      Parameters:
        `objST` - If CNN.11 is valued, this component must be valued.

    - #### setAssigningAuthorityUniversalIdType

          public void setAssigningAuthorityUniversalIdType(java.lang.String strAssigningAuthorityUniversalIdType)

      Sets the Assigning Authority Universal Id Type.
      Parameters:
        `strAssigningAuthorityUniversalIdType` - If CNN.10 is valued, this component must be valued.

    - #### setAssigningAuthorityUniversalIdType

          public void setAssigningAuthorityUniversalIdType(ID objID)

      Sets the Assigning Authority Universal Id Type.
      Parameters:
        `objID` - If CNN.10 is valued, this component must be valued.

    - #### getIDNumber

          public ST getIDNumber()

      Returns ID Number
      Returns:
        ST - data type.

    - #### getFamilyName

          public ST getFamilyName()

      Returns Family Name
      Returns:
        ST - 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.

    - #### getDegree

          public IS getDegree()

      Returns Degree (e.g., MD
      Returns:
        IS - data type.

    - #### getSourceTable

          public IS getSourceTable()

      Returns SourceTable
      Returns:
        IS - data type.

    - #### getAssigningAuthorityNamespaceID

          public IS getAssigningAuthorityNamespaceID()

      Returns Assigning Authority - Namespace ID
      Returns:
        IS - data type.

    - #### getAssigningAuthorityUniversalID

          public ST getAssigningAuthorityUniversalID()

      Returns Assigning Authority - Universal ID
      Returns:
        ST - data type.

    - #### getAssigningAuthorityUniversalIDType

          public ID getAssigningAuthorityUniversalIDType()

      Returns Assigning Authority - Universal ID Type
      Returns:
        ID - data type.

    - #### validate

          public boolean validate()
                           throws InvalidDataTypeException

      The Method validates the Input value,and if validated properly then returns true. Here the validetion 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.