cdac.medinfo.sdk.hl7282.baselibs.segments

## Class OM6

- java.lang.Object
- - cdac.medinfo.sdk.hl7282.baselibs.segments.Segment
  - - cdac.medinfo.sdk.hl7282.baselibs.segments.OM6

- All Implemented Interfaces:
    ISegment

      public class OM6
      extends Segment

  OM6 - Observations that are Calculated from Other Observations Segments.

  The Technical Steward for the OM6 segment is ORDERS. This segment contains the information about quantities that are derived from one or more other quantities or direct observations by mathematical or logical means

  Represents an HL7 OM6 message segment. This segment has the following fields:

  OM6-1: Sequence Number - Test/Observation Master File (NM)Optional
  OM6-2: Derivation Rule (TX)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. The class has validate method which validates Message against HL7 v 2.8.2 standard.

  User can also create Segment through `SegmentFactory`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `OM6()` Constructs the OM6 segment.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `TX` | `getDerivationRule()` Retrieves the Derivation Rule.
    `NM` | `getSequenceNumberTestObservationMasterFile()` Retrieves the Sequence Number Test Observation Master File.
    `void` | `setDerivationRule(java.lang.String strDerivationRule)` Set the Derivation Rule.
    `void` | `setDerivationRule(TX objderivationRule)` Set the Derivation Rule.
    `void` | `setSequenceNumberTestObservationMasterFile(NM objsequenceNumberTestObservationMasterFile)` Set the Sequence Number Test Observation Master File.
    `void` | `setSequenceNumberTestObservationMasterFile(java.lang.String strSequenceNumberTestObservationMasterFile)` Set the Sequence Number Test Observation Master File.
    `boolean` | `validate()` Validates HL7 Message objects .

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

      `addUnRecognizedField, dumpSegment, getFields, getName, getUnrecognizedFields, moveToNextSegment, parse, removeDataElement, removeDataElement, serialize, setName, setUnRecognizedField, updateDataElement, updateDataElement, writeToXML`

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

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

- - ### Constructor Detail

    - #### OM6

          public OM6()

      Constructs the OM6 segment.

  - ### Method Detail

    - #### getDerivationRule

          public TX getDerivationRule()

      Retrieves the Derivation Rule. This field used when there are patient variables that are derived from one or more other patient variables.
      Returns:
        TX - derivationRule

    - #### getSequenceNumberTestObservationMasterFile

          public NM getSequenceNumberTestObservationMasterFile()

      Retrieves the Sequence Number Test Observation Master File. This field contains the same value as the sequence number of the associated OM1 segment.
      Returns:
        NM - sequenceNumberTestObservationMasterFile

    - #### setDerivationRule

          public void setDerivationRule(java.lang.String strDerivationRule)

      Set the Derivation Rule. This field used when there are patient variables that are derived from one or more other patient variables.
      Parameters:
        `strDerivationRule` - Use as DerivationRule.

    - #### setDerivationRule

          public void setDerivationRule(TX objderivationRule)

      Set the Derivation Rule. This field used when there are patient variables that are derived from one or more other patient variables.
      Parameters:
        `objderivationRule` - Object of Derivation Rule.

    - #### setSequenceNumberTestObservationMasterFile

          public void setSequenceNumberTestObservationMasterFile(java.lang.String strSequenceNumberTestObservationMasterFile)

      Set the Sequence Number Test Observation Master File. This field contains the same value as the sequence number of the associated OM1 segment.
      Parameters:
        `strSequenceNumberTestObservationMasterFile` - Specifies the maximum number of days that the insurance policy will cover.

    - #### setSequenceNumberTestObservationMasterFile

          public void setSequenceNumberTestObservationMasterFile(NM objsequenceNumberTestObservationMasterFile)

      Set the Sequence Number Test Observation Master File. This field contains the same value as the sequence number of the associated OM1 segment.
      Parameters:
        `objsequenceNumberTestObservationMasterFile` - Object of Sequence Number Test Observation Master File.

    - #### validate

          public boolean validate()
                           throws InvalidSegmentException

      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.
      Specified by:
        `validate` in interface `ISegment`
      Overrides:
        `validate` in class `Segment`
      Returns:
        boolean - true or false.
      Throws:
        `InvalidSegmentException` - Throws when Segment Validation fails.