cdac.medinfo.sdk.hl7282.baselibs.messages

## Class Message_Source_Recepient

- java.lang.Object
- - cdac.medinfo.sdk.hl7282.baselibs.messages.Message_Source_Recepient

- Direct Known Subclasses:
    ADTRecepient, ADTSource, AppMgtRecepient, AppMgtSource, ClaimsAndReimbursementRecepient, ClaimsAndReimbursementSource, ClinicalLabAutoRecepient, ClinicalLabAutoSource, FinancialRecepient, FinancialSource, MasterFileRecepient, MasterFileSource, MaterialsMgtRecepient, MaterialsMgtSource, MediRecRecepient, MediRecSource, ObsvRepRecepient, ObsvRepSource, OrderEntryRecepient, OrderEntrySource, PatientCareRecepient, PatientCareSource, PatientRefRecepient, PatientRefSource, PersonalMgmtRecepient, PersonalMgmtSource, QryRecepient, QrySource, SchedulingRecepient, SchedulingSource

      public abstract class Message_Source_Recepient
      extends java.lang.Object

  Message_Source_Recepient class is the abstract class which Declares the Methods verify, canSend, canReceive. This class verifies Message according to MessageCode and TriggerEvent. It also checks weather User is capable to Send and Receive the Message.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Message_Source_Recepient(IMessageFactory objMessageFactory)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract boolean` | `canReceive(EnumMessageCode enumMessageCode, EnumTriggerEvent enumTriggerEvent)` Checks whether underlying Message Recipient can receive specified Message or not.
    `abstract 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.
    `Message` | `populateMessage(EnumMessageCode enumMessageCode, EnumTriggerEvent enumTriggerEvent, ISegmentSet objISegmentSet)` Populates Message with Specified Message Structure & Message Trigger Event from SegmentSet.
    `Message` | `populateMessage(ISegmentSet objISegmentSet)` Populates Message from HL7 Stream.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Message_Source_Recepient

          public Message_Source_Recepient(IMessageFactory objMessageFactory)

  - ### Method Detail

    - #### canSend

          public abstract 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

          public abstract 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

          public 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

          public Message populateMessage(ISegmentSet objISegmentSet)
                                  throws MessageNotSupportedException,
                                         InvalidMessageException

      Populates Message from HL7 Stream.
      Parameters:
        `objISegmentSet` - instance of SegmentSet
      Returns:
        Message instance of populated message
      Throws:
        `MessageNotSupportedException` - Thrown when Message creation is not supported by HL7 SDK
        `InvalidMessageException` - if Message validation fails

    - #### populateMessage

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

      Populates Message with Specified Message Structure & Message Trigger Event from SegmentSet.
      Parameters:
        `enumMessageCode` - specified message code
        `enumTriggerEvent` - specified trigger event
        `objISegmentSet` - instance of SegmentSet
      Returns:
        Message instance of populated message
      Throws:
        `MessageNotSupportedException` - Thrown when Message creation is not supported by HL7 SDK
        `InvalidMessageException` - if Message validation fails