cdac.medinfo.sdk.hl7282.baselibs.segments

## Class PSH

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

- All Implemented Interfaces:
    ISegment

      public class PSH
      extends Segment

  PSH - Product Summary Header Segment.

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

  PSH-1: Report Type (ST)Required
  PSH-2: Report Form Identifier (ST)Optional
  PSH-3: Report Date (DTM)Required
  PSH-4: Report Interval Start Date (DTM)Optional
  PSH-5: Report Interval End Date (DTM)Optional
  PSH-6: Quantity Manufactured (CQ)Optional
  PSH-7: Quantity Distributed (CQ)Optional
  PSH-8: Quantity Distributed Method (ID)Optional
  PSH-9: Quantity Distributed Comment (FT)Optional
  PSH-10: Quantity in Use (CQ)Optional
  PSH-11: Quantity in Use Method (ID)Optional
  PSH-12: Quantity in Use Comment (FT)Optional
  PSH-13: Number of Product Experience Reports Filed by Facility (NM)Optional
  PSH-14: Number of Product Experience Reports Filed by Distributor (NM)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
    `PSH()` Constructs the PSH segment.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addNoOfProductExpReportFiledByDistributor(NM objnoOfProductExpReportFiledByDistributor)` Add the No Of Product Exp Report Filed By Distributor.
    `void` | `addNoOfProductExpReportFiledByDistributor(java.lang.String strNoOfProductExpReportFiledByDistributor)` Add the No Of Product Exp Report Filed By Distributor.
    `void` | `addNoOfProductExpReportFiledByFacility(NM objnoOfProductExpReportFiledByFacility)` Add the No Of Product Exp Report Filed By Facility.
    `void` | `addNoOfProductExpReportFiledByFacility(java.lang.String strNoOfProductExpReportFiledByFacility)` Add the No Of Product Exp Report Filed By Facility.
    `ISingleCollection<NM>` | `getNoOfProductExpReportFiledByDistributor()` Retrieves the No Of Product Exp Report Filed By Distributor.
    `ISingleCollection<NM>` | `getNoOfProductExpReportFiledByFacility()` Retrieves the No Of Product Exp Report Filed By Facility.
    `CQ` | `getQuantityDistributed()` Retrieves the Quantity Distributed.
    `FT` | `getQuantityDistributedComment()` Retrieves the Quantity Distributed Comment.
    `ID` | `getQuantityDistributedMethod()` Retrieves the Quantity Distributed Method.
    `CQ` | `getQuantityinUse()` Retrieves the Quantity in Use.
    `FT` | `getQuantityinUseComment()` Retrieves the Quantity in Use Comment.
    `ID` | `getQuantityinUseMethod()` Retrieves the Quantity in Use Method.
    `CQ` | `getQuantityManufactured()` Retrieves the Quantity Manufactured.
    `DTM` | `getReportDate()` Retrieves the Report Date.
    `ST` | `getReportFormIdentifier()` Retrieves the Report Form Identifier.
    `DTM` | `getReportIntervalEndDate()` Retrieves the Report Interval End Date.
    `DTM` | `getReportIntervalStartDate()` Retrieves the Report Interval Start Date.
    `ST` | `getReportType()` Retrieves the Report Type.
    `void` | `setNoOfProductExpReportFiledByDistributor(ISingleCollection<NM> objnoOfProductExpReportFiledByDistributorList)` Set the No Of Product Exp Report Filed By Distributor.
    `void` | `setNoOfProductExpReportFiledByFacility(ISingleCollection<NM> objnoOfProductExpReportFiledByFacilityList)` Set the No Of Product Exp Report Filed By Facility.
    `void` | `setQuantityDistributed(CQ objquantityDistributed)` Set the Quantity Distributed.
    `void` | `setQuantityDistributed(java.lang.String strQuantity, CWE objUnits)` Set the Quantity Distributed.
    `void` | `setQuantityDistributedComment(FT objquantityDistributedComment)` Set the Quantity Distributed Comment.
    `void` | `setQuantityDistributedComment(java.lang.String strQuantityDistributedComment)` Set the Quantity Distributed Comment.
    `void` | `setQuantityDistributedMethod(ID objquantityDistributedMethod)` Set the Quantity Distributed Method.
    `void` | `setQuantityDistributedMethod(java.lang.String strQuantityDistributedMethod)` Set the Quantity Distributed Method.
    `void` | `setQuantityinUse(CQ objquantityinUse)` Set the Quantity in Use.
    `void` | `setQuantityinUse(java.lang.String strQuantity, CWE objUnits)` Set the Quantity in Use.
    `void` | `setQuantityinUseComment(FT objquantityinUseComment)` Set the Quantity in Use Comment.
    `void` | `setQuantityinUseComment(java.lang.String strQuantityinUseComment)` Set the Quantity in Use Comment.
    `void` | `setQuantityinUseMethod(ID objquantityinUseMethod)` Set the Quantity in Use Method.
    `void` | `setQuantityinUseMethod(java.lang.String strQuantityinUseMethod)` Set the Quantity in Use Method.
    `void` | `setQuantityManufactured(CQ objquantityManufactured)` Set the Quantity Manufactured.
    `void` | `setQuantityManufactured(java.lang.String strQuantity, CWE objUnits)` Set the Quantity Manufactured.
    `void` | `setReportDate(DTM objreportDate)` Set the Report Date.
    `void` | `setReportDate(java.lang.String strTime)` Set the Report Date.
    `void` | `setReportFormIdentifier(ST objreportFormIdentifier)` Set the Report Form Identifier.
    `void` | `setReportFormIdentifier(java.lang.String strReportFormIdentifier)` Set the Report Form Identifier.
    `void` | `setReportIntervalEndDate(DTM objreportIntervalEndDate)` Set the Report Interval End Date.
    `void` | `setReportIntervalEndDate(java.lang.String strTime)` Set the Report Interval End Date.
    `void` | `setReportIntervalStartDate(DTM objreportIntervalStartDate)` Set the Report Interval Start Date.
    `void` | `setReportIntervalStartDate(java.lang.String strTime)` Set the Report Interval Start Date.
    `void` | `setReportType(ST objreportType)` Set the Report Type.
    `void` | `setReportType(java.lang.String strReportType)` Set the Report Type.
    `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

    - #### PSH

          public PSH()

      Constructs the PSH segment.

  - ### Method Detail

    - #### getNoOfProductExpReportFiledByDistributor

          public ISingleCollection<NM> getNoOfProductExpReportFiledByDistributor()

      Retrieves the No Of Product Exp Report Filed By Distributor. This field contains the number of product experience reports filed by distributor.
      Returns:
        ISingleCollection - noOfProductExpReportFiledByDistributor

    - #### getNoOfProductExpReportFiledByFacility

          public ISingleCollection<NM> getNoOfProductExpReportFiledByFacility()

      Retrieves the No Of Product Exp Report Filed By Facility. This field contains the number of product experience reports filed by facility.
      Returns:
        ISingleCollection - noOfProductExpReportFiledByFacility

    - #### getQuantityDistributed

          public CQ getQuantityDistributed()

      Retrieves the Quantity Distributed. This field is used to send the number of units of the product which is distribute during the reporting interval.
      Returns:
        CQ - quantityDistributed

    - #### getQuantityDistributedComment

          public FT getQuantityDistributedComment()

      Retrieves the Quantity Distributed Comment. This field is use for any explanatory text needed but in particular should provide a description of the estimation method used.
      Returns:
        FT - quantityDistributedComment

    - #### getQuantityDistributedMethod

          public ID getQuantityDistributedMethod()

      Retrieves the Quantity Distributed Method.
      Returns:
        ID - quantityDistributedMethod

    - #### getQuantityinUse

          public CQ getQuantityinUse()

      Retrieves the Quantity in Use. This field is used to send the number of units of the product which were in use during the reporting interval.
      Returns:
        CQ - quantityinUse

    - #### getQuantityinUseComment

          public FT getQuantityinUseComment()

      Retrieves the Quantity in Use Comment.
      Returns:
        FT - quantityinUseComment

    - #### getQuantityinUseMethod

          public ID getQuantityinUseMethod()

      Retrieves the Quantity in Use Method. This field contains the method use for measuring the quantity in use.
      Returns:
        ID - quantityinUseMethod

    - #### getQuantityManufactured

          public CQ getQuantityManufactured()

      Retrieves the Quantity Manufactured. during the reporting interval.
      Returns:
        CQ - quantityManufactured

    - #### getReportDate

          public DTM getReportDate()

      Retrieves the Report Date. This field contains the date as assigned by the sender.
      Returns:
        DTM - reportDate

    - #### getReportFormIdentifier

          public ST getReportFormIdentifier()

      Retrieves the Report Form Identifier. This field contains the form descriptor which describes the report.
      Returns:
        ST - reportFormIdentifier

    - #### getReportIntervalEndDate

          public DTM getReportIntervalEndDate()

      Retrieves the Report Interval End Date. This field contains the date which marks the inclusive end of the time interval covered by the current report.
      Returns:
        DTM - reportIntervalEndDate

    - #### getReportIntervalStartDate

          public DTM getReportIntervalStartDate()

      Retrieves the Report Interval Start Date. This field contains the date that marks the beginning of the time interval covere by the current report.
      Returns:
        DTM - reportIntervalStartDate

    - #### getReportType

          public ST getReportType()

      Retrieves the Report Type. This field contains the name, title, or other description of the report.
      Returns:
        ST - reportType

    - #### addNoOfProductExpReportFiledByDistributor

          public void addNoOfProductExpReportFiledByDistributor(java.lang.String strNoOfProductExpReportFiledByDistributor)

      Add the No Of Product Exp Report Filed By Distributor. This field contains the number of product experience reports filed by distributor.
      Parameters:
        `strNoOfProductExpReportFiledByDistributor` - This field contains the String Value of Number Of Product Experiance Report Filed By Distributor

    - #### addNoOfProductExpReportFiledByDistributor

          public void addNoOfProductExpReportFiledByDistributor(NM objnoOfProductExpReportFiledByDistributor)

      Add the No Of Product Exp Report Filed By Distributor. This field contains the number of product experience reports filed by distributor.
      Parameters:
        `objnoOfProductExpReportFiledByDistributor` - Object of No Of Product Exp Report Filed By Distributor.

    - #### setNoOfProductExpReportFiledByDistributor

          public void setNoOfProductExpReportFiledByDistributor(ISingleCollection<NM> objnoOfProductExpReportFiledByDistributorList)

      Set the No Of Product Exp Report Filed By Distributor. This field contains the number of product experience reports filed by distributor.
      Parameters:
        `objnoOfProductExpReportFiledByDistributorList` - List of No Of Product Exp Report Filed By Distributor.

    - #### addNoOfProductExpReportFiledByFacility

          public void addNoOfProductExpReportFiledByFacility(java.lang.String strNoOfProductExpReportFiledByFacility)

      Add the No Of Product Exp Report Filed By Facility. This field contains the number of product experience reports filed by facility.
      Parameters:
        `strNoOfProductExpReportFiledByFacility` - This field contains the String Value of Number Of Product Experiance Report Filed By Facility

    - #### addNoOfProductExpReportFiledByFacility

          public void addNoOfProductExpReportFiledByFacility(NM objnoOfProductExpReportFiledByFacility)

      Add the No Of Product Exp Report Filed By Facility. This field contains the number of product experience reports filed by facility.
      Parameters:
        `objnoOfProductExpReportFiledByFacility` - Object of No Of Product Exp Report Filed By Facility.

    - #### setNoOfProductExpReportFiledByFacility

          public void setNoOfProductExpReportFiledByFacility(ISingleCollection<NM> objnoOfProductExpReportFiledByFacilityList)

      Set the No Of Product Exp Report Filed By Facility. This field contains the number of product experience reports filed by facility.
      Parameters:
        `objnoOfProductExpReportFiledByFacilityList` - List of No Of Product Exp Report Filed By Facility.

    - #### setQuantityDistributed

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

      Set the Quantity Distributed. This field is used to send the number of units of the product which is distribute during the reporting interval.
      Parameters:
        `strQuantity` - Specifies the numeric quantity or amount of an entity.
        `objUnits` - Specifies the units in which the quantity is expressed.

    - #### setQuantityDistributed

          public void setQuantityDistributed(CQ objquantityDistributed)

      Set the Quantity Distributed. This field is used to send the number of units of the product which is distribute during the reporting interval.
      Parameters:
        `objquantityDistributed` - Object of Quantity Distributed.

    - #### setQuantityDistributedComment

          public void setQuantityDistributedComment(java.lang.String strQuantityDistributedComment)

      Set the Quantity Distributed Comment. This field is use for any explanatory text needed but in particular should provide a description of the estimation method used.
      Parameters:
        `strQuantityDistributedComment` - This field contains the String Value of Quantity Distributed Comment

    - #### setQuantityDistributedComment

          public void setQuantityDistributedComment(FT objquantityDistributedComment)

      Set the Quantity Distributed Comment. This field is use for any explanatory text needed but in particular should provide a description of the estimation method used.
      Parameters:
        `objquantityDistributedComment` - Object of Quantity Distributed Comment.

    - #### setQuantityDistributedMethod

          public void setQuantityDistributedMethod(java.lang.String strQuantityDistributedMethod)

      Set the Quantity Distributed Method.
      Parameters:
        `strQuantityDistributedMethod` - This field contains the String Value of Quantity Distributed Method

    - #### setQuantityDistributedMethod

          public void setQuantityDistributedMethod(ID objquantityDistributedMethod)

      Set the Quantity Distributed Method.
      Parameters:
        `objquantityDistributedMethod` - Object of Quantity Distributed Method.

    - #### setQuantityinUse

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

      Set the Quantity in Use. This field is used to send the number of units of the product which were in use during the reporting interval.
      Parameters:
        `strQuantity` - Specifies the numeric quantity or amount of an entity.
        `objUnits` - Specifies the units in which the quantity is expressed.

    - #### setQuantityinUse

          public void setQuantityinUse(CQ objquantityinUse)

      Set the Quantity in Use. This field is used to send the number of units of the product which were in use during the reporting interval.
      Parameters:
        `strQuantity` - Specifies the numeric quantity or amount of an entity.
        `objUnits` - Specifies the units in which the quantity is expressed.

    - #### setQuantityinUseComment

          public void setQuantityinUseComment(java.lang.String strQuantityinUseComment)

      Set the Quantity in Use Comment.
      Parameters:
        `strQuantityinUseComment` - Object of Quantity in Use Comment.

    - #### setQuantityinUseComment

          public void setQuantityinUseComment(FT objquantityinUseComment)

      Set the Quantity in Use Comment.
      Parameters:
        `objquantityinUseComment` - Object of Quantity in Use Comment.

    - #### setQuantityinUseMethod

          public void setQuantityinUseMethod(java.lang.String strQuantityinUseMethod)

      Set the Quantity in Use Method. This field contains the method use for measuring the quantity in use.
      Parameters:
        `strQuantityinUseMethod` - This field contains the String Value of Quantityin Use Method

    - #### setQuantityinUseMethod

          public void setQuantityinUseMethod(ID objquantityinUseMethod)

      Set the Quantity in Use Method. This field contains the method use for measuring the quantity in use.
      Parameters:
        `objquantityinUseMethod` - Object of Quantity in Use Method.

    - #### setQuantityManufactured

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

      Set the Quantity Manufactured.
      Parameters:
        `strQuantity` - Specifies the numeric quantity or amount of an entity.
        `objUnits` - Specifies the units in which the quantity is expressed.

    - #### setQuantityManufactured

          public void setQuantityManufactured(CQ objquantityManufactured)

      Set the Quantity Manufactured.
      Parameters:
        `objquantityManufactured` - OBject of Quantity Manufactured.

    - #### setReportDate

          public void setReportDate(java.lang.String strTime)

      Set the Report Date. This field contains the date as assigned by the sender.
      Parameters:
        `strTime` - Specifies a point in time using a 24-hour clock notation.

    - #### setReportDate

          public void setReportDate(DTM objreportDate)

      Set the Report Date. This field contains the date as assigned by the sender.
      Parameters:
        `objreportDate` - Object of Report Date.

    - #### setReportFormIdentifier

          public void setReportFormIdentifier(java.lang.String strReportFormIdentifier)

      Set the Report Form Identifier. This field contains the form descriptor which describes the report.
      Parameters:
        `strReportFormIdentifier` - This field contains the String Value of Report Form Identifier

    - #### setReportFormIdentifier

          public void setReportFormIdentifier(ST objreportFormIdentifier)

      Set the Report Form Identifier. This field contains the form descriptor which describes the report.
      Parameters:
        `objreportFormIdentifier` - Object of Report Form Identifier.

    - #### setReportIntervalEndDate

          public void setReportIntervalEndDate(java.lang.String strTime)

      Set the Report Interval End Date. This field contains the date which marks the inclusive end of the time interval covered by the current report.
      Parameters:
        `strTime` - Specifies a point in time using a 24-hour clock notation.

    - #### setReportIntervalEndDate

          public void setReportIntervalEndDate(DTM objreportIntervalEndDate)

      Set the Report Interval End Date. This field contains the date which marks the inclusive end of the time interval covered by the current report.
      Parameters:
        `objreportIntervalEndDate` - Object of Report Interval End Date.

    - #### setReportIntervalStartDate

          public void setReportIntervalStartDate(java.lang.String strTime)

      Set the Report Interval Start Date. This field contains the date that marks the beginning of the time interval covere by the current report.
      Parameters:
        `strTime` - Specifies a point in time using a 24-hour clock notation.

    - #### setReportIntervalStartDate

          public void setReportIntervalStartDate(DTM objreportIntervalStartDate)

      Set the Report Interval Start Date. This field contains the date that marks the beginning of the time interval covere by the current report.
      Parameters:
        `objreportIntervalStartDate` - Object of Report Interval Start Date.

    - #### setReportType

          public void setReportType(java.lang.String strReportType)

      Set the Report Type. This field contains the name, title, or other description of the report.
      Parameters:
        `strReportType` - This field contains the String Value of Report Type

    - #### setReportType

          public void setReportType(ST objreportType)

      Set the Report Type. This field contains the name, title, or other description of the report.
      Parameters:
        `objreportType` - Object of Report Type.

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