cdac.medinfo.sdk.hl7282.baselibs.segments

## Class ARV

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

- All Implemented Interfaces:
    ISegment

      public class ARV
      extends Segment

  ARV - Access Restrictions segment.

  The ARV segment is used to communicate the requested/required type of access restrictions from system to system, at both the person/patient and the encounter/visit level

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

  ARV-1: Set ID (SI)Required
  ARV-2: Access Restriction Action Code (CNE)Required
  ARV-3: Access Restriction Value (CWE)Required
  ARV-4: Access Restriction Reason (CWE)Optional
  ARV-5: Special Access Restriction Instructions (ST)Optional
  ARV-6: Access Restriction Date Range (DR)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
    `ARV()` Constructs the ARV segment.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addAccessRestrictionReason(CWE objtempAccessRestrictionReason)` Set the Access Restriction Reason.
    `void` | `addAccessRestrictionReason(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 Access Restriction Reason.
    `void` | `addSpecialAccessRestrictionInstructions(ST objtempSpecialAccessRestrictionInstructions)` Set the Special Access Restriction Instructions.
    `void` | `addSpecialAccessRestrictionInstructions(java.lang.String strSpecialAccessRestrictionInstructions)` Set the Special Access Restriction Instructions.
    `CNE` | `getAccessRestrictionActionCode()` Retrieves the Access Restriction Action Code.
    `DR` | `getAccessRestrictionDateRange()` Retrieves the Access Restriction Date Range .
    `ISingleCollection<CWE>` | `getAccessRestrictionReason()` Retrieves the Access Restriction Reason.
    `CWE` | `getAccessRestrictionValue()` Retrieves the Access Restriction Value.
    `SI` | `getSetID()` Retrieves the Set ID.
    `ISingleCollection<ST>` | `getSpecialAccessRestrictionInstructions()` Retrieves the Special Access Restriction Instructions.
    `void` | `setAccessRestrictionActionCode(CNE objAccessRestrictionActionCode)` Set the Access Restriction Action Code.
    `void` | `setAccessRestrictionActionCode(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 strNameOfSecondAltenateCodingSystem, 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 Bc Component.
    `void` | `setAccessRestrictionDateRange(DR objAccessRestrictionDateRange)` Set the Access Restriction Date Range .
    `void` | `setAccessRestrictionDateRange(DTM objRangeStartDateTime, DTM objRangeEndDateTime)` Set the Access Restriction Date Range .
    `void` | `setAccessRestrictionReason(ISingleCollection<CWE> objAccessRestrictionReasonList)` Set the Access Restriction Reason list.
    `void` | `setAccessRestrictionValue(CWE objAccessRestrictionValue)` Set the Access Restriction Value.
    `void` | `setAccessRestrictionValue(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 Access Restriction Value.
    `void` | `setSetID(SI objsetID)` Set the Set ID.
    `void` | `setSetID(java.lang.String strSetID)` Set the Set ID.
    `void` | `setSpecialAccessRestrictionInstructions(ISingleCollection<ST> objSpecialAccessRestrictionInstructions)` Set the Special Access Restriction Instructions.
    `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

    - #### ARV

          public ARV()

      Constructs the ARV segment.

  - ### Method Detail

    - #### getSetID

          public SI getSetID()

      Retrieves the Set ID. This field contains the number that identifies this transaction.
      Returns:
        String - setID

    - #### getAccessRestrictionActionCode

          public CNE getAccessRestrictionActionCode()

      Retrieves the Access Restriction Action Code. This field contains a code defining the action to be taken for this segment.
      Returns:
        CNE - Access Restriction Action Code

    - #### getAccessRestrictionValue

          public CWE getAccessRestrictionValue()

      Retrieves the Access Restriction Value. This field specifies the information to which access is restricted.
      Returns:
        CWE - Access Restriction Value

    - #### getAccessRestrictionReason

          public ISingleCollection<CWE> getAccessRestrictionReason()

      Retrieves the Access Restriction Reason. This field is used to convey the reason for the restricted access.
      Returns:
        ISingleCollection - bPIndicationforUse

    - #### getSpecialAccessRestrictionInstructions

          public ISingleCollection<ST> getSpecialAccessRestrictionInstructions()

      Retrieves the Special Access Restriction Instructions. Used to convey specific instructions about the protection of the patient's data (e.g., "Always refer to the patient as Mr. Everyman"). This field may also be used to specify instructions about the release of information to family and friends (e.g., "Do not release information to patient's brother, Adam Everyman"). These instructions may be in conjunction with other fields (as elected by the system).
      Returns:
        ISingleCollection - Special Access Restriction Instructions

    - #### getAccessRestrictionDateRange

          public DR getAccessRestrictionDateRange()

      Retrieves the Access Restriction Date Range . This element defines the date from which an access restriction commences until the date it is specifically rescinded.
      Returns:
        DR - Access Restriction Date Range

    - #### setSetID

          public void setSetID(java.lang.String strSetID)

      Set the Set ID. This field contains the number that identifies this transaction.
      Parameters:
        `strSetID` - Use as SetID.

    - #### setSetID

          public void setSetID(SI objsetID)

      Set the Set ID. This field contains the number that identifies this transaction.
      Parameters:
        `objsetID` - object of SetID.

    - #### setAccessRestrictionActionCode

          public void setAccessRestrictionActionCode(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 strNameOfSecondAltenateCodingSystem,
                                            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 Bc Component. This field contains a code defining the action to be taken for this segment.
      Parameters:
        `strIdentifier` - Specifies sequence of characters (the code) that uniquely identifies the item being referenced by the CNE.
        `strText` - Specifies descriptive or textual name of the identifier, e.g., myocardial infarction
        `strNameOfCodingSystem` - Specifies the coding scheme being used in the identifier component.
        `strAlternateIdentifier` - Specifies the local or user seen code as described.
        `strAlternateText` - Specifies descriptive or textual name of the alternate identifier.
        `strNameOfAlternateCodingSystem` - Specifies the coding scheme being used in the alternate identifier component.
        `strCodingSystemVersionID` - Specifies the version ID for the coding system.
        `strAlternateCodingSystemVersionID` - Specifies the version ID for the coding system .
        `strOriginalText` - Specifies the original text that was available to an automated process or a human before a specific code was assigned.
        `strSecondAlternateIdentifier` - Specifies a sequence of characters that uniquely identifies the second alternate code
        `strSecondAlternateText` - Specifies a the textual information of the second alternate code
        `strNameOfSecondAltenateCodingSystem` - Specifies the second coding scheme being used in the identifier component.
        `strSecondAlternateCodingSystemVersionID` - Specifies version ID of Second alternative coding system.
        `strCodingSystemOID` - contains the ISO Object identifier for the coding system.
        `strValueSetOID` - contains the value set from which CNE-1 is obtained
        `strValueSetVersionID` - contains the version of the value set identified by CNE-15.
        `strAlternateCodingSystemOID` - contains the ISO Object identifier for the alternate coding system
        `strAlternateValueSetOID` - contains the value set from which CNE-4 is obtained
        `strAlternateValueSetVersionID` - contains the version of the value set identified by CNE-18.
        `strSecondAlternateCodingSystemOID` - contains the value set from which CNE-12 is obtained
        `strSecondAlternateValueSetOID` - contains the value set from which CNE-10 is obtained
        `strSecondAlternateValueSetVersionID` - contains the version of the value set identified by CNE-21.

    - #### setAccessRestrictionActionCode

          public void setAccessRestrictionActionCode(CNE objAccessRestrictionActionCode)

      Set the Access Restriction Action Code. This field includes an identifier and description of the specific blood component.
      Parameters:
        `objAccessRestrictionActionCode` - object of Bc Component.

    - #### setAccessRestrictionValue

          public void setAccessRestrictionValue(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 Access Restriction Value. This field specifies the information to which access is restricted.
      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.

    - #### setAccessRestrictionValue

          public void setAccessRestrictionValue(CWE objAccessRestrictionValue)

      Set the Access Restriction Value. This field specifies the information to which access is restricted.
      Parameters:
        `objAccessRestrictionValue` - object of AccessRestrictionValue.

    - #### addAccessRestrictionReason

          public void addAccessRestrictionReason(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 Access Restriction Reason.
      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.

    - #### addAccessRestrictionReason

          public void addAccessRestrictionReason(CWE objtempAccessRestrictionReason)

      Set the Access Restriction Reason. This field indicates any permanent or transient handicapped conditions.
      Parameters:
        `objtempAccessRestrictionReason` - object of AccessRestrictionReason.

    - #### setAccessRestrictionReason

          public void setAccessRestrictionReason(ISingleCollection<CWE> objAccessRestrictionReasonList)

      Set the Access Restriction Reason list.
      Parameters:
        `objAccessRestrictionReasonList` - List of Access Restriction Reason

    - #### addSpecialAccessRestrictionInstructions

          public void addSpecialAccessRestrictionInstructions(java.lang.String strSpecialAccessRestrictionInstructions)

      Set the Special Access Restriction Instructions. Used to convey specific instructions about the protection of the patient's data (e.g., "Always refer to the patient as Mr. Everyman"). This field may also be used to specify instructions about the release of information to family and friends (e.g., "Do not release information to patient's brother, Adam Everyman"). These instructions may be in conjunction with other fields (as elected by the system).
      Parameters:
        `strSpecialAccessRestrictionInstructions` -

    - #### addSpecialAccessRestrictionInstructions

          public void addSpecialAccessRestrictionInstructions(ST objtempSpecialAccessRestrictionInstructions)

      Set the Special Access Restriction Instructions. Used to convey specific instructions about the protection of the patient's data (e.g., "Always refer to the patient as Mr. Everyman"). This field may also be used to specify instructions about the release of information to family and friends (e.g., "Do not release information to patient's brother, Adam Everyman"). These instructions may be in conjunction with other fields (as elected by the system).
      Parameters:
        `objtempSpecialAccessRestrictionInstructions` - object indicates Special Access Restriction Instructions.

    - #### setSpecialAccessRestrictionInstructions

          public void setSpecialAccessRestrictionInstructions(ISingleCollection<ST> objSpecialAccessRestrictionInstructions)

      Set the Special Access Restriction Instructions. Used to convey specific instructions about the protection of the patient's data (e.g., "Always refer to the patient as Mr. Everyman"). This field may also be used to specify instructions about the release of information to family and friends (e.g., "Do not release information to patient's brother, Adam Everyman"). These instructions may be in conjunction with other fields (as elected by the system).
      Parameters:
        `objSpecialAccessRestrictionInstructions` - List of Special Access Restriction Instructions.

    - #### setAccessRestrictionDateRange

          public void setAccessRestrictionDateRange(DTM objRangeStartDateTime,
                                           DTM objRangeEndDateTime)

      Set the Access Restriction Date Range . This element defines the date from which an access restriction commences until the date it is specifically rescinded.
      Parameters:
        `objRangeStartDateTime` - Specifies the earliest date/time (time stamp) in the specified range.
        `objRangeEndDateTime` - Specifies the latest date/time in the specified range.

    - #### setAccessRestrictionDateRange

          public void setAccessRestrictionDateRange(DR objAccessRestrictionDateRange)

      Set the Access Restriction Date Range . This element defines the date from which an access restriction commences until the date it is specifically rescinded.
      Parameters:
        `objAccess` - RestrictionDateRange Object of Access Restriction Date Range .

    - #### 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.