cdac.medinfo.sdk.hl7282.baselibs

## Class OG

- java.lang.Object
- - cdac.medinfo.sdk.hl7282.baselibs.CompositeDataType
  - - cdac.medinfo.sdk.hl7282.baselibs.OG

- All Implemented Interfaces:
    IDataType

      public class OG
      extends CompositeDataType

  OG - Observation Grouper

  This data type can be used to define the structure of the observation/result segments (OBX) within an observation report segment (OBR).

  Represents an HL7 LA2 data type. This data type has the following attributes:

  1. Original Sub-Identifier (ST)Optional
  2. Group (NM)Optional
  3. Sequence (NM)Optional
  4. Identifier (ST)Optional
  This class provides accessors & mutators for the elements mentioned above. This class override the equal method, to check whether some other object is "equal to" this one.

  User can also create Data Type through `DataElementFactory`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `OG()` Default Constructor for OG
    `OG(int iComponentType, IDataTypeMap objIDataTypeMap)` Constructor for OG class which takes two arguments and sets the value in the respective member variable.
    `OG(int iComponentType, int iMinLength, int iMaxLength, java.lang.String strCLength, IDataTypeMap objIDataTypeMap)` Constructor for OG class which takes five arguments and sets the value in the respective member variable.
    `OG(int iComponentType, int iMinLength, int iMaxLength, java.lang.String strCLength, int ITableNo, IDataTypeMap objIDataTypeMap)` Constructor for OG class which takes six arguments and sets the value in the respective member variable.
    `OG(int iMinLength, int iMaxLength, java.lang.String strCLength, int iComponentType)` Constructor for OG class which takes four arguments and sets the value in the respective member variable.
    `OG(int iMinLength, int iMaxLength, java.lang.String strCLength, int iTableNo, int iComponentType)` Constructor for OG class which takes five arguments and sets the value in the respective member variable.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object objObject)` This method checks the equality of Object.
    `NM` | `getGroup()` Returns Group
    `ST` | `getIdentifier()` Returns Identifier.
    `ST` | `getOriginalSubIdentifier()` Returns Original Sub-Identifier.
    `NM` | `getSequence()` Returns Sequence
    `void` | `setGroup(NM objGroup)` Sets the Group
    `void` | `setGroup(java.lang.String strGroup)` Sets the Group.
    `void` | `setIdentifier(ST objIdentifier)` Sets the Sequence
    `void` | `setIdentifier(java.lang.String strIdentifier)` Sets the Identifier.
    `void` | `setOriginalSubIdentifier(ST objST)` Sets the Original Sub-identifier
    `void` | `setOriginalSubIdentifier(java.lang.String strOriginalSubIdentifier)` Sets the Original Sub-identifier.
    `void` | `setSequence(NM objSequence)` Sets the Sequence
    `void` | `setSequence(java.lang.String strSequence)` Sets the Sequence.

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

      `copy, dumpDataType, getAttributes, getDataTypeName, getLength, getValue, isPrimitive, read, setValue, validate, write, writeToXML`

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

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

- - ### Constructor Detail

    - #### OG

          public OG()

      Default Constructor for OG

    - #### OG

          public OG(int iMinLength,
            int iMaxLength,
            java.lang.String strCLength,
            int iComponentType)
             throws InvalidComponentTypeException

      Constructor for OG class which takes four arguments and sets the value in the respective member variable.
      Parameters:
        `iMinLength` - The Minimum length the DataType can have.
        `iMaxLength` - The Maximum length the DataType can have.
        `iCLength` - The Conformance length the DataType can have.
        `iComponentType` - The Type of the component i.e Component or a subcomponent.
      Throws:
        `InvalidComponentTypeException` - - if Component Type is not specified or valid.

    - #### OG

          public OG(int iMinLength,
            int iMaxLength,
            java.lang.String strCLength,
            int iTableNo,
            int iComponentType)
             throws InvalidComponentTypeException

      Constructor for OG class which takes five arguments and sets the value in the respective member variable.
      Parameters:
        `iMinLength` - The Minimum length the DataType can have.
        `iMaxLength` - The Maximum length the DataType can have.
        `iCLength` - The Conformance length the DataType can have.
        `iTableNo` - The Table number to which the value for the component is specified.
        `iComponentType` - The Type of the component i.e Component or a subcomponent.
      Throws:
        `InvalidComponentTypeException` - - if Component Type is not specified or valid.

    - #### OG

          public OG(int iComponentType,
            IDataTypeMap objIDataTypeMap)

      Constructor for OG class which takes two arguments and sets the value in the respective member variable.
      Parameters:
        `objIDataTypeMap` - object of Data Type Map.
        `iComponentType` - The Type of the component i.e Component or a subcomponent.
      Throws:
        `InvalidComponentTypeException` - - if Component Type is not specified or valid.

    - #### OG

          public OG(int iComponentType,
            int iMinLength,
            int iMaxLength,
            java.lang.String strCLength,
            IDataTypeMap objIDataTypeMap)

      Constructor for OG class which takes five arguments and sets the value in the respective member variable.
      Parameters:
        `objIDataTypeMap` - object of Data Type Map.
        `iComponentType` - The Type of the component i.e Component or a subcomponent.
        `iMinLength` - The Minimum length the DataType can have.
        `iMaxLength` - The Maximum length the DataType can have.
        `iCLength` - The Conformance length the DataType can have.
      Throws:
        `InvalidComponentTypeException` - - if Component Type is not specified or valid.

    - #### OG

          public OG(int iComponentType,
            int iMinLength,
            int iMaxLength,
            java.lang.String strCLength,
            int ITableNo,
            IDataTypeMap objIDataTypeMap)

      Constructor for OG class which takes six arguments and sets the value in the respective member variable.
      Parameters:
        `objIDataTypeMap` - object of Data Type Map.
        `iComponentType` - The Type of the component i.e Component or a subcomponent.
        `iMinLength` - The Minimum length the DataType can have.
        `iMaxLength` - The Maximum length the DataType can have.
        `iCLength` - The Conformance length the DataType can have.
        `iTableNo` - The Table number to which the value for the component is specified.
      Throws:
        `InvalidComponentTypeException` - - if Component Type is not specified or valid.

  - ### Method Detail

    - #### setOriginalSubIdentifier

          public void setOriginalSubIdentifier(java.lang.String strOriginalSubIdentifier)

      Sets the Original Sub-identifier.
      Parameters:
        `strOriginalSubIdentifier` - Specifies the street or mailing address of a person or institution.

    - #### setOriginalSubIdentifier

          public void setOriginalSubIdentifier(ST objST)

      Sets the Original Sub-identifier
      Parameters:
        `objST` - represents the original data type used in OBX-4 to enable backwards compatibility.

    - #### setGroup

          public void setGroup(java.lang.String strGroup)

      Sets the Group.
      Parameters:
        `strGroup` - Specifies group and its sequence within the OBR segment.

    - #### setGroup

          public void setGroup(NM objGroup)

      Sets the Group
      Parameters:
        `objGroup` - Specifies group and its sequence within the OBR segment.

    - #### setSequence

          public void setSequence(java.lang.String strSequence)

      Sets the Sequence.
      Parameters:
        `strSequence` - Specifies sequence within the group.

    - #### setSequence

          public void setSequence(NM objSequence)

      Sets the Sequence
      Parameters:
        `objSequence` - Specifies sequence within the group.

    - #### setIdentifier

          public void setIdentifier(java.lang.String strIdentifier)

      Sets the Identifier.
      Parameters:
        `strIdentifier` - Specifies sequence within the group.

    - #### setIdentifier

          public void setIdentifier(ST objIdentifier)

      Sets the Sequence
      Parameters:
        `objSequence` - Specifies sequence within the group.

    - #### getOriginalSubIdentifier

          public ST getOriginalSubIdentifier()

      Returns Original Sub-Identifier.
      Returns:
        ST - data type.

    - #### getGroup

          public NM getGroup()

      Returns Group
      Returns:
        NM - data type.

    - #### getSequence

          public NM getSequence()

      Returns Sequence
      Returns:
        NM - data type.

    - #### getIdentifier

          public ST getIdentifier()

      Returns Identifier.
      Returns:
        ST - data type.

    - #### equals

          public boolean equals(java.lang.Object objObject)

      This method checks the equality of Object.
      Overrides:
        `equals` in class `java.lang.Object`
      Parameters:
        `objObject` - object of Object class.
      Returns:
        boolean - shows success or failure of the comparison.