Class ROL

All Implemented Interfaces:
Segment, Structure, Visitable, Serializable

public class ROL extends AbstractSegment

Represents an HL7 ROL message segment (Role). This segment has the following fields:

  • ROL-1: Role Instance ID (EI) optional
  • ROL-2: Action Code (ID)
  • ROL-3: Role-ROL (CE)
  • ROL-4: Role Person (XCN) repeating
  • ROL-5: Role Begin Date/Time (TS) optional
  • ROL-6: Role End Date/Time (TS) optional
  • ROL-7: Role Duration (CE) optional
  • ROL-8: Role Action Reason (CE) optional
  • ROL-9: Provider Type (CE) optional repeating
  • ROL-10: Organization Unit Type (CE) optional
  • ROL-11: Office/Home Address/Birthplace (XAD) optional repeating
  • ROL-12: Phone (XTN) optional repeating
See Also:
  • Constructor Details

  • Method Details

    • getRoleInstanceID

      Returns ROL-1: "Role Instance ID" - creates it if necessary
    • getRol1_RoleInstanceID

      Returns ROL-1: "Role Instance ID" - creates it if necessary
    • getActionCode

      public ID getActionCode()
      Returns ROL-2: "Action Code" - creates it if necessary
    • getRol2_ActionCode

      Returns ROL-2: "Action Code" - creates it if necessary
    • getRoleROL

      public CE getRoleROL()
      Returns ROL-3: "Role-ROL" - creates it if necessary
    • getRol3_RoleROL

      public CE getRol3_RoleROL()
      Returns ROL-3: "Role-ROL" - creates it if necessary
    • getRolePerson

      public XCN[] getRolePerson()
      Returns all repetitions of Role Person (ROL-4).
    • getRol4_RolePerson

      public XCN[] getRol4_RolePerson()
      Returns all repetitions of Role Person (ROL-4).
    • getRolePersonReps

      public int getRolePersonReps()
      Returns a count of the current number of repetitions of Role Person (ROL-4). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getRolePerson

      public XCN getRolePerson(int rep)
      Returns a specific repetition of ROL-4: "Role Person" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getRol4_RolePerson

      public XCN getRol4_RolePerson(int rep)
      Returns a specific repetition of ROL-4: "Role Person" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getRol4_RolePersonReps

      public int getRol4_RolePersonReps()
      Returns a count of the current number of repetitions of Role Person (ROL-4). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • insertRolePerson

      public XCN insertRolePerson(int rep) throws HL7Exception
      Inserts a repetition of ROL-4: "Role Person" 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)
    • insertRol4_RolePerson

      public XCN insertRol4_RolePerson(int rep) throws HL7Exception
      Inserts a repetition of ROL-4: "Role Person" 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)
    • removeRolePerson

      public XCN removeRolePerson(int rep) throws HL7Exception
      Removes a repetition of ROL-4: "Role Person" 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)
    • removeRol4_RolePerson

      public XCN removeRol4_RolePerson(int rep) throws HL7Exception
      Removes a repetition of ROL-4: "Role Person" 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)
    • getRoleBeginDateTime

      Returns ROL-5: "Role Begin Date/Time" - creates it if necessary
    • getRol5_RoleBeginDateTime

      Returns ROL-5: "Role Begin Date/Time" - creates it if necessary
    • getRoleEndDateTime

      Returns ROL-6: "Role End Date/Time" - creates it if necessary
    • getRol6_RoleEndDateTime

      Returns ROL-6: "Role End Date/Time" - creates it if necessary
    • getRoleDuration

      public CE getRoleDuration()
      Returns ROL-7: "Role Duration" - creates it if necessary
    • getRol7_RoleDuration

      Returns ROL-7: "Role Duration" - creates it if necessary
    • getRoleActionReason

      Returns ROL-8: "Role Action Reason" - creates it if necessary
    • getRol8_RoleActionReason

      Returns ROL-8: "Role Action Reason" - creates it if necessary
    • getProviderType

      public CE[] getProviderType()
      Returns all repetitions of Provider Type (ROL-9).
    • getRol9_ProviderType

      Returns all repetitions of Provider Type (ROL-9).
    • getProviderTypeReps

      public int getProviderTypeReps()
      Returns a count of the current number of repetitions of Provider Type (ROL-9). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getProviderType

      public CE getProviderType(int rep)
      Returns a specific repetition of ROL-9: "Provider Type" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getRol9_ProviderType

      public CE getRol9_ProviderType(int rep)
      Returns a specific repetition of ROL-9: "Provider Type" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getRol9_ProviderTypeReps

      Returns a count of the current number of repetitions of Provider Type (ROL-9). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • insertProviderType

      public CE insertProviderType(int rep) throws HL7Exception
      Inserts a repetition of ROL-9: "Provider Type" 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)
    • insertRol9_ProviderType

      public CE insertRol9_ProviderType(int rep) throws HL7Exception
      Inserts a repetition of ROL-9: "Provider Type" 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)
    • removeProviderType

      public CE removeProviderType(int rep) throws HL7Exception
      Removes a repetition of ROL-9: "Provider Type" 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)
    • removeRol9_ProviderType

      public CE removeRol9_ProviderType(int rep) throws HL7Exception
      Removes a repetition of ROL-9: "Provider Type" 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)
    • getOrganizationUnitType

      Returns ROL-10: "Organization Unit Type" - creates it if necessary
    • getRol10_OrganizationUnitType

      Returns ROL-10: "Organization Unit Type" - creates it if necessary
    • getOfficeHomeAddressBirthplace

      Returns all repetitions of Office/Home Address/Birthplace (ROL-11).
    • getRol11_OfficeHomeAddressBirthplace

      Returns all repetitions of Office/Home Address/Birthplace (ROL-11).
    • getOfficeHomeAddressBirthplaceReps

      Returns a count of the current number of repetitions of Office/Home Address/Birthplace (ROL-11). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getOfficeHomeAddressBirthplace

      Returns a specific repetition of ROL-11: "Office/Home Address/Birthplace" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getRol11_OfficeHomeAddressBirthplace

      Returns a specific repetition of ROL-11: "Office/Home Address/Birthplace" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getRol11_OfficeHomeAddressBirthplaceReps

      Returns a count of the current number of repetitions of Office/Home Address/Birthplace (ROL-11). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • insertOfficeHomeAddressBirthplace

      Inserts a repetition of ROL-11: "Office/Home Address/Birthplace" 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)
    • insertRol11_OfficeHomeAddressBirthplace

      Inserts a repetition of ROL-11: "Office/Home Address/Birthplace" 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)
    • removeOfficeHomeAddressBirthplace

      Removes a repetition of ROL-11: "Office/Home Address/Birthplace" 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)
    • removeRol11_OfficeHomeAddressBirthplace

      Removes a repetition of ROL-11: "Office/Home Address/Birthplace" 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)
    • getPhone

      public XTN[] getPhone()
      Returns all repetitions of Phone (ROL-12).
    • getRol12_Phone

      public XTN[] getRol12_Phone()
      Returns all repetitions of Phone (ROL-12).
    • getPhoneReps

      public int getPhoneReps()
      Returns a count of the current number of repetitions of Phone (ROL-12). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getPhone

      public XTN getPhone(int rep)
      Returns a specific repetition of ROL-12: "Phone" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getRol12_Phone

      public XTN getRol12_Phone(int rep)
      Returns a specific repetition of ROL-12: "Phone" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getRol12_PhoneReps

      public int getRol12_PhoneReps()
      Returns a count of the current number of repetitions of Phone (ROL-12). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • insertPhone

      public XTN insertPhone(int rep) throws HL7Exception
      Inserts a repetition of ROL-12: "Phone" 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)
    • insertRol12_Phone

      public XTN insertRol12_Phone(int rep) throws HL7Exception
      Inserts a repetition of ROL-12: "Phone" 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)
    • removePhone

      public XTN removePhone(int rep) throws HL7Exception
      Removes a repetition of ROL-12: "Phone" 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)
    • removeRol12_Phone

      public XTN removeRol12_Phone(int rep) throws HL7Exception
      Removes a repetition of ROL-12: "Phone" 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