cdac.medinfo.sdk.hl7282.baselibs.segments

## Class APR

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

- All Implemented Interfaces:
    ISegment

      public class APR
      extends Segment

  APR - Appointment Preferences Segment

  The APR segment contains parameters and preference specifications used for requesting appointments in the SRM message.

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

  APR-1: Time Selection Criteria (SCV)Optional
  APR-2: Resource Selection Criteria (SCV)Optional
  APR-3: Location Selection Criteria (SCV)Optional
  APR-4: Slot Spacing Criteria (NM)Optional
  APR-5: Filler Override Criteria (SCV)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
    `APR()` Constructs the APR segment.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addFillerOverrideCriteria(CWE objParameterClass, java.lang.String strParameterValue)` Add the Filler Override Criteria.
    `void` | `addFillerOverrideCriteria(SCV objfillerOverrideCriteria)` Add the Filler Override Criteria.
    `void` | `addLocationSelectionCriteria(CWE objParameterClass, java.lang.String strParameterValue)` Add the Location Selection Criteria.
    `void` | `addLocationSelectionCriteria(SCV objlocationSelectionCriteria)` Add the Location Selection Criteria.
    `void` | `addResourceSelectionCriteria(CWE objParameterClass, java.lang.String strParameterValue)` Add the Resource Selection Criteria.
    `void` | `addResourceSelectionCriteria(SCV objresourceSelectionCriteria)` Add the Resource Selection Criteria.
    `void` | `addTimeSelectionCriteria(CWE objParameterClass, java.lang.String strParameterValue)` Add the Time Selection Criteria.
    `void` | `addTimeSelectionCriteria(SCV objtimeSelectionCriteria)` Add the Time Selection Criteria.
    `ISingleCollection<SCV>` | `getFillerOverrideCriteria()` Retrieves the Filler Override Criteria.
    `ISingleCollection<SCV>` | `getLocationSelectionCriteria()` Retrieves the Location Selection Criteria.
    `ISingleCollection<SCV>` | `getResourceSelectionCriteria()` Retrieves the Resource Selection Criteria.
    `NM` | `getSlotSpacingCriteria()` Retrieves the Slot Spacing Criteria.
    `ISingleCollection<SCV>` | `getTimeSelectionCriteria()` Retrieves the Time Selection Criteria.
    `void` | `setFillerOverrideCriteria(ISingleCollection<SCV> objfillerOverrideCriteriaList)` Set the Filler Override Criteria.
    `void` | `setLocationSelectionCriteria(ISingleCollection<SCV> objlocationSelectionCriteriaList)` Set the Location Selection Criteria.
    `void` | `setResourceSelectionCriteria(ISingleCollection<SCV> objresourceSelectionCriteriaList)` Set the Resource Selection Criteria.
    `void` | `setSlotSpacingCriteria(NM objslotSpacingCriteria)` Set the Slot Spacing Criteria.
    `void` | `setSlotSpacingCriteria(java.lang.String strSlotSpacingCriteria)` Set the Slot Spacing Criteria.
    `void` | `setTimeSelectionCriteria(ISingleCollection<SCV> objtimeSelectionCriteriaList)` Set the Time Selection Criteria.
    `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

    - #### APR

          public APR()

      Constructs the APR segment.

  - ### Method Detail

    - #### getFillerOverrideCriteria

          public ISingleCollection<SCV> getFillerOverrideCriteria()

      Retrieves the Filler Override Criteria. This field specify the override parameters to the filler application.
      Returns:
        ISingleCollection - fillerOverrideCriteria

    - #### getLocationSelectionCriteria

          public ISingleCollection<SCV> getLocationSelectionCriteria()

      Retrieves the Location Selection Criteria. This field specify the communicate parameters and preferences to the filler application regarding the selection of an appropriate location for an appointment.
      Returns:
        ISingleCollection - locationSelectionCriteria

    - #### getResourceSelectionCriteria

          public ISingleCollection<SCV> getResourceSelectionCriteria()

      Retrieves the Resource Selection Criteria. This field specify the communicate parameters and preferences to the filler application regarding the selection of an appropriate resource for an appointment.
      Returns:
        ISingleCollection - resourceSelectionCriteria

    - #### getSlotSpacingCriteria

          public NM getSlotSpacingCriteria()

      Retrieves the Slot Spacing Criteria. This field specify the queries returning lists of possible appointment slots, or other lists of slots.
      Returns:
        NM - slotSpacingCriteria

    - #### getTimeSelectionCriteria

          public ISingleCollection<SCV> getTimeSelectionCriteria()

      Retrieves the Time Selection Criteria. This field specify the communicate parameters and preferences to the filler application regarding the selection of an appropriate time slot for an appointment.
      Returns:
        ISingleCollection - timeSelectionCriteria

    - #### addTimeSelectionCriteria

          public void addTimeSelectionCriteria(CWE objParameterClass,
                                      java.lang.String strParameterValue)

      Add the Time Selection Criteria. This field specify the communicate parameters and preferences to the filler application regarding the selection of an appropriate time slot for an appointment.
      Parameters:
        `objParameterClass` - Identifies the parameter or preference being passed to the filler application.
        `strParameterValue` - Actual data value for that parameter.

    - #### addTimeSelectionCriteria

          public void addTimeSelectionCriteria(SCV objtimeSelectionCriteria)

      Add the Time Selection Criteria. This field specify the communicate parameters and preferences to the filler application regarding the selection of an appropriate time slot for an appointment.
      Parameters:
        `objtimeSelectionCriteria` - Object of Time Selection Criteria.

    - #### setTimeSelectionCriteria

          public void setTimeSelectionCriteria(ISingleCollection<SCV> objtimeSelectionCriteriaList)

      Set the Time Selection Criteria. This field specify the communicate parameters and preferences to the filler application regarding the selection of an appropriate time slot for an appointment.
      Parameters:
        `objtimeSelectionCriteriaList` - List of Time Selection Criteria.

    - #### addResourceSelectionCriteria

          public void addResourceSelectionCriteria(CWE objParameterClass,
                                          java.lang.String strParameterValue)

      Add the Resource Selection Criteria. This field specify the communicate parameters and preferences to the filler application regarding the selection of an appropriate resource for an appointment.
      Parameters:
        `objParameterClass` - Identifies the parameter or preference being passed to the filler application.
        `strParameterValue` - Actual data value for that parameter.

    - #### addResourceSelectionCriteria

          public void addResourceSelectionCriteria(SCV objresourceSelectionCriteria)

      Add the Resource Selection Criteria. This field specify the communicate parameters and preferences to the filler application regarding the selection of an appropriate resource for an appointment.
      Parameters:
        `objresourceSelectionCriteria` - Object of Resource Selection Criteria.

    - #### setResourceSelectionCriteria

          public void setResourceSelectionCriteria(ISingleCollection<SCV> objresourceSelectionCriteriaList)

      Set the Resource Selection Criteria. This field specify the communicate parameters and preferences to the filler application regarding the selection of an appropriate resource for an appointment.
      Parameters:
        `objresourceSelectionCriteriaList` - List of Resource Selection Criteria.

    - #### addLocationSelectionCriteria

          public void addLocationSelectionCriteria(CWE objParameterClass,
                                          java.lang.String strParameterValue)

      Add the Location Selection Criteria. This field specify the communicate parameters and preferences to the filler application regarding the selection of an appropriate location for an appointment.
      Parameters:
        `objParameterClass` - Identifies the parameter or preference being passed to the filler application.
        `strParameterValue` - Actual data value for that parameter.

    - #### addLocationSelectionCriteria

          public void addLocationSelectionCriteria(SCV objlocationSelectionCriteria)

      Add the Location Selection Criteria. This field specify the communicate parameters and preferences to the filler application regarding the selection of an appropriate location for an appointment.
      Parameters:
        `objlocationSelectionCriteria` - Object of Location Selection Criteria.

    - #### setLocationSelectionCriteria

          public void setLocationSelectionCriteria(ISingleCollection<SCV> objlocationSelectionCriteriaList)

      Set the Location Selection Criteria. This field specify the communicate parameters and preferences to the filler application regarding the selection of an appropriate location for an appointment.
      Parameters:
        `objlocationSelectionCriteriaList` - List of Location Selection Criteria.

    - #### setSlotSpacingCriteria

          public void setSlotSpacingCriteria(java.lang.String strSlotSpacingCriteria)

      Set the Slot Spacing Criteria. This field specify the queries returning lists of possible appointment slots, or other lists of slots.
      Parameters:
        `strSlotSpacingCriteria` - String value of Slot Spacing Criteria.

    - #### setSlotSpacingCriteria

          public void setSlotSpacingCriteria(NM objslotSpacingCriteria)

      Set the Slot Spacing Criteria. This field specify the queries returning lists of possible appointment slots, or other lists of slots.
      Parameters:
        `objslotSpacingCriteria` - Object of Slot Spacing Criteria.

    - #### addFillerOverrideCriteria

          public void addFillerOverrideCriteria(CWE objParameterClass,
                                       java.lang.String strParameterValue)

      Add the Filler Override Criteria. This field specify the override parameters to the filler application.
      Parameters:
        `objParameterClass` - Identifies the parameter or preference being passed to the filler application.
        `strParameterValue` - Actual data value for that parameter.

    - #### addFillerOverrideCriteria

          public void addFillerOverrideCriteria(SCV objfillerOverrideCriteria)

      Add the Filler Override Criteria. This field specify the override parameters to the filler application.
      Parameters:
        `objfillerOverrideCriteria` - Object of Filler Override Criteria.

    - #### setFillerOverrideCriteria

          public void setFillerOverrideCriteria(ISingleCollection<SCV> objfillerOverrideCriteriaList)

      Set the Filler Override Criteria. This field specify the override parameters to the filler application.
      Parameters:
        `objfillerOverrideCriteriaList` - List of Filler Override Criteria.

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