cdac.medinfo.sdk.hl7282.baselibs.segments

## Class DSC

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

- All Implemented Interfaces:
    ISegment

      public class DSC
      extends Segment

  DSC - continuation pointer segment

  The DSC segment is used in the continuation protocol.

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

  DSC-1: Continuation Pointer (ST)Optional
  DSC-2: Continuation Style (ID)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
    `DSC()` Constructs the DSC segment.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ST` | `getContinuationPointer()` Retrieves the Continuation Pointer.
    `ID` | `getContinuationStyle()` Retrieves the Continuation Style.
    `void` | `setContinuationPointer(ST objcontinuationPointer)` Set the Continuation Pointer.
    `void` | `setContinuationPointer(java.lang.String strContinuationPointer)` Set the Continuation Pointer.
    `void` | `setContinuationStyle(ID objcontinuationStyle)` Set the Continuation Style.
    `void` | `setContinuationStyle(java.lang.String strContinuationStyle)` Set the Continuation Style.
    `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

    - #### DSC

          public DSC()

      Constructs the DSC segment.

  - ### Method Detail

    - #### getContinuationPointer

          public ST getContinuationPointer()

      Retrieves the Continuation Pointer. This field contains the continuation pointer. In an initial query, this field is not present.
      Returns:
        String - continuationPointer

    - #### getContinuationStyle

          public ID getContinuationStyle()

      Retrieves the Continuation Style. This field indicates whether this is a fragmented message or not.
      Returns:
        String - continuationStyle

    - #### setContinuationPointer

          public void setContinuationPointer(java.lang.String strContinuationPointer)

      Set the Continuation Pointer. This field contains the continuation pointer. In an initial query, this field is not present.
      Parameters:
        `strContinuationPointer` - Contains the continuation pointer.

    - #### setContinuationPointer

          public void setContinuationPointer(ST objcontinuationPointer)

      Set the Continuation Pointer. This field contains the continuation pointer. In an initial query, this field is not present.
      Parameters:
        `objcontinuationPointer` - object of Continuation Pointer.

    - #### setContinuationStyle

          public void setContinuationStyle(java.lang.String strContinuationStyle)

      Set the Continuation Style. This field indicates whether this is a fragmented message or not.
      Parameters:
        `strContinuationStyle` - Used for ContinuationStyle.

    - #### setContinuationStyle

          public void setContinuationStyle(ID objcontinuationStyle)

      Set the Continuation Style. This field indicates whether this is a fragmented message or not.
      Parameters:
        `objcontinuationStyle` - object of Continuation Style.

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