cdac.medinfo.sdk.hl7282.baselibs.segments

## Class NSC

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

- All Implemented Interfaces:
    ISegment

      public class NSC
      extends Segment

  NSC - Application Status Change Segment.

  The NSC segment is used to inform (NMR query response) or announce (NMD unsolicited update) the start up, shut down, and/or migration (to a different cpu or file server/file system) of a particular application.

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

  NSC-1: Application Change Type (CWE)Required
  NSC-2: Current CPU (ST)Optional
  NSC-3: Current Fileserver (ST)Optional
  NSC-4: Current Application (HD)Optional
  NSC-5: Current Facility (HD)Optional
  NSC-6: New CPU (ST)Optional
  NSC-7: New Fileserver (ST)Optional
  NSC-8: New Application (HD)Optional
  NSC-9: New Facility (HD)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
    `NSC()` Constructs the NSC segment.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `CWE` | `getApplicationChangeType()` Retrieves the Application Change Type.
    `HD` | `getCurrentApplication()` Retrieves the Current Application.
    `ST` | `getCurrentCPU()` Retrieves the Current CPU.
    `HD` | `getCurrentFacility()` Retrieves the Current Facility.
    `ST` | `getCurrentFileserver()` Retrieves the Current Fileserver.
    `HD` | `getNewApplication()` Retrieves the New Application.
    `ST` | `getNewCPU()` Retrieves the New CPU.
    `HD` | `getNewFacility()` Retrieves the New Facility.
    `ST` | `getNewFileserver()` Retrieves the New Fileserver.
    `void` | `setApplicationChangeType(CWE objapplicationChangeType)` Set the Application Change Type.
    `void` | `setApplicationChangeType(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)` IS Set the Application Change Type.
    `void` | `setCurrentApplication(HD objcurrentApplication)` Set the Current Application.
    `void` | `setCurrentApplication(java.lang.String strNamespaceID, java.lang.String strUniversalID, java.lang.String strUniversalIDType)` Set the Current Application.
    `void` | `setCurrentCPU(ST objcurrentCPU)` Set the Current CPU.
    `void` | `setCurrentCPU(java.lang.String strCurrentCPU)` Set the Current CPU.
    `void` | `setCurrentFacility(HD objcurrentFacility)` Set the Current Facility.
    `void` | `setCurrentFacility(java.lang.String strNamespaceID, java.lang.String strUniversalID, java.lang.String strUniversalIDType)` Set the Current Facility.
    `void` | `setCurrentFileserver(ST objcurrentFileserver)` Set the Current Fileserver.
    `void` | `setCurrentFileserver(java.lang.String strCurrentFileserver)` Set the Current Fileserver.
    `void` | `setNewApplication(HD objnewApplication)` Set the New Application.
    `void` | `setNewApplication(java.lang.String strNamespaceID, java.lang.String strUniversalID, java.lang.String strUniversalIDType)` Set the New Application.
    `void` | `setNewCPU(ST objnewCPU)` Set the New CPU.
    `void` | `setNewCPU(java.lang.String strNewCPU)` Set the New CPU.
    `void` | `setNewFacility(HD objnewFacility)` Set the New Facility.
    `void` | `setNewFacility(java.lang.String strNamespaceID, java.lang.String strUniversalID, java.lang.String strUniversalIDType)` Set the New Facility.
    `void` | `setNewFileserver(ST objnewFileserver)` Set the New Fileserver.
    `void` | `setNewFileserver(java.lang.String strNewFileserver)` Set the New Fileserver.
    `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

    - #### NSC

          public NSC()

      Constructs the NSC segment.

  - ### Method Detail

    - #### getApplicationChangeType

          public CWE getApplicationChangeType()

      Retrieves the Application Change Type. This field contains the type of change being requested (if NMR query) or announced (if NMD unsolicited update).
      Returns:
        CWE - ApplicationChangeType

    - #### setApplicationChangeType

          public void setApplicationChangeType(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)

      IS Set the Application Change Type. This field contains the type of change being requested (if NMR query) or announced (if NMD unsolicited update).
      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.

    - #### setApplicationChangeType

          public void setApplicationChangeType(CWE objapplicationChangeType)

      Set the Application Change Type. This field contains the type of change being requested (if NMR query) or announced (if NMD unsolicited update).
      Parameters:
        `objapplicationChangeType` - value of ApplicationChangeType

    - #### getCurrentApplication

          public HD getCurrentApplication()

      Retrieves the Current Application. This field contains a site-specific name used to identify the "current" application process for interfacing with lower level protocols.
      Returns:
        HD - currentApplication

    - #### setCurrentApplication

          public void setCurrentApplication(java.lang.String strNamespaceID,
                                   java.lang.String strUniversalID,
                                   java.lang.String strUniversalIDType)

      Set the Current Application. This field contains a site-specific name used to identify the "current" application process for interfacing with lower level protocols.
      Parameters:
        `strNamespaceID` - Specifies Specifies the HL7 identifier for the user-defined table of values for this component.[Refer Table No.300]
        `strUniversalID` - Specifies a string formatted according to the scheme defined by the component, (UID type).
        `strUniversalIDType` - Governs the interpretation of the strUniversalId.

    - #### setCurrentApplication

          public void setCurrentApplication(HD objcurrentApplication)

      Set the Current Application. This field contains a site-specific name used to identify the "current" application process for interfacing with lower level protocols.
      Parameters:
        `objcurrentApplication` - Current Application

    - #### getCurrentCPU

          public ST getCurrentCPU()

      Retrieves the Current CPU. This field contains a site-specific name for the current CPU.
      Returns:
        ST - currentCPU

    - #### setCurrentCPU

          public void setCurrentCPU(java.lang.String strCurrentCPU)

      Set the Current CPU. This field contains a site-specific name for the current CPU.
      Parameters:
        `strCurrentCPU` - The name of the party.

    - #### setCurrentCPU

          public void setCurrentCPU(ST objcurrentCPU)

      Set the Current CPU. This field contains a site-specific name for the current CPU.
      Parameters:
        `objcurrentCPU` - The name of the party.

    - #### getCurrentFacility

          public HD getCurrentFacility()

      Retrieves the Current Facility. This field contains a site-specific name for the current facility used by this application.
      Returns:
        HD - currentFacility

    - #### setCurrentFacility

          public void setCurrentFacility(java.lang.String strNamespaceID,
                                java.lang.String strUniversalID,
                                java.lang.String strUniversalIDType)

      Set the Current Facility. This field contains a site-specific name for the current facility used by this application.
      Parameters:
        `strNamespaceID` - Specifies Specifies the HL7 identifier for the user-defined table of values for this component.[Refer Table No.300]
        `strUniversalID` - Specifies a string formatted according to the scheme defined by the component, (UID type).
        `strUniversalIDType` - Governs the interpretation of the strUniversalId.

    - #### setCurrentFacility

          public void setCurrentFacility(HD objcurrentFacility)

      Set the Current Facility. This field contains a site-specific name for the current facility used by this application.
      Parameters:
        `objcurrentFacility` - Current Facility

    - #### getCurrentFileserver

          public ST getCurrentFileserver()

      Retrieves the Current Fileserver. This field contains a site specific name for the current fileserver or file system used by this application.
      Returns:
        ST - currentFileserver

    - #### setCurrentFileserver

          public void setCurrentFileserver(java.lang.String strCurrentFileserver)

      Set the Current Fileserver. This field contains a site specific name for the current fileserver or file system used by this application.
      Parameters:
        `strCurrentFileserver` - The name of the party.

    - #### setCurrentFileserver

          public void setCurrentFileserver(ST objcurrentFileserver)

      Set the Current Fileserver. This field contains a site specific name for the current fileserver or file system used by this application.
      Parameters:
        `objcurrentFileserver` - The name of the party.

    - #### getNewApplication

          public HD getNewApplication()

      Retrieves the New Application. This field contains a site-specific name used to identify "new" application processes for interfacing with lower level protocols for interfacing with lower level protocols.
      Returns:
        HD - newApplication

    - #### setNewApplication

          public void setNewApplication(java.lang.String strNamespaceID,
                               java.lang.String strUniversalID,
                               java.lang.String strUniversalIDType)

      Set the New Application. This field contains a site-specific name used to identify "new" application processes for interfacing with lower level protocols for interfacing with lower level protocols.
      Parameters:
        `strNamespaceID` - Specifies Specifies the HL7 identifier for the user-defined table of values for this component.[Refer Table No.300]
        `strUniversalID` - Specifies a string formatted according to the scheme defined by the component, (UID type).
        `strUniversalIDType` - Governs the interpretation of the strUniversalId.

    - #### setNewApplication

          public void setNewApplication(HD objnewApplication)

      Set the New Application. This field contains a site-specific name used to identify "new" application processes for interfacing with lower level protocols for interfacing with lower level protocols.
      Parameters:
        `objnewApplication` - New Application

    - #### getNewCPU

          public ST getNewCPU()

      Retrieves the New CPU. This field contains a site-specific name for the new CPU.
      Returns:
        ST - newCPU

    - #### setNewCPU

          public void setNewCPU(java.lang.String strNewCPU)

      Set the New CPU. This field contains a site-specific name for the new CPU.
      Parameters:
        `strNewCPU` - The name of the party.

    - #### setNewCPU

          public void setNewCPU(ST objnewCPU)

      Set the New CPU. This field contains a site-specific name for the new CPU.
      Parameters:
        `objnewCPU` - The name of the party.

    - #### getNewFacility

          public HD getNewFacility()

      Retrieves the New Facility. This field contains a site-specific name for the new facility used by this application.
      Returns:
        HD - newFacility

    - #### setNewFacility

          public void setNewFacility(java.lang.String strNamespaceID,
                            java.lang.String strUniversalID,
                            java.lang.String strUniversalIDType)

      Set the New Facility. This field contains a site-specific name for the new facility used by this application.
      Parameters:
        `strNamespaceID` - Specifies Specifies the HL7 identifier for the user-defined table of values for this component.[Refer Table No.300]
        `strUniversalID` - Specifies a string formatted according to the scheme defined by the component, (UID type).
        `strUniversalIDType` - Governs the interpretation of the strUniversalId.

    - #### setNewFacility

          public void setNewFacility(HD objnewFacility)

      Set the New Facility. This field contains a site-specific name for the new facility used by this application.
      Parameters:
        `objnewFacility` - New Facility

    - #### getNewFileserver

          public ST getNewFileserver()

      Retrieves the New Fileserver. This field contains a site-specific name for the new fileserver or file system used by this application.
      Returns:
        ST - newFileserver

    - #### setNewFileserver

          public void setNewFileserver(java.lang.String strNewFileserver)

      Set the New Fileserver. This field contains a site-specific name for the new fileserver or file system used by this application.
      Parameters:
        `strNewFileserver` - The name of the party.

    - #### setNewFileserver

          public void setNewFileserver(ST objnewFileserver)

      Set the New Fileserver. This field contains a site-specific name for the new fileserver or file system used by this application.
      Parameters:
        `objnewFileserver` - The name of the party.

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