cdac.medinfo.sdk.hl7282.baselibs.segments

## Class RFI

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

- All Implemented Interfaces:
    ISegment

      public class RFI
      extends Segment

  RFI - Request for Information

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

  RFI-1 : Request Date(DTM)Required
  RFI-2 : Response Due Date(DTM)Required
  RFI-3 : Patient Consent(ID) Optional
  RFI-4 : Date Additional Information Was Submitted(DTM) 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
    `RFI()` Constructs the RFI segment.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `DTM` | `getDateAdditionalInformationWasSubmitted()` Retrieves Date Additional Information Was Submitted (DTM)
    `ID` | `getpatientConsent()` Retrieves Patient Consent (ID)
    `DTM` | `getRequestDate()` Retrieves Request Date (DTM)
    `DTM` | `getResponseDueDate()` Retrieves Response Due Date (DTM)
    `void` | `setDateAdditionalInformationWasSubmitted(DTM objDateAdditionalInformation)` Set Date Additional Information Was Submitted (DTM) This field is about The date on which the information was assembled for transmission to the Payer.
    `void` | `setDateAdditionalInformationWasSubmitted(java.lang.String strDateAdditionalInformation)` Set Date Additional Information Was Submitted (DTM) This field is about The date on which the information was assembled for transmission to the Payer.
    `void` | `setPatientConsent(ID objPatientConsent)` Patient Consent (ID) This field is about Code indicating if the Payer has obtained patient consent for release of information.
    `void` | `setPatientConsent(java.lang.String strPatientConsent)` Patient Consent (ID) This field is about Code indicating if the Payer has obtained patient consent for release of information.
    `void` | `setRequestDate(DTM objRequestDate)` Set Request Date(DTM)
    `void` | `setRequestDate(java.lang.String strRequestDate)` Set Request Date(DTM)
    `void` | `setResponseDueDate(DTM objResponseDueDate)` Set Response Due Date (DTM) This Field is about the The latest date by which the additional information is to be returned to requester.
    `void` | `setResponseDueDate(java.lang.String strResponseDueDate)` Set Response Due Date (DTM) This Field is about the The latest date by which the additional information is to be returned to requester.
    `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

    - #### RFI

          public RFI()

      Constructs the RFI segment.

  - ### Method Detail

    - #### getRequestDate

          public DTM getRequestDate()

      Retrieves Request Date (DTM)
      Returns:
        DTM - return the object of Requested date.

    - #### getResponseDueDate

          public DTM getResponseDueDate()

      Retrieves Response Due Date (DTM)
      Returns:
        DTM - return the object of Response due date.

    - #### getpatientConsent

          public ID getpatientConsent()

      Retrieves Patient Consent (ID)
      Returns:
        ID - return object of Patient Consent.

    - #### getDateAdditionalInformationWasSubmitted

          public DTM getDateAdditionalInformationWasSubmitted()

      Retrieves Date Additional Information Was Submitted (DTM)
      Returns:
        DTM - return the object of Date Additional Information Was Submitted.

    - #### setRequestDate

          public void setRequestDate(java.lang.String strRequestDate)

      Set Request Date(DTM)
      Parameters:
        `String` - - Request Date - string of characters the tells about the latest requested date by the requester.

    - #### setRequestDate

          public void setRequestDate(DTM objRequestDate)

      Set Request Date(DTM)
      Parameters:
        `objRequestDate` - - object of Latest date requested dated return to the requester.

    - #### setResponseDueDate

          public void setResponseDueDate(java.lang.String strResponseDueDate)

      Set Response Due Date (DTM) This Field is about the The latest date by which the additional information is to be returned to requester.
      Parameters:
        `String` - - String of Response Due Date - The latest date by which the additional information is to be returned to requester.

    - #### setResponseDueDate

          public void setResponseDueDate(DTM objResponseDueDate)

      Set Response Due Date (DTM) This Field is about the The latest date by which the additional information is to be returned to requester.
      Parameters:
        `objResponseDueDate` - - object of Response Due Date - The latest date by which the additional information is to be returned to requester.

    - #### setPatientConsent

          public void setPatientConsent(java.lang.String strPatientConsent)

      Patient Consent (ID) This field is about Code indicating if the Payer has obtained patient consent for release of information.
      Parameters:
        `String` - - String of Patient Consent - Code indicating if the Payer has obtained patient consent for release of information.

    - #### setPatientConsent

          public void setPatientConsent(ID objPatientConsent)

      Patient Consent (ID) This field is about Code indicating if the Payer has obtained patient consent for release of information.
      Parameters:
        `ID` - - Object of Patient Consent - Code indicating if the Payer has obtained patient consent for release of information.

    - #### setDateAdditionalInformationWasSubmitted

          public void setDateAdditionalInformationWasSubmitted(java.lang.String strDateAdditionalInformation)

      Set Date Additional Information Was Submitted (DTM) This field is about The date on which the information was assembled for transmission to the Payer. Not necessarily the same as the message date.
      Parameters:
        `String` - - string of Date Additional Information Was Submitted - The date on which the information was assembled for transmission to the Payer.

    - #### setDateAdditionalInformationWasSubmitted

          public void setDateAdditionalInformationWasSubmitted(DTM objDateAdditionalInformation)

      Set Date Additional Information Was Submitted (DTM) This field is about The date on which the information was assembled for transmission to the Payer. Not necessarily the same as the message date.
      Parameters:
        `DTM` - - object of Date Additional Information Was Submitted - The date on which the information was assembled for transmission to the Payer.

    - #### 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 {RFI} while parsing RFI segment validate method will check for its mandatory presence. [RFI] in this case validate will throw exception if one tries to enter more than one RFI segment.
      Specified by:
        `validate` in interface `ISegment`
      Overrides:
        `validate` in class `Segment`
      Returns:
        boolean - true or false.
      Throws:
        `InvalidSegmentException` - Throws when Segment Validation fails.