cdac.medinfo.sdk.hl7282.baselibs.segments

## Class PTH

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

- All Implemented Interfaces:
    ISegment

      public class PTH
      extends Segment

  PTH - Pathway Segment.

  The pathway segment contains the data necessary to add, update, correct, and delete from the record pathways that are utilized to address an individual's health care.

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

  PTH-1: Action Code (ID)Required
  PTH-2: Pathway ID (CWE)Required
  PTH-3: Pathway Instance ID (EI)Required
  PTH-4: Pathway Established Date/Time (DTM)Required
  PTH-5: Pathway Life Cycle Status (CWE)Optional
  PTH-6: Change Pathway Life Cycle Status Date/Time (DTM)Conditional
  PTH-7: Mood Code (CNE)Conditional

  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
    `PTH()` Constucts the PTH segment.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ID` | `getActionCode()` Retrieves the Action Code.
    `DTM` | `getChangePathwayLifeCycleStatusDateTime()` Retrieves the Change Pathway Life Cycle Status Date Time.
    `CNE` | `getMoodCode()` Retrieves the Mood Code.
    `DTM` | `getPathwayEstablishedDateTime()` Retrieves the Pathway Established Date Time.
    `CWE` | `getPathwayID()` Retrieves the Pathway ID.
    `EI` | `getPathwayInstanceID()` Retrieves the Pathway Instance ID.
    `CWE` | `getPathwayLifeCycleStatus()` Retrieves the Pathway Life Cycle Status.
    `void` | `setActionCode(ID objactionCode)` Set the Action Code.
    `void` | `setActionCode(java.lang.String strActionCode)` Set the Action Code.
    `void` | `setChangePathwayLifeCycleStatusDateTime(DTM objchangePathwayLifeCycleStatusDateTime)` Set the Change Pathway Life Cycle Status Date Time.
    `void` | `setChangePathwayLifeCycleStatusDateTime(java.lang.String strTime)` Set the Change Pathway Life Cycle Status Date Time.
    `void` | `setMoodCode(CNE objMoodCode)` Set the Mood Code.
    `void` | `setMoodCode(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 strNameOfSecondAltenateCodingSystem, 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 Mood Code.
    `void` | `setPathwayEstablishedDateTime(DTM objpathwayEstablishedDateTime)` Set the Pathway Established Date Time.
    `void` | `setPathwayEstablishedDateTime(java.lang.String strTime)` Set the Pathway Established Date Time.
    `void` | `setPathwayID(CWE objpathwayID)` Set the Pathway ID.
    `void` | `setPathwayID(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 Pathway ID.
    `void` | `setPathwayInstanceID(EI objpathwayInstanceID)` Set the Pathway Instance ID.
    `void` | `setPathwayInstanceID(java.lang.String strEntityIdentifier, java.lang.String strNamespaceId, java.lang.String strUniversalId, java.lang.String strUniversalIdType)` Set the Pathway Instance ID.
    `void` | `setPathwayLifeCycleStatus(CWE objpathwayLifeCycleStatus)` Set the Pathway Life Cycle Status.
    `void` | `setPathwayLifeCycleStatus(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 Pathway Life Cycle Status.
    `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

    - #### PTH

          public PTH()

      Constucts the PTH segment.

  - ### Method Detail

    - #### getActionCode

          public ID getActionCode()

      Retrieves the Action Code. This field reveals the intent of the message.
      Returns:
        ID - actionCode

    - #### getChangePathwayLifeCycleStatusDateTime

          public DTM getChangePathwayLifeCycleStatusDateTime()

      Retrieves the Change Pathway Life Cycle Status Date Time.
      Returns:
        DTM - changePathwayLifeCycleStatusDateTime

    - #### getPathwayEstablishedDateTime

          public DTM getPathwayEstablishedDateTime()

      Retrieves the Pathway Established Date Time. This field contains the identification of the event time for the current pathway record.
      Returns:
        DTM - pathwayEstablishedDateTime

    - #### getPathwayID

          public CWE getPathwayID()

      Retrieves the Pathway ID. This field contains the pathway master data identifier associated with the referenced problem or goal.
      Returns:
        CWE - pathwayID

    - #### getPathwayInstanceID

          public EI getPathwayInstanceID()

      Retrieves the Pathway Instance ID. This field contains a value generated by the originating application that represents an associated order placer group number, or other unique identifier assigned to the grouping of pathway directives.
      Returns:
        EI - pathwayInstanceID

    - #### getPathwayLifeCycleStatus

          public CWE getPathwayLifeCycleStatus()

      Retrieves the Pathway Life Cycle Status. This field contains an application-specific set of state identifiers.
      Returns:
        CWE - pathwayLifeCycleStatus

    - #### getMoodCode

          public CNE getMoodCode()

      Retrieves the Mood Code. This field indicates the Mood of the Pathway. It allows expression of the context of the Pathway.
      Returns:
        CNE - moodCode

    - #### setActionCode

          public void setActionCode(java.lang.String strActionCode)

      Set the Action Code. This field reveals the intent of the message.
      Parameters:
        `strActionCode` - Specifies the the intent of the message

    - #### setActionCode

          public void setActionCode(ID objactionCode)

      Set the Action Code. This field reveals the intent of the message.
      Parameters:
        `objactionCode` - Specifies the the intent of the message

    - #### setChangePathwayLifeCycleStatusDateTime

          public void setChangePathwayLifeCycleStatusDateTime(java.lang.String strTime)

      Set the Change Pathway Life Cycle Status Date Time.
      Parameters:
        `strTime` - Specifies a point in time using a 24-hour clock notation.

    - #### setChangePathwayLifeCycleStatusDateTime

          public void setChangePathwayLifeCycleStatusDateTime(DTM objchangePathwayLifeCycleStatusDateTime)

      Set the Change Pathway Life Cycle Status Date Time.
      Parameters:
        `objchangePathwayLifeCycleStatusDateTime` -

    - #### setPathwayEstablishedDateTime

          public void setPathwayEstablishedDateTime(java.lang.String strTime)

      Set the Pathway Established Date Time. This field contains the identification of the event time for the current pathway record.
      Parameters:
        `strTime` - Specifies a point in time using a 24-hour clock notation.

    - #### setPathwayEstablishedDateTime

          public void setPathwayEstablishedDateTime(DTM objpathwayEstablishedDateTime)

      Set the Pathway Established Date Time. This field contains the identification of the event time for the current pathway record.
      Parameters:
        `objpathwayEstablishedDateTime` -

    - #### setPathwayID

          public void setPathwayID(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 Pathway ID. This field contains the pathway master data identifier associated with the referenced problem or goal.
      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.

    - #### setPathwayID

          public void setPathwayID(CWE objpathwayID)

      Set the Pathway ID. This field contains the pathway master data identifier associated with the referenced problem or goal.
      Parameters:
        `objpathwayID` -

    - #### setPathwayInstanceID

          public void setPathwayInstanceID(java.lang.String strEntityIdentifier,
                                  java.lang.String strNamespaceId,
                                  java.lang.String strUniversalId,
                                  java.lang.String strUniversalIdType)

      Set the Pathway Instance ID. This field contains a value generated by the originating application that represents an associated order placer group number, or other unique identifier assigned to the grouping of pathway directives. an associated order placer group number, or other unique identifier assigned to the grouping of pathway directives.
      Parameters:
        `strEntityIdentifier` - Specifies defined by a hierarchic designator, represented by components 2 through 4. [Reference Section 2.A.33, "HD - hierarchic designator".]
        `strNamespaceId` - Specifies the HL7 identifier for the user-defined table of values for this component. [Refer to User-defined Table 0363 - Assigning authority]
        `strUniversalId` - Specifies string formatted according to the scheme defined by the component, (UID type).
        `strUniversalIdType` - Specifies the interpretation of the second component of the HD.

    - #### setPathwayInstanceID

          public void setPathwayInstanceID(EI objpathwayInstanceID)

      Set the Pathway Instance ID. This field contains a value generated by the originating application that represents an associated order placer group number, or other unique identifier assigned to the grouping of pathway directives. an associated order placer group number, or other unique identifier assigned to the grouping of pathway directives.
      Parameters:
        `objpathwayInstanceID` -

    - #### setPathwayLifeCycleStatus

          public void setPathwayLifeCycleStatus(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 Pathway Life Cycle Status. This field contains an application-specific set of state identifiers.
      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.

    - #### setPathwayLifeCycleStatus

          public void setPathwayLifeCycleStatus(CWE objpathwayLifeCycleStatus)

      Set the Pathway Life Cycle Status. This field contains an application-specific set of state identifiers.
      Parameters:
        `objpathwayLifeCycleStatus` -

    - #### setMoodCode

          public void setMoodCode(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 strNameOfSecondAltenateCodingSystem,
                         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 Mood Code. This field indicates the Mood of the Pathway. It allows expression of the context of the Pathway.
      Parameters:
        `strIdentifier` - Specifies sequence of characters (the code) that uniquely identifies the item being referenced by the CNE.
        `strText` - Specifies descriptive or textual name of the identifier, e.g., myocardial infarction
        `strNameOfCodingSystem` - Specifies the coding scheme being used in the identifier component.
        `strAlternateIdentifier` - Specifies the local or user seen code as described.
        `strAlternateText` - Specifies descriptive or textual name of the alternate identifier.
        `strNameOfAlternateCodingSystem` - Specifies the coding scheme being used in the alternate identifier component.
        `strCodingSystemVersionID` - Specifies the version ID for the coding system.
        `strAlternateCodingSystemVersionID` - Specifies the version ID for the coding system .
        `strOriginalText` - Specifies the original text that was available to an automated process or a human before a specific code was assigned.
        `strSecondAlternateIdentifier` - Specifies a sequence of characters that uniquely identifies the second alternate code
        `strSecondAlternateText` - Specifies a the textual information of the second alternate code
        `strNameOfSecondAltenateCodingSystem` - Specifies the second coding scheme being used in the identifier component.
        `strSecondAlternateCodingSystemVersionID` - Specifies version ID of Second alternative coding system.
        `strCodingSystemOID` - contains the ISO Object identifier for the coding system.
        `strValueSetOID` - contains the value set from which CNE-1 is obtained
        `strValueSetVersionID` - contains the version of the value set identified by CNE-15.
        `strAlternateCodingSystemOID` - contains the ISO Object identifier for the alternate coding system
        `strAlternateValueSetOID` - contains the value set from which CNE-4 is obtained
        `strAlternateValueSetVersionID` - contains the version of the value set identified by CNE-18.
        `strSecondAlternateCodingSystemOID` - contains the value set from which CNE-12 is obtained
        `strSecondAlternateValueSetOID` - contains the value set from which CNE-10 is obtained
        `strSecondAlternateValueSetVersionID` - contains the version of the value set identified by CNE-21.

    - #### setMoodCode

          public void setMoodCode(CNE objMoodCode)

      Set the Mood Code. This field indicates the Mood of the Pathway. It allows expression of the context of the Pathway.
      Parameters:
        `objMoodCode` - Object of Mood Code.

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