cdac.medinfo.sdk.hl7282.baselibs

## Class PL

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

- All Implemented Interfaces:
    IDataType

      public class PL
      extends CompositeDataType

  PL - Person Location

  This data type specifies a patient location within a healthcare institution.

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

  1. Point of Care (HD)Conditional
  2. Room (HD)Optional
  3. Bed (HD)Optional
  4. Facility (HD)Optional
  5. Location Status (IS)Optional
  6. Person Location Type (IS)Optional
  7. Building (HD)Optional
  8. Floor (HD)Optional
  9. Location Description (ST)Optional
  10. Comprehensive Location Identifier (EI)Optional
  11. Assigning Authority for Location (HD)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
    `PL()` Default Constructor for PL
    `PL(int iComponentType, IDataTypeMap objIDataTypeMap)` Constructor for PL class which takes two arguments and sets the value in the respective member variable.
    `PL(int iComponentType, int iMinLength, int iMaxLength, java.lang.String strCLength, IDataTypeMap objIDataTypeMap)` Constructor for PL class which takes five arguments and sets the value in the respective member variable.
    `PL(int iComponentType, int iMinLength, int iMaxLength, java.lang.String strCLength, int ITableNo, IDataTypeMap objIDataTypeMap)` Constructor for PL class which takes six arguments and sets the value in the respective member variable.
    `PL(int iMinLength, int iMaxLength, java.lang.String strCLength, int iComponentType)` Constructor for PL class which takes four arguments and sets the value in the respective member variable.
    `PL(int iMinLength, int iMaxLength, java.lang.String strCLength, int iTableNo, int iComponentType)` Constructor for PL 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.
    `HD` | `getAssigningAuthorityForLocation()` Returns Assigning Authority for Location
    `HD` | `getBed()` Returns Bed
    `HD` | `getBuilding()` Returns Building
    `EI` | `getComprehensiveLocationIdentifier()` Returns Comprehensive Location Identifier
    `HD` | `getFacility()` Returns Facility
    `HD` | `getFloor()` Returns Floor
    `ST` | `getLocationDescription()` Returns Location Description
    `IS` | `getLocationStatus()` Returns Location Status
    `IS` | `getPersonLocationType()` Returns Person Location Type
    `HD` | `getPointOfCare()` Returns Point of Care
    `HD` | `getRoom()` Returns Room
    `void` | `setAssigningAuthorityForLocation(HD objAssigningAuthorityForLocation)` Sets the AssigningAuthorityForLocation.
    `void` | `setBed(HD objHD)` Sets the Bed.
    `void` | `setBuilding(HD objHD)` Sets the Building.
    `void` | `setBuilding(java.lang.String strBuilding)` Sets the Building.
    `void` | `setComprehensiveLocationIdentifier(EI objComprehensiveLocationIdentifier)` Sets the ComprehensiveLocationIdentifier.
    `void` | `setFacility(HD objFacility)` Sets the Facility.
    `void` | `setFloor(HD objHD)` Sets the Floor.
    `void` | `setFloor(java.lang.String strFloor)` Sets the Floor.
    `void` | `setLocationDescription(ST objST)` Sets the LocationDescription.
    `void` | `setLocationDescription(java.lang.String strLocationDescription)` Sets the LocationDescription.
    `void` | `setLocationStatus(IS objIS)` Sets the LocationStatus.
    `void` | `setLocationStatus(java.lang.String strLocationStatus)` Sets the LocationStatus.
    `void` | `setPersonLocationType(IS objIS)` Sets the PersonLocationType.
    `void` | `setPersonLocationType(java.lang.String strPersonLocationType)` Sets the PersonLocationType.
    `void` | `setPointOfCare(HD objHD)` Sets the PointOfCare.
    `void` | `setRoom(HD objHD)` Sets the Room.
    `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

    - #### PL

          public PL()

      Default Constructor for PL

    - #### PL

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

      Constructor for PL 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.

    - #### PL

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

      Constructor for PL 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.

    - #### PL

          public PL(int iComponentType,
            IDataTypeMap objIDataTypeMap)

      Constructor for PL 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.

    - #### PL

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

      Constructor for PL 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.

    - #### PL

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

      Constructor for PL 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

    - #### setPointOfCare

          public void setPointOfCare(HD objHD)

      Sets the PointOfCare.
      Parameters:
        `objHD` - Specifies the code for the point where patient care is administered.

    - #### setRoom

          public void setRoom(HD objHD)

      Sets the Room.
      Parameters:
        `objHD` - Specifies the code for the patient's room.

    - #### setBed

          public void setBed(HD objHD)

      Sets the Bed.
      Parameters:
        `objHD` - Specifies the code for the patient's bed.

    - #### setFacility

          public void setFacility(HD objFacility)

      Sets the Facility.
      Parameters:
        `objFacility` - Specifies to site interpretation but generally describes the highest level physical designation of an institution, medical center or enterprise.

    - #### setLocationStatus

          public void setLocationStatus(java.lang.String strLocationStatus)

      Sets the LocationStatus.
      Parameters:
        `strLocationStatus` - Specifies the code for the status or availability of the location.

    - #### setLocationStatus

          public void setLocationStatus(IS objIS)

      Sets the LocationStatus.
      Parameters:
        `objIS` - Specifies the code for the status or availability of the location.

    - #### setPersonLocationType

          public void setPersonLocationType(java.lang.String strPersonLocationType)

      Sets the PersonLocationType.
      Parameters:
        `strPersonLocationType` - Specifies the categorization of the person's location defined by facility, building, floor, point of care, room or bed.

    - #### setPersonLocationType

          public void setPersonLocationType(IS objIS)

      Sets the PersonLocationType.
      Parameters:
        `objIS` - Specifies the categorization of the person's location defined by facility, building, floor, point of care, room or bed.

    - #### setBuilding

          public void setBuilding(java.lang.String strBuilding)

      Sets the Building.
      Parameters:
        `strBuilding` - Specifies code for the building where the person is located.

    - #### setBuilding

          public void setBuilding(HD objHD)

      Sets the Building.
      Parameters:
        `objHD` - Specifies code for the building where the person is located.

    - #### setFloor

          public void setFloor(java.lang.String strFloor)

      Sets the Floor.
      Parameters:
        `strFloor` - Specifies the code for the floor where the person is located.

    - #### setFloor

          public void setFloor(HD objHD)

      Sets the Floor.
      Parameters:
        `objIS` - Specifies the code for the floor where the person is located.

    - #### setLocationDescription

          public void setLocationDescription(java.lang.String strLocationDescription)

      Sets the LocationDescription.
      Parameters:
        `strLocationDescription` - Specifies describes the location in free text.

    - #### setLocationDescription

          public void setLocationDescription(ST objST)

      Sets the LocationDescription.
      Parameters:
        `objST` - Specifies describes the location in free text.

    - #### setComprehensiveLocationIdentifier

          public void setComprehensiveLocationIdentifier(EI objComprehensiveLocationIdentifier)

      Sets the ComprehensiveLocationIdentifier.
      Parameters:
        `objComprehensiveLocationIdentifier` - Specifies represents the physical location as a whole without regard for the individual components.

    - #### setAssigningAuthorityForLocation

          public void setAssigningAuthorityForLocation(HD objAssigningAuthorityForLocation)

      Sets the AssigningAuthorityForLocation.
      Parameters:
        `objAssigningAuthorityForLocation` - Specifies the entity that creates the data for the individual physical location components.

    - #### getPointOfCare

          public HD getPointOfCare()

      Returns Point of Care
      Returns:
        IS - data type.

    - #### getRoom

          public HD getRoom()

      Returns Room
      Returns:
        HD - data type.

    - #### getBed

          public HD getBed()

      Returns Bed
      Returns:
        HD - data type.

    - #### getFacility

          public HD getFacility()

      Returns Facility
      Returns:
        HD - data type.

    - #### getLocationStatus

          public IS getLocationStatus()

      Returns Location Status
      Returns:
        IS - data type.

    - #### getPersonLocationType

          public IS getPersonLocationType()

      Returns Person Location Type
      Returns:
        IS - data type.

    - #### getBuilding

          public HD getBuilding()

      Returns Building
      Returns:
        HD - data type.

    - #### getFloor

          public HD getFloor()

      Returns Floor
      Returns:
        HD - data type.

    - #### getLocationDescription

          public ST getLocationDescription()

      Returns Location Description
      Returns:
        ST - data type.

    - #### getComprehensiveLocationIdentifier

          public EI getComprehensiveLocationIdentifier()

      Returns Comprehensive Location Identifier
      Returns:
        EI - data type.

    - #### getAssigningAuthorityForLocation

          public HD getAssigningAuthorityForLocation()

      Returns Assigning Authority for Location
      Returns:
        HD - 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.