cdac.medinfo.sdk.hl7282.baselibs.segments

## Class DSP

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

- All Implemented Interfaces:
    ISegment

      public class DSP
      extends Segment

  DSP - display data segment.

  The DSP segment is used to contain data that has been preformatted by the sender for display. The semantic content of the data is lost; the data is simply treated as lines of text.

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

  DSP-1: Set ID - DSP (SI)Optional
  DSP-2: Display Level (SI)Optional
  DSP-3: Data Line (TX)Required
  DSP-4: Logical Break Point (ST)Optional
  DSP-5: Result ID (TX)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
    `DSP()` Constructs the DSP segment.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `TX` | `getDataLine()` Retrieves the Data Line.
    `SI` | `getDisplayLevel()` Retrieves the Display Level.
    `ST` | `getLogicalBreakPoint()` Retrieves the Logical Break Point.
    `TX` | `getResultID()` Retrieves the Result ID.
    `SI` | `getSetIDDSP()` Retrieves the Set ID DSP.
    `void` | `setDataLine(java.lang.String strSoftwareProductInformation)` Set the Data Line.
    `void` | `setDataLine(TX objdataLine)` Set the Data Line.
    `void` | `setDisplayLevel(SI objdisplayLevel)` Set the Display Level.
    `void` | `setDisplayLevel(java.lang.String strSetID_AL1)` Set the Display Level.
    `void` | `setLogicalBreakPoint(ST objlogicalBreakPoint)` Set the Logical Break Point.
    `void` | `setLogicalBreakPoint(java.lang.String strAccidentLocation)` Set the Logical Break Point.
    `void` | `setResultID(java.lang.String strSoftwareProductInformation)` Set the Result ID.
    `void` | `setResultID(TX objresultID)` Set the Result ID.
    `void` | `setSetIDDSP(SI objsetIDDSP)` Set the Set ID DSP.
    `void` | `setSetIDDSP(java.lang.String strSetID_AL1)` Set the Set ID DSP.
    `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

    - #### DSP

          public DSP()

      Constructs the DSP segment.

  - ### Method Detail

    - #### getDataLine

          public TX getDataLine()

      Retrieves the Data Line. This field contains an actual line as it should be displayed.
      Returns:
        TX - dataLine

    - #### getDisplayLevel

          public SI getDisplayLevel()

      Retrieves the Display Level. This field contains numbering to define groups of fields as assigned by the individual sites or applications.
      Returns:
        SI - displayLevel

    - #### getLogicalBreakPoint

          public ST getLogicalBreakPoint()

      Retrieves the Logical Break Point. This field is non-null, if this line is the last line of a logical break point in the response as defined by the responding system.
      Returns:
        ST - logicalBreakPoint

    - #### getResultID

          public TX getResultID()

      Retrieves the Result ID.
      Returns:
        TX - resultID

    - #### getSetIDDSP

          public SI getSetIDDSP()

      Retrieves the Set ID DSP. This field is used optionally to number multiple display segments.
      Returns:
        SI - setIDDSP

    - #### setDataLine

          public void setDataLine(java.lang.String strSoftwareProductInformation)

      Set the Data Line. This field contains an actual line as it should be displayed.
      Parameters:
        `strSoftwareProductInformation` - Used for SoftwareProductInformation.

    - #### setDataLine

          public void setDataLine(TX objdataLine)

      Set the Data Line. This field contains an actual line as it should be displayed.
      Parameters:
        `objdataLine` - object of Data Line.

    - #### setLogicalBreakPoint

          public void setLogicalBreakPoint(java.lang.String strAccidentLocation)

      Set the Logical Break Point. This field is non-null, if this line is the last line of a logical break point in the response as defined by the responding system.
      Parameters:
        `strAccidentLocation` - Used for AccidentLocation.

    - #### setLogicalBreakPoint

          public void setLogicalBreakPoint(ST objlogicalBreakPoint)

      Set the Logical Break Point. This field is non-null, if this line is the last line of a logical break point in the response as defined by the responding system.
      Parameters:
        `objlogicalBreakPoint` - object of logical Break Point.

    - #### setResultID

          public void setResultID(java.lang.String strSoftwareProductInformation)

      Set the Result ID.
      Parameters:
        `strSoftwareProductInformation` - Used for SoftwareProductInformation.

    - #### setResultID

          public void setResultID(TX objresultID)

      Set the Result ID.
      Parameters:
        `objresultID` - object of Result ID Used.

    - #### setSetIDDSP

          public void setSetIDDSP(java.lang.String strSetID_AL1)

      Set the Set ID DSP. This field is used optionally to number multiple display segments.
      Parameters:
        `strSetID_AL1` - This field contains the number that identifies AL1 transaction.

    - #### setSetIDDSP

          public void setSetIDDSP(SI objsetIDDSP)

      Set the Set ID DSP. This field is used optionally to number multiple display segments.
      Parameters:
        `objsetIDDSP` - object of set ID DSP.

    - #### setDisplayLevel

          public void setDisplayLevel(java.lang.String strSetID_AL1)

      Set the Display Level. This field contains numbering to define groups of fields as assigned by the individual sites or applications.
      Parameters:
        `strSetID_AL1` - This field contains the number that identifies AL1 transaction.

    - #### setDisplayLevel

          public void setDisplayLevel(SI objdisplayLevel)

      Set the Display Level. This field contains numbering to define groups of fields as assigned by the individual sites or applications.
      Parameters:
        `objdisplayLevel` - object of Display Level.

    - #### 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` - Throws when Segment Validation fails.