cdac.medinfo.sdk.hl7282.hl7model.messages.medicalrecords

## Class MDM_T01_Common

- java.lang.Object
- - cdac.medinfo.sdk.hl7282.baselibs.messages.Message
  - - cdac.medinfo.sdk.hl7282.hl7model.messages.medicalrecords.MDM_T01_Common

- Direct Known Subclasses:
    MDM_T01, MDM_T03, MDM_T05, MDM_T07, MDM_T09, MDM_T11

      public abstract class MDM_T01_Common
      extends Message

  MDM_T01 - Original Document Notification (Event T01). This event sent a notification of the creation of a document without the accompanying content. There are multiple approaches by which systems become aware of documents.

  Represents a MDM_T01 message structure (see chapter 9.6.1). This structure contains the following elements:

  0: MSH (Message Header Segment) SINGLE_COMPULSARY
  1: SFT (Software Segment) MULTIPLE_OPTIONAL
  2: UAC (User Authentication Credential) SINGLE OPTIONAL
  3: EVN (Event Type Segment) SINGLE_COMPULSARY
  4: PID (Patient Identification Segment) SINGLE_COMPULSARY
  5: PV1 (Patient Visit Segment)SINGLE_COMPULSARY
  6: COMMON_ORDER (a Group of segments in MDM_T01 message) MULTIPLE_OPTIONAL
  7: TXA (Transcription Document Header Segment) SINGLE_COMPULSARY
  8: CON (Consent Segment) MULTIPLE_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. 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.

  Following is the step to create message
  Before that, respective Message Source and Message Recipient to be set on Message Factory.

  MDM_T01 objT01 = (MDM_T01)MessageFactory.createInstance().createSendSupportedMessage("MDM", "T01");

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addCommonOrderGroup(IGroup objGroup)` Adds Common Order GROUP to this message.
    `void` | `addCommonOrderGroups(ISingleCollection<IGroup> objSingleCollection)` Adds Collection of Common Order GROUP to this message.
    `void` | `addConsentSegment(ConsentSeg objCON)` Adds Consent Segment(CON) to this message.
    `void` | `addConsentSegment(ISingleCollection<ConsentSeg> objCONSegmentCollection)` Adds collection of Consent Segment(CON) 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>` | `getCommonOrderGroups()` Retrieves Collection of Common Order GROUP present in this message.
    `ISingleCollection<ConsentSeg>` | `getConsentSegments()` Retrieves Collection of Consent Segments(CON) present in this message.
    `TXA` | `getDocumentNotificationSegment()` Retrieves Document Notification(TXA) segment present in this message.
    `EVN` | `getEventTypeSegment()` Retrieves Event Type(EVN) segment present in this message
    `PID` | `getPatientIdentificationSegment()` Retrieves Patient Identification(PID) segment present in this message.
    `PV1` | `getPatientVisitSegment()` Retrieves Patient Visit(PV1) segment 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
    `void` | `setDocumentNotificationSegment(TXA objTXA)` Sets value of TXA segment for this message,overwrites if already present.
    `void` | `setEventTypeSegment(EVN objEVN)` Sets value of Event Type segment for this message,overwrites if already present.
    `void` | `setPatientIdentificationSegment(PID objPID)` Sets value of PID segment for this message,overwrites if already present.
    `void` | `setPatientVisitSegment(PV1 objPV1)` Sets value of PV1 segment for this message,overwrites if already present.
    `void` | `setUserAuthenticationCredentialSegment(UAC objUAC)` Sets value of User Authentication Credential segment for this message,overwrites if already present.
    `boolean` | `validate()` Validates HL7 Message objects.

    - ### 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, populate, removeGroup, removeSegment, removeSegment, removeSegmentAttribute, removeSegmentAttribute, removeSegmentAttribute, removeSegments, setHeader, setSubscriptionType, updateSegmentAttribute, updateSegmentAttribute, 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

    - #### getEventTypeSegment

          public EVN getEventTypeSegment()

      Retrieves Event Type(EVN) segment present in this message
      Returns:
        EVN - the EVN Segment present in this message or null if unavailable.

    - #### setEventTypeSegment

          public void setEventTypeSegment(EVN objEVN)

      Sets value of Event Type segment for this message,overwrites if already present.
      Parameters:
        `objEVN` - Specified EVN Segment

    - #### getPatientIdentificationSegment

          public PID getPatientIdentificationSegment()

      Retrieves Patient Identification(PID) segment present in this message.
      Returns:
        PID - the Patient Identification Segment present in this message or null if unavailable.

    - #### setPatientIdentificationSegment

          public void setPatientIdentificationSegment(PID objPID)

      Sets value of PID segment for this message,overwrites if already present.
      Parameters:
        `objPID` - Specified PID Segment

    - #### getPatientVisitSegment

          public PV1 getPatientVisitSegment()

      Retrieves Patient Visit(PV1) segment present in this message.
      Returns:
        PV1 - Patient Visit Segment present in this message or null if unavailable.

    - #### setPatientVisitSegment

          public void setPatientVisitSegment(PV1 objPV1)

      Sets value of PV1 segment for this message,overwrites if already present.
      Parameters:
        `objPV1` - Specified PV1 Segment

    - #### getCommonOrderGroups

          public ISingleCollection<IGroup> getCommonOrderGroups()

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

    - #### addCommonOrderGroups

          public void addCommonOrderGroups(ISingleCollection<IGroup> objSingleCollection)

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

    - #### addCommonOrderGroup

          public void addCommonOrderGroup(IGroup objGroup)

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

    - #### getDocumentNotificationSegment

          public TXA getDocumentNotificationSegment()

      Retrieves Document Notification(TXA) segment present in this message.
      Returns:
        TXA - Document Notification Segment present in this message or null if unavailable.

    - #### setDocumentNotificationSegment

          public void setDocumentNotificationSegment(TXA objTXA)

      Sets value of TXA segment for this message,overwrites if already present.
      Parameters:
        `objTXA` - Specified Document Notification Segment

    - #### getConsentSegments

          public ISingleCollection<ConsentSeg> getConsentSegments()

      Retrieves Collection of Consent Segments(CON) present in this message.
      Returns:
        ISingleCollection - Collection of Consent Segments(CON) present in this message.

    - #### addConsentSegment

          public void addConsentSegment(ConsentSeg objCON)

      Adds Consent Segment(CON) to this message.
      Parameters:
        `objCON` - Specified Consent Segment(CON) to be added in this messageto this message.

    - #### addConsentSegment

          public void addConsentSegment(ISingleCollection<ConsentSeg> objCONSegmentCollection)

      Adds collection of Consent Segment(CON) to this message.
      Parameters:
        `objCONSegmentCollection` - Collection of Consent Segments to add in this message

    - #### validate

          public boolean validate()
                           throws InvalidMessageException

      Validates HL7 Message objects. Validate method checks for validation each and every segments in side the Message object against specified message Structure. Validation chcecks 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.
      Overrides:
        `validate` in class `Message`
      Returns:
        boolean - true If Message and all segments in side it are validated properly - false If segment in side it is not validated properly and if compulsory segments are not present.
      Throws:
        `InvalidMessageException` - Thrown when Message validation fails.