Class CTD

All Implemented Interfaces:
Segment, Structure, Visitable, Serializable

public class CTD extends AbstractSegment

Represents an HL7 CTD message segment (Contact Data). This segment has the following fields:

  • CTD-1: Contact Role (CE) repeating
  • CTD-2: Contact Name (XPN) optional repeating
  • CTD-3: Contact Address (XAD) optional repeating
  • CTD-4: Contact Location (PL) optional
  • CTD-5: Contact Communication Information (XTN) optional repeating
  • CTD-6: Preferred Method of Contact (CE) optional
  • CTD-7: Contact Identifiers (PLN) optional repeating
See Also:
  • Constructor Details

  • Method Details

    • getContactRole

      public CE[] getContactRole()
      Returns all repetitions of Contact Role (CTD-1).
    • getCtd1_ContactRole

      public CE[] getCtd1_ContactRole()
      Returns all repetitions of Contact Role (CTD-1).
    • getContactRoleReps

      public int getContactRoleReps()
      Returns a count of the current number of repetitions of Contact Role (CTD-1). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getContactRole

      public CE getContactRole(int rep)
      Returns a specific repetition of CTD-1: "Contact Role" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getCtd1_ContactRole

      public CE getCtd1_ContactRole(int rep)
      Returns a specific repetition of CTD-1: "Contact Role" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getCtd1_ContactRoleReps

      Returns a count of the current number of repetitions of Contact Role (CTD-1). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • insertContactRole

      public CE insertContactRole(int rep) throws HL7Exception
      Inserts a repetition of CTD-1: "Contact Role" 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)
    • insertCtd1_ContactRole

      public CE insertCtd1_ContactRole(int rep) throws HL7Exception
      Inserts a repetition of CTD-1: "Contact Role" 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)
    • removeContactRole

      public CE removeContactRole(int rep) throws HL7Exception
      Removes a repetition of CTD-1: "Contact Role" 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)
    • removeCtd1_ContactRole

      public CE removeCtd1_ContactRole(int rep) throws HL7Exception
      Removes a repetition of CTD-1: "Contact Role" 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)
    • getContactName

      public XPN[] getContactName()
      Returns all repetitions of Contact Name (CTD-2).
    • getCtd2_ContactName

      Returns all repetitions of Contact Name (CTD-2).
    • getContactNameReps

      public int getContactNameReps()
      Returns a count of the current number of repetitions of Contact Name (CTD-2). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getContactName

      public XPN getContactName(int rep)
      Returns a specific repetition of CTD-2: "Contact Name" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getCtd2_ContactName

      public XPN getCtd2_ContactName(int rep)
      Returns a specific repetition of CTD-2: "Contact Name" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getCtd2_ContactNameReps

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

      public XPN insertContactName(int rep) throws HL7Exception
      Inserts a repetition of CTD-2: "Contact Name" 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)
    • insertCtd2_ContactName

      public XPN insertCtd2_ContactName(int rep) throws HL7Exception
      Inserts a repetition of CTD-2: "Contact Name" 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)
    • removeContactName

      public XPN removeContactName(int rep) throws HL7Exception
      Removes a repetition of CTD-2: "Contact Name" 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)
    • removeCtd2_ContactName

      public XPN removeCtd2_ContactName(int rep) throws HL7Exception
      Removes a repetition of CTD-2: "Contact Name" 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)
    • getContactAddress

      public XAD[] getContactAddress()
      Returns all repetitions of Contact Address (CTD-3).
    • getCtd3_ContactAddress

      Returns all repetitions of Contact Address (CTD-3).
    • getContactAddressReps

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

      public XAD getContactAddress(int rep)
      Returns a specific repetition of CTD-3: "Contact Address" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getCtd3_ContactAddress

      public XAD getCtd3_ContactAddress(int rep)
      Returns a specific repetition of CTD-3: "Contact Address" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getCtd3_ContactAddressReps

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

      public XAD insertContactAddress(int rep) throws HL7Exception
      Inserts a repetition of CTD-3: "Contact Address" 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)
    • insertCtd3_ContactAddress

      public XAD insertCtd3_ContactAddress(int rep) throws HL7Exception
      Inserts a repetition of CTD-3: "Contact Address" 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)
    • removeContactAddress

      public XAD removeContactAddress(int rep) throws HL7Exception
      Removes a repetition of CTD-3: "Contact Address" 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)
    • removeCtd3_ContactAddress

      public XAD removeCtd3_ContactAddress(int rep) throws HL7Exception
      Removes a repetition of CTD-3: "Contact Address" 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)
    • getContactLocation

      Returns CTD-4: "Contact Location" - creates it if necessary
    • getCtd4_ContactLocation

      Returns CTD-4: "Contact Location" - creates it if necessary
    • getContactCommunicationInformation

      Returns all repetitions of Contact Communication Information (CTD-5).
    • getCtd5_ContactCommunicationInformation

      Returns all repetitions of Contact Communication Information (CTD-5).
    • getContactCommunicationInformationReps

      Returns a count of the current number of repetitions of Contact Communication Information (CTD-5). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getContactCommunicationInformation

      Returns a specific repetition of CTD-5: "Contact Communication Information" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getCtd5_ContactCommunicationInformation

      Returns a specific repetition of CTD-5: "Contact Communication Information" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getCtd5_ContactCommunicationInformationReps

      Returns a count of the current number of repetitions of Contact Communication Information (CTD-5). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • insertContactCommunicationInformation

      Inserts a repetition of CTD-5: "Contact Communication Information" 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)
    • insertCtd5_ContactCommunicationInformation

      Inserts a repetition of CTD-5: "Contact Communication Information" 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)
    • removeContactCommunicationInformation

      Removes a repetition of CTD-5: "Contact Communication Information" 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)
    • removeCtd5_ContactCommunicationInformation

      Removes a repetition of CTD-5: "Contact Communication Information" 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)
    • getPreferredMethodOfContact

      Returns CTD-6: "Preferred Method of Contact" - creates it if necessary
    • getCtd6_PreferredMethodOfContact

      Returns CTD-6: "Preferred Method of Contact" - creates it if necessary
    • getContactIdentifiers

      Returns all repetitions of Contact Identifiers (CTD-7).
    • getCtd7_ContactIdentifiers

      Returns all repetitions of Contact Identifiers (CTD-7).
    • getContactIdentifiersReps

      Returns a count of the current number of repetitions of Contact Identifiers (CTD-7). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getContactIdentifiers

      public PLN getContactIdentifiers(int rep)
      Returns a specific repetition of CTD-7: "Contact Identifiers" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getCtd7_ContactIdentifiers

      public PLN getCtd7_ContactIdentifiers(int rep)
      Returns a specific repetition of CTD-7: "Contact Identifiers" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getCtd7_ContactIdentifiersReps

      Returns a count of the current number of repetitions of Contact Identifiers (CTD-7). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • insertContactIdentifiers

      public PLN insertContactIdentifiers(int rep) throws HL7Exception
      Inserts a repetition of CTD-7: "Contact Identifiers" 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)
    • insertCtd7_ContactIdentifiers

      Inserts a repetition of CTD-7: "Contact Identifiers" 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)
    • removeContactIdentifiers

      public PLN removeContactIdentifiers(int rep) throws HL7Exception
      Removes a repetition of CTD-7: "Contact Identifiers" 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)
    • removeCtd7_ContactIdentifiers

      Removes a repetition of CTD-7: "Contact Identifiers" 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