package cdac.medinfo.sdk.hl7282.baselibs.segments;

import cdac.medinfo.sdk.hl7282.baselibs.CWE;
import cdac.medinfo.sdk.hl7282.baselibs.DTM;
import cdac.medinfo.sdk.hl7282.baselibs.MO;
import cdac.medinfo.sdk.hl7282.baselibs.NM;
import cdac.medinfo.sdk.hl7282.baselibs.SI;
import cdac.medinfo.sdk.hl7282.baselibs.ST;
import cdac.medinfo.sdk.hl7282.commoninterface.IDataType;
import cdac.medinfo.sdk.hl7282.commoninterface.ISingleCollection;
import cdac.medinfo.sdk.hl7282.exceptions.FieldMissingException;
import cdac.medinfo.sdk.hl7282.exceptions.InvalidSegmentException;
import cdac.medinfo.sdk.hl7282.utils.EnumSegments;

/**
 * ILT - Material Lot Segment <p>
 * The Material Lot segment (ILT) contains material information specific to a lot within 
 * an inventory location associated with the item in the IVT segment.  
 * <p>Represents an HL7 ILT message segment. 
 * This segment has the following fields:</p><p>
 * ILT-1 : Set Id - ILT (SI) <b>Required</b><br>
 * ILT-2 : Inventory Lot Number (ST) <b>Required</b><br>
 * ILT-3 : Inventory Expiration Date(DTM) <b>Optional</b><br>
 * ILT-4 : Inventory Received Date (DTM) <b>Optional</b><br>
 * ILT-5 : Inventory Received Quantity(NM) <b>Optional</b><br>
 * ILT-6 : Inventory Received Quantity Unit(CWE) <b>Optional</b><br>
 * ILT-7 : Inventory Received Item Cost (MO) <b>Optional</b><br>
 * ILT-8 : Inventory On Hand Date (DTM) <b>Optional</b><br>
 * ILT-9 : Inventory On Hand Quantity (NM) <b>Optional</b><br>
 * ILT-10: Inventory On Hand Quantity Unit (CWE) <b>Optional</b><br>
 * 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.
 *
 * <p>User can also create Segment through {@link SegmentFactory}
 * 
 */
public class ILT extends Segment
{
	/**
	 *  Constructs the ILT segment. 
	 */
	public ILT()
	{super(EnumSegments.HL7_SEG_ILT);
	}
	
	//Integer values used in getter/setter is unique item id defined 
	//for each attribute.
	
	/**
	 * Retrieves the Set Id - ILT.
	 * This field contains the number that identifies this transaction. 
	 * @return SI - setID_ILT
	 */
	public SI getSetID_ILT() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(2086);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (SI)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Retrieves the Inventory Lot Number.
	 * The lot number is the number printed on the label attached to the item or container holding the substance.
	 * @return ST - inventoryLotNumber
	 */
	public ST getInventoryLotNumber() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1800);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (ST)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Retrieves the Inventory Expiration Date.
	 * This field contains the expiration date of the service item in inventory.
	 * @return DTM - inventoryExpirationDate
	 */
	public DTM getInventoryExpirationDate() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1801);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (DTM)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Retrieves the Inventory Received Date.
	 * This field contains the most recent date that the product in question was received into inventory.
	 * @return DTM - inventoryReceivedDate
	 */
	public DTM getInventoryReceivedDate() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1804);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (DTM)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Retrieves the Inventory Received Quantity.
	 * This field contains the quantity of this inventory item that was received on the date specific in ILT-4 Inventory Received Date field.
	 * @return NM - inventoryReceivedQuantity
	 */
	public NM getInventoryReceivedQuantity() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1805);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (NM)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Retrieves the Inventory Received Quantity Unit.
	 * This field specifies the unit for the Inventory Received Quantity. 
	 * @return CWE - inventoryReceivedQuantityUnit
	 */
	public CWE getInventoryReceivedQuantityUnit() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1806);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Retrieves the Inventory Received Item Cost.
	 * This field contains the per-unit cost of the inventory item at the time of receipt.  
	 * @return MO - inventoryReceivedItemCost
	 */
	public MO getInventoryReceivedItemCost() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1807);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (MO)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Retrieves the Inventory On Hand Date.
	 * This field specifies the most recent date that an inventory count was performed for the inventory item. 
	 * @return DTM - inventoryOnHandDate
	 */
	public DTM getInventoryOnHandDate() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1808);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (DTM)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Retrieves the Inventory On Hand Quantity.
	 * This field contains the quantity of this inventory item that was available for issue/use as of the date specified in ILT-8 Inventory on Hand Date field.  
	 * @return NM - inventoryOnHandQuantity
	 */
	public NM getInventoryOnHandQuantity() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1809);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (NM)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Retrieves the Inventory On Hand Quantity Unit.
	 * This field contains the quantity of this inventory item that was available for issue/use as of the date specified in ILT-8 Inventory on Hand Date field.    
	 * @return CWE - inventoryOnHandQuantityUnit
	 */
	public CWE getInventoryOnHandQuantityUnit() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1810);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Set the Set Id – ILT.
	 * This field contains the number that identifies this transaction. 
	 * @param strSetId_ILT Specifies Set Id - ILT
	 */ 
	public void setSetId_ILT (String strSetId_ILT) 
	{
		SI objSI  = (SI)getDataElement(2086);
		objSI.setValue(strSetId_ILT); 
		setSetId_ILT(objSI);

	} 

	/** 
	 * Set the Set Id – ILT.
	 * This field contains the number that identifies this transaction. 
	 * @param objSetId_ILT Specifies Set Id - ILT
	 */ 
	public void setSetId_ILT(SI objSetId_ILT)
	{
		setDataType(2086,objSetId_ILT);

	}
	
	/**
	 * Set the Inventory Lot Number.
	 * The lot number is the number printed on the label attached to the item or container holding the substance.
	 * @param strInventoryLotNumber Used as Inventory Lot Number.
	 */ 
	public void setInventoryLotNumber(String strInventoryLotNumber) 
	{
		ST objST  = (ST)getDataElement(1800);
		objST.setValue(strInventoryLotNumber); 
		setInventoryLotNumber(objST);

	} 

	/** 
	 * Set the Inventory Lot Number.
	 * The lot number is the number printed on the label attached to the item or container holding the substance.
	 * @param objInventoryLotNumber Object of Inventory Lot Number.
	 */ 
	public void setInventoryLotNumber(ST objInventoryLotNumber)
	{
		setDataType(1800,objInventoryLotNumber);

	}
	
	/**
	 * Set the Inventory Expiration Date.
	 * This field contains the expiration date of the service item in inventory.
	 * @param strInventoryExpirationDate Use as Inventory Expiration Date.
	 */
	public void setInventoryExpirationDate(String strInventoryExpirationDate) 
	{
		DTM objDTM  = (DTM)getDataElement(1801);
		objDTM.setValue(strInventoryExpirationDate);
		setInventoryExpirationDate(objDTM);
	}

	/**
	 * Set the Inventory Expiration Date.
	 * This field contains the expiration date of the service item in inventory.
	 * @param objInventoryExpirationDate Object of Inventory Expiration Date.
	 */
	public void setInventoryExpirationDate(DTM objInventoryExpirationDate)
	{
		setDataType(1801,objInventoryExpirationDate);
	}
	
	/**
	 * Set the Inventory Received Date.
	 * This field contains the most recent date that the product in question was received into inventory.
	 * @param strInventoryReceivedDate Use as Inventory Received Date.
	 */
	public void setInventoryReceivedDate(String strInventoryReceivedDate) 
	{
		DTM objDTM  = (DTM)getDataElement(1804);
		objDTM.setValue(strInventoryReceivedDate);
		setInventoryReceivedDate(objDTM);
	}

	/**
	 * Set the Inventory Received Date.
	 * This field contains the most recent date that the product in question was received into inventory.
	 * @param objInventoryReceivedDate Object of Inventory Received Date.
	 */
	public void setInventoryReceivedDate(DTM objInventoryReceivedDate)
	{
		setDataType(1804,objInventoryReceivedDate);
	}
	
	/**
	 * Set the Inventory Received Quantity.
	 * This field contains the quantity of this inventory item that was received on the date specific in ILT-4 Inventory Received Date field.
	 * @param strInventoryReceivedQuantity Use as Inventory Received Quantity.
	 */ 
	public void setInventoryReceivedQuantity(String strInventoryReceivedQuantity) 
	{
		NM objNM  = (NM)getDataElement(1805);
		objNM.setValue(strInventoryReceivedQuantity); 
		setInventoryReceivedQuantity(objNM);

	} 

	/** 
	 * Set the Inventory Received Quantity.
	 * This field contains the quantity of this inventory item that was received on the date specific in ILT-4 Inventory Received Date field.
	 * @param objInventoryReceivedQuantity Use as Inventory Received Quantity.
	 */ 
	public void setInventoryReceivedQuantity(NM objInventoryReceivedQuantity)
	{
		setDataType(1805,objInventoryReceivedQuantity);

	}
	
	/**
	 * Set the Inventory Received Quantity Unit.
	 * This field specifies the unit for the Inventory Received Quantity.
	 * @param strIdentifier Specifies of characters (the code) that uniquely identifies the item being referenced. 
	 * @param strText Specifies The descriptive or textual name of the identifier, e.g., myocardial infarction. 
	 * @param strNameOfCodingSystem Identifies the coding scheme being used in the identifier component.
	 * @param strAlternateIdentifier Specifies an alternate sequence of characters (the code) that uniquely identifies the item being referenced.
	 * @param strAlternateText Specifies the descriptive or textual name of the alternate identifier. See usage note in section introduction.
	 * @param strNameOfAlternateCodingSystem Identifies the coding scheme being used in the alternate identifier component. 
	 * @param strCodingSystemVersionID A sequence of characters that uniquely identifies a second alternate code.
	 * @param strAlternateCodingSystemVersionId This component carries the version for the coding system identified by components 4-6.
	 * @param strOriginalText The text as seen and/or selected by the user who entered the data.
	 * @param strSecondAlternateIdentifier A sequence of characters that uniquely identifies a second alternate code.
	 * @param strSecondAlternateText The descriptive or textual name of the alternate identifier.
	 * @param strNameofSecondAlternateCodingSystem Identifies the coding scheme being used in the alternate identifier component.
	 * @param strSecondAlternateCodingSystemVersionID This component carries the version for the coding system identified by components 10-12.
	 * @param strCodingSystemOID This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.3.
	 * @param 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.
	 * @param 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.
	 * @param strAlternateCodingSystemOID This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.6.
	 * @param 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.
	 * @param strAlternateValueSetVersionID This component carries the version for the value set identified by CWE.18. The version is a date.
	 * @param strSecondAlternateCodingSystemOID This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.12.
	 * @param 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.
	 * @param strSecondAlternateValueSetVersionID This component carries the version for the value set identified by CWE.21. The version is a date.
	 */ 
	public void setInventoryReceivedQuantityUnit(String strIdentifier,String strText,String strNameOfCodingSystem,
			String strAlternateIdentifier,String strAlternateText,String strNameOfAlternateCodingSystem, String strCodingSystemVersionID, String strAlternateCodingSystemVersionId,
			String strOriginalText, String  strSecondAlternateIdentifier, String strSecondAlternateText, 
			String strNameofSecondAlternateCodingSystem, String strSecondAlternateCodingSystemVersionID, String strCodingSystemOID, String strValueSetOID,
			String strValueSetVersionID, String strAlternateCodingSystemOID, String strAlternateValueSetOID, String strAlternateValueSetVersionID,
			String  strSecondAlternateCodingSystemOID, String strSecondAlternateValueSetOID, String strSecondAlternateValueSetVersionID)
	{
		CWE cwe  = (CWE)getDataElement(1806);
		cwe.setIdentifier(strIdentifier);
		cwe.setText(strText);
		cwe.setNameOfCodingSystem(strNameOfCodingSystem);
		cwe.setAlternateIdentifier(strAlternateIdentifier);
		cwe.setAlternateText(strAlternateText);
		cwe.setNameOfAlternateCodingSystem(strNameOfAlternateCodingSystem); 
		cwe.setCodingSystemVersionID(strCodingSystemVersionID);
		cwe.setAlternateCodingSystemVersionId(strAlternateCodingSystemVersionId);
		cwe.setOriginalText(strOriginalText);
		cwe.setSecondAlternateIdentifier(strSecondAlternateIdentifier);
		cwe.setSecondAlternateText(strSecondAlternateText);
		cwe.setNameofSecondAlternateCodingSystem(strNameofSecondAlternateCodingSystem);
		cwe.setSecondAlternateCodingSystemVersionID(strSecondAlternateCodingSystemVersionID);
		cwe.setCodingSystemOID(strCodingSystemOID);
		cwe.setValueSetOID(strValueSetOID);
		cwe.setValueSetVersionID(strValueSetVersionID);
		cwe.setAlternateCodingSystemOID(strAlternateCodingSystemOID);
		cwe.setAlternateValueSetOID(strAlternateValueSetOID);
		cwe.setAlternateValueSetVersionID(strAlternateValueSetVersionID);
		cwe.setSecondAlternateCodingSystemOID(strSecondAlternateCodingSystemOID);
		cwe.setSecondAlternateValueSetOID(strSecondAlternateValueSetOID);
		cwe.setSecondAlternateValueSetVersionID(strSecondAlternateValueSetVersionID); 
		setInventoryReceivedQuantityUnit(cwe);

	} 
	
	/** 
	 * Set the Inventory Received Quantity Unit.
	 * This field specifies the unit for the Inventory Received Quantity.  
	 * @param objInventoryReceivedQuantityUnit Object of Inventory Received Quantity Unit.
	 */ 
	public void setInventoryReceivedQuantityUnit(CWE objInventoryReceivedQuantityUnit)
	{
		setDataType(1806,objInventoryReceivedQuantityUnit);

	}
	
	/**
	 * Set the Inventory Received Item Cost.
	 * This field contains the per-unit cost of the inventory item at the time of receipt.
	 * @param strQuantity Specifies the Quantity.
	 * @param strDenomination Specifies the denomination in which the quantity is expressed. 
	 */ 
	public void setInventoryReceivedItemCost(String strQuantity,String strDenomination)
	{
		MO objMO  = (MO)getDataElement(1807);
		objMO.setQuantity(strQuantity);
		objMO.setDenomination(strDenomination); 
		setInventoryReceivedItemCost(objMO);
	} 

	/** 
	 * Set the Inventory Received Item Cost.
	 * This field contains the per-unit cost of the inventory item at the time of receipt.
	 * @param objInventoryReceivedItemCost Object of Inventory Received Item Cost.
	 */ 
	public void setInventoryReceivedItemCost(MO objInventoryReceivedItemCost)
	{
		setDataType(1807,objInventoryReceivedItemCost);
	}
	
	/**
	 * Set the Inventory On Hand Date.
	 * This field specifies the most recent date that an inventory count was performed for the inventory item. 
	 * @param strInventoryReceivedDate Use as Inventory On Hand Date.
	 */
	public void setInventoryOnHandDate(String strInventoryOnHandDate) 
	{
		DTM objDTM  = (DTM)getDataElement(1808);
		objDTM.setValue(strInventoryOnHandDate);
		setInventoryOnHandDate(objDTM);
	}

	/**
	 * Set the Inventory On Hand Date.
	 * This field specifies the most recent date that an inventory count was performed for the inventory item. 
	 * @param objInventoryOnHandDate Object of Inventory On Hand Date.
	 */
	public void setInventoryOnHandDate(DTM objInventoryOnHandDate)
	{
		setDataType(1808,objInventoryOnHandDate);
	}
	
	/**
	 * Set the Inventory On Hand Quantity.
	 * This field contains the quantity of this inventory item that was available for issue/use as of the date specified in ILT-8 Inventory on Hand Date field.
	 * @param strInventoryOnHandQuantity Use as Inventory On Hand Quantity.
	 */ 
	public void setInventoryOnHandQuantity(String strInventoryOnHandQuantity) 
	{
		NM objNM  = (NM)getDataElement(1809);
		objNM.setValue(strInventoryOnHandQuantity); 
		setInventoryOnHandQuantity(objNM);

	} 

	/** 
	 * Set the Inventory On Hand Quantity.
	 * This field contains the quantity of this inventory item that was available for issue/use as of the date specified in ILT-8 Inventory on Hand Date field.
	 * @param objInventoryOnHandQuantity Use as Inventory On Hand Quantity.
	 */ 
	public void setInventoryOnHandQuantity(NM objInventoryOnHandQuantity)
	{
		setDataType(1809,objInventoryOnHandQuantity);

	}
	
	/**
	 * Set the Inventory On Hand Quantity Unit.
	 * This field contains the quantity of this inventory item that was available for issue/use as of the date specified in ILT-8 Inventory on Hand Date field.
	 * @param strIdentifier Specifies of characters (the code) that uniquely identifies the item being referenced. 
	 * @param strText Specifies The descriptive or textual name of the identifier, e.g., myocardial infarction. 
	 * @param strNameOfCodingSystem Identifies the coding scheme being used in the identifier component.
	 * @param strAlternateIdentifier Specifies an alternate sequence of characters (the code) that uniquely identifies the item being referenced.
	 * @param strAlternateText Specifies the descriptive or textual name of the alternate identifier. See usage note in section introduction.
	 * @param strNameOfAlternateCodingSystem Identifies the coding scheme being used in the alternate identifier component. 
	 * @param strCodingSystemVersionID A sequence of characters that uniquely identifies a second alternate code.
	 * @param strAlternateCodingSystemVersionId This component carries the version for the coding system identified by components 4-6.
	 * @param strOriginalText The text as seen and/or selected by the user who entered the data.
	 * @param strSecondAlternateIdentifier A sequence of characters that uniquely identifies a second alternate code.
	 * @param strSecondAlternateText The descriptive or textual name of the alternate identifier.
	 * @param strNameofSecondAlternateCodingSystem Identifies the coding scheme being used in the alternate identifier component.
	 * @param strSecondAlternateCodingSystemVersionID This component carries the version for the coding system identified by components 10-12.
	 * @param strCodingSystemOID This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.3.
	 * @param 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.
	 * @param 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.
	 * @param strAlternateCodingSystemOID This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.6.
	 * @param 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.
	 * @param strAlternateValueSetVersionID This component carries the version for the value set identified by CWE.18. The version is a date.
	 * @param strSecondAlternateCodingSystemOID This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.12.
	 * @param 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.
	 * @param strSecondAlternateValueSetVersionID This component carries the version for the value set identified by CWE.21. The version is a date.
	 */ 
	public void setInventoryOnHandQuantityUnit(String strIdentifier,String strText,String strNameOfCodingSystem,
			String strAlternateIdentifier,String strAlternateText,String strNameOfAlternateCodingSystem, String strCodingSystemVersionID, String strAlternateCodingSystemVersionId,
			String strOriginalText, String  strSecondAlternateIdentifier, String strSecondAlternateText, 
			String strNameofSecondAlternateCodingSystem, String strSecondAlternateCodingSystemVersionID, String strCodingSystemOID, String strValueSetOID,
			String strValueSetVersionID, String strAlternateCodingSystemOID, String strAlternateValueSetOID, String strAlternateValueSetVersionID,
			String  strSecondAlternateCodingSystemOID, String strSecondAlternateValueSetOID, String strSecondAlternateValueSetVersionID)
	{
		CWE cwe  = (CWE)getDataElement(1810);
		cwe.setIdentifier(strIdentifier);
		cwe.setText(strText);
		cwe.setNameOfCodingSystem(strNameOfCodingSystem);
		cwe.setAlternateIdentifier(strAlternateIdentifier);
		cwe.setAlternateText(strAlternateText);
		cwe.setNameOfAlternateCodingSystem(strNameOfAlternateCodingSystem); 
		cwe.setCodingSystemVersionID(strCodingSystemVersionID);
		cwe.setAlternateCodingSystemVersionId(strAlternateCodingSystemVersionId);
		cwe.setOriginalText(strOriginalText);
		cwe.setSecondAlternateIdentifier(strSecondAlternateIdentifier);
		cwe.setSecondAlternateText(strSecondAlternateText);
		cwe.setNameofSecondAlternateCodingSystem(strNameofSecondAlternateCodingSystem);
		cwe.setSecondAlternateCodingSystemVersionID(strSecondAlternateCodingSystemVersionID);
		cwe.setCodingSystemOID(strCodingSystemOID);
		cwe.setValueSetOID(strValueSetOID);
		cwe.setValueSetVersionID(strValueSetVersionID);
		cwe.setAlternateCodingSystemOID(strAlternateCodingSystemOID);
		cwe.setAlternateValueSetOID(strAlternateValueSetOID);
		cwe.setAlternateValueSetVersionID(strAlternateValueSetVersionID);
		cwe.setSecondAlternateCodingSystemOID(strSecondAlternateCodingSystemOID);
		cwe.setSecondAlternateValueSetOID(strSecondAlternateValueSetOID);
		cwe.setSecondAlternateValueSetVersionID(strSecondAlternateValueSetVersionID); 
		setInventoryOnHandQuantityUnit(cwe);

	} 
	
	/** 
	 * Set the Inventory On Hand Quantity Unit.
	 * This field contains the quantity of this inventory item that was available for issue/use as of the date specified in ILT-8 Inventory on Hand Date field.
	 * @param objInventoryOnHandQuantityUnit Object of Inventory On Hand Quantity Unit.
	 */ 
	public void setInventoryOnHandQuantityUnit(CWE objInventoryOnHandQuantityUnit)
	{
		setDataType(1810,objInventoryOnHandQuantityUnit);

	}
	
	/**
	 * 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.
	 * @return boolean - true or false.
	 * @throws InvalidSegmentException If Segment Validation fails 
	 */
	@Override
	public boolean validate() throws InvalidSegmentException 
	{
		try
		{
			/*
			 * Item Identifier is required fields of this segment.
			 */
			super.validate();

			return true;
		}
		catch(FieldMissingException ex)
		{
			throw new InvalidSegmentException(enumSegments.getValue(),ex);
		}
	}
}
