Class NTE

All Implemented Interfaces:
Segment, Structure, Visitable, Serializable

public class NTE extends AbstractSegment

Represents an HL7 NTE message segment (NOTES AND COMMENTS). This segment has the following fields:

  • NTE-1: Set ID - Notes and Comments (SI) optional
  • NTE-2: Source of Comment (ID) optional
  • NTE-3: Comment (FT) optional repeating
See Also:
  • Constructor Details

  • Method Details

    • getSetIDNotesAndComments

      Returns NTE-1: "Set ID - Notes and Comments" - creates it if necessary
    • getNte1_SetIDNotesAndComments

      Returns NTE-1: "Set ID - Notes and Comments" - creates it if necessary
    • getSourceOfComment

      Returns NTE-2: "Source of Comment" - creates it if necessary
    • getNte2_SourceOfComment

      Returns NTE-2: "Source of Comment" - creates it if necessary
    • getComment

      public FT[] getComment()
      Returns all repetitions of Comment (NTE-3).
    • getNte3_Comment

      public FT[] getNte3_Comment()
      Returns all repetitions of Comment (NTE-3).
    • getCommentReps

      public int getCommentReps()
      Returns a count of the current number of repetitions of Comment (NTE-3). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getComment

      public FT getComment(int rep)
      Returns a specific repetition of NTE-3: "Comment" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getNte3_Comment

      public FT getNte3_Comment(int rep)
      Returns a specific repetition of NTE-3: "Comment" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getNte3_CommentReps

      public int getNte3_CommentReps()
      Returns a count of the current number of repetitions of Comment (NTE-3). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • insertComment

      public FT insertComment(int rep) throws HL7Exception
      Inserts a repetition of NTE-3: "Comment" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • insertNte3_Comment

      public FT insertNte3_Comment(int rep) throws HL7Exception
      Inserts a repetition of NTE-3: "Comment" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • removeComment

      public FT removeComment(int rep) throws HL7Exception
      Removes a repetition of NTE-3: "Comment" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • removeNte3_Comment

      public FT removeNte3_Comment(int rep) throws HL7Exception
      Removes a repetition of NTE-3: "Comment" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • createNewTypeWithoutReflection

      protected Type createNewTypeWithoutReflection(int field)
      Overrides:
      createNewTypeWithoutReflection in class AbstractSegment