cdac.medinfo.sdk.hl7282.baselibs.segments

## Class ERR

- java.lang.Object
- - cdac.medinfo.sdk.hl7282.baselibs.segments.Segment
  - - cdac.medinfo.sdk.hl7282.baselibs.segments.ERR

- All Implemented Interfaces:
    ISegment

      public class ERR
      extends Segment

  ERR - error segment

  The ERR segment is used to add error comments to acknowledgment messages.

  Represents an HL7 ERR message segment. This segment has the following fields:

  ERR-1: Error Code and Location (ELD)Withdrawn
  ERR-2: Error Location (ERL)Optional
  ERR-3: HL7 Error Code (CWE)Required
  ERR-4: Severity (ID)Required
  ERR-5: Application Error Code (CWE)Optional
  ERR-6: Application Error Parameter (ST)Optional
  ERR-7: Diagnostic Information (TX)Optional
  ERR-8: User Message (TX)Optional
  ERR-9: Inform Person Indicator (CWE)Optional
  ERR-10: Override Type (CWE)Optional
  ERR-11: Override Reason Code (CWE)Optional
  ERR-12: Help Desk Contact Point (XTN)Optional

  This class provides mechanism to validate message against HL7 v 2.8.2 standard. The class provides accessors & mutators for the elements mentioned above. The class has validate method which validates Message against HL7 v 2.8.2 standard.

  User can also create Segment through `SegmentFactory`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ERR()` Constructs the ERR segment.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addApplicationErrorParameter(ST ApplicationErrorParameter)` Add the Application Error Parameter.
    `void` | `addApplicationErrorParameter(java.lang.String strApplicationErrorParameter)` Add the Application Error Parameter.
    `void` | `addErrorLocation(ERL ErrorLocation)` Add the Error Location.
    `void` | `addErrorLocation(java.lang.String strSegmentId, java.lang.String strSegmentSequence, java.lang.String strFieldPosition, java.lang.String strFieldRepetition, java.lang.String strComponentNumber, java.lang.String strSubComponentNumber)` Add the Error Location.
    `void` | `addHelpDeskContactPoint(java.lang.String strTeleCommunicationUseCode, java.lang.String strTeleCommunicationEquipmentType, java.lang.String strCommuinicationAddress, java.lang.String strCountryCode, java.lang.String strAreaCityCode, java.lang.String strLocalNumber, java.lang.String strExtension, java.lang.String strAnyText, java.lang.String strExtensionPrefix, java.lang.String strSpeedDialCode, java.lang.String strUnformattedTelephoneNumber, java.lang.String strEffectiveStartDate, java.lang.String strExpirationDate, CWE objExpirationReason, CWE objProtectionCode, EI objSharedTelecommunicationIdentifier, java.lang.String strPreferenceOrder)` Add the Help Desk Contact Point.
    `void` | `addHelpDeskContactPoint(XTN HelpDeskContactPoint)` Add the Help Desk Contact Point.
    `void` | `addInformPersonIndicator(CWE InformPersonIndicator)` Add the Inform Person Indicator.
    `void` | `addInformPersonIndicator(java.lang.String strIdentifier, java.lang.String strText, java.lang.String strNameOfCodingSystem, java.lang.String strAlternateIdentifier, java.lang.String strAlternateText, java.lang.String strNameOfAlternateCodingSystem, java.lang.String strCodingSystemVersionID, java.lang.String strAlternateCodingSystemVersionId, java.lang.String strOriginalText, java.lang.String strSecondAlternateIdentifier, java.lang.String strSecondAlternateText, java.lang.String strNameofSecondAlternateCodingSystem, java.lang.String strSecondAlternateCodingSystemVersionID, java.lang.String strCodingSystemOID, java.lang.String strValueSetOID, java.lang.String strValueSetVersionID, java.lang.String strAlternateCodingSystemOID, java.lang.String strAlternateValueSetOID, java.lang.String strAlternateValueSetVersionID, java.lang.String strSecondAlternateCodingSystemOID, java.lang.String strSecondAlternateValueSetOID, java.lang.String strSecondAlternateValueSetVersionID)` Add the Inform Person Indicator.
    `void` | `addOverrideReasonCode(CWE OverrideReasonCode)` Add the Override Reason Code.
    `void` | `addOverrideReasonCode(java.lang.String strIdentifier, java.lang.String strText, java.lang.String strNameOfCodingSystem, java.lang.String strAlternateIdentifier, java.lang.String strAlternateText, java.lang.String strNameOfAlternateCodingSystem, java.lang.String strCodingSystemVersionID, java.lang.String strAlternateCodingSystemVersionId, java.lang.String strOriginalText, java.lang.String strSecondAlternateIdentifier, java.lang.String strSecondAlternateText, java.lang.String strNameofSecondAlternateCodingSystem, java.lang.String strSecondAlternateCodingSystemVersionID, java.lang.String strCodingSystemOID, java.lang.String strValueSetOID, java.lang.String strValueSetVersionID, java.lang.String strAlternateCodingSystemOID, java.lang.String strAlternateValueSetOID, java.lang.String strAlternateValueSetVersionID, java.lang.String strSecondAlternateCodingSystemOID, java.lang.String strSecondAlternateValueSetOID, java.lang.String strSecondAlternateValueSetVersionID)` Add the Override Reason Code.
    `CWE` | `getApplicationErrorCode()` Retrieves the Application Error Code.
    `ISingleCollection<ST>` | `getApplicationErrorParameter()` Retrieves the Application Error Parameter.
    `TX` | `getDiagnosticInformation()` Retrieves the Diagnostic Information.
    `ISingleCollection<ERL>` | `getErrorLocation()` Retrieves the Error Location.
    `ISingleCollection<XTN>` | `getHelpDeskContactPoint()` Retrieves the Help Desk Contact Point.
    `CWE` | `getHL7ErrorCode()` Retrieves the HL7 Error Code.
    `ISingleCollection<CWE>` | `getInformPersonIndicator()` Retrieves the Inform Person Indicator.
    `ISingleCollection<CWE>` | `getOverrideReasonCode()` Retrieves the Override Reason Code.
    `CWE` | `getOverrideType()` Retrieves the Override Type.
    `ID` | `getSeverity()` Retrieves the Severity.
    `TX` | `getUserMessage()` Retrieves the User Message.
    `void` | `setApplicationErrorCode(CWE applicationErrorCode)` Set the Application Error Code.
    `void` | `setApplicationErrorCode(java.lang.String strIdentifier, java.lang.String strText, java.lang.String strNameOfCodingSystem, java.lang.String strAlternateIdentifier, java.lang.String strAlternateText, java.lang.String strNameOfAlternateCodingSystem, java.lang.String strCodingSystemVersionID, java.lang.String strAlternateCodingSystemVersionId, java.lang.String strOriginalText, java.lang.String strSecondAlternateIdentifier, java.lang.String strSecondAlternateText, java.lang.String strNameofSecondAlternateCodingSystem, java.lang.String strSecondAlternateCodingSystemVersionID, java.lang.String strCodingSystemOID, java.lang.String strValueSetOID, java.lang.String strValueSetVersionID, java.lang.String strAlternateCodingSystemOID, java.lang.String strAlternateValueSetOID, java.lang.String strAlternateValueSetVersionID, java.lang.String strSecondAlternateCodingSystemOID, java.lang.String strSecondAlternateValueSetOID, java.lang.String strSecondAlternateValueSetVersionID)` Set the Application Error Code.
    `void` | `setApplicationErrorParameter(ISingleCollection<ST> objApplicationErrorParameterList)` Set the Application Error Parameter List.
    `void` | `setDiagnosticInformation(java.lang.String strDiagnosticInformation)` Set the Diagnostic Information.
    `void` | `setDiagnosticInformation(TX diagnosticInformation)` Set the Diagnostic Information.
    `void` | `setErrorLocation(ISingleCollection<ERL> objErrorLocationList)` Set the Error Location.
    `void` | `setHelpDeskContactPoint(ISingleCollection<XTN> objHelpDeskContactPointList)` Set the Help Desk ContactPoint.
    `void` | `setHL7ErrorCode(CWE hL7ErrorCode)` Set the HL7 Error Code.
    `void` | `setHL7ErrorCode(java.lang.String strIdentifier, java.lang.String strText, java.lang.String strNameOfCodingSystem, java.lang.String strAlternateIdentifier, java.lang.String strAlternateText, java.lang.String strNameOfAlternateCodingSystem, java.lang.String strCodingSystemVersionID, java.lang.String strAlternateCodingSystemVersionId, java.lang.String strOriginalText, java.lang.String strSecondAlternateIdentifier, java.lang.String strSecondAlternateText, java.lang.String strNameofSecondAlternateCodingSystem, java.lang.String strSecondAlternateCodingSystemVersionID, java.lang.String strCodingSystemOID, java.lang.String strValueSetOID, java.lang.String strValueSetVersionID, java.lang.String strAlternateCodingSystemOID, java.lang.String strAlternateValueSetOID, java.lang.String strAlternateValueSetVersionID, java.lang.String strSecondAlternateCodingSystemOID, java.lang.String strSecondAlternateValueSetOID, java.lang.String strSecondAlternateValueSetVersionID)` Set the HL7 Error Code.
    `void` | `setInformPersonIndicator(ISingleCollection<CWE> objInformPersonIndicatorList)` Set the Inform Person Indicator.
    `void` | `setOverrideReasonCode(ISingleCollection<CWE> objOverrideReasonCodeList)` Set the Override Reason Code.
    `void` | `setOverrideType(CWE overrideType)` Set the Override Type.
    `void` | `setOverrideType(java.lang.String strIdentifier, java.lang.String strText, java.lang.String strNameOfCodingSystem, java.lang.String strAlternateIdentifier, java.lang.String strAlternateText, java.lang.String strNameOfAlternateCodingSystem, java.lang.String strCodingSystemVersionID, java.lang.String strAlternateCodingSystemVersionId, java.lang.String strOriginalText, java.lang.String strSecondAlternateIdentifier, java.lang.String strSecondAlternateText, java.lang.String strNameofSecondAlternateCodingSystem, java.lang.String strSecondAlternateCodingSystemVersionID, java.lang.String strCodingSystemOID, java.lang.String strValueSetOID, java.lang.String strValueSetVersionID, java.lang.String strAlternateCodingSystemOID, java.lang.String strAlternateValueSetOID, java.lang.String strAlternateValueSetVersionID, java.lang.String strSecondAlternateCodingSystemOID, java.lang.String strSecondAlternateValueSetOID, java.lang.String strSecondAlternateValueSetVersionID)` Set the Override Type.
    `void` | `setSeverity(ID severity)` Set the Severity.
    `void` | `setSeverity(java.lang.String strSeverity)` Set the Severity.
    `void` | `setUserMessage(java.lang.String strUserMessage)` Set the User Message.
    `void` | `setUserMessage(TX userMessage)` Set the User Message.
    `boolean` | `validate()` Validates HL7 Message objects .

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

      `addUnRecognizedField, dumpSegment, getFields, getName, getUnrecognizedFields, moveToNextSegment, parse, removeDataElement, removeDataElement, serialize, setName, setUnRecognizedField, updateDataElement, updateDataElement, writeToXML`

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

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

- - ### Constructor Detail

    - #### ERR

          public ERR()

      Constructs the ERR segment.

  - ### Method Detail

    - #### getApplicationErrorCode

          public CWE getApplicationErrorCode()

      Retrieves the Application Error Code. This field contains Application specific code identifying the specific error that occurred.
      Returns:
        CWE - applicationErrorCode

    - #### getApplicationErrorParameter

          public ISingleCollection<ST> getApplicationErrorParameter()

      Retrieves the Application Error Parameter. This field contains Additional information to be used, together with the Application Error Code, to understand a particular error condition/warning/etc.
      Returns:
        ISingleCollection - applicationErrorParameter

    - #### getDiagnosticInformation

          public TX getDiagnosticInformation()

      Retrieves the Diagnostic Information. This field contains information that may be used by help desk or other support personnel to diagnose a problem.
      Returns:
        TX - diagnosticInformation

    - #### getErrorLocation

          public ISingleCollection<ERL> getErrorLocation()

      Retrieves the Error Location. This field identify the location in a message related to the identified error, warning or message.
      Returns:
        ISingleCollection - errorLocation

    - #### getHelpDeskContactPoint

          public ISingleCollection<XTN> getHelpDeskContactPoint()

      Retrieves the Help Desk Contact Point. This field specify the lists of phone, e-mail, fax, and other relevant numbers for helpdesk support related to the specified error.
      Returns:
        ISingleCollection - helpDeskContactPoint

    - #### getHL7ErrorCode

          public CWE getHL7ErrorCode()

      Retrieves the HL7 Error Code. This field identify the HL7 (communications) error code.
      Returns:
        CWE - hL7ErrorCode

    - #### getInformPersonIndicator

          public ISingleCollection<CWE> getInformPersonIndicator()

      Retrieves the Inform Person Indicator. This field specify the code to indicate who(if anyone) should be informed of the error. This field may also be used to indicate that a particular person should NOT be informed of the error.
      Returns:
        ISingleCollection - informPersonIndicator

    - #### getOverrideReasonCode

          public ISingleCollection<CWE> getOverrideReasonCode()

      Retrieves the Override Reason Code. This field specify the list of potential override codes that can be used to override enforcement of the application rule that generated the error.
      Returns:
        ISingleCollection - overrideReasonCode

    - #### getOverrideType

          public CWE getOverrideType()

      Retrieves the Override Type. This field identify what type of override can be used to override the specific error identified.
      Returns:
        CWE - overrideType

    - #### getSeverity

          public ID getSeverity()

      Retrieves the Severity. This field identify the severity of an application error.
      Returns:
        ID - severity

    - #### getUserMessage

          public TX getUserMessage()

      Retrieves the User Message. This field specify the text message to be displayed to the application user.
      Returns:
        TX - userMessage

    - #### setApplicationErrorCode

          public void setApplicationErrorCode(java.lang.String strIdentifier,
                                     java.lang.String strText,
                                     java.lang.String strNameOfCodingSystem,
                                     java.lang.String strAlternateIdentifier,
                                     java.lang.String strAlternateText,
                                     java.lang.String strNameOfAlternateCodingSystem,
                                     java.lang.String strCodingSystemVersionID,
                                     java.lang.String strAlternateCodingSystemVersionId,
                                     java.lang.String strOriginalText,
                                     java.lang.String strSecondAlternateIdentifier,
                                     java.lang.String strSecondAlternateText,
                                     java.lang.String strNameofSecondAlternateCodingSystem,
                                     java.lang.String strSecondAlternateCodingSystemVersionID,
                                     java.lang.String strCodingSystemOID,
                                     java.lang.String strValueSetOID,
                                     java.lang.String strValueSetVersionID,
                                     java.lang.String strAlternateCodingSystemOID,
                                     java.lang.String strAlternateValueSetOID,
                                     java.lang.String strAlternateValueSetVersionID,
                                     java.lang.String strSecondAlternateCodingSystemOID,
                                     java.lang.String strSecondAlternateValueSetOID,
                                     java.lang.String strSecondAlternateValueSetVersionID)

      Set the Application Error Code. This field contains Application specific code identifying the specific error that occurred.
      Parameters:
        `strIdentifier` - Specifies of characters (the code) that uniquely identifies the item being referenced.
        `strText` - Specifies The descriptive or textual name of the identifier, e.g., myocardial infarction.
        `strNameOfCodingSystem` - Identifies the coding scheme being used in the identifier component.
        `strAlternateIdentifier` - Specifies an alternate sequence of characters (the code) that uniquely identifies the item being referenced.
        `strAlternateText` - Specifies the descriptive or textual name of the alternate identifier. See usage note in section introduction.
        `strNameOfAlternateCodingSystem` - Identifies the coding scheme being used in the alternate identifier component.
        `strCodingSystemVersionID` - A sequence of characters that uniquely identifies a second alternate code.
        `strAlternateCodingSystemVersionId` - This component carries the version for the coding system identified by components 4-6.
        `strOriginalText` - The text as seen and/or selected by the user who entered the data.
        `strSecondAlternateIdentifier` - A sequence of characters that uniquely identifies a second alternate code.
        `strSecondAlternateText` - The descriptive or textual name of the alternate identifier.
        `strNameofSecondAlternateCodingSystem` - Identifies the coding scheme being used in the alternate identifier component.
        `strSecondAlternateCodingSystemVersionID` - This component carries the version for the coding system identified by components 10-12.
        `strCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.3.
        `strValueSetOID` - This component contains the ISO Object Identifier (OID) to allow identification of the value set from which the value in CWE.1 is obtained.
        `strValueSetVersionID` - This component carries the version for the value set identified by CWE.15. The version is a date. The date is the date/time that the value set being used was published.
        `strAlternateCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.6.
        `strAlternateValueSetOID` - This component contains the ISO Object Identifier (OID) to allow identification of the value set from which the value in CWE.4 is obtained.
        `strAlternateValueSetVersionID` - This component carries the version for the value set identified by CWE.18. The version is a date.
        `strSecondAlternateCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.12.
        `strSecondAlternateValueSetOID` - This component contains the ISO Object Identifier (OID) to allow identification of the value set from which the value in CWE.10 is obtained.
        `strSecondAlternateValueSetVersionID` - This component carries the version for the value set identified by CWE.21. The version is a date.

    - #### setApplicationErrorCode

          public void setApplicationErrorCode(CWE applicationErrorCode)

      Set the Application Error Code. This field contains Application specific code identifying the specific error that occurred.
      Parameters:
        `applicationErrorCode` - Object of Application Error Code.

    - #### addApplicationErrorParameter

          public void addApplicationErrorParameter(java.lang.String strApplicationErrorParameter)

      Add the Application Error Parameter. This field contains Additional information to be used, together with the Application Error Code, to understand a particular error condition/warning/etc.
      Parameters:
        `strApplicationErrorParameter` - String which to set as Application Error Parameter

    - #### addApplicationErrorParameter

          public void addApplicationErrorParameter(ST ApplicationErrorParameter)

      Add the Application Error Parameter. This field contains Additional information to be used, together with the Application Error Code, to understand a particular error condition/warning/etc.
      Parameters:
        `ApplicationErrorParameter` - Object of Application Error Parameter.

    - #### setApplicationErrorParameter

          public void setApplicationErrorParameter(ISingleCollection<ST> objApplicationErrorParameterList)

      Set the Application Error Parameter List.
      Parameters:
        `objErrorCodeandLocationList` - List of Application Error Parameter.

    - #### setDiagnosticInformation

          public void setDiagnosticInformation(java.lang.String strDiagnosticInformation)

      Set the Diagnostic Information. This field contains information that may be used by help desk or other support personnel to diagnose a problem.
      Parameters:
        `strDiagnosticInformation` - String which to set as Diagnostic Information

    - #### setDiagnosticInformation

          public void setDiagnosticInformation(TX diagnosticInformation)

      Set the Diagnostic Information. This field contains information that may be used by help desk or other support personnel to diagnose a problem.
      Parameters:
        `diagnosticInformation` - Object of Diagnostic Information.

    - #### addErrorLocation

          public void addErrorLocation(java.lang.String strSegmentId,
                              java.lang.String strSegmentSequence,
                              java.lang.String strFieldPosition,
                              java.lang.String strFieldRepetition,
                              java.lang.String strComponentNumber,
                              java.lang.String strSubComponentNumber)

      Add the Error Location. This field identify the location in a message related to the identified error, warning or message.
      Parameters:
        `strSegmentId` - Specifies the 3-letter name for the segment.
        `strSegmentSequence` - Specifies the segment occurrence within the message.
        `strFieldPosition` - Specifies the number of the field within the segment.
        `strFieldRepetition` - Specifies the repetition number of the field.
        `strComponentNumber` - Specifies the number of the component within the field.
        `strSubComponentNumber` - Specifies the number of the sub-component within the component.

    - #### addErrorLocation

          public void addErrorLocation(ERL ErrorLocation)

      Add the Error Location. This field identify the location in a message related to the identified error, warning or message.
      Parameters:
        `ErrorLocation` - Object of Error Location.

    - #### setErrorLocation

          public void setErrorLocation(ISingleCollection<ERL> objErrorLocationList)

      Set the Error Location.
      Parameters:
        `objErrorCodeandLocationList` - List of Error Location.

    - #### addHelpDeskContactPoint

          public void addHelpDeskContactPoint(java.lang.String strTeleCommunicationUseCode,
                                     java.lang.String strTeleCommunicationEquipmentType,
                                     java.lang.String strCommuinicationAddress,
                                     java.lang.String strCountryCode,
                                     java.lang.String strAreaCityCode,
                                     java.lang.String strLocalNumber,
                                     java.lang.String strExtension,
                                     java.lang.String strAnyText,
                                     java.lang.String strExtensionPrefix,
                                     java.lang.String strSpeedDialCode,
                                     java.lang.String strUnformattedTelephoneNumber,
                                     java.lang.String strEffectiveStartDate,
                                     java.lang.String strExpirationDate,
                                     CWE objExpirationReason,
                                     CWE objProtectionCode,
                                     EI objSharedTelecommunicationIdentifier,
                                     java.lang.String strPreferenceOrder)

      Add the Help Desk Contact Point. This field specify the lists of phone, e-mail, fax, and other relevant numbers for helpdesk support related to the specified error.
      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.]
        `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.]
        `strCommuinicationAddress` - Specifies Email address.
        `strCountryCode` - Specifies the Country code.
        `strAreaCityCode` - Specifies the area /City Code.
        `strLocalNumber` - Specifies an Local Number.
        `strExtension` - Specifies an Extension.
        `strAnyText` - Contains comments with respect to the telephone number.
        `strExtensionPrefix` - Specifies the characters established within a company's internal telephone system network used as a prefix to the Extension component for internal dialing.
        `strSpeedDialCode` - Specifies The characters established within a company's internal telephone system used in place of the (external) telephone number.
        `strUnformattedTelephoneNumber` - Specifies an expression of the telephone number as an unparsible string.
        `strEffectiveStartDate` - Specifies start date.
        `strExpirationDate` - Specifies expiration date.
        `objExpirationReason` - Specifies reason why this contact is marked as ended.
        `objProtectionCode` - Specifies reason why this information is sensitive or protected.
        `objSharedTelecommunicationIdentifier` - Specifies a unique phone number phone telephone number or email-id.
        `strPreferenceOrder` - Specifies the preference order for an entity..

    - #### addHelpDeskContactPoint

          public void addHelpDeskContactPoint(XTN HelpDeskContactPoint)

      Add the Help Desk Contact Point. This field specify the lists of phone, e-mail, fax, and other relevant numbers for helpdesk support related to the specified error.
      Parameters:
        `HelpDeskContactPoint` - Object of Help Desk Contact Point.

    - #### setHelpDeskContactPoint

          public void setHelpDeskContactPoint(ISingleCollection<XTN> objHelpDeskContactPointList)

      Set the Help Desk ContactPoint.
      Parameters:
        `objHelpDeskContactPointList` - List of Help Desk ContactPoint.

    - #### setHL7ErrorCode

          public void setHL7ErrorCode(java.lang.String strIdentifier,
                             java.lang.String strText,
                             java.lang.String strNameOfCodingSystem,
                             java.lang.String strAlternateIdentifier,
                             java.lang.String strAlternateText,
                             java.lang.String strNameOfAlternateCodingSystem,
                             java.lang.String strCodingSystemVersionID,
                             java.lang.String strAlternateCodingSystemVersionId,
                             java.lang.String strOriginalText,
                             java.lang.String strSecondAlternateIdentifier,
                             java.lang.String strSecondAlternateText,
                             java.lang.String strNameofSecondAlternateCodingSystem,
                             java.lang.String strSecondAlternateCodingSystemVersionID,
                             java.lang.String strCodingSystemOID,
                             java.lang.String strValueSetOID,
                             java.lang.String strValueSetVersionID,
                             java.lang.String strAlternateCodingSystemOID,
                             java.lang.String strAlternateValueSetOID,
                             java.lang.String strAlternateValueSetVersionID,
                             java.lang.String strSecondAlternateCodingSystemOID,
                             java.lang.String strSecondAlternateValueSetOID,
                             java.lang.String strSecondAlternateValueSetVersionID)

      Set the HL7 Error Code. This field identify the HL7 (communications) error code.
      Parameters:
        `strIdentifier` - Specifies of characters (the code) that uniquely identifies the item being referenced.
        `strText` - Specifies The descriptive or textual name of the identifier, e.g., myocardial infarction.
        `strNameOfCodingSystem` - Identifies the coding scheme being used in the identifier component.
        `strAlternateIdentifier` - Specifies an alternate sequence of characters (the code) that uniquely identifies the item being referenced.
        `strAlternateText` - Specifies the descriptive or textual name of the alternate identifier. See usage note in section introduction.
        `strNameOfAlternateCodingSystem` - Identifies the coding scheme being used in the alternate identifier component.
        `strCodingSystemVersionID` - A sequence of characters that uniquely identifies a second alternate code.
        `strAlternateCodingSystemVersionId` - This component carries the version for the coding system identified by components 4-6.
        `strOriginalText` - The text as seen and/or selected by the user who entered the data.
        `strSecondAlternateIdentifier` - A sequence of characters that uniquely identifies a second alternate code.
        `strSecondAlternateText` - The descriptive or textual name of the alternate identifier.
        `strNameofSecondAlternateCodingSystem` - Identifies the coding scheme being used in the alternate identifier component.
        `strSecondAlternateCodingSystemVersionID` - This component carries the version for the coding system identified by components 10-12.
        `strCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.3.
        `strValueSetOID` - This component contains the ISO Object Identifier (OID) to allow identification of the value set from which the value in CWE.1 is obtained.
        `strValueSetVersionID` - This component carries the version for the value set identified by CWE.15. The version is a date. The date is the date/time that the value set being used was published.
        `strAlternateCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.6.
        `strAlternateValueSetOID` - This component contains the ISO Object Identifier (OID) to allow identification of the value set from which the value in CWE.4 is obtained.
        `strAlternateValueSetVersionID` - This component carries the version for the value set identified by CWE.18. The version is a date.
        `strSecondAlternateCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.12.
        `strSecondAlternateValueSetOID` - This component contains the ISO Object Identifier (OID) to allow identification of the value set from which the value in CWE.10 is obtained.
        `strSecondAlternateValueSetVersionID` - This component carries the version for the value set identified by CWE.21. The version is a date.

    - #### setHL7ErrorCode

          public void setHL7ErrorCode(CWE hL7ErrorCode)

      Set the HL7 Error Code. This field identify the HL7 (communications) error code.
      Parameters:
        `hL7ErrorCode` - Object of HL7 Error Code.

    - #### addInformPersonIndicator

          public void addInformPersonIndicator(java.lang.String strIdentifier,
                                      java.lang.String strText,
                                      java.lang.String strNameOfCodingSystem,
                                      java.lang.String strAlternateIdentifier,
                                      java.lang.String strAlternateText,
                                      java.lang.String strNameOfAlternateCodingSystem,
                                      java.lang.String strCodingSystemVersionID,
                                      java.lang.String strAlternateCodingSystemVersionId,
                                      java.lang.String strOriginalText,
                                      java.lang.String strSecondAlternateIdentifier,
                                      java.lang.String strSecondAlternateText,
                                      java.lang.String strNameofSecondAlternateCodingSystem,
                                      java.lang.String strSecondAlternateCodingSystemVersionID,
                                      java.lang.String strCodingSystemOID,
                                      java.lang.String strValueSetOID,
                                      java.lang.String strValueSetVersionID,
                                      java.lang.String strAlternateCodingSystemOID,
                                      java.lang.String strAlternateValueSetOID,
                                      java.lang.String strAlternateValueSetVersionID,
                                      java.lang.String strSecondAlternateCodingSystemOID,
                                      java.lang.String strSecondAlternateValueSetOID,
                                      java.lang.String strSecondAlternateValueSetVersionID)

      Add the Inform Person Indicator. This field specify the code to indicate who(if anyone) should be informed of the error. This field may also be used to indicate that a particular person should NOT be informed of the error.
      Parameters:
        `strIdentifier` - Specifies of characters (the code) that uniquely identifies the item being referenced.
        `strText` - Specifies The descriptive or textual name of the identifier, e.g., myocardial infarction.
        `strNameOfCodingSystem` - Identifies the coding scheme being used in the identifier component.
        `strAlternateIdentifier` - Specifies an alternate sequence of characters (the code) that uniquely identifies the item being referenced.
        `strAlternateText` - Specifies the descriptive or textual name of the alternate identifier. See usage note in section introduction.
        `strNameOfAlternateCodingSystem` - Identifies the coding scheme being used in the alternate identifier component.
        `strCodingSystemVersionID` - A sequence of characters that uniquely identifies a second alternate code.
        `strAlternateCodingSystemVersionId` - This component carries the version for the coding system identified by components 4-6.
        `strOriginalText` - The text as seen and/or selected by the user who entered the data.
        `strSecondAlternateIdentifier` - A sequence of characters that uniquely identifies a second alternate code.
        `strSecondAlternateText` - The descriptive or textual name of the alternate identifier.
        `strNameofSecondAlternateCodingSystem` - Identifies the coding scheme being used in the alternate identifier component.
        `strSecondAlternateCodingSystemVersionID` - This component carries the version for the coding system identified by components 10-12.
        `strCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.3.
        `strValueSetOID` - This component contains the ISO Object Identifier (OID) to allow identification of the value set from which the value in CWE.1 is obtained.
        `strValueSetVersionID` - This component carries the version for the value set identified by CWE.15. The version is a date. The date is the date/time that the value set being used was published.
        `strAlternateCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.6.
        `strAlternateValueSetOID` - This component contains the ISO Object Identifier (OID) to allow identification of the value set from which the value in CWE.4 is obtained.
        `strAlternateValueSetVersionID` - This component carries the version for the value set identified by CWE.18. The version is a date.
        `strSecondAlternateCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.12.
        `strSecondAlternateValueSetOID` - This component contains the ISO Object Identifier (OID) to allow identification of the value set from which the value in CWE.10 is obtained.
        `strSecondAlternateValueSetVersionID` - This component carries the version for the value set identified by CWE.21. The version is a date.

    - #### addInformPersonIndicator

          public void addInformPersonIndicator(CWE InformPersonIndicator)

      Add the Inform Person Indicator. This field specify the code to indicate who(if anyone) should be informed of the error. This field may also be used to indicate that a particular person should NOT be informed of the error.
      Parameters:
        `InformPersonIndicator` - Object of Inform Person Indicator.

    - #### setInformPersonIndicator

          public void setInformPersonIndicator(ISingleCollection<CWE> objInformPersonIndicatorList)

      Set the Inform Person Indicator.
      Parameters:
        `objInformPersonIndicatorList` - List of Inform Person Indicator.

    - #### addOverrideReasonCode

          public void addOverrideReasonCode(java.lang.String strIdentifier,
                                   java.lang.String strText,
                                   java.lang.String strNameOfCodingSystem,
                                   java.lang.String strAlternateIdentifier,
                                   java.lang.String strAlternateText,
                                   java.lang.String strNameOfAlternateCodingSystem,
                                   java.lang.String strCodingSystemVersionID,
                                   java.lang.String strAlternateCodingSystemVersionId,
                                   java.lang.String strOriginalText,
                                   java.lang.String strSecondAlternateIdentifier,
                                   java.lang.String strSecondAlternateText,
                                   java.lang.String strNameofSecondAlternateCodingSystem,
                                   java.lang.String strSecondAlternateCodingSystemVersionID,
                                   java.lang.String strCodingSystemOID,
                                   java.lang.String strValueSetOID,
                                   java.lang.String strValueSetVersionID,
                                   java.lang.String strAlternateCodingSystemOID,
                                   java.lang.String strAlternateValueSetOID,
                                   java.lang.String strAlternateValueSetVersionID,
                                   java.lang.String strSecondAlternateCodingSystemOID,
                                   java.lang.String strSecondAlternateValueSetOID,
                                   java.lang.String strSecondAlternateValueSetVersionID)

      Add the Override Reason Code. This field specify the list of potential override codes that can be used to override enforcement of the application rule that generated the error.
      Parameters:
        `strIdentifier` - Specifies of characters (the code) that uniquely identifies the item being referenced.
        `strText` - Specifies The descriptive or textual name of the identifier, e.g., myocardial infarction.
        `strNameOfCodingSystem` - Identifies the coding scheme being used in the identifier component.
        `strAlternateIdentifier` - Specifies an alternate sequence of characters (the code) that uniquely identifies the item being referenced.
        `strAlternateText` - Specifies the descriptive or textual name of the alternate identifier. See usage note in section introduction.
        `strNameOfAlternateCodingSystem` - Identifies the coding scheme being used in the alternate identifier component.
        `strCodingSystemVersionID` - A sequence of characters that uniquely identifies a second alternate code.
        `strAlternateCodingSystemVersionId` - This component carries the version for the coding system identified by components 4-6.
        `strOriginalText` - The text as seen and/or selected by the user who entered the data.
        `strSecondAlternateIdentifier` - A sequence of characters that uniquely identifies a second alternate code.
        `strSecondAlternateText` - The descriptive or textual name of the alternate identifier.
        `strNameofSecondAlternateCodingSystem` - Identifies the coding scheme being used in the alternate identifier component.
        `strSecondAlternateCodingSystemVersionID` - This component carries the version for the coding system identified by components 10-12.
        `strCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.3.
        `strValueSetOID` - This component contains the ISO Object Identifier (OID) to allow identification of the value set from which the value in CWE.1 is obtained.
        `strValueSetVersionID` - This component carries the version for the value set identified by CWE.15. The version is a date. The date is the date/time that the value set being used was published.
        `strAlternateCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.6.
        `strAlternateValueSetOID` - This component contains the ISO Object Identifier (OID) to allow identification of the value set from which the value in CWE.4 is obtained.
        `strAlternateValueSetVersionID` - This component carries the version for the value set identified by CWE.18. The version is a date.
        `strSecondAlternateCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.12.
        `strSecondAlternateValueSetOID` - This component contains the ISO Object Identifier (OID) to allow identification of the value set from which the value in CWE.10 is obtained.
        `strSecondAlternateValueSetVersionID` - This component carries the version for the value set identified by CWE.21. The version is a date.

    - #### addOverrideReasonCode

          public void addOverrideReasonCode(CWE OverrideReasonCode)

      Add the Override Reason Code. This field specify the list of potential override codes that can be used to override enforcement of the application rule that generated the error.
      Parameters:
        `OverrideReasonCode` - Object of Override Reason Code.

    - #### setOverrideReasonCode

          public void setOverrideReasonCode(ISingleCollection<CWE> objOverrideReasonCodeList)

      Set the Override Reason Code.
      Parameters:
        `objOverrideReasonCodeList` - List of Override Reason Code.

    - #### setOverrideType

          public void setOverrideType(java.lang.String strIdentifier,
                             java.lang.String strText,
                             java.lang.String strNameOfCodingSystem,
                             java.lang.String strAlternateIdentifier,
                             java.lang.String strAlternateText,
                             java.lang.String strNameOfAlternateCodingSystem,
                             java.lang.String strCodingSystemVersionID,
                             java.lang.String strAlternateCodingSystemVersionId,
                             java.lang.String strOriginalText,
                             java.lang.String strSecondAlternateIdentifier,
                             java.lang.String strSecondAlternateText,
                             java.lang.String strNameofSecondAlternateCodingSystem,
                             java.lang.String strSecondAlternateCodingSystemVersionID,
                             java.lang.String strCodingSystemOID,
                             java.lang.String strValueSetOID,
                             java.lang.String strValueSetVersionID,
                             java.lang.String strAlternateCodingSystemOID,
                             java.lang.String strAlternateValueSetOID,
                             java.lang.String strAlternateValueSetVersionID,
                             java.lang.String strSecondAlternateCodingSystemOID,
                             java.lang.String strSecondAlternateValueSetOID,
                             java.lang.String strSecondAlternateValueSetVersionID)

      Set the Override Type. This field identify what type of override can be used to override the specific error identified.
      Parameters:
        `strIdentifier` - Specifies of characters (the code) that uniquely identifies the item being referenced.
        `strText` - Specifies The descriptive or textual name of the identifier, e.g., myocardial infarction.
        `strNameOfCodingSystem` - Identifies the coding scheme being used in the identifier component.
        `strAlternateIdentifier` - Specifies an alternate sequence of characters (the code) that uniquely identifies the item being referenced.
        `strAlternateText` - Specifies the descriptive or textual name of the alternate identifier. See usage note in section introduction.
        `strNameOfAlternateCodingSystem` - Identifies the coding scheme being used in the alternate identifier component.
        `strCodingSystemVersionID` - A sequence of characters that uniquely identifies a second alternate code.
        `strAlternateCodingSystemVersionId` - This component carries the version for the coding system identified by components 4-6.
        `strOriginalText` - The text as seen and/or selected by the user who entered the data.
        `strSecondAlternateIdentifier` - A sequence of characters that uniquely identifies a second alternate code.
        `strSecondAlternateText` - The descriptive or textual name of the alternate identifier.
        `strNameofSecondAlternateCodingSystem` - Identifies the coding scheme being used in the alternate identifier component.
        `strSecondAlternateCodingSystemVersionID` - This component carries the version for the coding system identified by components 10-12.
        `strCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.3.
        `strValueSetOID` - This component contains the ISO Object Identifier (OID) to allow identification of the value set from which the value in CWE.1 is obtained.
        `strValueSetVersionID` - This component carries the version for the value set identified by CWE.15. The version is a date. The date is the date/time that the value set being used was published.
        `strAlternateCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.6.
        `strAlternateValueSetOID` - This component contains the ISO Object Identifier (OID) to allow identification of the value set from which the value in CWE.4 is obtained.
        `strAlternateValueSetVersionID` - This component carries the version for the value set identified by CWE.18. The version is a date.
        `strSecondAlternateCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.12.
        `strSecondAlternateValueSetOID` - This component contains the ISO Object Identifier (OID) to allow identification of the value set from which the value in CWE.10 is obtained.
        `strSecondAlternateValueSetVersionID` - This component carries the version for the value set identified by CWE.21. The version is a date.

    - #### setOverrideType

          public void setOverrideType(CWE overrideType)

      Set the Override Type. This field identify what type of override can be used to override the specific error identified.
      Parameters:
        `overrideType` - Object of Override Type.

    - #### setSeverity

          public void setSeverity(java.lang.String strSeverity)

      Set the Severity. This field identify the severity of an application error.
      Parameters:
        `strSeverity` - String which to set as Severity

    - #### setSeverity

          public void setSeverity(ID severity)

      Set the Severity. This field identify the severity of an application error.
      Parameters:
        `severity` - Object of Severity.

    - #### setUserMessage

          public void setUserMessage(java.lang.String strUserMessage)

      Set the User Message. This field specify the text message to be displayed to the application user.
      Parameters:
        `strUserMessage` - String which to set as User Message

    - #### setUserMessage

          public void setUserMessage(TX userMessage)

      Set the User Message. This field specify the text message to be displayed to the application user.
      Parameters:
        `userMessage` - Object of User Message.

    - #### validate

          public boolean validate()
                           throws InvalidSegmentException

      Validates HL7 Message objects . Validate method checks for validation each and every segments in side the Message object against specified message Structure. Validation chcecks include optionality of segment or group. It also verifies the number of times segment or group is repeated in message. e.g {PSH} while parsing PSH segment validate method will check for its mandatory presence. [PSH] in this case validate will throw exception if one tries to enter more than one PSH segment.
      Specified by:
        `validate` in interface `ISegment`
      Overrides:
        `validate` in class `Segment`
      Returns:
        boolean - true or false.
      Throws:
        `InvalidSegmentException` - Thrown when Segment Validation Fails.