Class ODT

All Implemented Interfaces:
Segment, Structure, Visitable, Serializable

public class ODT extends AbstractSegment

Represents an HL7 ODT message segment (DIET TRAY INSTRUCTION). This segment has the following fields:

  • ODT-1: Tray Type (CE)
  • ODT-2: Service Period (CE) optional repeating
  • ODT-3: Text Instruction (ST) optional repeating
See Also:
  • Constructor Details

  • Method Details

    • getTrayType

      public CE getTrayType()
      Returns ODT-1: "Tray Type" - creates it if necessary
    • getOdt1_TrayType

      public CE getOdt1_TrayType()
      Returns ODT-1: "Tray Type" - creates it if necessary
    • getServicePeriod

      public CE[] getServicePeriod()
      Returns all repetitions of Service Period (ODT-2).
    • getOdt2_ServicePeriod

      Returns all repetitions of Service Period (ODT-2).
    • getServicePeriodReps

      public int getServicePeriodReps()
      Returns a count of the current number of repetitions of Service Period (ODT-2). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getServicePeriod

      public CE getServicePeriod(int rep)
      Returns a specific repetition of ODT-2: "Service Period" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getOdt2_ServicePeriod

      public CE getOdt2_ServicePeriod(int rep)
      Returns a specific repetition of ODT-2: "Service Period" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getOdt2_ServicePeriodReps

      Returns a count of the current number of repetitions of Service Period (ODT-2). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • insertServicePeriod

      public CE insertServicePeriod(int rep) throws HL7Exception
      Inserts a repetition of ODT-2: "Service Period" 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)
    • insertOdt2_ServicePeriod

      public CE insertOdt2_ServicePeriod(int rep) throws HL7Exception
      Inserts a repetition of ODT-2: "Service Period" 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)
    • removeServicePeriod

      public CE removeServicePeriod(int rep) throws HL7Exception
      Removes a repetition of ODT-2: "Service Period" 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)
    • removeOdt2_ServicePeriod

      public CE removeOdt2_ServicePeriod(int rep) throws HL7Exception
      Removes a repetition of ODT-2: "Service Period" 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)
    • getTextInstruction

      public ST[] getTextInstruction()
      Returns all repetitions of Text Instruction (ODT-3).
    • getOdt3_TextInstruction

      Returns all repetitions of Text Instruction (ODT-3).
    • getTextInstructionReps

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

      public ST getTextInstruction(int rep)
      Returns a specific repetition of ODT-3: "Text Instruction" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getOdt3_TextInstruction

      public ST getOdt3_TextInstruction(int rep)
      Returns a specific repetition of ODT-3: "Text Instruction" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getOdt3_TextInstructionReps

      Returns a count of the current number of repetitions of Text Instruction (ODT-3). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • insertTextInstruction

      public ST insertTextInstruction(int rep) throws HL7Exception
      Inserts a repetition of ODT-3: "Text Instruction" 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)
    • insertOdt3_TextInstruction

      public ST insertOdt3_TextInstruction(int rep) throws HL7Exception
      Inserts a repetition of ODT-3: "Text Instruction" 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)
    • removeTextInstruction

      public ST removeTextInstruction(int rep) throws HL7Exception
      Removes a repetition of ODT-3: "Text Instruction" 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)
    • removeOdt3_TextInstruction

      public ST removeOdt3_TextInstruction(int rep) throws HL7Exception
      Removes a repetition of ODT-3: "Text Instruction" 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