cdac.medinfo.sdk.hl7282.baselibs.messages

## Interface IMessageRecepient

- All Known Implementing Classes:
    ADTRecepient, AppMgtRecepient, ClaimsAndReimbursementRecepient, ClinicalLabAutoRecepient, FinancialRecepient, MasterFileRecepient, MaterialsMgtRecepient, MediRecRecepient, ObsvRepRecepient, OrderEntryRecepient, PatientCareRecepient, PatientRefRecepient, PersonalMgmtRecepient, QryRecepient, SchedulingRecepient

      public interface IMessageRecepient

  IMessageRecepient provides methods to parse message from Given HL7stream object.It supports check for Query messages. Unlike Message Processor it does not support creation of Message.With implementor of this interface you can not trigger event. But you can process event.It also has support for creation of Queries.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `canReceive(EnumMessageCode enumMessageCode, EnumTriggerEvent enumTriggerEvent)` Checks whether underlying Message Recipient can receive specified Message or not.
    `boolean` | `canSend(EnumMessageCode enumMessageCode, EnumTriggerEvent enumTriggerEvent)` Checks whether underlying Message Recipient can send specified Message or not.
    `Message` | `createMessage(EnumMessageCode enumMessageCode, EnumTriggerEvent enumTriggerEvent)` Creates Empty Message with Message Structure & Trigger Event specified.
    `boolean` | `isMessageExtensionSupported(EnumMessageCode enumMsgCode, EnumTriggerEvent enumTriggerEvent)` Checks whether underlying Message Recipient supports extension of message for provided message code and trigger event.
    `Message` | `populateMessage(EnumMessageCode enumMessageCode, EnumTriggerEvent enumTriggerEvent, ISegmentSet objISegmentSet)` Parses Message with Specified Message Structure & Message Trigger Event from HL7 Stream.
    `Message` | `populateMessage(ISegmentSet objISegmentSet)` Parses Message from HL7 Stream.

- - ### Method Detail

    - #### isMessageExtensionSupported

          boolean isMessageExtensionSupported(EnumMessageCode enumMsgCode,
                                            EnumTriggerEvent enumTriggerEvent)

      Checks whether underlying Message Recipient supports extension of message for provided message code and trigger event. For Local trigger events enum value must be null.
      Parameters:
        `enumMsgCode` - specified message code.
        `enumTriggerEvent` - specified trigger event
      Returns:
        boolean status as true or false

    - #### canSend

          boolean canSend(EnumMessageCode enumMessageCode,
                        EnumTriggerEvent enumTriggerEvent)

      Checks whether underlying Message Recipient can send specified Message or not.
      Parameters:
        `enumMessageCode` - specified message code
        `enumTriggerEvent` - specified trigger event
      Returns:
        boolean status as true or false

    - #### canReceive

          boolean canReceive(EnumMessageCode enumMessageCode,
                           EnumTriggerEvent enumTriggerEvent)

      Checks whether underlying Message Recipient can receive specified Message or not.
      Parameters:
        `enumMessageCode` - specified message code
        `enumTriggerEvent` - specified trigger event
      Returns:
        boolean status as true or false

    - #### createMessage

          Message createMessage(EnumMessageCode enumMessageCode,
                              EnumTriggerEvent enumTriggerEvent)
                                throws MessageNotSupportedException

      Creates Empty Message with Message Structure & Trigger Event specified.
      Parameters:
        `enumMessageCode` - specified message code
        `enumTriggerEvent` - specified trigger event
      Returns:
        Message - Generated Empty Message
      Throws:
        `MessageNotSupportedException` - Thrown when Message creation is not supported by HL7 SDK

    - #### populateMessage

          Message populateMessage(ISegmentSet objISegmentSet)
                                  throws MessageNotSupportedException,
                                         InvalidMessageException

      Parses Message from HL7 Stream.
      Parameters:
        `objISegmentSet` - Stream from which Message to be parsed
      Returns:
        Message- message parsed
      Throws:
        `MessageNotSupportedException` - Thrown when Message creation is not supported by HL7 SDK
        `InvalidMessageException` - if Message validation fails

    - #### populateMessage

          Message populateMessage(EnumMessageCode enumMessageCode,
                                EnumTriggerEvent enumTriggerEvent,
                                ISegmentSet objISegmentSet)
                                  throws MessageNotSupportedException,
                                         InvalidMessageException

      Parses Message with Specified Message Structure & Message Trigger Event from HL7 Stream.
      Parameters:
        `enumMessageCode` - specified message code
        `enumTriggerEvent` - specified trigger event
        `objISegmentSet` - Stream from which Message to be parsed
      Returns:
        Message- message parsed
      Throws:
        `MessageNotSupportedException` - Thrown when Message creation is not supported by HL7 SDK
        `InvalidMessageException` - if Message validation fails