cdac.medinfo.sdk.hl7282.baselibs.segments

## Class CTD

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

- All Implemented Interfaces:
    ISegment

      public class CTD
      extends Segment

  CTD - Contact Data Segment.

  CTD segment identifies any contact personnel associated with a patient referral message and its related transactions.

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

  CTD-1: Contact Role (CWE)Required
  CTD-2: Contact Name (XPN)Optional
  CTD-3: Contact Address (XAD)Optional
  CTD-4: Contact Location (PL)Optional
  CTD-5: Contact Communication Information (XTN)Optional
  CTD-6: Preferred Method of Contact (CWE)Optional
  CTD-7: Contact Identifiers (PLN)Optional

  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
    `CTD()` Constructs the CTD segment.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addContactAddress(SAD objStreetAddress, java.lang.String strOtherDesignation, java.lang.String strCity, java.lang.String strStateOrProvince, java.lang.String strZipOrPostalCode, java.lang.String strCountry, java.lang.String strAddressType, java.lang.String strOtherGeographicDesignation, CWE objCountyParishCode, CWE objCensusTract, java.lang.String strAddressRepresentationCode, DTM objEffectiveDate, DTM objExpirationDate, CWE objEXpirationReason, java.lang.String strTemporaryIndicator, java.lang.String strBadAddressIndicator, java.lang.String strAddressUsage, java.lang.String strAddressee, java.lang.String strComment, java.lang.String strPreferenceOrder, CWE objProtectionCode, EI objAddressIdentifier)` Set the Contact Address.
    `void` | `addContactAddress(XAD objtempContactAddress)`
    `void` | `addContactCommunicationInformation(java.lang.String strTeleCommunicationUseCode, java.lang.String strTeleCommunicationEquipmentType, java.lang.String strCommuinicationAddress, java.lang.String strCountryCode, java.lang.String strAreaCityCode, java.lang.String strLocalNumber, java.lang.String strExtension, java.lang.String strAnyText, java.lang.String strExtensionPrefix, java.lang.String strSpeedDialCode, java.lang.String strUnformattedTelephoneNumber, java.lang.String strEffectiveStartDate, java.lang.String strExpirationDate, CWE objExpirationReason, CWE objProtectionCode, EI objSharedTelecommunicationIdentifier, java.lang.String strPreferenceOrder)` Set the Contact Communication Information.
    `void` | `addContactCommunicationInformation(XTN objtempContactCommunicationInformation)`
    `void` | `addContactIdentifiers(PLN objtempContactIdentifiers)` Set the Contact Identifiers.
    `void` | `addContactIdentifiers(java.lang.String strIdNumber, CWE objTypeOfIdNumber, java.lang.String strStateOtherQualifyingInfo, java.lang.String strExpirationDate)` Set the Contact Identifiers.
    `void` | `addContactName(FN objFamilyName, java.lang.String strGivenName, java.lang.String strSecondAndFurtherGivenNamesOrInitialsThereof, java.lang.String strSuffix, java.lang.String strPrefix, java.lang.String strNameTypeCode, java.lang.String strNameRepresentationCode, CWE objNameContext, java.lang.String strNameAssemblyOrder, DTM objEffectiveDate, DTM objExpirationDate, java.lang.String strProfessionalSuffix, java.lang.String strCalledBy)` Set the Contact Name.
    `void` | `addContactName(XPN objtempContactName)` Sets the Contact name.
    `void` | `addContactRole(CWE objtempContactRole)` Set the Contact Role.
    `void` | `addContactRole(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 Contact Role.
    `ISingleCollection<XAD>` | `getContactAddress()` Retrieves the Contact Address.
    `ISingleCollection<XTN>` | `getContactCommunicationInformation()` Retrieves the Contact Communication Information.
    `ISingleCollection<PLN>` | `getContactIdentifiers()` Retrieves the Contact Identifiers.
    `PL` | `getContactLocation()` Retrieves the Contact Location.
    `ISingleCollection<XPN>` | `getContactName()` Retrieves the Contact Name.
    `ISingleCollection<CWE>` | `getContactRole()` Retrieves the Contact Role.
    `CWE` | `getPreferredMethodContact()` Retrieves the Preferred Method Contact.
    `void` | `setContactAddress(ISingleCollection<XAD> objContactAddressList)` Sets the Contact Address.
    `void` | `setContactCommunicationInformation(ISingleCollection<XTN> objContactCommunicationInformationList)` Sets the Contact Communication Information List.
    `void` | `setContactIdentifiers(ISingleCollection<PLN> objContactIdentifiersList)` Sets the Contact Identifiers.
    `void` | `setContactLocation(HD objPointOfCare, HD objRoom, HD objBed, HD objFacility, java.lang.String strLocationStatus, java.lang.String strPersonLocationType, HD objBuilding, HD objFloor, java.lang.String strLocationDescription, EI objComprehensiveLocationIdentifier, HD objAssigningAuthorityForLocation)` Set the Contact Location.
    `void` | `setContactLocation(PL objcontactLocation)` Set the Contact Location.
    `void` | `setContactName(ISingleCollection<XPN> objContactNameList)` Sets the Contact Name.
    `void` | `setContactRole(ISingleCollection<CWE> objContactRoleList)` Sets the Contact Role.
    `void` | `setPreferredMethodContact(CWE objpreferredMethodContact)` Set the Preferred Method Contact.
    `void` | `setPreferredMethodContact(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 Preferred Method Contact.
    `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

    - #### CTD

          public CTD()

      Constructs the CTD segment.

  - ### Method Detail

    - #### getContactAddress

          public ISingleCollection<XAD> getContactAddress()

      Retrieves the Contact Address. This field contains the mailing address of the contact person identify in this segment.
      Returns:
        ISingleCollection - contactAddress

    - #### getContactCommunicationInformation

          public ISingleCollection<XTN> getContactCommunicationInformation()

      Retrieves the Contact Communication Information. This field contains the information, such as the phone number or electronic mail address, used to communicate with the contact person or organization.
      Returns:
        ISingleCollection - contactCommunicationInformation

    - #### getContactIdentifiers

          public ISingleCollection<PLN> getContactIdentifiers()

      Retrieves the Contact Identifiers. This field contains the contact's unique identifiers such as UPIN, Medicare and Medicaid numbers.
      Returns:
        ISingleCollection - contactIdentifiers

    - #### getContactLocation

          public PL getContactLocation()

      Retrieves the Contact Location. This field contains the location of the contact, which is required when a contact that may be external to a given enterprise must be referenced.
      Returns:
        PL - contactLocation

    - #### getContactName

          public ISingleCollection<XPN> getContactName()

      Retrieves the Contact Name. This field contains the name of the contact person identify in this segment.
      Returns:
        ISingleCollection - contactName

    - #### getContactRole

          public ISingleCollection<CWE> getContactRole()

      Retrieves the Contact Role. This field contains the contact role that defines the relationship of the person describe in this segment to the patient being referred.
      Returns:
        ISingleCollection - contactRole

    - #### getPreferredMethodContact

          public CWE getPreferredMethodContact()

      Retrieves the Preferred Method Contact. This field contains the preferred method to use when communicating with the contact person.
      Returns:
        CWE - preferredMethodContact

    - #### addContactAddress

          public void addContactAddress(SAD objStreetAddress,
                               java.lang.String strOtherDesignation,
                               java.lang.String strCity,
                               java.lang.String strStateOrProvince,
                               java.lang.String strZipOrPostalCode,
                               java.lang.String strCountry,
                               java.lang.String strAddressType,
                               java.lang.String strOtherGeographicDesignation,
                               CWE objCountyParishCode,
                               CWE objCensusTract,
                               java.lang.String strAddressRepresentationCode,
                               DTM objEffectiveDate,
                               DTM objExpirationDate,
                               CWE objEXpirationReason,
                               java.lang.String strTemporaryIndicator,
                               java.lang.String strBadAddressIndicator,
                               java.lang.String strAddressUsage,
                               java.lang.String strAddressee,
                               java.lang.String strComment,
                               java.lang.String strPreferenceOrder,
                               CWE objProtectionCode,
                               EI objAddressIdentifier)

      Set the Contact Address. This field contains the mailing address of the contact person identify in this segment.
      Parameters:
        `objStreetAddress` - Specifies the street address.
        `strOtherDesignation` - Specifies the Second line of address.
        `strCity` - The city, or district or place where the addressee is located.
        `strStateOrProvince` - Specifies the state or province where the addressee is located.
        `strZipOrPostalCode` - Specifies the zip or postal code where the addressee is located.
        `strCountry` - Specifies the country where the addressee is located.
        `strAddressType` - Specifies the kind or type of address.
        `strOtherGeographicDesignation` - Specifies any other geographic designation.
        `objCountyParishCode` - Specifies a code that represents the county in which the specified address resides.
        `objCensusTract` - Specifies a code that represents the census tract in which the specified address resides.
        `strAddressRepresentationCode` - Specifies representations of the same name/address Suggested values are I,A,P [Refer table 0465]
        `objEffectiveDate` - It is The first date, if known, on which the address is valid and active.
        `objExpirationDate` - It is The last date, if known, on which the address is valid and active.
        `objExpirationReason` - indicates why this address was marked as ended.
        `strTemporaryIndicator` - indicates whether address is considered temporary .
        `strBadAddressIndicator` - indicates whether it is possible to contact the owning entity.
        `strAddressUsage` - indicates how the address is intended to be used.
        `strAddressee` - indicates the name of the person whose address is intended to be used.
        `strComment` - indicated descriptive information
        `strPreferenceOrder` - preference order
        `objProtectionCode` - indicates that an address need to be protected
        `objAddressIdentifier` - indicates a unique identifier for address

    - #### addContactAddress

          public void addContactAddress(XAD objtempContactAddress)

      Parameters:
        `objEffectiveDate` - It is The first date, if known, on which the address is valid and active.
        `objExpirationDate` - It is The last date, if known, on which the address is valid and active.

    - #### setContactAddress

          public void setContactAddress(ISingleCollection<XAD> objContactAddressList)

      Sets the Contact Address.
      Parameters:
        `objContactAddressList` - object of Contact Address.

    - #### addContactCommunicationInformation

          public void addContactCommunicationInformation(java.lang.String strTeleCommunicationUseCode,
                                                java.lang.String strTeleCommunicationEquipmentType,
                                                java.lang.String strCommuinicationAddress,
                                                java.lang.String strCountryCode,
                                                java.lang.String strAreaCityCode,
                                                java.lang.String strLocalNumber,
                                                java.lang.String strExtension,
                                                java.lang.String strAnyText,
                                                java.lang.String strExtensionPrefix,
                                                java.lang.String strSpeedDialCode,
                                                java.lang.String strUnformattedTelephoneNumber,
                                                java.lang.String strEffectiveStartDate,
                                                java.lang.String strExpirationDate,
                                                CWE objExpirationReason,
                                                CWE objProtectionCode,
                                                EI objSharedTelecommunicationIdentifier,
                                                java.lang.String strPreferenceOrder)

      Set the Contact Communication Information. This field contains the information, such as the phone number or electronic mail address, used to communicate with the contact person or organization.
      Parameters:
        `strTeleCommunicationUseCode` - Specifies a code that represents a specific use of a telecommunication number. Suggested values are PRN,ORN,WPN,VHN,ASN,EMR,NET,BPN [Refer table 0201.]
        `strTeleCommunicationEquipmentType` - Specifies a code that represents the type of telecommunication equipment. Suggested values are PH,FX,MD,CP,BP,Internet,X.400,TDD,TTY [Refer table 0202.]
        `strCommuinicationAddress` - Specifies Email address.
        `strCountryCode` - Specifies the Country code.
        `strAreaCityCode` - Specifies the area /City Code.
        `strLocalNumber` - Specifies an Local Number.
        `strExtension` - Specifies an Extension.
        `strAnyText` - Contains comments with respect to the telephone number.
        `strExtensionPrefix` - Specifies the characters established within a company's internal telephone system network used as a prefix to the Extension component for internal dialing.
        `strSpeedDialCode` - Specifies The characters established within a company's internal telephone system used in place of the (external) telephone number.
        `strUnformattedTelephoneNumber` - Specifies an expression of the telephone number as an unparsible string.
        `strEffectiveStartDate` - Specifies start date.
        `strExpirationDate` - Specifies expiration date.
        `objExpirationReason` - Specifies reason why this contact is marked as ended.
        `objProtectionCode` - Specifies reason why this information is sensitive or protected.
        `objSharedTelecommunicationIdentifier` - Specifies a unique phone number phone telephone number or email-id.
        `strPreferenceOrder` - Specifies the preference order for an entity..

    - #### addContactCommunicationInformation

          public void addContactCommunicationInformation(XTN objtempContactCommunicationInformation)

      Parameters:
        `strLocalNumber` - Specifies an Local Number.
        `strExtension` - Specifies an Extension.
        `strAnyText` - Contains comments with respect to the telephone number.
        `strExtensionPrefix` - Specifies the characters established within a company's internal telephone system network used as a prefix to the Extension component for internal dialing.
        `strSpeedDialCode` - Specifies The characters established within a company's internal telephone system used in place of the (external) telephone number.
        `strUnformattedPhNo` - Specifies an expression of the telephone number as an unparsible string.

    - #### setContactCommunicationInformation

          public void setContactCommunicationInformation(ISingleCollection<XTN> objContactCommunicationInformationList)

      Sets the Contact Communication Information List.
      Parameters:
        `objContactCommunicationInformationList` - object Contact Communication Information List.

    - #### addContactIdentifiers

          public void addContactIdentifiers(java.lang.String strIdNumber,
                                   CWE objTypeOfIdNumber,
                                   java.lang.String strStateOtherQualifyingInfo,
                                   java.lang.String strExpirationDate)

      Set the Contact Identifiers. This field contains the contact's unique identifiers such as UPIN, Medicare and Medicaid numbers.
      Parameters:
        `strIdNumber` - Specifies the license number or other ID number such as UPIN, Medicare and Medicaid number.
        `objTypeOfIdNumber` - Specifies the type of number.
        `strStateOtherQualifyingInfo` - Specifies the state or province in which the license or ID is valid
        `strExpirationDate` - Specifies the date when the license or ID is no longer valid.

    - #### addContactIdentifiers

          public void addContactIdentifiers(PLN objtempContactIdentifiers)

      Set the Contact Identifiers. This field contains the contact's unique identifiers such as UPIN, Medicare and Medicaid numbers.
      Parameters:
        `strIdNumber` - Specifies the license number or other ID number such as UPIN, Medicare and Medicaid number.
        `strTypeOfIdNumber` - Specifies the type of number.
        `strStateOtherQualifyingInfo` - Specifies the state or province in which the license or ID is valid
        `strExpirationDate` - Specifies the date when the license or ID is no longer valid.

    - #### setContactIdentifiers

          public void setContactIdentifiers(ISingleCollection<PLN> objContactIdentifiersList)

      Sets the Contact Identifiers.
      Parameters:
        `objContactIdentifiersList` - object Contact Identifiers List.

    - #### setContactLocation

          public void setContactLocation(HD objPointOfCare,
                                HD objRoom,
                                HD objBed,
                                HD objFacility,
                                java.lang.String strLocationStatus,
                                java.lang.String strPersonLocationType,
                                HD objBuilding,
                                HD objFloor,
                                java.lang.String strLocationDescription,
                                EI objComprehensiveLocationIdentifier,
                                HD objAssigningAuthorityForLocation)

      Set the Contact Location. This field contains the location of the contact, which is required when a contact that may be external to a given enterprise must be referenced.
      Parameters:
        `objPointOfCare` - Specifies the code for the point where patient care is administered.
        `objRoom` - Specifies the code for the patient's room.
        `objBed` - Specifies the code for the patient's bed.
        `objFacility` - Specifies to site interpretation but generally describes the highest level physical designation of an institution, medical center or enterprise.
        `strLocationStatus` - Specifies the code for the status or availability of the location.
        `strPersonLocationType` - Specifies the categorization of the person's location defined by facility, building, floor, point of care, room or bed.
        `objBuilding` - Specifies code for the building where the person is located.
        `objFloor` - Specifies the code for the floor where the person is located.
        `strLocationDescription` - Specifies describes the location in free text.
        `objComprehensiveLocationIdentifier` - Specifies represents the physical location as a whole without regard for the individual components.
        `objAssigningAuthorityForLocation` - Specifies the entity that creates the data for the individual physical location components.

    - #### setContactLocation

          public void setContactLocation(PL objcontactLocation)

      Set the Contact Location. This field contains the location of the contact, which is required when a contact that may be external to a given enterprise must be referenced.
      Parameters:
        `objcontactLocation` - object of Contact Location.

    - #### addContactName

          public void addContactName(FN objFamilyName,
                            java.lang.String strGivenName,
                            java.lang.String strSecondAndFurtherGivenNamesOrInitialsThereof,
                            java.lang.String strSuffix,
                            java.lang.String strPrefix,
                            java.lang.String strNameTypeCode,
                            java.lang.String strNameRepresentationCode,
                            CWE objNameContext,
                            java.lang.String strNameAssemblyOrder,
                            DTM objEffectiveDate,
                            DTM objExpirationDate,
                            java.lang.String strProfessionalSuffix,
                            java.lang.String strCalledBy)

      Set the Contact Name. This field contains the name of the contact person identify in this segment. This field contains the names of the patient, the primary or legal name of the patient is reported first.
      Parameters:
        `objFamilyName` - Specifies the surname of a person.
        `strGivenName` - Specifies First name.
        `strSecondAndFurtherGivenNamesOrInitialsThereof` - Specifies multiple middle names that may be included by separating them with spaces.
        `strSuffix` - Used to specify a name suffix (e.g., Jr. or III).
        `strPrefix` - Used to specify a name prefix (e.g., Dr.).
        `strNameTypeCode` - Specifies a code that represents the type of name. Suggested values are A,B,C,D,I,L,M,N,P,R,S,T,U...[Refer table 0200.]
        `strNameRepresentationCode` - Specifies representations of the same name/address Suggested values are I,A,P [Refer table 0465]
        `objNameContext` - Designates the context in which a name is used. [Refer User-defined Table 0448 ]
        `strNameAssemblyOrder` - Specifies a code that represents the preferred display order of the components of this person name. Suggested values are G,F[Refer table 0444.]
        `objEffectiveDate` - Specifies the first date, if known, on which the address is valid and active.
        `objExpirationDate` - Specifies the last date, if known, on which the address is valid and active.
        `strProfessionalSuffix` - Used to specify an abbreviation, or a string of abbreviations, denoting qualifications that support the person's profession, (e.g., licenses).
        `strCalledBy` - Used to specify the called name.

    - #### addContactName

          public void addContactName(XPN objtempContactName)

      Sets the Contact name.
      Parameters:
        `objtempContactName` - object of Contact name.

    - #### setContactName

          public void setContactName(ISingleCollection<XPN> objContactNameList)

      Sets the Contact Name.
      Parameters:
        `objContactNameList` - object of Contact Name.

    - #### addContactRole

          public void addContactRole(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 Contact Role. This field contains the contact role that defines the relationship of the person describe in this segment to the patient being referred.
      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.

    - #### addContactRole

          public void addContactRole(CWE objtempContactRole)

      Set the Contact Role. This field contains the contact role that defines the relationship of the person describe in this segment to the patient being referred.
      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.
        `strNameOfAlternateCodingSystem` - Identifies the coding scheme being used in the alternate identifier component.

    - #### setContactRole

          public void setContactRole(ISingleCollection<CWE> objContactRoleList)

      Sets the Contact Role.
      Parameters:
        `objContactRoleList` - object of Contact Role.

    - #### setPreferredMethodContact

          public void setPreferredMethodContact(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 Preferred Method Contact. This field contains the preferred method to use when communicating with the contact person.
      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.

    - #### setPreferredMethodContact

          public void setPreferredMethodContact(CWE objpreferredMethodContact)

      Set the Preferred Method Contact. This field contains the preferred method to use when communicating with the contact person.
      Parameters:
        `objpreferredMethodContact` - object of Preferred Method Contact.

    - #### 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` - Thrown when Segment Validation Fails.