cdac.medinfo.sdk.hl7282.baselibs.segments

## Class OM3

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

- All Implemented Interfaces:
    ISegment

      public class OM3
      extends Segment

  OM3 - Categorical Service/Test/Observation Segment

  The Technical Steward for the OM3 segment is ORDERS. This segment applies to free text and other non-numeric data types.

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

  OM3-1: Sequence Number - Test/Observation Master File (NM)Optional
  OM3-2: Preferred Coding System (CWE)Optional
  OM3-3: Valid Coded "Answers" (CWE)Optional
  OM3-4: Normal Text/Codes for Categorical Observations (CWE)Optional
  OM3-5: Abnormal Text/Codes for Categorical Observations (CWE)Optional
  OM3-6: Critical Text/Codes for Categorical Observations (CWE)Optional
  OM3-7: Value Type (ID)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
    `OM3()` Constructs the OM3 segment.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addAbnormalTextCodesforCategoricalObservations(CWE objabnormalTextCodesforCategoricalObservations)` Add the Abnormal Text Codesfor Categorical Observations.
    `void` | `addAbnormalTextCodesforCategoricalObservations(java.lang.String strIdentifier, java.lang.String strText, java.lang.String strNameOfCodingSystem, java.lang.String strAlternateIdentifier, java.lang.String strAlternateText, java.lang.String strNameOfAlternateCodingSystem, java.lang.String strCodingSystemVersionID, java.lang.String strAlternateCodingSystemVersionId, java.lang.String strOriginalText, java.lang.String strSecondAlternateIdentifier, java.lang.String strSecondAlternateText, java.lang.String strNameofSecondAlternateCodingSystem, java.lang.String strSecondAlternateCodingSystemVersionID, java.lang.String strCodingSystemOID, java.lang.String strValueSetOID, java.lang.String strValueSetVersionID, java.lang.String strAlternateCodingSystemOID, java.lang.String strAlternateValueSetOID, java.lang.String strAlternateValueSetVersionID, java.lang.String strSecondAlternateCodingSystemOID, java.lang.String strSecondAlternateValueSetOID, java.lang.String strSecondAlternateValueSetVersionID)` Add the Abnormal Text Codesfor Categorical Observations.
    `void` | `addCriticalTextCodesforCategoricalObservations(CWE objcriticalTextCodesforCategoricalObservations)` Add the Critical Text Codes for Categorical Observations.
    `void` | `addCriticalTextCodesforCategoricalObservations(java.lang.String strIdentifier, java.lang.String strText, java.lang.String strNameOfCodingSystem, java.lang.String strAlternateIdentifier, java.lang.String strAlternateText, java.lang.String strNameOfAlternateCodingSystem, java.lang.String strCodingSystemVersionID, java.lang.String strAlternateCodingSystemVersionId, java.lang.String strOriginalText, java.lang.String strSecondAlternateIdentifier, java.lang.String strSecondAlternateText, java.lang.String strNameofSecondAlternateCodingSystem, java.lang.String strSecondAlternateCodingSystemVersionID, java.lang.String strCodingSystemOID, java.lang.String strValueSetOID, java.lang.String strValueSetVersionID, java.lang.String strAlternateCodingSystemOID, java.lang.String strAlternateValueSetOID, java.lang.String strAlternateValueSetVersionID, java.lang.String strSecondAlternateCodingSystemOID, java.lang.String strSecondAlternateValueSetOID, java.lang.String strSecondAlternateValueSetVersionID)` Add the Critical Text Codes for Categorical Observations.
    `void` | `addNormalTextCodesforCategoricalObservations(CWE objnormalTextCodesforCategoricalObservations)` Add the Normal Text Codes for Categorical Observations.
    `void` | `addNormalTextCodesforCategoricalObservations(java.lang.String strIdentifier, java.lang.String strText, java.lang.String strNameOfCodingSystem, java.lang.String strAlternateIdentifier, java.lang.String strAlternateText, java.lang.String strNameOfAlternateCodingSystem, java.lang.String strCodingSystemVersionID, java.lang.String strAlternateCodingSystemVersionId, java.lang.String strOriginalText, java.lang.String strSecondAlternateIdentifier, java.lang.String strSecondAlternateText, java.lang.String strNameofSecondAlternateCodingSystem, java.lang.String strSecondAlternateCodingSystemVersionID, java.lang.String strCodingSystemOID, java.lang.String strValueSetOID, java.lang.String strValueSetVersionID, java.lang.String strAlternateCodingSystemOID, java.lang.String strAlternateValueSetOID, java.lang.String strAlternateValueSetVersionID, java.lang.String strSecondAlternateCodingSystemOID, java.lang.String strSecondAlternateValueSetOID, java.lang.String strSecondAlternateValueSetVersionID)` Add the Normal Text Codes for Categorical Observations.
    `ISingleCollection<CWE>` | `getAbnormalTextCodesforCategoricalObservations()` Retrieves the Abnormal Text Codesfor Categorical Observations.
    `ISingleCollection<CWE>` | `getCriticalTextCodesforCategoricalObservations()` Retrieves the Critical Text Codes for Categorical Observations.
    `ISingleCollection<CWE>` | `getNormalTextCodesforCategoricalObservations()` Retrieves the Normal Text Codes for Categorical Observations.
    `CWE` | `getPreferredCodingSystem()` Retrieves the Preferred Coding System.
    `NM` | `getSequenceNumberTestObservationMasterFile()` Retrieves the Sequence Number Test Observation Master File.
    `CWE` | `getValidCodedAnswers()` Retrieves the Valid Coded Answers.
    `ID` | `getValueType()` Retrieves the Value Type.
    `void` | `setAbnormalTextCodesforCategoricalObservations(ISingleCollection<CWE> objabnormalTextCodesforCategoricalObservationsList)` Set the Abnormal Text Codesfor Categorical Observations.
    `void` | `setCriticalTextCodesforCategoricalObservations(ISingleCollection<CWE> objcriticalTextCodesforCategoricalObservationsList)` Set the Critical Text Codes for Categorical Observations.
    `void` | `setNormalTextCodesforCategoricalObservations(ISingleCollection<CWE> objnormalTextCodesforCategoricalObservationsList)` Set the Normal Text Codes for Categorical Observations.
    `void` | `setPreferredCodingSystem(CWE objpreferredCodingSystem)` Set the Preferred Coding System.
    `void` | `setPreferredCodingSystem(java.lang.String strIdentifier, java.lang.String strText, java.lang.String strNameOfCodingSystem, java.lang.String strAlternateIdentifier, java.lang.String strAlternateText, java.lang.String strNameOfAlternateCodingSystem, java.lang.String strCodingSystemVersionID, java.lang.String strAlternateCodingSystemVersionId, java.lang.String strOriginalText, java.lang.String strSecondAlternateIdentifier, java.lang.String strSecondAlternateText, java.lang.String strNameofSecondAlternateCodingSystem, java.lang.String strSecondAlternateCodingSystemVersionID, java.lang.String strCodingSystemOID, java.lang.String strValueSetOID, java.lang.String strValueSetVersionID, java.lang.String strAlternateCodingSystemOID, java.lang.String strAlternateValueSetOID, java.lang.String strAlternateValueSetVersionID, java.lang.String strSecondAlternateCodingSystemOID, java.lang.String strSecondAlternateValueSetOID, java.lang.String strSecondAlternateValueSetVersionID)` Set the Preferred Coding System.
    `void` | `setSequenceNumberTestObservationMasterFile(NM objsequenceNumberTestObservationMasterFile)` Set the Sequence Number Test Observation Master File.
    `void` | `setSequenceNumberTestObservationMasterFile(java.lang.String strPolicyLimitDays)` Set the Sequence Number Test Observation Master File.
    `void` | `setValidCodedAnswers(CWE objvalidCodedAnswers)` Set the Valid Coded Answers.
    `void` | `setValidCodedAnswers(java.lang.String strIdentifier, java.lang.String strText, java.lang.String strNameOfCodingSystem, java.lang.String strAlternateIdentifier, java.lang.String strAlternateText, java.lang.String strNameOfAlternateCodingSystem, java.lang.String strCodingSystemVersionID, java.lang.String strAlternateCodingSystemVersionId, java.lang.String strOriginalText, java.lang.String strSecondAlternateIdentifier, java.lang.String strSecondAlternateText, java.lang.String strNameofSecondAlternateCodingSystem, java.lang.String strSecondAlternateCodingSystemVersionID, java.lang.String strCodingSystemOID, java.lang.String strValueSetOID, java.lang.String strValueSetVersionID, java.lang.String strAlternateCodingSystemOID, java.lang.String strAlternateValueSetOID, java.lang.String strAlternateValueSetVersionID, java.lang.String strSecondAlternateCodingSystemOID, java.lang.String strSecondAlternateValueSetOID, java.lang.String strSecondAlternateValueSetVersionID)` Set the Valid Coded Answers.
    `void` | `setValueType(ID objvalueType)` Set the Value Type.
    `void` | `setValueType(java.lang.String strQueryResponseStatus)` Set the Value Type.
    `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

    - #### OM3

          public OM3()

      Constructs the OM3 segment.

  - ### Method Detail

    - #### getAbnormalTextCodesforCategoricalObservations

          public ISingleCollection<CWE> getAbnormalTextCodesforCategoricalObservations()

      Retrieves the Abnormal Text Codesfor Categorical Observations. This field contains the list of the text answers that are abnormal for the test.
      Returns:
        ISingleCollection - abnormalTextCodesforCategoricalObservations

    - #### getCriticalTextCodesforCategoricalObservations

          public ISingleCollection<CWE> getCriticalTextCodesforCategoricalObservations()

      Retrieves the Critical Text Codes for Categorical Observations. This field contains the list of coded results that are critically abnormal for this observation.
      Returns:
        ISingleCollection - criticalTextCodesforCategoricalObservations

    - #### getNormalTextCodesforCategoricalObservations

          public ISingleCollection<CWE> getNormalTextCodesforCategoricalObservations()

      Retrieves the Normal Text Codes for Categorical Observations. This field contains the list of the text answers that are normal for the test.
      Returns:
        ISingleCollection - normalTextCodesforCategoricalObservations

    - #### getPreferredCodingSystem

          public CWE getPreferredCodingSystem()

      Retrieves the Preferred Coding System. This field contains the observations whose categorical responses are taken from a specified table of codes.
      Returns:
        CWE - preferredCodingSystem

    - #### 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

    - #### getValidCodedAnswers

          public CWE getValidCodedAnswers()

      Retrieves the Valid Coded Answers. This field contains a list of valid coded answers.
      Returns:
        CWE - validCodedAnswers

    - #### getValueType

          public ID getValueType()

      Retrieves the Value Type. This field contains the allowed data type for a single categorical observation.
      Returns:
        ID - valueType

    - #### addAbnormalTextCodesforCategoricalObservations

          public void addAbnormalTextCodesforCategoricalObservations(java.lang.String strIdentifier,
                                                            java.lang.String strText,
                                                            java.lang.String strNameOfCodingSystem,
                                                            java.lang.String strAlternateIdentifier,
                                                            java.lang.String strAlternateText,
                                                            java.lang.String strNameOfAlternateCodingSystem,
                                                            java.lang.String strCodingSystemVersionID,
                                                            java.lang.String strAlternateCodingSystemVersionId,
                                                            java.lang.String strOriginalText,
                                                            java.lang.String strSecondAlternateIdentifier,
                                                            java.lang.String strSecondAlternateText,
                                                            java.lang.String strNameofSecondAlternateCodingSystem,
                                                            java.lang.String strSecondAlternateCodingSystemVersionID,
                                                            java.lang.String strCodingSystemOID,
                                                            java.lang.String strValueSetOID,
                                                            java.lang.String strValueSetVersionID,
                                                            java.lang.String strAlternateCodingSystemOID,
                                                            java.lang.String strAlternateValueSetOID,
                                                            java.lang.String strAlternateValueSetVersionID,
                                                            java.lang.String strSecondAlternateCodingSystemOID,
                                                            java.lang.String strSecondAlternateValueSetOID,
                                                            java.lang.String strSecondAlternateValueSetVersionID)

      Add the Abnormal Text Codesfor Categorical Observations. This field contains the list of the text answers that are abnormal for the test.
      Parameters:
        `strIdentifier` - Specifies of characters (the code) that uniquely identifies the item being referenced.
        `strText` - Specifies The descriptive or textual name of the identifier, e.g., myocardial infarction.
        `strNameOfCodingSystem` - Identifies the coding scheme being used in the identifier component.
        `strAlternateIdentifier` - Specifies an alternate sequence of characters (the code) that uniquely identifies the item being referenced.
        `strAlternateText` - Specifies the descriptive or textual name of the alternate identifier. See usage note in section introduction.
        `strNameOfAlternateCodingSystem` - Identifies the coding scheme being used in the alternate identifier component.
        `strCodingSystemVersionID` - A sequence of characters that uniquely identifies a second alternate code.
        `strAlternateCodingSystemVersionId` - This component carries the version for the coding system identified by components 4-6.
        `strOriginalText` - The text as seen and/or selected by the user who entered the data.
        `strSecondAlternateIdentifier` - A sequence of characters that uniquely identifies a second alternate code.
        `strSecondAlternateText` - The descriptive or textual name of the alternate identifier.
        `strNameofSecondAlternateCodingSystem` - Identifies the coding scheme being used in the alternate identifier component.
        `strSecondAlternateCodingSystemVersionID` - This component carries the version for the coding system identified by components 10-12.
        `strCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.3.
        `strValueSetOID` - This component contains the ISO Object Identifier (OID) to allow identification of the value set from which the value in CWE.1 is obtained.
        `strValueSetVersionID` - This component carries the version for the value set identified by CWE.15. The version is a date. The date is the date/time that the value set being used was published.
        `strAlternateCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.6.
        `strAlternateValueSetOID` - This component contains the ISO Object Identifier (OID) to allow identification of the value set from which the value in CWE.4 is obtained.
        `strAlternateValueSetVersionID` - This component carries the version for the value set identified by CWE.18. The version is a date.
        `strSecondAlternateCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.12.
        `strSecondAlternateValueSetOID` - This component contains the ISO Object Identifier (OID) to allow identification of the value set from which the value in CWE.10 is obtained.
        `strSecondAlternateValueSetVersionID` - This component carries the version for the value set identified by CWE.21. The version is a date.

    - #### addAbnormalTextCodesforCategoricalObservations

          public void addAbnormalTextCodesforCategoricalObservations(CWE objabnormalTextCodesforCategoricalObservations)

      Add the Abnormal Text Codesfor Categorical Observations. This field contains the list of the text answers that are abnormal for the test.
      Parameters:
        `objabnormalTextCodesforCategoricalObservations` - Object of Abnormal Text Codesfor Categorical Observations.

    - #### setAbnormalTextCodesforCategoricalObservations

          public void setAbnormalTextCodesforCategoricalObservations(ISingleCollection<CWE> objabnormalTextCodesforCategoricalObservationsList)

      Set the Abnormal Text Codesfor Categorical Observations. This field contains the list of the text answers that are abnormal for the test.
      Parameters:
        `objabnormalTextCodesforCategoricalObservationsList` - List of Abnormal Text Codesfor Categorical Observations.

    - #### addCriticalTextCodesforCategoricalObservations

          public void addCriticalTextCodesforCategoricalObservations(java.lang.String strIdentifier,
                                                            java.lang.String strText,
                                                            java.lang.String strNameOfCodingSystem,
                                                            java.lang.String strAlternateIdentifier,
                                                            java.lang.String strAlternateText,
                                                            java.lang.String strNameOfAlternateCodingSystem,
                                                            java.lang.String strCodingSystemVersionID,
                                                            java.lang.String strAlternateCodingSystemVersionId,
                                                            java.lang.String strOriginalText,
                                                            java.lang.String strSecondAlternateIdentifier,
                                                            java.lang.String strSecondAlternateText,
                                                            java.lang.String strNameofSecondAlternateCodingSystem,
                                                            java.lang.String strSecondAlternateCodingSystemVersionID,
                                                            java.lang.String strCodingSystemOID,
                                                            java.lang.String strValueSetOID,
                                                            java.lang.String strValueSetVersionID,
                                                            java.lang.String strAlternateCodingSystemOID,
                                                            java.lang.String strAlternateValueSetOID,
                                                            java.lang.String strAlternateValueSetVersionID,
                                                            java.lang.String strSecondAlternateCodingSystemOID,
                                                            java.lang.String strSecondAlternateValueSetOID,
                                                            java.lang.String strSecondAlternateValueSetVersionID)

      Add the Critical Text Codes for Categorical Observations. This field contains the list of coded results that are critically abnormal for this observation.
      Parameters:
        `strIdentifier` - Specifies of characters (the code) that uniquely identifies the item being referenced.
        `strText` - Specifies The descriptive or textual name of the identifier, e.g., myocardial infarction.
        `strNameOfCodingSystem` - Identifies the coding scheme being used in the identifier component.
        `strAlternateIdentifier` - Specifies an alternate sequence of characters (the code) that uniquely identifies the item being referenced.
        `strAlternateText` - Specifies the descriptive or textual name of the alternate identifier. See usage note in section introduction.
        `strNameOfAlternateCodingSystem` - Identifies the coding scheme being used in the alternate identifier component.
        `strCodingSystemVersionID` - A sequence of characters that uniquely identifies a second alternate code.
        `strAlternateCodingSystemVersionId` - This component carries the version for the coding system identified by components 4-6.
        `strOriginalText` - The text as seen and/or selected by the user who entered the data.
        `strSecondAlternateIdentifier` - A sequence of characters that uniquely identifies a second alternate code.
        `strSecondAlternateText` - The descriptive or textual name of the alternate identifier.
        `strNameofSecondAlternateCodingSystem` - Identifies the coding scheme being used in the alternate identifier component.
        `strSecondAlternateCodingSystemVersionID` - This component carries the version for the coding system identified by components 10-12.
        `strCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.3.
        `strValueSetOID` - This component contains the ISO Object Identifier (OID) to allow identification of the value set from which the value in CWE.1 is obtained.
        `strValueSetVersionID` - This component carries the version for the value set identified by CWE.15. The version is a date. The date is the date/time that the value set being used was published.
        `strAlternateCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.6.
        `strAlternateValueSetOID` - This component contains the ISO Object Identifier (OID) to allow identification of the value set from which the value in CWE.4 is obtained.
        `strAlternateValueSetVersionID` - This component carries the version for the value set identified by CWE.18. The version is a date.
        `strSecondAlternateCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.12.
        `strSecondAlternateValueSetOID` - This component contains the ISO Object Identifier (OID) to allow identification of the value set from which the value in CWE.10 is obtained.
        `strSecondAlternateValueSetVersionID` - This component carries the version for the value set identified by CWE.21. The version is a date.

    - #### addCriticalTextCodesforCategoricalObservations

          public void addCriticalTextCodesforCategoricalObservations(CWE objcriticalTextCodesforCategoricalObservations)

      Add the Critical Text Codes for Categorical Observations. This field contains the list of coded results that are critically abnormal for this observation.
      Parameters:
        `objcriticalTextCodesforCategoricalObservations` - Object of Critical Text Codes for Categorical Observations.

    - #### setCriticalTextCodesforCategoricalObservations

          public void setCriticalTextCodesforCategoricalObservations(ISingleCollection<CWE> objcriticalTextCodesforCategoricalObservationsList)

      Set the Critical Text Codes for Categorical Observations. This field contains the list of coded results that are critically abnormal for this observation.
      Parameters:
        `objcriticalTextCodesforCategoricalObservationsList` - List of Critical Text Codes for Categorical Observations.

    - #### addNormalTextCodesforCategoricalObservations

          public void addNormalTextCodesforCategoricalObservations(java.lang.String strIdentifier,
                                                          java.lang.String strText,
                                                          java.lang.String strNameOfCodingSystem,
                                                          java.lang.String strAlternateIdentifier,
                                                          java.lang.String strAlternateText,
                                                          java.lang.String strNameOfAlternateCodingSystem,
                                                          java.lang.String strCodingSystemVersionID,
                                                          java.lang.String strAlternateCodingSystemVersionId,
                                                          java.lang.String strOriginalText,
                                                          java.lang.String strSecondAlternateIdentifier,
                                                          java.lang.String strSecondAlternateText,
                                                          java.lang.String strNameofSecondAlternateCodingSystem,
                                                          java.lang.String strSecondAlternateCodingSystemVersionID,
                                                          java.lang.String strCodingSystemOID,
                                                          java.lang.String strValueSetOID,
                                                          java.lang.String strValueSetVersionID,
                                                          java.lang.String strAlternateCodingSystemOID,
                                                          java.lang.String strAlternateValueSetOID,
                                                          java.lang.String strAlternateValueSetVersionID,
                                                          java.lang.String strSecondAlternateCodingSystemOID,
                                                          java.lang.String strSecondAlternateValueSetOID,
                                                          java.lang.String strSecondAlternateValueSetVersionID)

      Add the Normal Text Codes for Categorical Observations. This field contains the list of the text answers that are normal for the test.
      Parameters:
        `strIdentifier` - Specifies of characters (the code) that uniquely identifies the item being referenced.
        `strText` - Specifies The descriptive or textual name of the identifier, e.g., myocardial infarction.
        `strNameOfCodingSystem` - Identifies the coding scheme being used in the identifier component.
        `strAlternateIdentifier` - Specifies an alternate sequence of characters (the code) that uniquely identifies the item being referenced.
        `strAlternateText` - Specifies the descriptive or textual name of the alternate identifier. See usage note in section introduction.
        `strNameOfAlternateCodingSystem` - Identifies the coding scheme being used in the alternate identifier component.
        `strCodingSystemVersionID` - A sequence of characters that uniquely identifies a second alternate code.
        `strAlternateCodingSystemVersionId` - This component carries the version for the coding system identified by components 4-6.
        `strOriginalText` - The text as seen and/or selected by the user who entered the data.
        `strSecondAlternateIdentifier` - A sequence of characters that uniquely identifies a second alternate code.
        `strSecondAlternateText` - The descriptive or textual name of the alternate identifier.
        `strNameofSecondAlternateCodingSystem` - Identifies the coding scheme being used in the alternate identifier component.
        `strSecondAlternateCodingSystemVersionID` - This component carries the version for the coding system identified by components 10-12.
        `strCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.3.
        `strValueSetOID` - This component contains the ISO Object Identifier (OID) to allow identification of the value set from which the value in CWE.1 is obtained.
        `strValueSetVersionID` - This component carries the version for the value set identified by CWE.15. The version is a date. The date is the date/time that the value set being used was published.
        `strAlternateCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.6.
        `strAlternateValueSetOID` - This component contains the ISO Object Identifier (OID) to allow identification of the value set from which the value in CWE.4 is obtained.
        `strAlternateValueSetVersionID` - This component carries the version for the value set identified by CWE.18. The version is a date.
        `strSecondAlternateCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.12.
        `strSecondAlternateValueSetOID` - This component contains the ISO Object Identifier (OID) to allow identification of the value set from which the value in CWE.10 is obtained.
        `strSecondAlternateValueSetVersionID` - This component carries the version for the value set identified by CWE.21. The version is a date.

    - #### addNormalTextCodesforCategoricalObservations

          public void addNormalTextCodesforCategoricalObservations(CWE objnormalTextCodesforCategoricalObservations)

      Add the Normal Text Codes for Categorical Observations. This field contains the list of the text answers that are normal for the test.
      Parameters:
        `objnormalTextCodesforCategoricalObservations` - Object of Normal Text Codes for Categorical Observations.

    - #### setNormalTextCodesforCategoricalObservations

          public void setNormalTextCodesforCategoricalObservations(ISingleCollection<CWE> objnormalTextCodesforCategoricalObservationsList)

      Set the Normal Text Codes for Categorical Observations. This field contains the list of the text answers that are normal for the test.
      Parameters:
        `objnormalTextCodesforCategoricalObservationsList` - List of Normal Text Codes for Categorical Observations.

    - #### setPreferredCodingSystem

          public void setPreferredCodingSystem(java.lang.String strIdentifier,
                                      java.lang.String strText,
                                      java.lang.String strNameOfCodingSystem,
                                      java.lang.String strAlternateIdentifier,
                                      java.lang.String strAlternateText,
                                      java.lang.String strNameOfAlternateCodingSystem,
                                      java.lang.String strCodingSystemVersionID,
                                      java.lang.String strAlternateCodingSystemVersionId,
                                      java.lang.String strOriginalText,
                                      java.lang.String strSecondAlternateIdentifier,
                                      java.lang.String strSecondAlternateText,
                                      java.lang.String strNameofSecondAlternateCodingSystem,
                                      java.lang.String strSecondAlternateCodingSystemVersionID,
                                      java.lang.String strCodingSystemOID,
                                      java.lang.String strValueSetOID,
                                      java.lang.String strValueSetVersionID,
                                      java.lang.String strAlternateCodingSystemOID,
                                      java.lang.String strAlternateValueSetOID,
                                      java.lang.String strAlternateValueSetVersionID,
                                      java.lang.String strSecondAlternateCodingSystemOID,
                                      java.lang.String strSecondAlternateValueSetOID,
                                      java.lang.String strSecondAlternateValueSetVersionID)

      Set the Preferred Coding System. This field contains the observations whose categorical responses are taken from a specified table of codes.
      Parameters:
        `strIdentifier` - Specifies of characters (the code) that uniquely identifies the item being referenced.
        `strText` - Specifies The descriptive or textual name of the identifier, e.g., myocardial infarction.
        `strNameOfCodingSystem` - Identifies the coding scheme being used in the identifier component.
        `strAlternateIdentifier` - Specifies an alternate sequence of characters (the code) that uniquely identifies the item being referenced.
        `strAlternateText` - Specifies the descriptive or textual name of the alternate identifier. See usage note in section introduction.
        `strNameOfAlternateCodingSystem` - Identifies the coding scheme being used in the alternate identifier component.
        `strCodingSystemVersionID` - A sequence of characters that uniquely identifies a second alternate code.
        `strAlternateCodingSystemVersionId` - This component carries the version for the coding system identified by components 4-6.
        `strOriginalText` - The text as seen and/or selected by the user who entered the data.
        `strSecondAlternateIdentifier` - A sequence of characters that uniquely identifies a second alternate code.
        `strSecondAlternateText` - The descriptive or textual name of the alternate identifier.
        `strNameofSecondAlternateCodingSystem` - Identifies the coding scheme being used in the alternate identifier component.
        `strSecondAlternateCodingSystemVersionID` - This component carries the version for the coding system identified by components 10-12.
        `strCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.3.
        `strValueSetOID` - This component contains the ISO Object Identifier (OID) to allow identification of the value set from which the value in CWE.1 is obtained.
        `strValueSetVersionID` - This component carries the version for the value set identified by CWE.15. The version is a date. The date is the date/time that the value set being used was published.
        `strAlternateCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.6.
        `strAlternateValueSetOID` - This component contains the ISO Object Identifier (OID) to allow identification of the value set from which the value in CWE.4 is obtained.
        `strAlternateValueSetVersionID` - This component carries the version for the value set identified by CWE.18. The version is a date.
        `strSecondAlternateCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.12.
        `strSecondAlternateValueSetOID` - This component contains the ISO Object Identifier (OID) to allow identification of the value set from which the value in CWE.10 is obtained.
        `strSecondAlternateValueSetVersionID` - This component carries the version for the value set identified by CWE.21. The version is a date.

    - #### setPreferredCodingSystem

          public void setPreferredCodingSystem(CWE objpreferredCodingSystem)

      Set the Preferred Coding System. This field contains the observations whose categorical responses are taken from a specified table of codes.
      Parameters:
        `objpreferredCodingSystem` - Object of Preferred Coding System.

    - #### setValidCodedAnswers

          public void setValidCodedAnswers(java.lang.String strIdentifier,
                                  java.lang.String strText,
                                  java.lang.String strNameOfCodingSystem,
                                  java.lang.String strAlternateIdentifier,
                                  java.lang.String strAlternateText,
                                  java.lang.String strNameOfAlternateCodingSystem,
                                  java.lang.String strCodingSystemVersionID,
                                  java.lang.String strAlternateCodingSystemVersionId,
                                  java.lang.String strOriginalText,
                                  java.lang.String strSecondAlternateIdentifier,
                                  java.lang.String strSecondAlternateText,
                                  java.lang.String strNameofSecondAlternateCodingSystem,
                                  java.lang.String strSecondAlternateCodingSystemVersionID,
                                  java.lang.String strCodingSystemOID,
                                  java.lang.String strValueSetOID,
                                  java.lang.String strValueSetVersionID,
                                  java.lang.String strAlternateCodingSystemOID,
                                  java.lang.String strAlternateValueSetOID,
                                  java.lang.String strAlternateValueSetVersionID,
                                  java.lang.String strSecondAlternateCodingSystemOID,
                                  java.lang.String strSecondAlternateValueSetOID,
                                  java.lang.String strSecondAlternateValueSetVersionID)

      Set the Valid Coded Answers. This field contains a list of valid coded answers.
      Parameters:
        `strIdentifier` - Specifies of characters (the code) that uniquely identifies the item being referenced.
        `strText` - Specifies The descriptive or textual name of the identifier, e.g., myocardial infarction.
        `strNameOfCodingSystem` - Identifies the coding scheme being used in the identifier component.
        `strAlternateIdentifier` - Specifies an alternate sequence of characters (the code) that uniquely identifies the item being referenced.
        `strAlternateText` - Specifies the descriptive or textual name of the alternate identifier. See usage note in section introduction.
        `strNameOfAlternateCodingSystem` - Identifies the coding scheme being used in the alternate identifier component.
        `strCodingSystemVersionID` - A sequence of characters that uniquely identifies a second alternate code.
        `strAlternateCodingSystemVersionId` - This component carries the version for the coding system identified by components 4-6.
        `strOriginalText` - The text as seen and/or selected by the user who entered the data.
        `strSecondAlternateIdentifier` - A sequence of characters that uniquely identifies a second alternate code.
        `strSecondAlternateText` - The descriptive or textual name of the alternate identifier.
        `strNameofSecondAlternateCodingSystem` - Identifies the coding scheme being used in the alternate identifier component.
        `strSecondAlternateCodingSystemVersionID` - This component carries the version for the coding system identified by components 10-12.
        `strCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.3.
        `strValueSetOID` - This component contains the ISO Object Identifier (OID) to allow identification of the value set from which the value in CWE.1 is obtained.
        `strValueSetVersionID` - This component carries the version for the value set identified by CWE.15. The version is a date. The date is the date/time that the value set being used was published.
        `strAlternateCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.6.
        `strAlternateValueSetOID` - This component contains the ISO Object Identifier (OID) to allow identification of the value set from which the value in CWE.4 is obtained.
        `strAlternateValueSetVersionID` - This component carries the version for the value set identified by CWE.18. The version is a date.
        `strSecondAlternateCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.12.
        `strSecondAlternateValueSetOID` - This component contains the ISO Object Identifier (OID) to allow identification of the value set from which the value in CWE.10 is obtained.
        `strSecondAlternateValueSetVersionID` - This component carries the version for the value set identified by CWE.21. The version is a date.

    - #### setValidCodedAnswers

          public void setValidCodedAnswers(CWE objvalidCodedAnswers)

      Set the Valid Coded Answers. This field contains a list of valid coded answers.
      Parameters:
        `objvalidCodedAnswers` - Object of Valid Coded Answers.

    - #### setSequenceNumberTestObservationMasterFile

          public void setSequenceNumberTestObservationMasterFile(java.lang.String strPolicyLimitDays)

      Set the Sequence Number Test Observation Master File. This field contains the same value as the sequence number of the associated OM1 segment.
      Parameters:
        `strPolicyLimitDays` - 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.

    - #### setValueType

          public void setValueType(java.lang.String strQueryResponseStatus)

      Set the Value Type. This field contains the allowed data type for a single categorical observation.
      Parameters:
        `strQueryResponseStatus` - Use as QueryResponseStatus.

    - #### setValueType

          public void setValueType(ID objvalueType)

      Set the Value Type. This field contains the allowed data type for a single categorical observation.
      Parameters:
        `objvalueType` - Object of Value Type.

    - #### 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 checks 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.