cdac.medinfo.sdk.hl7282.baselibs.segments

## Class NST

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

- All Implemented Interfaces:
    ISegment

      public class NST
      extends Segment

  NST - Application Control-Level Statistics Segment

  The NST segment allows application control-level statistical information to be passed between the various systems on the network.

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

  NST-1: Statistics Available (ID)Required
  NST-2: Source Identifier (ST)Optional
  NST-3: Source Type (ID)Optional
  NST-4: Statistics Start (DTM)Optional
  NST-5: Statistics End (DTM)Optional
  NST-6: Receive Character Count (NM)Optional
  NST-7: Send Character Count (NM)Optional
  NST-8: Messages Received (NM)Optional
  NST-9: Messages Sent (NM)Optional
  NST-10: Checksum Errors Received (NM)Optional
  NST-11: Length Errors Received (NM)Optional
  NST-12: Other Errors Received (NM)Optional
  NST-13: Connect Timeouts (NM)Optional
  NST-14: Receive Timeouts (NM)Optional
  NST-15: Application control-level Errors (NM)

  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
    `NST()` Constructs the NST segment.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `NM` | `getApplicationcontrollevelErrors()` Retrieves the Application control level Errors.
    `NM` | `getChecksumErrorsReceived()` Retrieves the Checksum Errors Received.
    `NM` | `getConnectTimeouts()` Retrieves the Connect Timeouts.
    `NM` | `getLengthErrorsReceived()` Retrieves the Length Errors Received.
    `NM` | `getMessagesReceived()` Retrieves the Messages Received.
    `NM` | `getMessagesSent()` Retrieves the Messages Sent.
    `NM` | `getOtherErrorsReceived()` Retrieves the Other Errors Received.
    `NM` | `getReceiveCharacterCount()` Retrieves the Receive Character Count.
    `NM` | `getReceiveTimeouts()` Retrieves the Receive Timeouts.
    `NM` | `getSendCharacterCount()` Retrieves the Send Character Count.
    `ST` | `getSourceIdentifier()` Retrieves the Source Identifier.
    `ID` | `getSourceType()` Retrieves the Source Type.
    `ID` | `getStatisticsAvailable()` Retrieves the Statistics Available.
    `DTM` | `getStatisticsEnd()` Retrieves the Statistics End.
    `DTM` | `getStatisticsStart()` Retrieves the Statistics Start.
    `void` | `setApplicationcontrollevelErrors(NM objapplicationcontrollevelErrors)` Set the Application control level Errors.
    `void` | `setApplicationcontrollevelErrors(java.lang.String strApplicationcontrollevelErrors)` Set the Application control level Errors.
    `void` | `setChecksumErrorsReceived(NM objchecksumErrorsReceived)` Set the Checksum Errors Received.
    `void` | `setChecksumErrorsReceived(java.lang.String strChecksumErrorsReceived)` Set the Checksum Errors Received.
    `void` | `setConnectTimeouts(NM objconnectTimeouts)` Set the Connect Timeouts.
    `void` | `setConnectTimeouts(java.lang.String strConnectTimeouts)` Set the Connect Timeouts.
    `void` | `setLengthErrorsReceived(NM objlengthErrorsReceived)` Set the Length Errors Received.
    `void` | `setLengthErrorsReceived(java.lang.String strLengthErrorsReceived)` Set the Length Errors Received.
    `void` | `setMessagesReceived(NM objmessagesReceived)` Set the Messages Received.
    `void` | `setMessagesReceived(java.lang.String strMessagesReceived)` Set the Messages Received.
    `void` | `setMessagesSent(NM objmessagesSent)` Set the Messages Sent.
    `void` | `setMessagesSent(java.lang.String strMessagesSent)` Set the Messages Sent.
    `void` | `setOtherErrorsReceived(NM objotherErrorsReceived)` Set the Other Errors Received.
    `void` | `setOtherErrorsReceived(java.lang.String strOtherErrorsReceived)` Set the Other Errors Received.
    `void` | `setReceiveCharacterCount(NM objreceiveCharacterCount)` Set the Receive Character Count.
    `void` | `setReceiveCharacterCount(java.lang.String strReceiveCharacterCount)` Set the Receive Character Count.
    `void` | `setReceiveTimeouts(NM objreceiveTimeouts)` Set the Receive Timeouts.
    `void` | `setReceiveTimeouts(java.lang.String strReceiveTimeouts)` Set the Receive Timeouts.
    `void` | `setSendCharacterCount(NM objsendCharacterCount)` Set the Send Character Count.
    `void` | `setSendCharacterCount(java.lang.String strSendCharacterCount)` Set the Send Character Count.
    `void` | `setSourceIdentifier(ST objsourceIdentifier)` Set the Source Identifier.
    `void` | `setSourceIdentifier(java.lang.String strSourceIdentifier)` Set the Source Identifier.
    `void` | `setSourceType(ID objsourceType)` Set the Source Type.
    `void` | `setSourceType(java.lang.String strSourceType)` Set the Source Type.
    `void` | `setStatisticsAvailable(ID objstatisticsAvailable)` Set the Statistics Available.
    `void` | `setStatisticsAvailable(java.lang.String strStatisticsAvailable)` Set the Statistics Available.
    `void` | `setStatisticsEnd(DTM objstatisticsEnd)` Set the Statistics End.
    `void` | `setStatisticsEnd(java.lang.String strDate)` Set the Statistics End.
    `void` | `setStatisticsStart(DTM objstatisticsStart)` Set the Statistics Start.
    `void` | `setStatisticsStart(java.lang.String strDate)` Set the Statistics Start.
    `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

    - #### NST

          public NST()

      Constructs the NST segment.

  - ### Method Detail

    - #### getApplicationcontrollevelErrors

          public NM getApplicationcontrollevelErrors()

      Retrieves the Application control level Errors. This field contains the number of application control-level errors in response to an initiated message.
      Returns:
        NM - applicationcontrollevelErrors

    - #### getChecksumErrorsReceived

          public NM getChecksumErrorsReceived()

      Retrieves the Checksum Errors Received. This field contains the number of messages received with checksum errors.
      Returns:
        NM - checksumErrorsReceived

    - #### getConnectTimeouts

          public NM getConnectTimeouts()

      Retrieves the Connect Timeouts. This field contains the number of connect timeout errors.
      Returns:
        NM - connectTimeouts

    - #### getLengthErrorsReceived

          public NM getLengthErrorsReceived()

      Retrieves the Length Errors Received. This field contains the number of messages received with length errors.
      Returns:
        NM - lengthErrorsReceived

    - #### getMessagesReceived

          public NM getMessagesReceived()

      Retrieves the Messages Received. This field contains the number of messages received.
      Returns:
        NM - messagesReceived

    - #### getMessagesSent

          public NM getMessagesSent()

      Retrieves the Messages Sent. This field contains the number of messages sent.
      Returns:
        NM - messagesSent

    - #### getOtherErrorsReceived

          public NM getOtherErrorsReceived()

      Retrieves the Other Errors Received. This field contains the number of "other" invalid messages received (excluding length and checksum errors).
      Returns:
        NM - otherErrorsReceived

    - #### getReceiveCharacterCount

          public NM getReceiveCharacterCount()

      Retrieves the Receive Character Count. This field contains the number of characters received.
      Returns:
        NM - receiveCharacterCount

    - #### getReceiveTimeouts

          public NM getReceiveTimeouts()

      Retrieves the Receive Timeouts. This field contains the number of timeouts while waiting for a response to an initiated message.
      Returns:
        NM - receiveTimeouts

    - #### getSendCharacterCount

          public NM getSendCharacterCount()

      Retrieves the Send Character Count. This field contains the number of characters sent.
      Returns:
        NM - sendCharacterCount

    - #### getSourceIdentifier

          public ST getSourceIdentifier()

      Retrieves the Source Identifier. This field identify a particular lower level link.
      Returns:
        ST - sourceIdentifier

    - #### getSourceType

          public ID getSourceType()

      Retrieves the Source Type. This field identify (in certain systems) whether a lower level source identifier is an initiate or accept type.
      Returns:
        ID - sourceType

    - #### getStatisticsAvailable

          public ID getStatisticsAvailable()

      Retrieves the Statistics Available. This field indicates the availability of statistics.
      Returns:
        ID - statisticsAvailable

    - #### getStatisticsEnd

          public DTM getStatisticsEnd()

      Retrieves the Statistics End. This field contains the date/time stamp of the end of the statistics collection period.
      Returns:
        DTM - statisticsEnd

    - #### getStatisticsStart

          public DTM getStatisticsStart()

      Retrieves the Statistics Start. This field contains the date/time stamp of the start of the collection of the statistics reported in fields 6 15 of this segment.
      Returns:
        DTM - statisticsStart

    - #### setStatisticsAvailable

          public void setStatisticsAvailable(java.lang.String strStatisticsAvailable)

      Set the Statistics Available. This field indicates the availability of statistics.
      Parameters:
        `strStatisticsAvailable` - Used as StatisticsAvailable.

    - #### setStatisticsAvailable

          public void setStatisticsAvailable(ID objstatisticsAvailable)

      Set the Statistics Available. This field indicates the availability of statistics.
      Parameters:
        `objstatisticsAvailable` - Used as StatisticsAvailable.

    - #### setSourceIdentifier

          public void setSourceIdentifier(java.lang.String strSourceIdentifier)

      Set the Source Identifier. This field identify a particular lower level link.
      Parameters:
        `strSourceIdentifier` - The name of the party.

    - #### setSourceIdentifier

          public void setSourceIdentifier(ST objsourceIdentifier)

      Set the Source Identifier. This field identify a particular lower level link.
      Parameters:
        `objsourceIdentifier` - The name of the party.

    - #### setSourceType

          public void setSourceType(java.lang.String strSourceType)

      Set the Source Type. This field identify (in certain systems) whether a lower level source identifier is an initiate or accept type.
      Parameters:
        `strSourceType` - used as SourceType.

    - #### setSourceType

          public void setSourceType(ID objsourceType)

      Set the Source Type. This field identify (in certain systems) whether a lower level source identifier is an initiate or accept type.
      Parameters:
        `objsourceType` - used as SourceType.

    - #### setStatisticsStart

          public void setStatisticsStart(java.lang.String strDate)

      Set the Statistics Start. This field contains the date/time stamp of the start of the collection of the statistics reported in fields 6 15 of this segment.
      Parameters:
        `strDate` - Specifies a point in time using a 24-hour clock notation.

    - #### setStatisticsStart

          public void setStatisticsStart(DTM objstatisticsStart)

      Set the Statistics Start. This field contains the date/time stamp of the start of the collection of the statistics reported in fields 6 15 of this segment.
      Parameters:
        `objstatisticsStart` - Statistics Start

    - #### setStatisticsEnd

          public void setStatisticsEnd(java.lang.String strDate)

      Set the Statistics End. This field contains the date/time stamp of the end of the statistics collection period.
      Parameters:
        `strDate` - Specifies a point in time using a 24-hour clock notation.

    - #### setStatisticsEnd

          public void setStatisticsEnd(DTM objstatisticsEnd)

      Set the Statistics End. This field contains the date/time stamp of the end of the statistics collection period.
      Parameters:
        `objstatisticsEnd` - Statistics End

    - #### setReceiveCharacterCount

          public void setReceiveCharacterCount(java.lang.String strReceiveCharacterCount)

      Set the Receive Character Count. This field contains the number of characters received.
      Parameters:
        `strReceiveCharacterCount` - Specifies Transaction Quantity

    - #### setReceiveCharacterCount

          public void setReceiveCharacterCount(NM objreceiveCharacterCount)

      Set the Receive Character Count. This field contains the number of characters received.
      Parameters:
        `objreceiveCharacterCount` - Specifies Transaction Quantity

    - #### setSendCharacterCount

          public void setSendCharacterCount(java.lang.String strSendCharacterCount)

      Set the Send Character Count. This field contains the number of characters sent.
      Parameters:
        `strSendCharacterCount` - Specifies Transaction Quantity.

    - #### setSendCharacterCount

          public void setSendCharacterCount(NM objsendCharacterCount)

      Set the Send Character Count. This field contains the number of characters sent.
      Parameters:
        `objsendCharacterCount` - Specifies Transaction Quantity.

    - #### setMessagesReceived

          public void setMessagesReceived(java.lang.String strMessagesReceived)

      Set the Messages Received. This field contains the number of messages received.
      Parameters:
        `strMessagesReceived` - Specifies Transaction Quantity

    - #### setMessagesReceived

          public void setMessagesReceived(NM objmessagesReceived)

      Set the Messages Received. This field contains the number of messages received.
      Parameters:
        `objmessagesReceived` - Specifies Transaction Quantity

    - #### setMessagesSent

          public void setMessagesSent(java.lang.String strMessagesSent)

      Set the Messages Sent. This field contains the number of messages sent.
      Parameters:
        `strMessagesSent` - Specifies Transaction Quantity.

    - #### setMessagesSent

          public void setMessagesSent(NM objmessagesSent)

      Set the Messages Sent. This field contains the number of messages sent.
      Parameters:
        `objmessagesSent` - Specifies Transaction Quantity.

    - #### setChecksumErrorsReceived

          public void setChecksumErrorsReceived(java.lang.String strChecksumErrorsReceived)

      Set the Checksum Errors Received. This field contains the number of messages received with checksum errors.
      Parameters:
        `strChecksumErrorsReceived` - Specifies Transaction Quantity

    - #### setChecksumErrorsReceived

          public void setChecksumErrorsReceived(NM objchecksumErrorsReceived)

      Set the Checksum Errors Received. This field contains the number of messages received with checksum errors.
      Parameters:
        `objchecksumErrorsReceived` - Specifies Transaction Quantity

    - #### setLengthErrorsReceived

          public void setLengthErrorsReceived(java.lang.String strLengthErrorsReceived)

      Set the Length Errors Received. This field contains the number of messages received with length errors.
      Parameters:
        `strLengthErrorsReceived` - Specifies Transaction Quantity

    - #### setLengthErrorsReceived

          public void setLengthErrorsReceived(NM objlengthErrorsReceived)

      Set the Length Errors Received. This field contains the number of messages received with length errors.
      Parameters:
        `objlengthErrorsReceived` - Specifies Transaction Quantity

    - #### setOtherErrorsReceived

          public void setOtherErrorsReceived(java.lang.String strOtherErrorsReceived)

      Set the Other Errors Received. This field contains the number of "other" invalid messages received (excluding length and checksum errors).
      Parameters:
        `strOtherErrorsReceived` - Specifies Transaction Quantity.

    - #### setOtherErrorsReceived

          public void setOtherErrorsReceived(NM objotherErrorsReceived)

      Set the Other Errors Received. This field contains the number of "other" invalid messages received (excluding length and checksum errors).
      Parameters:
        `objotherErrorsReceived` - Specifies Transaction Quantity.

    - #### setConnectTimeouts

          public void setConnectTimeouts(java.lang.String strConnectTimeouts)

      Set the Connect Timeouts. This field contains the number of connect timeout errors.
      Parameters:
        `strConnectTimeouts` - Specifies Transaction Quantity.

    - #### setConnectTimeouts

          public void setConnectTimeouts(NM objconnectTimeouts)

      Set the Connect Timeouts. This field contains the number of connect timeout errors.
      Parameters:
        `objconnectTimeouts` - Specifies Transaction Quantity.

    - #### setReceiveTimeouts

          public void setReceiveTimeouts(java.lang.String strReceiveTimeouts)

      Set the Receive Timeouts. This field contains the number of timeouts while waiting for a response to an initiated message.
      Parameters:
        `strReceiveTimeouts` - Specifies Transaction Quantity.

    - #### setReceiveTimeouts

          public void setReceiveTimeouts(NM objreceiveTimeouts)

      Set the Receive Timeouts. This field contains the number of timeouts while waiting for a response to an initiated message.
      Parameters:
        `objreceiveTimeouts` - Specifies Transaction Quantity.

    - #### setApplicationcontrollevelErrors

          public void setApplicationcontrollevelErrors(java.lang.String strApplicationcontrollevelErrors)

      Set the Application control level Errors. This field contains the number of application control-level errors in response to an initiated message.
      Parameters:
        `strApplicationcontrollevelErrors` - Specifies Transaction Quantity.

    - #### setApplicationcontrollevelErrors

          public void setApplicationcontrollevelErrors(NM objapplicationcontrollevelErrors)

      Set the Application control level Errors. This field contains the number of application control-level errors in response to an initiated message.
      Parameters:
        `objapplicationcontrollevelErrors` - Specifies Transaction Quantity.

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