cdac.medinfo.sdk.hl7282.baselibs.segments

## Class RCP

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

- All Implemented Interfaces:
    ISegment

      public class RCP
      extends Segment

  RCP - Response Control Parameter Segment.

  The RCP segment is used to restrict the amount of data that should be returned in response to query.

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

  RCP-1: Query Priority (ID)Optional
  RCP-2: Quantity Limited Request (CQ)Optional
  RCP-3: Response Modality (CWE)Optional
  RCP-4: Execution and Delivery Time (DTM)Conditional
  RCP-5: Modify Indicator (ID)Optional
  RCP-6: Sort-by Field (SRT)Optional
  RCP-7: Segment group inclusion (ID)

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

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addSegmentgroupinclusion(ID objtempSegmentgroupinclusion)` Set the Segment group inclusion.
    `void` | `addSegmentgroupinclusion(java.lang.String strSegmentgroupinclusion)` Set the Segment group inclusion.
    `void` | `addSortField(SRT objtempSortField)` Set the Sort Field.
    `void` | `addSortField(java.lang.String strSortbyField, java.lang.String strSequencing)` Set the Sort Field.
    `DTM` | `getExecutionDeliveryTime()` Retrieves the Execution Delivery Time.
    `ID` | `getModifyIndicator()` Retrieves the Modify Indicator.
    `CQ` | `getQuantityLimitedRequest()` Retrieves the Quantity Limited Request.
    `ID` | `getQueryPriority()` Retrieves the Query Priority.
    `CNE` | `getResponseModality()` Retrieves the Response Modality.
    `ISingleCollection<ID>` | `getSegmentgroupinclusion()` Retrieves the Segment group inclusion.
    `ISingleCollection<SRT>` | `getSortField()` Retrieves the Sort Field.
    `void` | `setExecutionDeliveryTime(DTM objexecutionDeliveryTime)` Set the Execution Delivery Time.
    `void` | `setExecutionDeliveryTime(java.lang.String strTime)` Set the Execution Delivery Time.
    `void` | `setModifyIndicator(ID objmodifyIndicator)` Set the Modify Indicator.
    `void` | `setModifyIndicator(java.lang.String strModifyIndicator)` Set the Modify Indicator.
    `void` | `setQuantityLimitedRequest(CQ objquantityLimitedRequest)` Set the Quantity Limited Request.
    `void` | `setQuantityLimitedRequest(java.lang.String strQuantity, CWE objUnits)` Set the Quantity Limited Request.
    `void` | `setQueryPriority(ID objqueryPriority)` Set the Query Priority.
    `void` | `setQueryPriority(java.lang.String strQueryPriority)` Set the Query Priority.
    `void` | `setResponseModality(CNE objresponseModality)` Set the field which specifies the timing and grouping of the response message(s).
    `void` | `setResponseModality(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 field which specifies the timing and grouping of the response message(s).
    `void` | `setSegmentgroupinclusion(ISingleCollection<ID> objSegmentgroupinclusionList)` Set the Segment group inclusion.
    `void` | `setSortField(ISingleCollection<SRT> objSortFieldList)` Set the Sort Field list.
    `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

    - #### RCP

          public RCP()

      Constructs the RCP segment.

  - ### Method Detail

    - #### getExecutionDeliveryTime

          public DTM getExecutionDeliveryTime()

      Retrieves the Execution Delivery Time.
      Returns:
        DTM - executionDeliveryTime

    - #### getModifyIndicator

          public ID getModifyIndicator()

      Retrieves the Modify Indicator. This field specify whether the subscription is new or is being modified.
      Returns:
        String - modifyIndicator

    - #### getQuantityLimitedRequest

          public CQ getQuantityLimitedRequest()

      Retrieves the Quantity Limited Request. This field contains the maximum length of the response that is to be accept by the requesting system.
      Returns:
        CQ - quantityLimitedRequest

    - #### getQueryPriority

          public ID getQueryPriority()

      Retrieves the Query Priority.
      Returns:
        String - queryPriority

    - #### getResponseModality

          public CNE getResponseModality()

      Retrieves the Response Modality. This field specify the timing and grouping of the response message(s).
      Returns:
        CWE - responseModality

    - #### getSegmentgroupinclusion

          public ISingleCollection<ID> getSegmentgroupinclusion()

      Retrieves the Segment group inclusion. This field specify those optional segment groups which are to be included in the response.
      Returns:
        ISingleCollection - segmentgroupinclusion

    - #### getSortField

          public ISingleCollection<SRT> getSortField()

      Retrieves the Sort Field. This field specify by which fields the response and the order(s) is to be sorted.
      Returns:
        ISingleCollection - sortField

    - #### setExecutionDeliveryTime

          public void setExecutionDeliveryTime(java.lang.String strTime)

      Set the Execution Delivery Time.
      Parameters:
        `strTime` - The point in time.

    - #### setExecutionDeliveryTime

          public void setExecutionDeliveryTime(DTM objexecutionDeliveryTime)

      Set the Execution Delivery Time.
      Parameters:
        `objexecutionDeliveryTime` - object of Execution Delivery Time.

    - #### setModifyIndicator

          public void setModifyIndicator(java.lang.String strModifyIndicator)

      Set the Modify Indicator. This field specify whether the subscription is new or is being modified.
      Parameters:
        `strModifyIndicator` - Use as ModifyIndicator.

    - #### setModifyIndicator

          public void setModifyIndicator(ID objmodifyIndicator)

      Set the Modify Indicator. This field specify whether the subscription is new or is being modified.
      Parameters:
        `objmodifyIndicator` - object of ModifyIndicator.

    - #### setQuantityLimitedRequest

          public void setQuantityLimitedRequest(java.lang.String strQuantity,
                                       CWE objUnits)

      Set the Quantity Limited Request. This field contains the maximum length of the response that is to be accept by the requesting system.
      Parameters:
        `strQuantity` - Specifies the numeric quantity or amount of an entity.
        `objUnits` - Specifies the units in which the quantity is expressed.

    - #### setQuantityLimitedRequest

          public void setQuantityLimitedRequest(CQ objquantityLimitedRequest)

      Set the Quantity Limited Request. This field contains the maximum length of the response that is to be accept by the requesting system.
      Parameters:
        `objquantityLimitedRequest` - object of Quantity Limited Request.

    - #### setQueryPriority

          public void setQueryPriority(java.lang.String strQueryPriority)

      Set the Query Priority.
      Parameters:
        `strQueryPriority` - Use as QueryPriority.

    - #### setQueryPriority

          public void setQueryPriority(ID objqueryPriority)

      Set the Query Priority.
      Parameters:
        `objqueryPriority` - object of QueryPriority.

    - #### setResponseModality

          public void setResponseModality(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 field which specifies the timing and grouping of the response message(s).
      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.

    - #### setResponseModality

          public void setResponseModality(CNE objresponseModality)

      Set the field which specifies the timing and grouping of the response message(s).
      Parameters:
        `objresponseModality` - object of ResponseModality

    - #### addSegmentgroupinclusion

          public void addSegmentgroupinclusion(java.lang.String strSegmentgroupinclusion)

      Set the Segment group inclusion. This field specify those optional segment groups which are to be included in the response.
      Parameters:
        `strSegmentgroupinclusion` - Use as Segmentgroupinclusion.

    - #### addSegmentgroupinclusion

          public void addSegmentgroupinclusion(ID objtempSegmentgroupinclusion)

      Set the Segment group inclusion. This field specify those optional segment groups which are to be included in the response.
      Parameters:
        `objtempSegmentgroupinclusion` - object of Segmentgroupinclusion.

    - #### setSegmentgroupinclusion

          public void setSegmentgroupinclusion(ISingleCollection<ID> objSegmentgroupinclusionList)

      Set the Segment group inclusion.
      Parameters:
        `objSegmentgroupinclusionList` - List of Segment group inclusion..

    - #### addSortField

          public void addSortField(java.lang.String strSortbyField,
                          java.lang.String strSequencing)

      Set the Sort Field. This field specify by which fields the response and the order(s) is to be sorted.
      Parameters:
        `strSortbyField` - Identifies the field by which the response will be sorted.
        `strSequencing` - Identifies how the field or parameter will be sorted; and, if sorted, whether the sort will be case sensitive (the default) or not.

    - #### addSortField

          public void addSortField(SRT objtempSortField)

      Set the Sort Field. This field specify by which fields the response and the order(s) is to be sorted.
      Parameters:
        `objtempSortField` - object of SortField

    - #### setSortField

          public void setSortField(ISingleCollection<SRT> objSortFieldList)

      Set the Sort Field list.
      Parameters:
        `objSortFieldList` - List of Sort Field.

    - #### 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` - Throws when Segment Validation fails.