cdac.medinfo.sdk.hl7282.baselibs.segments

## Class ADD

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

- All Implemented Interfaces:
    ISegment

      public class ADD
      extends Segment

  ADD - Addendum Segment.

  The ADD segment is used to define the continuation of the prior segment in a continuation message.

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

  ADD-1: Addendum Continuation Pointer (ST)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
    `ADD()` Constructs the ADD segment.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ST` | `getAddendumContinuationPointer()` Retrieves the Addendum Continuation Pointer which defines the continuation of the prior segment in a continuation message
    `void` | `setAddendumContinuationPointer(ST addendumContinuationPointer)` Sets the Addendum Continuation Pointer which defines the continuation of the prior segment in a continuation message
    `void` | `setAddendumContinuationPointer(java.lang.String strAddendumContinuationPointer)` Sets the Addendum Continuation Pointer which defines the continuation of the prior segment in a continuation 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

    - #### ADD

          public ADD()

      Constructs the ADD segment.

  - ### Method Detail

    - #### getAddendumContinuationPointer

          public ST getAddendumContinuationPointer()

      Retrieves the Addendum Continuation Pointer which defines the continuation of the prior segment in a continuation message
      Returns:
        ST - addendumContinuationPointer

    - #### setAddendumContinuationPointer

          public void setAddendumContinuationPointer(java.lang.String strAddendumContinuationPointer)

      Sets the Addendum Continuation Pointer which defines the continuation of the prior segment in a continuation message
      Parameters:
        `strAddendumContinuationPointer` - Contains the addendum continuation pointer.

    - #### setAddendumContinuationPointer

          public void setAddendumContinuationPointer(ST addendumContinuationPointer)

      Sets the Addendum Continuation Pointer which defines the continuation of the prior segment in a continuation message
      Parameters:
        `addendumContinuationPointer` - Contains the addendum continuation pointer.

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