cdac.medinfo.sdk.hl7282.baselibs.segments

## Class AFF

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

- All Implemented Interfaces:
    ISegment

      public class AFF
      extends Segment

  AFF - Professional Affiliation Segment

  The AFF segment adds detailed information regarding professional affiliations with which the staff member identified by the STF segment is/was associated.

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

  AFF-1: Set ID _ AFF (SI)Required
  AFF-2: Professional Organization (XON)Required
  AFF-3: Professional Organization Address (XAD)Optional
  AFF-4: Professional Organization Affiliation Date Range (DR)Optional
  AFF-5: Professional Affiliation Additional Information (ST)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
    `AFF()` Constructs the AFF segment.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addProfessionalOrganizationAffiliationDateRange(DR objProfessionalOrganizationAffiliationDateRange)` Add the Professional Organization Affiliation Date Range.
    `void` | `addProfessionalOrganizationAffiliationDateRange(DTM objRangeStartDateTime, DTM objRangeEndDateTime)` Add the Professional Organization Affiliation Date Range.
    `ST` | `getProfessionalAffiliationAdditionalInformation()` Retrieves the Professional Affiliation Additional Information.
    `XON` | `getProfessionalOrganization()` Retrieves the Professional Organization.
    `XAD` | `getProfessionalOrganizationAddress()` Retrieves the Professional Organization Address.
    `ISingleCollection<DR>` | `getProfessionalOrganizationAffiliationDateRange()` Retrieves the Professional Organization Affiliation Date Range.
    `SI` | `getSetID_AFF()` Retrieves the Set ID AFF.
    `void` | `setProfessionalAffiliationAdditionalInformation(ST objProfessionalAffiliationAdditionalInformation)`
    `void` | `setProfessionalAffiliationAdditionalInformation(java.lang.String strProfessionalAffiliationAdditionalInformation)` Set the Professional Affiliation Additional Information.
    `void` | `setProfessionalOrganization(java.lang.String strOrganizationName, CWE objOrganizationNameTypeCode, HD objAssigningAuthority, java.lang.String strIdentifierTypeCode, HD objAssigningFacility, java.lang.String strNameRepresentationCode, java.lang.String strOrganizationIdentifier)` Set the Professional Organization.
    `void` | `setProfessionalOrganization(XON objProfessionalOrganization)` Set the Professional Organization.
    `void` | `setProfessionalOrganizationAddress(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 Professional Organization Address.
    `void` | `setProfessionalOrganizationAddress(XAD objProfessionalOrganizationAddress)` Set the Professional Organization Address.
    `void` | `setProfessionalOrganizationAffiliationDateRange(ISingleCollection<DR> objProfessionalOrganizationAffiliationDateRangeList)` Set the Professional Organization Affiliation Date Range.
    `void` | `setSetID_AFF(SI objSetID_AFF)` Set the Set ID AFF.
    `void` | `setSetID_AFF(java.lang.String strSetID_AFF)` Set the Set ID AFF.
    `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

    - #### AFF

          public AFF()

      Constructs the AFF segment.

  - ### Method Detail

    - #### getProfessionalAffiliationAdditionalInformation

          public ST getProfessionalAffiliationAdditionalInformation()

      Retrieves the Professional Affiliation Additional Information. This field specify the descriptive name of the staff member's occupation.
      Returns:
        String - professionalAffiliationAdditionalInformation

    - #### getProfessionalOrganization

          public XON getProfessionalOrganization()

      Retrieves the Professional Organization. This field specify the official name of the association promoting specific professional interests with which the staff member is affiliated.
      Returns:
        XON - professionalOrganization

    - #### getProfessionalOrganizationAddress

          public XAD getProfessionalOrganizationAddress()

      Retrieves the Professional Organization Address. This field specify the postal address of the professional organization with which the Staff Member is associated.
      Returns:
        XAD - professionalOrganizationAddress

    - #### getProfessionalOrganizationAffiliationDateRange

          public ISingleCollection<DR> getProfessionalOrganizationAffiliationDateRange()

      Retrieves the Professional Organization Affiliation Date Range. This field specify the miscellaneous additional information related to the staff member's membership in the professional organization.
      Returns:
        ISingleCollection - professionalOrganizationAffiliationDateRange

    - #### getSetID_AFF

          public SI getSetID_AFF()

      Retrieves the Set ID AFF. this field specify the number that identifies this transaction.
      Returns:
        String - setID_AFF

    - #### setSetID_AFF

          public void setSetID_AFF(java.lang.String strSetID_AFF)

      Set the Set ID AFF. this field specify the number that identifies this transaction.
      Parameters:
        `strSetID_AFF` - This field contains the number that identifies AFF transaction.

    - #### setSetID_AFF

          public void setSetID_AFF(SI objSetID_AFF)

      Set the Set ID AFF. this field specify the number that identifies this transaction.
      Parameters:
        `objSetID_AFF` - Object of Set ID AFF.

    - #### setProfessionalOrganization

          public void setProfessionalOrganization(java.lang.String strOrganizationName,
                                         CWE objOrganizationNameTypeCode,
                                         HD objAssigningAuthority,
                                         java.lang.String strIdentifierTypeCode,
                                         HD objAssigningFacility,
                                         java.lang.String strNameRepresentationCode,
                                         java.lang.String strOrganizationIdentifier)

      Set the Professional Organization. This field specify the official name of the association promoting specific professional interests with which the staff member is affiliated.
      Parameters:
        `strOrganizationName` - Specifies name of the specified organization.
        `objOrganizationNameTypeCode` - Specifies a code that represents the type of name i.e., legal name, display name. Suggested Values A,L,D,SL.[Refer to table No.0204]
        `objAssigningAuthority` - Specifies The assigning authority is a unique identifier of the system (or organization or agency or department) that creates the data.
        `strIdentifierTypeCode` - Specifies a code corresponding to the type of identifier.
        `objAssigningFacility` - Specifies The place or location identifier where the identifier was first assigned to the person.
        `strNameRepresentationCode` - Specifies representations of the same name/address Suggested values are I,A,P [Refer table 0465]
        `strOrganizationIdentifier` - This component contains the sequence of characters (the code) that uniquely identifies the item being referenced by XON.1 Organization Name. This component replaces XON.3 ID Number as of v 2.5.

    - #### setProfessionalOrganization

          public void setProfessionalOrganization(XON objProfessionalOrganization)

      Set the Professional Organization. This field specify the official name of the association promoting specific professional interests with which the staff member is affiliated.
      Parameters:
        `objProfessionalOrganization` - Object of Professional Organization.

    - #### setProfessionalOrganizationAddress

          public void setProfessionalOrganizationAddress(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 Professional Organization Address. This field specify the postal address of the professional organization with which the Staff Member is associated.
      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

    - #### setProfessionalOrganizationAddress

          public void setProfessionalOrganizationAddress(XAD objProfessionalOrganizationAddress)

      Set the Professional Organization Address. This field specify the postal address of the professional organization with which the Staff Member is associated.
      Parameters:
        `objProfessionalOrganizationAddress` - Object of Professional Organization Address.

    - #### addProfessionalOrganizationAffiliationDateRange

          public void addProfessionalOrganizationAffiliationDateRange(DTM objRangeStartDateTime,
                                                             DTM objRangeEndDateTime)

      Add the Professional Organization Affiliation Date Range. This field specify the miscellaneous additional information related to the staff member's membership in the professional organization.
      Parameters:
        `objRangeStartDateTime` - Specifies the earliest date/time (time stamp) in the specified range.
        `objRangeEndDateTime` - Specifies the latest date/time in the specified range.

    - #### addProfessionalOrganizationAffiliationDateRange

          public void addProfessionalOrganizationAffiliationDateRange(DR objProfessionalOrganizationAffiliationDateRange)

      Add the Professional Organization Affiliation Date Range. This field specify the miscellaneous additional information related to the staff member's membership in the professional organization.
      Parameters:
        `objProfessionalOrganizationAffiliationDateRange` - Object of Professional Organization Affiliation Date Range.

    - #### setProfessionalOrganizationAffiliationDateRange

          public void setProfessionalOrganizationAffiliationDateRange(ISingleCollection<DR> objProfessionalOrganizationAffiliationDateRangeList)

      Set the Professional Organization Affiliation Date Range. This field specify the miscellaneous additional information related to the staff member's membership in the professional organization.
      Parameters:
        `objProfessionalOrganizationAffiliationDateRangeList` - List of Professional Organization Affiliation Date Range.

    - #### setProfessionalAffiliationAdditionalInformation

          public void setProfessionalAffiliationAdditionalInformation(java.lang.String strProfessionalAffiliationAdditionalInformation)

      Set the Professional Affiliation Additional Information. This field specify the descriptive name of the staff member's occupation.
      Parameters:
        `strProfessionalAffiliationAdditionalInformation` - String value of PriorityARQ

    - #### setProfessionalAffiliationAdditionalInformation

          public void setProfessionalAffiliationAdditionalInformation(ST objProfessionalAffiliationAdditionalInformation)

    - #### 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 checks 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` - If Segment Validation fails.