cdac.medinfo.sdk.hl7282.utils

## Interface IMap

- All Known Implementing Classes:
    Map

      public interface IMap

  IMessageMap needs to be implemented by class which provides Structure for a HL7 Message. Implementor class should provide definition to all methods which are defined to represent HL7 message structure.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addSegmentItem(ISegmentItem objSegmentItem)` Adds a ISegmentItem to Map at current available index.
    `void` | `addSegmentItem(ISegmentItem objSegmentItem, int index, EnumMapModifyMode enumModifyMode)` Adds a Segment Item to Map at given index according to the modification mode.
    `IMap` | `clone()` Generates clone of MessageMap
    `IMap` | `getGroupMap(ISegmentKey enumGroupName)` Retrieves Map of specified Group name
    `boolean` | `getLock()` Retrieves current status of lock for IMessageMap
    `ISegmentItem` | `getSegmentItem(int index)` Retrieves ISegmentItem from given index.
    `boolean` | `isFirstLevelMember(ISegmentKey enumSearchSegment)` Verifies whether Segment or Group is present at the first level of HL7 message structure or not.
    `boolean` | `isMember(ISegmentKey enumSearchSegment)` Verifies whether Segment or Group is member of HL7 Message or not according to Message Structure.
    `void` | `setLock(boolean bLock)` Sets lock on IMessageMap.
    `int` | `size()` This method returns the size of Message Map

- - ### Method Detail

    - #### getSegmentItem

          ISegmentItem getSegmentItem(int index)

      Retrieves ISegmentItem from given index.
      Parameters:
        `index` - value of index
      Returns:
        ISegmentItem instance of ISegmentItem

    - #### addSegmentItem

          void addSegmentItem(ISegmentItem objSegmentItem)

      Adds a ISegmentItem to Map at current available index.
      Parameters:
        `objSegmentItem` - Specified Sequence Item.

    - #### addSegmentItem

          void addSegmentItem(ISegmentItem objSegmentItem,
                            int index,
                            EnumMapModifyMode enumModifyMode)

      Adds a Segment Item to Map at given index according to the modification mode.
      Parameters:
        `objSegmentItem` - Specified Sequence Item.

    - #### size

          int size()

      This method returns the size of Message Map
      Returns:
        int - number of SegmentItem available in MessageMap

    - #### isFirstLevelMember

          boolean isFirstLevelMember(ISegmentKey enumSearchSegment)

      Verifies whether Segment or Group is present at the first level of HL7 message structure or not.
      Parameters:
        `enumSearchSegment` - Object of ISegmentKey provides name of Segment or Group.
      Returns:
        True - if Given Segment or Group is present at first level of HL7 message Structur else returns false.

    - #### isMember

          boolean isMember(ISegmentKey enumSearchSegment)

      Verifies whether Segment or Group is member of HL7 Message or not according to Message Structure.
      Parameters:
        `enumSearchSegment` - Object of ISegmentKey provides name of Segment or Group.
        `objMessageMap` - Object of IMessageMap.
      Returns:
        True - if Given Segment or Group is part of HL7 message Structur else returns false.

    - #### clone

          IMap clone()

      Generates clone of MessageMap
      Returns:
        IMessageMap - instance of MessageMap

    - #### setLock

          void setLock(boolean bLock)

      Sets lock on IMessageMap. If lock is set then new SegmentItem can not be added in IMessageMap
      Parameters:
        `bLock` - value of lock

    - #### getLock

          boolean getLock()

      Retrieves current status of lock for IMessageMap
      Returns:
        boolean - status of lock

    - #### getGroupMap

          IMap getGroupMap(ISegmentKey enumGroupName)

      Retrieves Map of specified Group name
      Parameters:
        `enumGroupName` - Object of ISegmentKey provides name of Group.
      Returns:
        IMessageMap Object of IMessageMap.