cdac.medinfo.sdk.hl7282.hl7model.messages.observationreporting

## Class CSU_C09_Common

- java.lang.Object
- - cdac.medinfo.sdk.hl7282.baselibs.messages.Message
  - - cdac.medinfo.sdk.hl7282.hl7model.messages.observationreporting.CSU_C09_Common

- Direct Known Subclasses:
    CSU_C09, CSU_C10, CSU_C11, CSU_C12

      public abstract class CSU_C09_Common
      extends Message

  CSU_C09 - Unsolicited Study Data Message (Event C09,C10,C11,C12). This message is used to keep data enter in the clinical system or in laboratory, pathology, radiology, pharmacy and/or other clinical applications.

  Represents a CSU_C09 message structure (see chapter 7.7.2). This structure contains the 0: MSH (Message Header Segment) SINGLE_COMPULSARY
  1: SFT (Software Segment) MULTIPLE_OPTIONAL
  2: UAC (User Authentication Credential) SINGLE OPTIONAL
  3: PATIENT (a Group of segments in CRM_C01 message) MULTIPLE_COMPULSARY
  This class provides mechanism to validate message against HL7 v 2.8.2 standard. The class provides accessors & mutators for the elements mentioned above. These elements can be easily populated & populated values can be easily retrieved. The class has validate method which validates Message against HL7 v 2.8.2 standard.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addPatientGroup(IGroup objGroup)` Adds PATIENT GROUP to this message.
    `void` | `addPatientGroups(ISingleCollection<IGroup> objSingleCollection)` Adds Collection of PATIENT GROUP to this message.
    `void` | `addSoftwareSegment(ISingleCollection<SFT> objSFTSegmentCollection)` Adds collection of Software Segment(SFT) to this message.
    `void` | `addSoftwareSegment(SFT objSFT)` Adds Software Segment(SFT) to this message.
    `ISingleCollection<IGroup>` | `getPatientGroups()` Retrieves Collection of PATIENT GROUP present in this message.
    `ISingleCollection<SFT>` | `getSoftwareSegments()` Retrieves Collection of Software Segments(SFT) present in this message.
    `UAC` | `getUserAuthenticationCredentialSegment()` Retrieves User Authentication Credential(UAC) segment present in this message
    `int` | `populate(ISegmentSet objSegmentSet)` Populates Message using provided SegmentSet according to Message Structure specified by HL7 standard.
    `void` | `setUserAuthenticationCredentialSegment(UAC objUAC)` Sets value of User Authentication Credential segment for this message,overwrites if already present.

    - ### Methods inherited from class cdac.medinfo.sdk.hl7282.baselibs.messages.Message

      `contains, dumpMessage, dumpMessage, getACKMode, getGroup, getGroupMap, getHeader, getMessageCode, getMessageControlID, getMessageStructure, getQueryUserParameters, getSegment, getSegmentSet, getSubscriptionType, getTriggerEvent, isQuery, isResponse, removeGroup, removeSegment, removeSegment, removeSegmentAttribute, removeSegmentAttribute, removeSegmentAttribute, removeSegments, setHeader, setSubscriptionType, updateSegmentAttribute, updateSegmentAttribute, validate, writeToXML, writeToXML`

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

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

- - ### Method Detail

    - #### getSoftwareSegments

          public ISingleCollection<SFT> getSoftwareSegments()

      Retrieves Collection of Software Segments(SFT) present in this message.
      Returns:
        ISingleCollection - Collection of Software Segments(SFT) present in this message.

    - #### addSoftwareSegment

          public void addSoftwareSegment(SFT objSFT)

      Adds Software Segment(SFT) to this message.
      Parameters:
        `objSFT` - Specified Software Segment(SFT) to be added in this messageto this message.

    - #### addSoftwareSegment

          public void addSoftwareSegment(ISingleCollection<SFT> objSFTSegmentCollection)

      Adds collection of Software Segment(SFT) to this message.
      Parameters:
        `objSFTSegmentCollection` - Collection of Software Segments to add in this message

    - #### getUserAuthenticationCredentialSegment

          public UAC getUserAuthenticationCredentialSegment()

      Retrieves User Authentication Credential(UAC) segment present in this message
      Returns:
        UAC - Specified UAC Segment

    - #### setUserAuthenticationCredentialSegment

          public void setUserAuthenticationCredentialSegment(UAC objUAC)

      Sets value of User Authentication Credential segment for this message,overwrites if already present.
      Parameters:
        `objUAC` - Specified UAC Segment

    - #### getPatientGroups

          public ISingleCollection<IGroup> getPatientGroups()

      Retrieves Collection of PATIENT GROUP present in this message.
      Returns:
        ISingleCollection - Collection of PATIENT Group present in this Message.

    - #### addPatientGroups

          public void addPatientGroups(ISingleCollection<IGroup> objSingleCollection)

      Adds Collection of PATIENT GROUP to this message.
      Parameters:
        `objSingleCollection` - Specified PATIENT GROUP Collection.

    - #### addPatientGroup

          public void addPatientGroup(IGroup objGroup)

      Adds PATIENT GROUP to this message.
      Parameters:
        `objGroup` - Specified PATIENT GROUP.

    - #### populate

          public int populate(ISegmentSet objSegmentSet)
                       throws InvalidMessageException

      Populates Message using provided SegmentSet according to Message Structure specified by HL7 standard.
      Overrides:
        `populate` in class `Message`
      Parameters:
        `objSegmentSet` - instance of SegmentSet
      Returns:
        int - shows status as success or failure
      Throws:
        `InvalidMessageException` - If message validation fails.