cdac.medinfo.sdk.hl7282.baselibs

## Class RPT

- java.lang.Object
- - cdac.medinfo.sdk.hl7282.baselibs.CompositeDataType
  - - cdac.medinfo.sdk.hl7282.baselibs.RPT

- All Implemented Interfaces:
    IDataType

      public class RPT
      extends CompositeDataType

  RPT - Repeat pattern

  This data type should be used where it is necessary to define the frequency at which an event is to take place.

  Represents an HL7 RPT data type. This data type has the following attributes:

  1. Repeat Pattern Code (CWE)Required
  2. Calendar Alignment (ID)Optional
  3. Phase Range Begin Value (NM)Optional
  4. Phase Range End Value (NM)Optional
  5. Period Quantity (NM)Optional
  6. Period Units (CWE)Conditional
  7. Institution Specified Time (ID)Optional
  8. Event (ID)Optional
  9. Event Offset Quantity (NM)Optional
  10. Event Offset Units (CWE)Conditional
  11. General Timing Specification (GTS)Optional

  This class provides accessors & mutators for the elements mentioned above. This class override the equal method, to check whether some other object is "equal to" this one.

  User can also create Data Type through `DataElementFactory`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RPT()` Default Constructor for RPT
    `RPT(int iComponentType, IDataTypeMap objIDataTypeMap)` Constructor for RPT class which takes two arguments and sets the value in the respective member variable.
    `RPT(int iComponentType, int iMinLength, int iMaxLength, java.lang.String strCLength, IDataTypeMap objIDataTypeMap)` Constructor for RPT class which takes five arguments and sets the value in the respective member variable.
    `RPT(int iComponentType, int iMinLength, int iMaxLength, java.lang.String strCLength, int ITableNo, IDataTypeMap objIDataTypeMap)` Constructor for RPT class which takes six arguments and sets the value in the respective member variable.
    `RPT(int iMinLength, int iMaxLength, java.lang.String strCLength, int iComponentType)` Constructor for CQ class which takes four arguments and sets the value in the respective member variable.
    `RPT(int iMinLength, int iMaxLength, java.lang.String strCLength, int iTableNo, int iComponentType)` Constructor for RPT class which takes five arguments and sets the value in the respective member variable.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object objObject)` This method checks the equality of Object.
    `ID` | `getCalendarAlignment()` Returns Calendar Alignment
    `ID` | `getEvent()` Returns Event
    `NM` | `getEventOffsetQuantity()` Returns Event Offset Quantity
    `CWE` | `getEventOffsetUnits()` Returns Event Offset Units
    `GTS` | `getGeneralTimingSpecification()` Returns General Timing Specification
    `ID` | `getInstitutionSpecifiedTime()` Returns Institution Specified Time
    `NM` | `getPeriodQuantity()` Returns Period Quantity
    `CWE` | `getPeriodUnits()` Returns Period Units
    `NM` | `getPhaseRangeBeginValue()` Returns Phase Range Begin Value
    `NM` | `getPhaseRangeEndValue()` Returns Phase Range End Value
    `CWE` | `getRepeatPatternCode()` Returns Repeat Pattern Code
    `void` | `setCalendarAlignment(ID objID)` Sets the CalendarAlignment.
    `void` | `setCalendarAlignment(java.lang.String strCalendarAlignment)` Sets the CalendarAlignment.
    `void` | `setEvent(ID objID)` Sets the Event.
    `void` | `setEvent(java.lang.String strEvent)` Sets the Event.
    `void` | `setEventOffsetQuantity(NM objNM)` Sets the EventOffsetQuantity.
    `void` | `setEventOffsetQuantity(java.lang.String strEventOffsetQuantity)` Sets the EventOffsetQuantity.
    `void` | `setEventOffsetUnits(CWE objCWE)` Sets the EventOffsetUnits.
    `void` | `setEventOffsetUnits(java.lang.String strEventOffsetUnits)` Sets the EventOffsetUnits.
    `void` | `setGeneralTimingSpecification(GTS objGTS)` Sets the GeneralTimingSpecification.
    `void` | `setGeneralTimingSpecification(java.lang.String strGeneralTimingSpecification)` Sets the GeneralTimingSpecification.
    `void` | `setInstitutionSpecifiedTime(ID objID)` Sets the InstitutionSpecifiedTime.
    `void` | `setInstitutionSpecifiedTime(java.lang.String strInstitutionSpecifiedTime)` Sets the InstitutionSpecifiedTime.
    `void` | `setPeriodQuantity(NM objNM)` Sets the PeriodQuantity.
    `void` | `setPeriodQuantity(java.lang.String strPeriodQuantity)` Sets the PeriodQuantity.
    `void` | `setPeriodUnits(CWE objCWE)` Sets the PeriodUnits.
    `void` | `setPeriodUnits(java.lang.String strPeriodUnits)` Sets the PeriodUnits.
    `void` | `setPhaseRangeBeginValue(NM objNM)` Sets the PhaseRangeBeginValue.
    `void` | `setPhaseRangeBeginValue(java.lang.String strPhaseRangeBeginValue)` Sets the PhaseRangeBeginValue.
    `void` | `setPhaseRangeEndValue(NM objNM)` Sets the PhaseRangeEndValue.
    `void` | `setPhaseRangeEndValue(java.lang.String strPhaseRangeEndValue)` Sets the PhaseRangeEndValue.
    `void` | `setRepeatPatternCode(CWE objRepeatPatternCode)` Sets the RepeatPatternCode.
    `boolean` | `validate()` The Method validates the Input value,and if validated properly then returns true.

    - ### Methods inherited from class cdac.medinfo.sdk.hl7282.baselibs.CompositeDataType

      `copy, dumpDataType, getAttributes, getDataTypeName, getLength, getValue, isPrimitive, read, setValue, write, writeToXML`

    - ### Methods inherited from class java.lang.Object

      `getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### RPT

          public RPT()

      Default Constructor for RPT

    - #### RPT

          public RPT(int iMinLength,
             int iMaxLength,
             java.lang.String strCLength,
             int iComponentType)
              throws InvalidComponentTypeException

      Constructor for CQ class which takes four arguments and sets the value in the respective member variable.
      Parameters:
        `iMinLength` - The Minimum length the DataType can have.
        `iMaxLength` - The Maximum length the DataType can have.
        `iCLength` - The Conformance length the DataType can have.
        `iComponentType` - The Type of the component i.e Component or a subcomponent.
      Throws:
        `InvalidComponentTypeException` - - if Component Type is not specified or valid.

    - #### RPT

          public RPT(int iMinLength,
             int iMaxLength,
             java.lang.String strCLength,
             int iTableNo,
             int iComponentType)
              throws InvalidComponentTypeException

      Constructor for RPT class which takes five arguments and sets the value in the respective member variable.
      Parameters:
        `iMinLength` - The Minimum length the DataType can have.
        `iMaxLength` - The Maximum length the DataType can have.
        `iCLength` - The Conformance length the DataType can have.
        `iTableNo` - The Table number to which the value for the component is specified.
        `iComponentType` - The Type of the component i.e Component or a subcomponent.
      Throws:
        `InvalidComponentTypeException` - - if Component Type is not specified or valid.

    - #### RPT

          public RPT(int iComponentType,
             IDataTypeMap objIDataTypeMap)

      Constructor for RPT class which takes two arguments and sets the value in the respective member variable.
      Parameters:
        `objIDataTypeMap` - object of Data Type Map.
        `iComponentType` - The Type of the component i.e Component or a subcomponent.
      Throws:
        `InvalidComponentTypeException` - - if Component Type is not specified or valid.

    - #### RPT

          public RPT(int iComponentType,
             int iMinLength,
             int iMaxLength,
             java.lang.String strCLength,
             IDataTypeMap objIDataTypeMap)

      Constructor for RPT class which takes five arguments and sets the value in the respective member variable.
      Parameters:
        `objIDataTypeMap` - object of Data Type Map.
        `iComponentType` - The Type of the component i.e Component or a subcomponent.
        `iMinLength` - The Minimum length the DataType can have.
        `iMaxLength` - The Maximum length the DataType can have.
        `iCLength` - The Conformance length the DataType can have.
      Throws:
        `InvalidComponentTypeException` - - if Component Type is not specified or valid.

    - #### RPT

          public RPT(int iComponentType,
             int iMinLength,
             int iMaxLength,
             java.lang.String strCLength,
             int ITableNo,
             IDataTypeMap objIDataTypeMap)

      Constructor for RPT class which takes six arguments and sets the value in the respective member variable.
      Parameters:
        `objIDataTypeMap` - object of Data Type Map.
        `iComponentType` - The Type of the component i.e Component or a subcomponent.
        `iMinLength` - The Minimum length the DataType can have.
        `iMaxLength` - The Maximum length the DataType can have.
        `iCLength` - The Conformance length the DataType can have.
        `iTableNo` - The Table number to which the value for the component is specified.
      Throws:
        `InvalidComponentTypeException` - - if Component Type is not specified or valid.

  - ### Method Detail

    - #### setRepeatPatternCode

          public void setRepeatPatternCode(CWE objRepeatPatternCode)

      Sets the RepeatPatternCode.
      Parameters:
        `objRepeatPatternCode` - A code representing the repeat pattern defined by the other components of this data type.

    - #### setCalendarAlignment

          public void setCalendarAlignment(java.lang.String strCalendarAlignment)

      Sets the CalendarAlignment.
      Parameters:
        `strCalendarAlignment` - Specifies an alignment of the repetition to a calendar

    - #### setCalendarAlignment

          public void setCalendarAlignment(ID objID)

      Sets the CalendarAlignment.
      Parameters:
        `objID` - Specifies an alignment of the repetition to a calendar

    - #### setPhaseRangeBeginValue

          public void setPhaseRangeBeginValue(java.lang.String strPhaseRangeBeginValue)

      Sets the PhaseRangeBeginValue.
      Parameters:
        `strPhaseRangeBeginValue` - Used for Calendar aligned repeat patterns to determine the amount of time from the beginning of particular RPT-2 (Calendar Alignment) to the beginning of the phase.

    - #### setPhaseRangeBeginValue

          public void setPhaseRangeBeginValue(NM objNM)

      Sets the PhaseRangeBeginValue.
      Parameters:
        `strPhaseRangeBeginValue` - Used for Calendar aligned repeat patterns to determine the amount of time from the beginning of particular RPT-2 (Calendar Alignment) to the beginning of the phase.

    - #### setPhaseRangeEndValue

          public void setPhaseRangeEndValue(java.lang.String strPhaseRangeEndValue)

      Sets the PhaseRangeEndValue.
      Parameters:
        `strPhaseRangeEndValue` - Used for Calendar aligned repeat patterns to determine the amount of time from the beginning of particular RPT-2 (Calendar Alignment) to the end of the phase.

    - #### setPhaseRangeEndValue

          public void setPhaseRangeEndValue(NM objNM)

      Sets the PhaseRangeEndValue.
      Parameters:
        `objNM` - Used for Calendar aligned repeat patterns to determine the amount of time from the beginning of particular RPT-2 (Calendar Alignment) to the end of the phase.

    - #### setPeriodQuantity

          public void setPeriodQuantity(java.lang.String strPeriodQuantity)

      Sets the PeriodQuantity.
      Parameters:
        `strPeriodQuantity` - A time duration specifying the frequency at which the periodic interval repeats.

    - #### setPeriodQuantity

          public void setPeriodQuantity(NM objNM)

      Sets the PeriodQuantity.
      Parameters:
        `objNM` - A time duration specifying the frequency at which the periodic interval repeats.

    - #### setPeriodUnits

          public void setPeriodUnits(java.lang.String strPeriodUnits)

      Sets the PeriodUnits.
      Parameters:
        `strPeriodUnits` - Defines the units used for RPT-5 (Period Quantity).

    - #### setPeriodUnits

          public void setPeriodUnits(CWE objCWE)

      Sets the PeriodUnits.
      Parameters:
        `objCWE` - Defines the units used for RPT-5 (Period Quantity).

    - #### setInstitutionSpecifiedTime

          public void setInstitutionSpecifiedTime(java.lang.String strInstitutionSpecifiedTime)

      Sets the InstitutionSpecifiedTime.
      Parameters:
        `strInstitutionSpecifiedTime` - a code that indicates whether the exact timing is up to the party executing the schedule

    - #### setInstitutionSpecifiedTime

          public void setInstitutionSpecifiedTime(ID objID)

      Sets the InstitutionSpecifiedTime.
      Parameters:
        `objID` - a code that indicates whether the exact timing is up to the party executing the schedule

    - #### setEvent

          public void setEvent(java.lang.String strEvent)

      Sets the Event.
      Parameters:
        `strEvent` - A code for a common (periodical) activity of daily living.

    - #### setEvent

          public void setEvent(ID objID)

      Sets the Event.
      Parameters:
        `objID` - A code for a common (periodical) activity of daily living.

    - #### setEventOffsetQuantity

          public void setEventOffsetQuantity(java.lang.String strEventOffsetQuantity)

      Sets the EventOffsetQuantity.
      Parameters:
        `strEventOffsetQuantity` - An interval that marks the offsets for the beginning, width and end of the event-related periodic interval measured from the time each such event actually occurred.

    - #### setEventOffsetQuantity

          public void setEventOffsetQuantity(NM objNM)

      Sets the EventOffsetQuantity.
      Parameters:
        `strEventOffsetQuantity` - An interval that marks the offsets for the beginning, width and end of the event-related periodic interval measured from the time each such event actually occurred.

    - #### setEventOffsetUnits

          public void setEventOffsetUnits(java.lang.String strEventOffsetUnits)

      Sets the EventOffsetUnits.
      Parameters:
        `strEventOffsetUnits` - Defines the units used for RPT-9 (Event Offset Quantity).

    - #### setEventOffsetUnits

          public void setEventOffsetUnits(CWE objCWE)

      Sets the EventOffsetUnits.
      Parameters:
        `objCWE` - Defines the units used for RPT-9 (Event Offset Quantity).

    - #### setGeneralTimingSpecification

          public void setGeneralTimingSpecification(java.lang.String strGeneralTimingSpecification)

      Sets the GeneralTimingSpecification.
      Parameters:
        `strGeneralTimingSpecification` - The General Timing Specification as defined by the Version 3 Data Types document.

    - #### setGeneralTimingSpecification

          public void setGeneralTimingSpecification(GTS objGTS)

      Sets the GeneralTimingSpecification.
      Parameters:
        `objGTS` - The General Timing Specification as defined by the Version 3 Data Types document.

    - #### getRepeatPatternCode

          public CWE getRepeatPatternCode()

      Returns Repeat Pattern Code
      Returns:
        CWE - data type.

    - #### getCalendarAlignment

          public ID getCalendarAlignment()

      Returns Calendar Alignment
      Returns:
        ID - data type.

    - #### getPhaseRangeBeginValue

          public NM getPhaseRangeBeginValue()

      Returns Phase Range Begin Value
      Returns:
        NM - data type.

    - #### getPhaseRangeEndValue

          public NM getPhaseRangeEndValue()

      Returns Phase Range End Value
      Returns:
        NM - data type.

    - #### getPeriodQuantity

          public NM getPeriodQuantity()

      Returns Period Quantity
      Returns:
        NM - data type.

    - #### getPeriodUnits

          public CWE getPeriodUnits()

      Returns Period Units
      Returns:
        CWE - data type.

    - #### getInstitutionSpecifiedTime

          public ID getInstitutionSpecifiedTime()

      Returns Institution Specified Time
      Returns:
        ID - data type.

    - #### getEvent

          public ID getEvent()

      Returns Event
      Returns:
        ID - data type.

    - #### getEventOffsetQuantity

          public NM getEventOffsetQuantity()

      Returns Event Offset Quantity
      Returns:
        NM - data type.

    - #### getEventOffsetUnits

          public CWE getEventOffsetUnits()

      Returns Event Offset Units
      Returns:
        CWE - data type.

    - #### getGeneralTimingSpecification

          public GTS getGeneralTimingSpecification()

      Returns General Timing Specification
      Returns:
        GTS - data type.

    - #### validate

          public boolean validate()
                           throws InvalidDataTypeException

      The Method validates the Input value,and if validated properly then returns true. Here the validetion is based on the compulsory fields for the Datatype.
      Specified by:
        `validate` in interface `IDataType`
      Overrides:
        `validate` in class `CompositeDataType`
      Returns:
        boolean - true or false.
      Throws:
        `InvalidDataTypeException` - - if Invalid values is entered or Mandatory field is missing.

    - #### equals

          public boolean equals(java.lang.Object objObject)

      This method checks the equality of Object.
      Overrides:
        `equals` in class `java.lang.Object`
      Parameters:
        `objObject` - object of Object class.
      Returns:
        boolean - shows success or failure of the comparison.