cdac.medinfo.sdk.hl7282.baselibs.segments

## Class VND

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

- All Implemented Interfaces:
    ISegment

      public class VND
      extends Segment

  VND - Purchasing Vendor Segment

  This segment contains purchasing vendors that supply the inventory supply item specified in the ITM segment.

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

  VND-1 : Set Id - VND(SI) Required
  VND-2 : Vendor Identifier(EI) Required
  VND-3 : Vendor Name (ST) Optional
  VND-4 : Vendor Catalog Number (EI) Optional
  VND-5 : Primary Vendor Indicator(CNE) 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
    `VND()` Constructs the VND segment.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `CNE` | `getPrimaryVendorIndicator()` Retrieves the Primary Vendor Indicator.
    `SI` | `getSetIdVND()` Retrieves the Set Id - VND.
    `EI` | `getVendorCatalogNumber()` Retrieves the Vendor Catalog Number.
    `EI` | `getVendorIdentifier()` Retrieves the Vendor Identifier.
    `ST` | `getVendorName()` Retrieves the Vendor Name.
    `void` | `setPrimaryVendorIndicator(CNE objPrimaryVendorIndicator)` Set the Primary Vendor Indicator.
    `void` | `setPrimaryVendorIndicator(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 strNameOfSecondAltenateCodingSystem, 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)` Set the Primary Vendor Indicator.
    `void` | `setSetIdVND(SI objSetIdVND)` Set the Set Id - VND.
    `void` | `setSetIdVND(java.lang.String strSetIdVND)` Set the Set Id - VND.
    `void` | `setVendorCatalogNumber(EI objVendorCatalogNumber)` Set the Vendor Catalog Number.
    `void` | `setVendorCatalogNumber(java.lang.String strEntityIdentifier, java.lang.String strNamespaceId, java.lang.String strUniversalId, java.lang.String strUniversalIdType)` Set the Vendor Catalog Number.
    `void` | `setVendorIdentifier(EI objVendorIdentifier)` Set the Vendor Identifier.
    `void` | `setVendorIdentifier(java.lang.String strEntityIdentifier, java.lang.String strNamespaceId, java.lang.String strUniversalId, java.lang.String strUniversalIdType)` Set the Vendor Identifier.
    `void` | `setVendorName(ST objVendorName)` Set the Vendor Name.
    `void` | `setVendorName(java.lang.String strVendorName)` Set the Vendor Name.
    `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

    - #### VND

          public VND()

      Constructs the VND segment.

  - ### Method Detail

    - #### getSetIdVND

          public SI getSetIdVND()

      Retrieves the Set Id - VND. This field contains a sequential number that identifies this segment within a given PURCHASING_VENDOR segment group.
      Returns:
        SI - setIdVND

    - #### getVendorIdentifier

          public EI getVendorIdentifier()

      Retrieves the Vendor Identifier. This field contains the identifier of the vendor in the system.
      Returns:
        EI - vendorIdentifier

    - #### getVendorName

          public ST getVendorName()

      Retrieves the Vendor Name. This field contains the name of the vendor identified in VND-2.
      Returns:
        ST - vendorName

    - #### getVendorCatalogNumber

          public EI getVendorCatalogNumber()

      Retrieves the Vendor Catalog Number. This field contains the catalog number assigned to the item by a purchasing vendor.
      Returns:
        EI - vendorCatalogNumber

    - #### getPrimaryVendorIndicator

          public CNE getPrimaryVendorIndicator()

      Retrieves the Primary Vendor Indicator. This field contains an indicator to communicate whether this purchasing vendor is the primary vendor used to place orders for inventory supply item.
      Returns:
        CNE - primaryVendorIndicator

    - #### setSetIdVND

          public void setSetIdVND(java.lang.String strSetIdVND)

      Set the Set Id - VND. This field contains a sequential number that identifies this segment within a given PURCHASING_VENDOR segment group.
      Parameters:
        `strSetIdVND` - Specifies Set Id – VND

    - #### setSetIdVND

          public void setSetIdVND(SI objSetIdVND)

      Set the Set Id - VND. This field contains a sequential number that identifies this segment within a given PURCHASING_VENDOR segment group.
      Parameters:
        `objSetIdVND` - Specifies Set Id – VND

    - #### setVendorIdentifier

          public void setVendorIdentifier(java.lang.String strEntityIdentifier,
                                 java.lang.String strNamespaceId,
                                 java.lang.String strUniversalId,
                                 java.lang.String strUniversalIdType)

      Set the Vendor Identifier. This field contains the identifier of the vendor in the system.
      Parameters:
        `strEntityIdentifier` - Specifies to be unique within the series of identifiers created by the assigning authority, defined by a hierarchic designator
        `strNamespaceId` - Specifies the assigning authority is a unique identifier of the system (or organization or agency or department) that creates the data.
        `strUniversalId` - Specifies a string formatted according to the scheme defined by the third component universal ID type. It is intended to be unique over time within the UID type.
        `strUniversalIdType` - Governs the interpretation of the Universal ID.

    - #### setVendorIdentifier

          public void setVendorIdentifier(EI objVendorIdentifier)

      Set the Vendor Identifier. This field contains the identifier of the vendor in the system.
      Parameters:
        `objVendorIdentifier` - Object of Vendor Identifier

    - #### setVendorName

          public void setVendorName(java.lang.String strVendorName)

      Set the Vendor Name. This field contains the name of the vendor identified in VND-2.
      Parameters:
        `strVendorName` - Used as Vendor Name.

    - #### setVendorName

          public void setVendorName(ST objVendorName)

      Set the Vendor Name. This field contains the name of the vendor identified in VND-2.
      Parameters:
        `objVendorName` - Object of Vendor Name.

    - #### setVendorCatalogNumber

          public void setVendorCatalogNumber(java.lang.String strEntityIdentifier,
                                    java.lang.String strNamespaceId,
                                    java.lang.String strUniversalId,
                                    java.lang.String strUniversalIdType)

      Set the Vendor Catalog Number. This field contains the catalog number assigned to the item by a purchasing vendor.
      Parameters:
        `strEntityIdentifier` - Specifies to be unique within the series of identifiers created by the assigning authority, defined by a hierarchic designator
        `strNamespaceId` - Specifies the assigning authority is a unique identifier of the system (or organization or agency or department) that creates the data.
        `strUniversalId` - Specifies a string formatted according to the scheme defined by the third component universal ID type. It is intended to be unique over time within the UID type.
        `strUniversalIdType` - Governs the interpretation of the Universal ID.

    - #### setVendorCatalogNumber

          public void setVendorCatalogNumber(EI objVendorCatalogNumber)

      Set the Vendor Catalog Number. This field contains the catalog number assigned to the item by a purchasing vendor.
      Parameters:
        `objVendorCatalogNumber` - Object of Vendor Catalog Number

    - #### setPrimaryVendorIndicator

          public void setPrimaryVendorIndicator(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 strNameOfSecondAltenateCodingSystem,
                                       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)

      Set the Primary Vendor Indicator. This field contains an indicator to communicate whether this purchasing vendor is the primary vendor used to place orders for inventory supply item.
      Parameters:
        `strIdentifier` - Specifies sequence of characters (the code) that uniquely identifies the item being referenced by the CNE.
        `strText` - Specifies descriptive or textual name of the identifier, e.g., myocardial infarction
        `strNameOfCodingSystem` - Specifies the coding scheme being used in the identifier component.
        `strAlternateIdentifier` - Specifies the local or user seen code as described.
        `strAlternateText` - Specifies descriptive or textual name of the alternate identifier.
        `strNameOfAlternateCodingSystem` - Specifies the coding scheme being used in the alternate identifier component.
        `strCodingSystemVersionID` - Specifies the version ID for the coding system.
        `strAlternateCodingSystemVersionID` - Specifies the version ID for the coding system .
        `strOriginalText` - Specifies the original text that was available to an automated process or a human before a specific code was assigned.
        `strSecondAlternateIdentifier` - Specifies a sequence of characters that uniquely identifies the second alternate code
        `strSecondAlternateText` - Specifies a the textual information of the second alternate code
        `strNameOfSecondAltenateCodingSystem` - Specifies the second coding scheme being used in the identifier component.
        `strSecondAlternateCodingSystemVersionID` - Specifies version ID of Second alternative coding system.
        `strCodingSystemOID` - contains the ISO Object identifier for the coding system.
        `strValueSetOID` - contains the value set from which CNE-1 is obtained
        `strValueSetVersionID` - contains the version of the value set identified by CNE-15.
        `strAlternateCodingSystemOID` - contains the ISO Object identifier for the alternate coding system
        `strAlternateValueSetOID` - contains the value set from which CNE-4 is obtained
        `strAlternateValueSetVersionID` - contains the version of the value set identified by CNE-18.
        `strSecondAlternateCodingSystemOID` - contains the value set from which CNE-12 is obtained
        `strSecondAlternateValueSetOID` - contains the value set from which CNE-10 is obtained
        `strSecondAlternateValueSetVersionID` - contains the version of the value set identified by CNE-21.

    - #### setPrimaryVendorIndicator

          public void setPrimaryVendorIndicator(CNE objPrimaryVendorIndicator)

      Set the Primary Vendor Indicator. This field contains an indicator to communicate whether this purchasing vendor is the primary vendor used to place orders for inventory supply item.
      Parameters:
        `objPrimaryVendorIndicator` - Object of Primary Vendor Indicator.

    - #### 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 checks 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` - If Segment Validation fails