/*******************************************************************************
 *  Copyright 2017 Centre for Development of Advanced Computing(C-DAC), Pune
 *  
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *  
 *    http://www.apache.org/licenses/LICENSE-2.0
 *  
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *******************************************************************************/
package cdac.medinfo.sdk.hl7282.hl7net.localextension;

import cdac.medinfo.sdk.hl7282.baselibs.CNE;
import cdac.medinfo.sdk.hl7282.baselibs.CP;
import cdac.medinfo.sdk.hl7282.baselibs.CWE;
import cdac.medinfo.sdk.hl7282.baselibs.CX;
import cdac.medinfo.sdk.hl7282.baselibs.DTM;
import cdac.medinfo.sdk.hl7282.baselibs.EI;
import cdac.medinfo.sdk.hl7282.baselibs.FC;
import cdac.medinfo.sdk.hl7282.baselibs.FN;
import cdac.medinfo.sdk.hl7282.baselibs.HD;
import cdac.medinfo.sdk.hl7282.baselibs.JCC;
import cdac.medinfo.sdk.hl7282.baselibs.MO;
import cdac.medinfo.sdk.hl7282.baselibs.MOP;
import cdac.medinfo.sdk.hl7282.baselibs.MSG;
import cdac.medinfo.sdk.hl7282.baselibs.NM;
import cdac.medinfo.sdk.hl7282.baselibs.NR;
import cdac.medinfo.sdk.hl7282.baselibs.PL;
import cdac.medinfo.sdk.hl7282.baselibs.SAD;
import cdac.medinfo.sdk.hl7282.baselibs.ST;
import cdac.medinfo.sdk.hl7282.baselibs.XAD;
import cdac.medinfo.sdk.hl7282.baselibs.XCN;
import cdac.medinfo.sdk.hl7282.baselibs.XON;
import cdac.medinfo.sdk.hl7282.baselibs.XPN;
import cdac.medinfo.sdk.hl7282.baselibs.XTN;
import cdac.medinfo.sdk.hl7282.baselibs.datatypefactory.DataTypeMapReader;
import cdac.medinfo.sdk.hl7282.baselibs.segments.*;
import cdac.medinfo.sdk.hl7282.commoninterface.IDataType;
import cdac.medinfo.sdk.hl7282.commoninterface.ISingleCollection;
import cdac.medinfo.sdk.hl7282.hl7net.testnetwork.localmessages.ZL7;
import cdac.medinfo.sdk.hl7282.utils.EnumDataType;
import cdac.medinfo.sdk.hl7282.utils.HL7Constants;
import cdac.medinfo.sdk.hl7282.utils.IDataTypeMap;
import cdac.medinfo.sdk.hl7282.utils.IDataTypeMapReader;
import cdac.medinfo.sdk.hl7282.utils.SingleCollection;

/**
 *
 */
public class Populate_Test 
{
	//	data elements common to XCN
	static IDataTypeMapReader dataTypeMapReader = DataTypeMapReader.createInstance();
	static IDataTypeMap dtmap = dataTypeMapReader.getDataTypeMap(EnumDataType.HL7_DT_HD.getValue());
	static HD objAssigningAuthority = new HD(HL7Constants.HL7_SUBCOMPONENT,dtmap);

	
	static IDataTypeMap dtmap1 = dataTypeMapReader.getDataTypeMap(EnumDataType.HL7_DT_CWE.getValue());
	static CWE objAssigningJurisdiction = new CWE(HL7Constants.HL7_SUBCOMPONENT,dtmap1);
	
	static IDataTypeMap dtmap2 = dataTypeMapReader.getDataTypeMap(EnumDataType.HL7_DT_FN.getValue());
	static FN objFamilyName = new FN(HL7Constants.HL7_SUBCOMPONENT,dtmap2);
	
	static DTM objEffectiveDate = new DTM(4, 24, "8#");
	static DTM objExpirationDate = new DTM(4, 24, "8#");
	
	static IDataTypeMap dtmap3 = dataTypeMapReader.getDataTypeMap(EnumDataType.HL7_DT_SAD.getValue());
	static SAD objStreetAddress = new SAD(HL7Constants.HL7_SUBCOMPONENT,dtmap3);

	static
	{
		
		objAssigningAuthority.setNamespaceId("REGAD1");
		objAssigningAuthority.setUniversalId("2.16.840.1.113883.19");
		objAssigningAuthority.setUniversalIdType("DNS");
				
		objAssigningJurisdiction = PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
	
		objFamilyName.setSurname("Kulkarni");
		objFamilyName.setOwnSurnamePrefix("OSP");
		objFamilyName.setOwnSurname("OS");
		objFamilyName.setSurnamePrefixFromPartnerSpouse("SPFPS");
		objFamilyName.setSurnameFromPartnerSpouse("SPD");
		
		objEffectiveDate.setValue("20050302");	
		objExpirationDate.setValue("20050302");
		
		objStreetAddress.setStreetOrMailingAddress("SAOMA");
		objStreetAddress.setStreetName("SN");
		objStreetAddress.setStreetOrMailingAddress("DN");
		
	}
	
	public MSH populateMSH()
	{
//		MSH objMSH = new MSH();
//		objMSH.setFieldSeparator('|');//ST
//		objMSH.setEncodingChars('^','&','~','\\','#');//ST
//		objMSH.setDateTimeOfMessage("20170628");//DTM
//		objMSH.setSecurity("Security");//ST
//		objMSH.setMessageType("ADT","A01","ADT_A01");
//		objMSH.setMessageControlID("MSG0001");//ST
//		objMSH.setProcessingID("T", "T");//PT
//		objMSH.setVersionID("2.8.2",null, null);//VID
		
		MSH objMSH = new MSH();
		objMSH.setFieldSeparator('|');//ST
		objMSH.setEncodingChars('^','&','~','\\','#');//ST
		
		objMSH.setSendingApplication("NID", "Universal Id", "x400");//HD
		objMSH.setSendingFacility("NID", "Universal Id", "x400");//HD
		objMSH.setReceivingApplication("NID", "Universal Id", "x400");//HD
		objMSH.setReceivingFacility("NID", "Universal Id", "x400");//HD
		objMSH.setDateTimeOfMessage("20000320");//TS
		objMSH.setSecurity("Security");//ST
		objMSH.setMessageControlID("MSG0001");//ST
		objMSH.setProcessingID("T", "T");//PT
		objMSH.setVersionID("2.5", null, null);//VID
		objMSH.setSequenceNumber("123");//NM
		objMSH.setContinuationPointer("ContinuationPointer");//ST
		objMSH.setAcceptAcknowledgmentType("AL");//ID
		objMSH.setApplicationAcknowledgmentType("AL");//ID
		objMSH.setCountryCode("CCD");//ID
		objMSH.addCharacterSet("ASCII");//ID
		objMSH.setPrincipalLanguageOfMessage(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CE
		objMSH.setAlternateCharacterSetHandlingScheme("ISO 2022-1994");//ID
		objMSH.addMessageProfileIdentifier("Entity Identifier", "NAMESPACE", "UniversalId", "x500");//EI
		
		
		return objMSH;
	}


	/**
	 * populates SFT Segment
	 * @return SFT
	 */
	public  SFT populateSFT()
	{
		//SFT segment
		SFT objSFT = new SFT();		
		objSFT.setSoftwareVendorOrganization(PopulateDataType.populateXON(HL7Constants.HL7_COMPONENT));
		objSFT.setSoftwareCertifiedVersionOrReleaseNO("AFR-093232");
		objSFT.setSoftwareProductName("ZIRCON");
		objSFT.setSoftwareBinaryId("100110111");
		objSFT.setSoftwareInstallDate("20030202");
		return objSFT;
	}

	/**
	 * populates SFT Segment
	 * @return SFT
	 */
	public  SFT populateSFT(SFT objTempSFT)
	{
		//SFT segment
		SFT objSFT = new SFT();
		objSFT.setSoftwareVendorOrganization(objTempSFT.getSoftwareVendorOrganization());//XON
		objSFT.setSoftwareCertifiedVersionOrReleaseNO(objTempSFT.getSoftwareCertifiedVersionOrReleaseNO());
		objSFT.setSoftwareProductName(objTempSFT.getSoftwareProductName());
		objSFT.setSoftwareBinaryId(objTempSFT.getSoftwareBinaryId());
		objSFT.setSoftwareInstallDate(objTempSFT.getSoftwareInstallDate());
		return objSFT;
	}
	
	/**
	 * Populate UAC Segment
	 * @return UAC
	 */
	public UAC populateUAC(){
		UAC objUAC=new UAC();
		objUAC.setUserAuthenticationCredential(PopulateDataType.populateED(HL7Constants.HL7_COMPONENT));
		objUAC.setUserAuthenticationCredentialTypeCode(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT ));
	
		return objUAC;
	}
	/**
	 * Populate UAC Segment
	 * @return UAC 
	 */
	public UAC populateUAC(UAC objTempUAC)
	{
		UAC objUAC=new UAC();
		
		objUAC.setUserAuthenticationCredential(objTempUAC.getUserAuthenticationCredential());
		objUAC.setUserAuthenticationCredentialTypeCode(objTempUAC.getUserAuthenticationCredentialTypeCode());
		
		return objUAC;
	}
	
	/**
	 * populates MSA Segment
	 * @return MSA
	 */
	public MSA populateMSA()
	{
		//MSA Segment
		MSA objMSA = new MSA();
		objMSA.setAcknowledgmentCode("AA");
		objMSA.setMessageControlID("MSG0001");
		objMSA.setExpectedSequenceNumber("1234567");
		objMSA.setMessageWaitingNumber("5");
		objMSA.setMessageWaitingPriority("H");
		return objMSA;
	}

	/**
	 * populates MSA Segment
	 * @return MSA
	 */
	public MSA populateMSA(MSA objTempMSA)
	{
		//MSA Segment
		MSA objMSA = new MSA();
		objMSA.setAcknowledgmentCode(objTempMSA.getAcknowledgmentCode());
		objMSA.setMessageControlID(objTempMSA.getMessageControlID());
		objMSA.setExpectedSequenceNumber(objTempMSA.getExpectedSequenceNumber());
		objMSA.setMessageWaitingNumber(objTempMSA.getMessageWaitingNumber());
		objMSA.setMessageWaitingPriority(objTempMSA.getMessageWaitingPriority());
		return objMSA;
	}

	/**
	 * populates PV1 Segment
	 * @return PV1
	 */
	public  PV1 populatePV1()
	{
		CWE objCWE = PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
	
		//PV1 segment
		PV1 objPV1 = new PV1();
		objPV1.setSetID("3");
		objPV1.setPatientClass(objCWE);
		objPV1.setAdmissionType(objCWE);
		objPV1.setHospitalService(objCWE);
		
		return objPV1;
	}

	/**
	 * populates PV1 Segment
	 * @return PV1
	 */
	public  PV1 populatePV1(PV1 objTempPV1)
	{
		//PV1 segment
		PV1 objPV1 = new PV1();
		objPV1.setSetID(objTempPV1.getSetID());
		objPV1.setPatientClass(objTempPV1.getPatientClass());
		objPV1.setAdmissionType(objTempPV1.getAdmissionType());
		objPV1.setHospitalService(objTempPV1.getHospitalService());
		
		return objPV1;
	}

	/**
	 * populates PV2 Segment
	 * @return PV2
	 */
	public  PV2 populatePV2()
	{
		CWE objCWE = PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
						
		//PV2 segment
		PV2 objPV2 = new PV2();
		objPV2.setExpectedAdmitDateOrTime("20030303");//DTM
		objPV2.setExpectedDischargeDateOrTime("20170629");//DTM
		objPV2.setEstimatedLengthOfInPatientStay("123");
		objPV2.setActualLengthOfInPatientStay("456");
		objPV2.setPreviousServiceDate("20050202");
		objPV2.setEmploymentIllnessRelatedIndicator("Y");
		objPV2.setPurgeStatusDate("20110202");
		objPV2.setSpecialProgramCode("CH");
		objPV2.setRetentionIndicator("N");
		objPV2.setExpectedNumberOfInsurancePlans("8");
		objPV2.setVisitProtectionIndicator("Y");
		objPV2.setPreviousTreatmentDate("20030202");
		objPV2.setSignatureOnFileDate("20080505");
		objPV2.setFirstSimilarIllnessDate("20030202");
		objPV2.setBillingmediaCode("N");
		objPV2.setExpectedSurgeryDateAndTime("20030303");//DTM
		objPV2.setMilitaryPartnershipCode("Y");
		objPV2.setMilitaryNonAvailabilityCode("Y");
		objPV2.setNewBornBabyIndictor("Y");
		objPV2.setBabyDetainedIndicator("Y");
		objPV2.setPatientStatusEffectiveDate("20040303");
		objPV2.setExpectedLOAReturnDAteOrTime("20030303");//DTM
		objPV2.setExpectedPreAdmissionTestingDateOrTime("20030303");//DTM
		objPV2.setAdvanceDirectiveLastVerifiedDate("20170629");
		return objPV2;
	}

	/**
	 * populates PV2 Segment
	 * @return PV2
	 */
	public  PV2 populatePV2(PV2 objTempPV2)
	{
		//PV2 segment
		PV2 objPV2 = new PV2();
		objPV2.setExpectedAdmitDateOrTime(objTempPV2.getExpectedAdmitDateOrTime());//DTM
		objPV2.setExpectedDischargeDateOrTime(objTempPV2.getExpectedDischargeDateOrTime());//DTM
		objPV2.setEstimatedLengthOfInPatientStay(objTempPV2.getEstimatedLengthOfInPatientStay());
		objPV2.setActualLengthOfInPatientStay(objTempPV2.getActualLengthOfInPatientStay());
		objPV2.setPreviousServiceDate(objTempPV2.getPreviousServiceDate());
		objPV2.setEmploymentIllnessRelatedIndicator(objTempPV2.getEmploymentIllnessRelatedIndicator());
		objPV2.setPurgeStatusDate(objTempPV2.getPurgeStatusDate());
		objPV2.setSpecialProgramCode(objTempPV2.getSpecialProgramCode());
		objPV2.setRetentionIndicator(objTempPV2.getRetentionIndicator());
		objPV2.setExpectedNumberOfInsurancePlans(objTempPV2.getExpectedNumberOfInsurancePlans());
		objPV2.setVisitPriorityCode(objTempPV2.getVisitPriorityCode());
		objPV2.setPreviousTreatmentDate(objTempPV2.getPreviousTreatmentDate());
		objPV2.setExpectedDischargeDisposition(objTempPV2.getExpectedDischargeDisposition());
		objPV2.setSignatureOnFileDate(objTempPV2.getSignatureOnFileDate());
		objPV2.setFirstSimilarIllnessDate(objTempPV2.getFirstSimilarIllnessDate());
		objPV2.setBillingmediaCode(objTempPV2.getBillingmediaCode());
		objPV2.setExpectedSurgeryDateAndTime(objTempPV2.getExpectedSurgeryDateAndTime());//DTM
		objPV2.setMilitaryPartnershipCode(objTempPV2.getMilitaryPartnershipCode());
		objPV2.setMilitaryNonAvailabilityCode(objTempPV2.getMilitaryNonAvailabilityCode());
		objPV2.setNewBornBabyIndictor(objTempPV2.getNewBornBabyIndictor());
		objPV2.setBabyDetainedIndicator(objTempPV2.getBabyDetainedIndicator());
			objPV2.setAdvanceDirectiveCode(objTempPV2.getAdvanceDirectiveCode());
		objPV2.setPatientStatusEffectiveDate(objTempPV2.getPatientStatusEffectiveDate());
		objPV2.setExpectedLOAReturnDAteOrTime(objTempPV2.getExpectedLOAReturnDAteOrTime());//DTM
		objPV2.setExpectedPreAdmissionTestingDateOrTime(objTempPV2.getExpectedPreAdmissionTestingDateOrTime());//DTM
		objPV2.setAdvanceDirectiveLastVerifiedDate(objTempPV2.getAdvanceDirectiveLastVerifiedDate());
		return objPV2;
	}

	/**
	 * populates DB1 Segment
	 * @return DB1
	 */
	public  DB1 populateDB1()
	{
		CWE objCWE = PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		
		//DB1 segment
		DB1 objDB1 = new DB1();
		objDB1.setSetID_DB1("6");
		objDB1.setDisabledPersonCode(objCWE);	
		objDB1.setDisabledIndicator("Y");
		objDB1.setDisabilityStartDate("20050202");
		objDB1.setDisabilityEndDate("20170202");
		objDB1.setDisabilityReturnToWorkDate("20050202");
		objDB1.setDisabilityUnableToWorkDate("20050202");
		return objDB1;
	}

	/**
	 * populates DB1 Segment
	 * @return DB1
	 */
	public  DB1 populateDB1(DB1 objTempDB1)
	{
		//DB1 segment
		DB1 objDB1 = new DB1();
		objDB1.setSetID_DB1(objTempDB1.getSetID_DB1());
		objDB1.setDisabledPersonCode(objTempDB1.getDisabledPersonCode());
		if(objTempDB1.getDisabledPersonIdentifier().size() != 0)
			objDB1.setDisabledPersonIdentifier(objTempDB1.getDisabledPersonIdentifier());//CX
		objDB1.setDisabledIndicator(objTempDB1.getDisabledIndicator());
		objDB1.setDisabilityStartDate(objTempDB1.getDisabilityStartDate());
		objDB1.setDisabilityEndDate(objTempDB1.getDisabilityEndDate());
		objDB1.setDisabilityReturnToWorkDate(objTempDB1.getDisabilityReturnToWorkDate());
		objDB1.setDisabilityUnableToWorkDate(objTempDB1.getDisabilityUnableToWorkDate());
		return objDB1;
	}

	/**
	 * populates OBX Segment
	 * @return OBX
	 */
	public  OBX populateOBX()
	{	
		
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		CNE objCNE=PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT);
		XAD objXAD=PopulateDataType.populateXAD(HL7Constants.HL7_COMPONENT);
		XCN objXCN=PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT);
		XON objXON=PopulateDataType.populateXON(HL7Constants.HL7_COMPONENT);

		//OBX segment
		OBX objOBX = new OBX();
		objOBX.setSetID_OBX("1234");
		objOBX.setValueType("CWE");
		objOBX.setObservationIdentifier(objCWE);
		objOBX.setObservationSubID(PopulateDataType.populateOG(HL7Constants.HL7_COMPONENT));
		objOBX.addObservationValue(objCWE);
		objOBX.addAbnormalFlags(objCWE);
		objOBX.setObservationResultStatus("F");
		objOBX.setProducersID(objCWE);
		objOBX.addResponsibleObserver(objXCN);
		objOBX.addObservationMethod(objCWE);
		objOBX.addEquipmentInstanceIdentifier(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));
		objOBX.setMoodCode(objCNE);	
		objOBX.setPerformingOrganizationName(objXON);	
		objOBX.setPerformingOrganizationAddress(objXAD);
		objOBX.setPerformingOrganizationMedicalDirector(objXCN);
		return objOBX;
	}

	
	/**
	 * populates OBX Segment
	 * @return OBX
	 */
	public  OBX populateOBX(OBX objTempOBX)
	{	
		//OBX segment
		OBX objOBX = new OBX();
		objOBX.setSetID_OBX(objTempOBX.getSetID_OBX());
		objOBX.setValueType(objTempOBX.getValueType());
		objOBX.setObservationIdentifier(objTempOBX.getObservationIdentifier());
		objOBX.setObservationSubID(objTempOBX.getObservationSubID());
		if(objTempOBX.getObservationValue().size() != 0)
			objOBX.setObservationValue(objTempOBX.getObservationValue());
		if(objTempOBX.getAbnormalFlags().size() != 0)
			objOBX.setAbnormalFlags(objTempOBX.getAbnormalFlags());
		objOBX.setObservationResultStatus(objTempOBX.getObservationResultStatus());
		objOBX.setProducersID(objTempOBX.getProducersID());
		if(objTempOBX.getResponsibleObserver().size() != 0)
			objOBX.setResponsibleObserver(objTempOBX.getResponsibleObserver());//XCN
		if(objTempOBX.getObservationMethod().size() != 0)
			objOBX.setObservationMethod(objTempOBX.getObservationMethod());
		if(objTempOBX.getEquipmentInstanceIdentifier().size() != 0)
			objOBX.setEquipmentInstanceIdentifier(objTempOBX.getEquipmentInstanceIdentifier());
		objOBX.setMoodCode(objTempOBX.getMoodCode());
		objOBX.setPerformingOrganizationName(objTempOBX.getPerformingOrganizationName());
		objOBX.setPerformingOrganizationAddress(objTempOBX.getPerformingOrganizationAddress());	
		objOBX.setPerformingOrganizationMedicalDirector(objTempOBX.getPerformingOrganizationMedicalDirector());
		
		return objOBX;
	}

	/**
	 * populates AL1 Segment
	 * @return AL1
	 */
	public  AL1 populateAL1()
	{		
		
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		//AL1 segment
		AL1 objAL1 = new AL1();
		objAL1.setSetID_AL1("456");
		objAL1.setAllergenTypeCode(objCWE);
		objAL1.setAllergenCodeMnemonicDescription(objCWE);
		objAL1.setAllergySeverityCode(objCWE);
		return objAL1;
	}

	/**
	 * populates AL1 Segment
	 * @return AL1
	 */
	public  AL1 populateAL1(AL1 objTempAL1)
	{			
		//AL1 segment
		AL1 objAL1 = new AL1();
		objAL1.setSetID_AL1(objTempAL1.getSetID_AL1());
		objAL1.setAllergenTypeCode(objTempAL1.getAllergenTypeCode());
		objAL1.setAllergenCodeMnemonicDescription(objTempAL1.getAllergenCodeMnemonicDescription());
		objAL1.setAllergySeverityCode(objTempAL1.getAllergySeverityCode());

		return objAL1;
	}

	/**
	 * populates DG1 Segment
	 * @return DG1
	 */
	public  DG1 populateDG1()
	{
		
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		MO objPrice = new MO();
		objPrice.setQuantity("99");
		objPrice.setDenomination("USD");

		//DG1 segment
		DG1 objDG1 = new DG1();
		objDG1.setSetID_DG1("5");
		objDG1.setDiagnosisCode_DG1(objCWE);
		objDG1.setDiagnosisDateTime("20030303");//DTM
		objDG1.setDiagnosisType(objCWE);
		objDG1.setDiagnosisClassification(objCWE);//IS
		objDG1.setConfidentialIndicator("Y");
		objDG1.setAttestationDateTime("20030303");//DTM
		objDG1.setDiagnosisIdentifier(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));//EI
		objDG1.setDiagnosisActionCode("U");
		objDG1.setParentDiagnosis(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));
		objDG1.setDRGCCLValueCode(objCWE);
		return objDG1;
	}

	/**
	 * populates DG1 Segment
	 * @return DG1
	 */
	public  DG1 populateDG1(DG1 objTempDG1)
	{
		//DG1 segment
		DG1 objDG1 = new DG1();
		objDG1.setSetID_DG1(objTempDG1.getSetID_DG1());
		objDG1.setDiagnosisCode_DG1(objTempDG1.getDiagnosisCode_DG1());
		objDG1.setDiagnosisDateTime(objTempDG1.getDiagnosisDateTime());//DTM
		objDG1.setDiagnosisType(objTempDG1.getDiagnosisType());
		if(objTempDG1.getDiagnosingClinician().size()!=0)
			objDG1.setDiagnosingClinician(objTempDG1.getDiagnosingClinician());//XCN
		objDG1.setDiagnosisClassification(objTempDG1.getDiagnosisClassification());//IS
		objDG1.setConfidentialIndicator(objTempDG1.getConfidentialIndicator());
		objDG1.setAttestationDateTime(objTempDG1.getAttestationDateTime());//DTM
		objDG1.setDiagnosisIdentifier(objTempDG1.getDiagnosisIdentifier());//EI
		objDG1.setDiagnosisActionCode(objTempDG1.getDiagnosisActionCode());
		objDG1.setParentDiagnosis(objTempDG1.getParentDiagnosis());
		objDG1.setDRGCCLValueCode(objTempDG1.getDRGCCLValueCode());
	
		return objDG1;
	}

	/**
	 * populates DRG Segment
	 * @return DRG
	 */
	public  DRG populateDRG()
	{
		MO objPrice = new MO();
		objPrice.setQuantity("99");
		objPrice.setDenomination("USD");
		
		CNE objCNE=PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT);
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		CP objCP=PopulateDataType.populateCP(HL7Constants.HL7_COMPONENT);
		XPN objXPN=PopulateDataType.populateXPN(HL7Constants.HL7_COMPONENT);
		
		//DRG segment
		DRG objDRG = new DRG();
		objDRG.setDiagnosticRelatedGroup(objCNE);
		objDRG.setDRGGrouperReviewCode(objCWE);
		objDRG.setOutlierType(objCWE);
		objDRG.setOutlierCost(objCP);
		objDRG.setDRGPayor(objCWE);
		objDRG.setOutlierReimbursement(objCP);
		objDRG.setDRGTransferType(objCWE);
		objDRG.setNameOfCoder(objXPN);
		objDRG.setGrouperStatus(objCWE);
		objDRG.setPCCLValueCode(objCWE);
		objDRG.setMonetaryAmount(objPrice);
		objDRG.setStatusPatient(objCWE);
		objDRG.setGrouperSoftwareVersion("2.8.1");
		objDRG.setStatusFinancialCalculation(objCWE);
		objDRG.setRelativeDiscountSurcharge(objPrice);
		objDRG.setBasicCharge(objPrice);
		objDRG.setTotalCharge(objPrice);
		objDRG.setDiscountSurcharge(objPrice);
		objDRG.setStatusGender(objCWE);
		objDRG.setStatusAge(objCWE);
		objDRG.setStatusLengthOfStay(objCWE);
		objDRG.setStatusSameDayFlag(objCWE);
		objDRG.setStatusSeparationMode(objCWE);
		objDRG.setStatusWeightAtBirth(objCWE);
		objDRG.setStatusRespirationMinutes(objCWE);
		objDRG.setStatusAdmission(objCWE);
		
		return objDRG;
	}

	/**
	 * populates DRG Segment
	 * @return DRG
	 */
	public  DRG populateDRG(DRG objTempDRG)
	{
		//DRG segment
		DRG objDRG = new DRG();
		objDRG.setDiagnosticRelatedGroup(objTempDRG.getDiagnosticRelatedGroup());
		objDRG.setDRGGrouperReviewCode(objTempDRG.getDRGGrouperReviewCode());
		objDRG.setOutlierType(objTempDRG.getOutlierType());
		objDRG.setOutlierCost(objTempDRG.getOutlierCost());//CP
		objDRG.setDRGPayor(objTempDRG.getDRGPayor());
		objDRG.setOutlierReimbursement(objTempDRG.getOutlierReimbursement());//CP
		objDRG.setDRGTransferType(objTempDRG.getDRGTransferType());
		objDRG.setNameOfCoder(objTempDRG.getNameOfCoder());
		objDRG.setGrouperStatus(objTempDRG.getGrouperStatus());
		objDRG.setPCCLValueCode(objTempDRG.getPCCLValueCode());
		objDRG.setMonetaryAmount(objTempDRG.getMonetaryAmount());
		objDRG.setStatusPatient(objTempDRG.getStatusPatient());
		objDRG.setGrouperSoftwareVersion(objTempDRG.getGrouperSoftwareVersion());
		objDRG.setStatusFinancialCalculation(objTempDRG.getStatusFinancialCalculation());
		objDRG.setRelativeDiscountSurcharge(objTempDRG.getRelativeDiscountSurcharge());
		objDRG.setBasicCharge(objTempDRG.getBasicCharge());
		objDRG.setTotalCharge(objTempDRG.getTotalCharge());
		objDRG.setDiscountSurcharge(objTempDRG.getDiscountSurcharge());
		objDRG.setStatusGender(objTempDRG.getStatusGender());
		objDRG.setStatusAge(objTempDRG.getStatusAge());
		objDRG.setStatusLengthOfStay(objTempDRG.getStatusLengthOfStay());
		objDRG.setStatusSameDayFlag(objTempDRG.getStatusSameDayFlag());
		objDRG.setStatusSeparationMode(objTempDRG.getStatusSeparationMode());
		objDRG.setStatusWeightAtBirth(objTempDRG.getStatusWeightAtBirth());
		objDRG.setStatusRespirationMinutes(objTempDRG.getStatusRespirationMinutes());
		objDRG.setStatusAdmission(objTempDRG.getStatusAdmission());
		
		return objDRG;
	}



	/**
	 * populates PR1 Segment
	 * @return PR1
	 */
	public  PR1 populatePR1()
	{
		CNE objCNE=PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT);
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		
		PL objPL=PopulateDataType.populatePL(HL7Constants.HL7_COMPONENT);
		//PR1 segment
		PR1 objPR1 = new PR1();
		objPR1.setSetID_PR1("2");//SI
		objPR1.setProcedureCode(objCNE);
		objPR1.setProcedureDateTime("20040303");//DTM
		objPR1.setProcedureFunctionalType(objCWE);//CWE
		objPR1.setProcedureMinutes("60");//NM
		objPR1.setAnesthesiaCode(objCWE);//CWE
		objPR1.setAnesthesiaMinutes("15");//NM
		objPR1.setConsentCode(objCWE);//CWE
		objPR1.setAssociatedDiagnosisCode(objCWE);//CWE
		objPR1.addProcedureCodeModifier(objCNE);//CWE
		objPR1.setProcedureDRGType(objCWE);//CWE
		objPR1.addTissueTypeCode(objCWE);//CWE
		objPR1.setProcedureIdentifier(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));//EI
		
		return objPR1;
	}

	/**
	 * populates PR1 Segment
	 * @return PR1
	 */
	public  PR1 populatePR1(PR1 objTempPR1)
	{
		//PR1 segment
		PR1 objPR1 = new PR1();
		objPR1.setSetID_PR1(objTempPR1.getSetID_PR1());//SI
		objPR1.setProcedureCode(objTempPR1.getProcedureCode());//CWE
		objPR1.setProcedureDateTime(objTempPR1.getProcedureDateTime());//DTM
		objPR1.setProcedureFunctionalType(objTempPR1.getProcedureFunctionalType());//IS
		objPR1.setProcedureMinutes(objTempPR1.getProcedureMinutes());//NM
		objPR1.setAnesthesiaCode(objTempPR1.getAnesthesiaCode());//IS
		objPR1.setAnesthesiaMinutes(objTempPR1.getAnesthesiaMinutes());//NM
		objPR1.setConsentCode(objTempPR1.getConsentCode());//CWE
		objPR1.setAssociatedDiagnosisCode(objTempPR1.getAssociatedDiagnosisCode());//CWE
		if(objTempPR1.getProcedureCodeModifier().size() != 0)
			objPR1.setProcedureCodeModifier(objTempPR1.getProcedureCodeModifier());//IS
		objPR1.setProcedureDRGType(objTempPR1.getProcedureDRGType());//IS
		if(objTempPR1.getTissueTypeCode().size() != 0)
			objPR1.setTissueTypeCode(objTempPR1.getTissueTypeCode());//CWE
		objPR1.setProcedureIdentifier(objTempPR1.getProcedureIdentifier());//EI
		
		return objPR1;
	}
	
	/**
	 * populates GT1 Segment
	 * @return GT1
	 */
	public  GT1 populateGT1()
	{

		
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		CX objCX=PopulateDataType.populateCX(HL7Constants.HL7_COMPONENT);
		CP objCP=PopulateDataType.populateCP(HL7Constants.HL7_COMPONENT);
		
		XON objXON=PopulateDataType.populateXON(HL7Constants.HL7_COMPONENT);
		XPN objXPN=PopulateDataType.populateXPN(HL7Constants.HL7_COMPONENT);
		XAD objXAD=PopulateDataType.populateXAD(HL7Constants.HL7_COMPONENT);
		XTN objXTN=PopulateDataType.populateXTN(HL7Constants.HL7_COMPONENT);
		JCC objJCC=PopulateDataType.populateJCC(HL7Constants.HL7_COMPONENT);
		FC objFC=PopulateDataType.populateFC(HL7Constants.HL7_COMPONENT);
		
		//GT1 segment
		GT1 objGT1 = new GT1();
		objGT1.setSetID_GT1("1145");
		objGT1.addGuarantorNumber(objCX);
		objGT1.addGuarantorName(objXPN);
		objGT1.addGuarantorSpouseName(objXPN);
		objGT1.addGuarantorAddress(objXAD);
		objGT1.addGuarantorPhNum_Home(objXTN);
		objGT1.addGuarantorPhNum_Business(objXTN);
		objGT1.setGuarantorDtTmOfBirth("19980202");//DTM
		objGT1.setGuarantorAdminSex(objCWE);
		objGT1.setGuarantorType(objCWE);
		objGT1.setGuarantorRelationship(objCWE);
		objGT1.setGuarantorSSN("12345qwe");
		objGT1.addGuarantorEmpName(objXPN);
		objGT1.addGuarantorEmpAdd(objXAD);
		objGT1.addGuarantorEmpPhNo(objXTN);
		objGT1.addGuarantorEmpIDNo(objCX);
		objGT1.setGuarantorEmpmtStatus(objCWE);
		objGT1.addGuarantorOrgName(objXON);
		objGT1.setGuarantorBillingHoldFlag("Y");
		objGT1.setGuarantorCreditRatingCode(objCWE);
		objGT1.setGuarantorDeathDateAndTime("20170707");//DTM
		objGT1.setGuarantorDeathFlag("N");
		objGT1.setGuarantorChargeAdjustmtCode(objCWE);
		objGT1.setGuarantorHousehldAnualInc(objCP);
		objGT1.setGuarantorHousehldSize("123");
		objGT1.addGuarantorEmpIDNo(objCX);
		objGT1.setGuarantorMaritalStatusCode(objCWE);
		objGT1.setGuarantorHireEffectiveDate("20050202");
		objGT1.setEmploymentStopDate("20050202");
		objGT1.setLivingDependency(objCWE);
		objGT1.addAmbulatoryStatus(objCWE);
		objGT1.addCitizenship(objCWE);
		objGT1.setPrimaryLanguage(objCWE);
		objGT1.setLivingArrangement(objCWE);
		objGT1.setPublicityCode(objCWE);
		objGT1.setProtectionIndicator("N");
		objGT1.setStudentIndicator(objCWE);
		objGT1.setReligion(objCWE);
		objGT1.addMothersMaidenName(objXPN);
		objGT1.setNationality(objCWE);
		objGT1.addEthnicGroup(objCWE);
		objGT1.addContactPersonsName(objXPN);
		objGT1.addContactPersnTelphNo(objXTN);
		objGT1.setContactReason(objCWE);
		objGT1.setContactRelationship(objCWE);
		objGT1.setJobCodeClass(objJCC);
		objGT1.addGuarantorEmpsOrgNm(objXON);
		objGT1.setHandicap(objCWE);
		objGT1.setJobStatus(objCWE);
		objGT1.setGuarantorFinancialClass(objFC);
		objGT1.addGuarantorRace(objCWE);
		objGT1.setVIPIndicator(objCWE);
		return objGT1;
	}

	/**
	 * populates GT1 Segment
	 * @return GT1
	 */
	public  GT1 populateGT1(GT1 objTempGT1)
	{
		//GT1 segment
		GT1 objGT1 = new GT1();
		objGT1.setSetID_GT1(objTempGT1.getSetID_GT1());
		if(objTempGT1.getGuarantorNumber().size() != 0)
			objGT1.setGuarantorNumber(objTempGT1.getGuarantorNumber());//CX
		if(objTempGT1.getGuarantorName().size() != 0)
			objGT1.setGuarantorName(objTempGT1.getGuarantorName());//XPN
		if(objTempGT1.getGuarantorSpouseName().size() != 0)
			objGT1.setGuarantorSpouseName(objTempGT1.getGuarantorSpouseName());//XPN
		if(objTempGT1.getGuarantorAddress().size() != 0)
			objGT1.setGuarantorAddress(objTempGT1.getGuarantorAddress());//XAD
		if(objTempGT1.getGuarantorPhNum_Home().size() != 0)
			objGT1.setGuarantorPhNum_Home(objTempGT1.getGuarantorPhNum_Home());//XTN
		if(objTempGT1.getGuarantorPhNum_Business().size() != 0)
			objGT1.setGuarantorPhNum_Business(objTempGT1.getGuarantorPhNum_Business());//XTN
		objGT1.setGuarantorDtTmOfBirth(objTempGT1.getGuarantorDtTmOfBirth());//DTM
		objGT1.setGuarantorAdminSex(objTempGT1.getGuarantorAdminSex());
		objGT1.setGuarantorType(objTempGT1.getGuarantorType());
		objGT1.setGuarantorRelationship(objTempGT1.getGuarantorRelationship());
		objGT1.setGuarantorSSN(objTempGT1.getGuarantorSSN());
		if(objTempGT1.getGuarantorEmpName().size() != 0)
			objGT1.setGuarantorEmpName(objTempGT1.getGuarantorEmpName());//XPN
		if(objTempGT1.getGuarantorEmpAdd().size() != 0)
			objGT1.setGuarantorEmpAdd(objTempGT1.getGuarantorEmpAdd());//XAD
		if(objTempGT1.getGuarantorEmpPhNo().size() != 0)
			objGT1.setGuarantorEmpPhNo(objTempGT1.getGuarantorEmpPhNo());//XTN
		if(objTempGT1.getGuarantorEmployeeIDNo().size() != 0)
			objGT1.setGuarantorEmployeeIDNo(objTempGT1.getGuarantorEmployeeIDNo());//CX
		objGT1.setGuarantorEmpmtStatus(objTempGT1.getGuarantorEmpmtStatus());
		if(objTempGT1.getGuarantorOrgName().size() != 0)
			objGT1.setGuarantorOrgName(objTempGT1.getGuarantorOrgName());//XON
		objGT1.setGuarantorBillingHoldFlag(objTempGT1.getGuarantorBillingHoldFlag());
		objGT1.setGuarantorCreditRatingCode(objTempGT1.getGuarantorCreditRatingCode());
		objGT1.setGuarantorDeathDateAndTime(objTempGT1.getGuarantorDeathDateAndTime());//DTM
		objGT1.setGuarantorDeathFlag(objTempGT1.getGuarantorDeathFlag());
		objGT1.setGuarantorChargeAdjustmtCode(objTempGT1.getGuarantorChargeAdjustmtCode());
		objGT1.setGuarantorHousehldAnualInc(objTempGT1.getGuarantorHousehldAnualInc());//CP
		objGT1.setGuarantorHousehldSize(objTempGT1.getGuarantorHousehldSize());
		if(objTempGT1.getGuarantorEmpIDNo().size() != 0)
			objGT1.setGuarantorEmpIDNo(objTempGT1.getGuarantorEmpIDNo());//CX
		objGT1.setGuarantorMaritalStatusCode(objTempGT1.getGuarantorMaritalStatusCode());
		objGT1.setGuarantorHireEffectiveDate(objTempGT1.getGuarantorHireEffectiveDate());
		objGT1.setEmploymentStopDate(objTempGT1.getEmploymentStopDate());
		objGT1.setLivingDependency(objTempGT1.getLivingDependency());
		if(objTempGT1.getAmbulatoryStatus().size() != 0)
			objGT1.setAmbulatoryStatus(objTempGT1.getAmbulatoryStatus());
		if(objTempGT1.getCitizenship().size() != 0)
			objGT1.setCitizenship(objTempGT1.getCitizenship());
		objGT1.setPrimaryLanguage(objTempGT1.getPrimaryLanguage());
		objGT1.setLivingArrangement(objTempGT1.getLivingArrangement());
		objGT1.setPublicityCode(objTempGT1.getPublicityCode());
		objGT1.setProtectionIndicator(objTempGT1.getProtectionIndicator());
		objGT1.setStudentIndicator(objTempGT1.getStudentIndicator());
		objGT1.setReligion(objTempGT1.getReligion());
		if(objTempGT1.getMothersMaidenName().size() != 0)
			objGT1.setMothersMaidenName(objTempGT1.getMothersMaidenName());//XPN
		objGT1.setNationality(objTempGT1.getNationality());
		if(objTempGT1.getEthnicGroup().size() != 0)
			objGT1.setEthnicGroup(objTempGT1.getEthnicGroup());
		if(objTempGT1.getContactPersonsName().size() != 0)
			objGT1.setContactPersonsName(objTempGT1.getContactPersonsName());//XPN
		if(objTempGT1.getContactPersnTelphNo().size() != 0)
			objGT1.setContactPersnTelphNo(objTempGT1.getContactPersnTelphNo());//XTN
		objGT1.setContactReason(objTempGT1.getContactReason());
		objGT1.setContactRelationship(objTempGT1.getContactRelationship());
		objGT1.setJobCodeClass(objTempGT1.getJobCodeClass());//JCC
		if(objTempGT1.getGuarantorEmpsOrgNm().size() != 0)
			objGT1.setGuarantorEmpsOrgNm(objTempGT1.getGuarantorEmpsOrgNm());//XON
		objGT1.setHandicap(objTempGT1.getHandicap());
		objGT1.setJobStatus(objTempGT1.getJobStatus());
		objGT1.setGuarantorFinancialClass(objTempGT1.getGuarantorFinancialClass());
		if(objTempGT1.getGuarantorRace().size() != 0)
			objGT1.setGuarantorRace(objTempGT1.getGuarantorRace());
		objGT1.setVIPIndicator(objTempGT1.getVIPIndicator());
		return objGT1;
	}

	/**
	 * populates NK1 Segment
	 * @return NK1
	 */
	public  NK1 populateNK1()
	{

		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		CX objCX=PopulateDataType.populateCX(HL7Constants.HL7_COMPONENT);
				
		XON objXON=PopulateDataType.populateXON(HL7Constants.HL7_COMPONENT);
		XPN objXPN=PopulateDataType.populateXPN(HL7Constants.HL7_COMPONENT);
		XAD objXAD=PopulateDataType.populateXAD(HL7Constants.HL7_COMPONENT);
		XTN objXTN=PopulateDataType.populateXTN(HL7Constants.HL7_COMPONENT);
		JCC objJCC=PopulateDataType.populateJCC(HL7Constants.HL7_COMPONENT);
	
		//NK1 segment
		NK1 objNK1 = new NK1();
		objNK1.setSetIDNK1("8");
		objNK1.addName(objXPN);
		objNK1.setRelationship(objCWE);
		objNK1.addAddress(objXAD);
		objNK1.addPhoneNumber(objXTN);
		objNK1.addBusinessPhoneNumber(objXTN);
		objNK1.setContactRole(objCWE);
		objNK1.setStartDate("20060304");
		objNK1.setEndDate("20060304");
		objNK1.setNextOfKinAssociatedPartiesJobCodeClass(objJCC);//JCC
		objNK1.setNextOfKinAssociatedPartiesEmployeeNumber(objCX);
		objNK1.addOrganizationNameNK1(objXON);
		objNK1.setMaritalStatus(objCWE);
		objNK1.setAdministrativeSex(objCWE);
		objNK1.setDateTimeOfBirth("20030303");//DTM
		objNK1.addLivingDependency(objCWE);
		objNK1.addAmbulatoryStatus(objCWE);
		objNK1.addCitizenship(objCWE);
		objNK1.setPrimaryLanguage(objCWE);
		objNK1.setLivingArrangement(objCWE);
		objNK1.setPublicityCode(objCWE);
		objNK1.setProtectionIndicator("N");
		objNK1.setStudentIndicator(objCWE);
		objNK1.setReligion(objCWE);
		objNK1.addMothersMaidenName(objXPN);
		objNK1.setNationality(objCWE);
		objNK1.addEthnicGroup(objCWE);
		objNK1.addContactReason(objCWE);
		objNK1.addContactPersonsName(objXPN);
		objNK1.addContactPersonsTelephoneNumber(objXTN);
		objNK1.addContactPersonsAddress(objXAD);
		objNK1.addNextOfKinAssociatedPartysIdentifiers(objCX);
		objNK1.setJobStatus(objCWE);
		objNK1.addRace(objCWE);
		objNK1.setHandicap(objCWE);
		objNK1.setContactPersonSocialSecurityNumber("12345QWE");
		objNK1.setNextOfKinBirthPlace("Kanpur");
		objNK1.setVIPIndicator(objCWE);
		objNK1.setNextOfKinTelecommunicationInformation(objXTN);
		objNK1.setContactPersonsTelecommunicationInformation(objXTN);
		return objNK1;
	}

	/**
	 * populates NK1 Segment
	 * @return NK1
	 */
	public  NK1 populateNK1(NK1 objTempNK1)
	{
		//NK1 segment
		NK1 objNK1 = new NK1();
		objNK1.setSetIDNK1(objTempNK1.getSetIDNK1());
		objNK1.setName(objTempNK1.getNameOFNextKin());//XPN
		objNK1.setRelationship(objTempNK1.getRelationship());
		objNK1.setAddress(objTempNK1.getAddress());//XAD
		objNK1.setPhoneNumber(objTempNK1.getPhoneNumber());//XTN
		objNK1.setBusinessPhoneNumber(objTempNK1.getBusinessPhoneNumber());//XTN
		objNK1.setContactRole(objTempNK1.getContactRole());
		objNK1.setStartDate(objTempNK1.getStartDate());
		objNK1.setEndDate(objTempNK1.getEndDate());
		objNK1.setNextOfKinAssociatedPartiesJobCodeClass(objTempNK1.getNextOfKinAssociatedPartiesJobCodeClass());//JCC
		objNK1.setNextOfKinAssociatedPartiesEmployeeNumber(objTempNK1.getNextOfKinAssociatedPartiesEmployeeNumber());//CX
		objNK1.setOrganizationNameNK1(objTempNK1.getOrganizationNameNK1());//XON
		objNK1.setMaritalStatus(objTempNK1.getMaritalStatus());
		objNK1.setAdministrativeSex(objTempNK1.getAdministrativeSex());
		objNK1.setDateTimeOfBirth(objTempNK1.getDateTimeOfBirth());//DTM
		objNK1.setLivingDependency(objTempNK1.getLivingDependency());
		objNK1.setAmbulatoryStatus(objTempNK1.getAmbulatoryStatus());
		objNK1.setCitizenship(objTempNK1.getCitizenship());
		objNK1.setPrimaryLanguage(objTempNK1.getPrimaryLanguage());
		objNK1.setLivingArrangement(objTempNK1.getLivingArrangement());
		objNK1.setPublicityCode(objTempNK1.getPublicityCode());
		objNK1.setProtectionIndicator(objTempNK1.getProtectionIndicator());
		objNK1.setStudentIndicator(objTempNK1.getStudentIndicator());
		objNK1.setReligion(objTempNK1.getReligion());
		objNK1.setMothersMaidenName(objTempNK1.getMothersMaidenName());//XPN
		objNK1.setNationality(objTempNK1.getNationality());
		objNK1.setEthnicGroup(objTempNK1.getEthnicGroup());
		objNK1.setContactReason(objTempNK1.getContactReason());
		objNK1.setContactPersonsName(objTempNK1.getContactPersonsName());//XPN
		objNK1.setContactPersonsTelephoneNumber(objTempNK1.getContactPersonsTelephoneNumber());//XTN
		objNK1.setContactPersonsAddress(objTempNK1.getContactPersonsAddress());//XAD
		objNK1.setNextOfKinAssociatedPartysIdentifiers(objTempNK1.getNextOfKinAssociatedPartysIdentifiers());//CX
		objNK1.setJobStatus(objTempNK1.getJobStatus());
		objNK1.setRace(objTempNK1.getRace());
		objNK1.setHandicap(objTempNK1.getHandicap());
		objNK1.setContactPersonSocialSecurityNumber(objTempNK1.getContactPersonSocialSecurityNumber());
		objNK1.setNextOfKinBirthPlace(objTempNK1.getNextOfKinBirthPlace());
		objNK1.setVIPIndicator(objTempNK1.getVIPIndicator());
		objNK1.setNextOfKinTelecommunicationInformation(objTempNK1.getNextOfKinTelecommunicationInformation());
		objNK1.setContactPersonsTelecommunicationInformation(objTempNK1.getContactPersonsTelecommunicationInformation());
		return objNK1;
	}

	
	/**
	 * populates IN1 Segment
	 * @return IN1
	 */
	public  IN1 populateIN1()
	{
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		
		//IN1 segment
		IN1 objIN1 = new IN1();
		objIN1.setSetID_IN1("1258");
		objIN1.setHealthPlanID(objCWE);
		objIN1.addInsuranceCompanyID(PopulateDataType.populateCX(HL7Constants.HL7_COMPONENT));//CX
		objIN1.addInsuranceCompanyName(PopulateDataType.populateXON(HL7Constants.HL7_COMPONENT));//XON
		objIN1.addInsuranceCompanyAddr(PopulateDataType.populateXAD(HL7Constants.HL7_COMPONENT));//XAD
		objIN1.addInsuranceCoContactPerson(PopulateDataType.populateXPN(HL7Constants.HL7_COMPONENT));
		objIN1.addInsuranceCoPhoneNumber(PopulateDataType.populateXTN(HL7Constants.HL7_COMPONENT));//XTN
		objIN1.setPlanEffectiveDate("20050202");
		objIN1.setPlanExpirationDate("20030303");
		objIN1.setInsuredDOB("20030303");//DTM
		objIN1.setCoordOfBenPriority("2");
		objIN1.setNoticeOfAdmissionFlag("N");
		objIN1.setNoticeOfAdmissionDate("20070505");
		objIN1.setReportOfEligibilityFlag("Y");
		objIN1.setReportOfEligibilityDate("20060202");
		objIN1.setReleaseInformationCode(objCWE);
		objIN1.setPreAdmitCert("PreAdmitCert");
		objIN1.setVerificationDateTime("20030303");//DTM
		objIN1.setSignatureCodeDate("20030201");
		
		return objIN1;
	}

	/**
	 * populates IN1 Segment
	 * @return IN1
	 */
	public  IN1 populateIN1(IN1 objTempIN1)
	{
		//IN1 segment
		IN1 objIN1 = new IN1();
		objIN1.setSetID_IN1(objTempIN1.getSetID_IN1());
		objIN1.setHealthPlanID(objTempIN1.getHealthPlanID());
		if(objTempIN1.getInsuranceCompanyID().size() != 0)
			objIN1.setInsuranceCompanyID(objTempIN1.getInsuranceCompanyID());//CX
		if(objTempIN1.getInsuranceCompanyName().size() != 0)
			objIN1.setInsuranceCompanyName(objTempIN1.getInsuranceCompanyName());//XON
		if(objTempIN1.getInsuranceCompanyAddr().size() != 0)
			objIN1.setInsuranceCompanyAddr(objTempIN1.getInsuranceCompanyAddr());//XAD
		if(objTempIN1.getInsuranceCoContactPerson().size() != 0)
			objIN1.setInsuranceCoContactPerson(objTempIN1.getInsuranceCoContactPerson());//XPN
		if(objTempIN1.getInsuranceCoPhoneNumber().size() != 0)
			objIN1.setInsuranceCoPhoneNumber(objTempIN1.getInsuranceCoPhoneNumber());//XTN
		objIN1.setPlanEffectiveDate(objTempIN1.getPlanEffectiveDate());
		objIN1.setPlanExpirationDate(objTempIN1.getPlanExpirationDate());
		objIN1.setInsuredDOB(objTempIN1.getInsuredDOB());//DTM
		objIN1.setCoordOfBenPriority(objTempIN1.getCoordOfBenPriority());
		objIN1.setNoticeOfAdmissionFlag(objTempIN1.getNoticeOfAdmissionFlag());
		objIN1.setNoticeOfAdmissionDate(objTempIN1.getNoticeOfAdmissionDate());
		objIN1.setReportOfEligibilityFlag(objTempIN1.getReportOfEligibilityFlag());
		objIN1.setReportOfEligibilityDate(objTempIN1.getReportOfEligibilityDate());
		objIN1.setReleaseInformationCode(objTempIN1.getReleaseInformationCode());
		objIN1.setPreAdmitCert(objTempIN1.getPreAdmitCert());
		objIN1.setVerificationDateTime(objTempIN1.getVerificationDateTime());//DTM
		objIN1.setSignatureCodeDate(objTempIN1.getSignatureCodeDate());
		return objIN1;
	}

	/**
	 * populates IN2 Segment
	 * @return IN2
	 */
	public  IN2 populateIN2()
	{
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		XTN objXTN=PopulateDataType.populateXTN(HL7Constants.HL7_COMPONENT);
		HD objHD = PopulateDataType.populateHD(HL7Constants.HL7_COMPONENT);
		MO objPrice = new MO();
		objPrice.setQuantity("99");
		objPrice.setDenomination("USD");
				
		MOP objMoneyOrPercentage = new MOP();
		objMoneyOrPercentage.setMoneyOrPercentageQuantity("99");
		objMoneyOrPercentage.setMoneyOrPercentageIndicator("AT");
		objMoneyOrPercentage.setCurrencyDenomination("USD");
		
		//IN2 segment
		IN2 objIN2 = new IN2();
		objIN2.addInsuredsEmployeeId(PopulateDataType.populateCX(HL7Constants.HL7_COMPONENT));//CX
		objIN2.setInsuredsSocialSecurityNumber("ASR-9038423");
		objIN2.addInsuredsEmployersNameandID(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));//XCN
		objIN2.setEmployerInformationData(objCWE);
		objIN2.addMailClaimParty(objCWE);
		objIN2.addMedicaidCaseName(PopulateDataType.populateXPN(HL7Constants.HL7_COMPONENT));//XPN
		objIN2.addMilitarySponsorName(PopulateDataType.populateXPN(HL7Constants.HL7_COMPONENT));//XPN
		objIN2.setDependentOfMilitaryRecipient(objCWE);
		objIN2.setMilitaryService(objCWE);
		objIN2.setMilitaryRankOrGrade(objCWE);
		objIN2.setMilitaryStatus(objCWE);
		objIN2.setMilitaryRetireDate("20040202");
		objIN2.setMilitaryNonAvailCertOnFile("Y");
		objIN2.setBabyCoverage("Y");
		objIN2.setCombineBabyBill("Y");
		objIN2.setBloodDeductible("B");	
		objIN2.addSpecialCoverageApprovalName(PopulateDataType.populateXPN(HL7Constants.HL7_COMPONENT));//XPN
		objIN2.addNonCoveredInsuranceCode(objCWE);
		objIN2.addPayorID(PopulateDataType.populateCX(HL7Constants.HL7_COMPONENT));//CX
		objIN2.addPayorSubscriberID(PopulateDataType.populateCX(HL7Constants.HL7_COMPONENT));//CX
		objIN2.setEligibilitySource(objCWE);
		objIN2.addRoomCoverageTypeOrAmount(PopulateDataType.populateRMC(HL7Constants.HL7_COMPONENT));//RMC
		objIN2.addPolicyTypeOrAmount(PopulateDataType.populatePTA(HL7Constants.HL7_COMPONENT));//PTA
		objIN2.setDailyDeductible("123", objPrice, "1345");
		objIN2.setLivingDependency(objCWE);
		objIN2.addAmbulatoryStatus(objCWE);
		objIN2.addCitizenship(objCWE);
		objIN2.setPrimaryLanguage(objCWE);
		objIN2.setPublicityCode(objCWE);
		objIN2.setProtectionIndicator("N");
		objIN2.setStudentIndicator(objCWE);
		objIN2.setReligion(objCWE);
		objIN2.setNationality(objCWE);
		objIN2.addEthnicGroup(objCWE);
		objIN2.addMaritalStatus(objCWE);
		objIN2.setInsuredsEmploymentStartDate("20000202");
		objIN2.setEmploymentStopDate("20030303");
		objIN2.setJobCodeOrClass(PopulateDataType.populateJCC(HL7Constants.HL7_COMPONENT));//JCC
		objIN2.setJobStatus(objCWE);
		objIN2.addEmployerContactPersonName(PopulateDataType.populateXPN(HL7Constants.HL7_COMPONENT));
		objIN2.addEmployerContactPersonPhoneNumber(PopulateDataType.populateXTN(HL7Constants.HL7_COMPONENT));//XTN
		objIN2.setEmployerContactReason(objCWE);
		objIN2.addInsuredsContactPersonsName(PopulateDataType.populateXPN(HL7Constants.HL7_COMPONENT));
		objIN2.addInsuredsContactPersonPhoneNumber(objXTN);
		objIN2.addInsuredsContactPersonReason(objCWE);
		objIN2.setRelationshipToThePatientStartDate("20020202");
		objIN2.addRelationshipToThePatientStopDate("20040404");
		objIN2.setInsuranceCoContactReason(objCWE);
		objIN2.setInsuranceCoContactPhoneNumber(objXTN);//XTN
		objIN2.setPolicyScope(objCWE);
		objIN2.setPolicySource(objCWE);
		objIN2.setPatientMemberNumber(PopulateDataType.populateCX(HL7Constants.HL7_COMPONENT));//CX
		objIN2.setGuarantorsRelationshipToInsured(objCWE);
		objIN2.addInsuredsPhoneNumberHome(objXTN);
		objIN2.addInsuredsEmployerPhoneNumber(objXTN);//XTN
		objIN2.setMilitaryHandicappedProgram(objCWE);
		objIN2.addInsuredOrganizationNameandID("CDAC",PopulateDataType.populateCWE(HL7Constants.HL7_SUBCOMPONENT) , objHD, "AM", objHD, "I", "AS");//XON
		objIN2.addRace(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));
		objIN2.setCMSPatientsRelationshipToInsured(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));
		return objIN2;
	}

	/**
	 /** populates IN2 Segment
	 * @return IN2
	 */ 
	public IN2 populateIN2(IN2 objTempIN2)
	{
		//IN2 segment
		IN2 objIN2 = new IN2();
		if(objTempIN2.getInsuredsEmployeeId().size() != 0)
			objIN2.setInsuredsEmployeeId(objTempIN2.getInsuredsEmployeeId());//CX
		objIN2.setInsuredsSocialSecurityNumber(objTempIN2.getInsuredsSocialSecurityNumber());
		if(objTempIN2.getInsuredsEmployersNameandID().size() != 0)
			objIN2.setInsuredsEmployersNameandID(objTempIN2.getInsuredsEmployersNameandID());//XCN
		objIN2.setEmployerInformationData(objTempIN2.getEmployerInformationData());
		if(objTempIN2.getMailClaimParty().size() != 0)
			objIN2.setMailClaimParty(objTempIN2.getMailClaimParty());
		objIN2.setMedicareHealthInsCardNumber(objTempIN2.getMedicareHealthInsCardNumber());
		if(objTempIN2.getMedicaidCaseName().size() != 0)
			objIN2.setMedicaidCaseName(objTempIN2.getMedicaidCaseName());//XPN
		if(objTempIN2.getMilitarySponsorName().size() != 0)
			objIN2.setMilitarySponsorName(objTempIN2.getMilitarySponsorName());//XPN
		objIN2.setDependentOfMilitaryRecipient(objTempIN2.getDependentOfMilitaryRecipient());
		objIN2.setMilitaryService(objTempIN2.getMilitaryService());
		objIN2.setMilitaryRankOrGrade(objTempIN2.getMilitaryRankOrGrade());
		objIN2.setMilitaryStatus(objTempIN2.getMilitaryStatus());
		objIN2.setMilitaryRetireDate(objTempIN2.getMilitaryRetireDate());
		objIN2.setMilitaryNonAvailCertOnFile(objTempIN2.getMilitaryNonAvailCertOnFile());
		objIN2.setBabyCoverage(objTempIN2.getBabyCoverage());
		objIN2.setCombineBabyBill(objTempIN2.getCombineBabyBill());
		objIN2.setBloodDeductible(objTempIN2.getBloodDeductible());
		if(objTempIN2.getSpecialCoverageApprovalName().size() != 0)
			objIN2.setSpecialCoverageApprovalName(objTempIN2.getSpecialCoverageApprovalName());//XPN
		if(objTempIN2.getNonCoveredInsuranceCode().size() != 0)
			objIN2.setNonCoveredInsuranceCode(objTempIN2.getNonCoveredInsuranceCode());
		if(objTempIN2.getPayorID().size() != 0)
			objIN2.setPayorID(objTempIN2.getPayorID());//CX
		if(objTempIN2.getPayorSubscriberID().size() != 0)
			objIN2.setPayorSubscriberID(objTempIN2.getPayorSubscriberID());//CX
		objIN2.setEligibilitySource(objTempIN2.getEligibilitySource());
		if(objTempIN2.getRoomCoverageTypeOrAmount().size() != 0)
			objIN2.setRoomCoverageTypeOrAmount(objTempIN2.getRoomCoverageTypeOrAmount());//RMC
		if(objTempIN2.getPolicyTypeOrAmount().size() != 0)
			objIN2.setPolicyTypeOrAmount(objTempIN2.getPolicyTypeOrAmount());
		objIN2.setDailyDeductible(objTempIN2.getDailyDeductible());
		objIN2.setLivingDependency(objTempIN2.getLivingDependency());
		if(objTempIN2.getAmbulatoryStatus().size() != 0)
			objIN2.setAmbulatoryStatus(objTempIN2.getAmbulatoryStatus());
		if(objTempIN2.getCitizenship().size() != 0)
			objIN2.setCitizenship(objTempIN2.getCitizenship());
		objIN2.setPrimaryLanguage(objTempIN2.getPrimaryLanguage());
		objIN2.setLivingArrangement(objTempIN2.getLivingArrangement());
		objIN2.setPublicityCode(objTempIN2.getPublicityCode());
		objIN2.setProtectionIndicator(objTempIN2.getProtectionIndicator());
		objIN2.setStudentIndicator(objTempIN2.getStudentIndicator());
		objIN2.setReligion(objTempIN2.getReligion());
		objIN2.setNationality(objTempIN2.getNationality());
		if(objTempIN2.getEthnicGroup().size() != 0)
			objIN2.setEthnicGroup(objTempIN2.getEthnicGroup());
		if(objTempIN2.getMaritalStatus().size() != 0)
			objIN2.setMaritalStatus(objTempIN2.getMaritalStatus());
		objIN2.setInsuredsEmploymentStartDate(objTempIN2.getInsuredsEmploymentStartDate());
		objIN2.setEmploymentStopDate(objTempIN2.getEmploymentStopDate());
		objIN2.setJobCodeOrClass(objTempIN2.getJobCodeOrClass());//JCC
		objIN2.setJobStatus(objTempIN2.getJobStatus());
		if(objTempIN2.getEmployerContactPersonName().size() != 0)
			objIN2.setEmployerContactPersonName(objTempIN2.getEmployerContactPersonName());//XPN
		if(objTempIN2.getEmployerContactPersonPhoneNumber().size() != 0)
			objIN2.setEmployerContactPersonPhoneNumber(objTempIN2.getEmployerContactPersonPhoneNumber());//XTN
		objIN2.setEmployerContactReason(objTempIN2.getEmployerContactReason());
		if(objTempIN2.getInsuredsContactPersonsName().size() != 0)
			objIN2.setInsuredsContactPersonsName(objTempIN2.getInsuredsContactPersonsName());//XPN
		if(objTempIN2.getInsuredsContactPersonPhoneNumber().size() != 0)
			objIN2.setInsuredsContactPersonPhoneNumber(objTempIN2.getInsuredsContactPersonPhoneNumber());//XTN
		if(objTempIN2.getInsuredsContactPersonReason().size() != 0)
			objIN2.setInsuredsContactPersonReason(objTempIN2.getInsuredsContactPersonReason());
		objIN2.setRelationshipToThePatientStartDate(objTempIN2.getRelationshipToThePatientStartDate());
		if(objTempIN2.getRelationshipToThePatientStopDate().size() != 0)
			objIN2.setRelationshipToThePatientStopDate(objTempIN2.getRelationshipToThePatientStopDate());
		objIN2.setInsuranceCoContactReason(objTempIN2.getInsuranceCoContactReason());
		objIN2.setInsuranceCoContactPhoneNumber(objTempIN2.getInsuranceCoContactPhoneNumber());//XTN
		objIN2.setPolicyScope(objTempIN2.getPolicyScope());
		objIN2.setPolicySource(objTempIN2.getPolicySource());
		objIN2.setPatientMemberNumber(objTempIN2.getPatientMemberNumber());//CX
		objIN2.setGuarantorsRelationshipToInsured(objTempIN2.getGuarantorsRelationshipToInsured());
		if(objTempIN2.getInsuredsPhoneNumberHome().size() != 0)
			objIN2.setInsuredsPhoneNumberHome(objTempIN2.getInsuredsPhoneNumberHome());//XTN
		if(objTempIN2.getInsuredsEmployerPhoneNumber().size() != 0)
			objIN2.setInsuredsEmployerPhoneNumber(objTempIN2.getInsuredsEmployerPhoneNumber());//XTN
		objIN2.setMilitaryHandicappedProgram(objTempIN2.getMilitaryHandicappedProgram());
		if(objTempIN2.getInsuredOrganizationNameandID().size() != 0)
			objIN2.setInsuredOrganizationNameandID(objTempIN2.getInsuredOrganizationNameandID());//XON
		if(objTempIN2.getRace().size() != 0)
			objIN2.setRace(objTempIN2.getRace());
		objIN2.setCMSPatientsRelationshipToInsured(objTempIN2.getCMSPatientsRelationshipToInsured());
		return objIN2;
	}

	/**
	 * populates IN3 Segment
	 * @return IN3
	 */
	public  IN3 populateIN3()
	{
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		//IN3 segment
		IN3 objIN3 = new IN3();
		objIN3.setSetID_IN3("5");
		objIN3.setCertificationNo(PopulateDataType.populateCX(HL7Constants.HL7_COMPONENT));//CX
		objIN3.addCertifiedBy(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));//XCN
		objIN3.setCertificationRequired("N");
		objIN3.setPenalty("AT", "99", "USD");
		objIN3.setCertificationDtOrTm("20030303");//DTM
		objIN3.setCertificationModifyDateOrTime("20030303");//DTM
		objIN3.addOperator(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));//XCN
		objIN3.setCertificationBeginDt("20020202");
		objIN3.setCertificationEndDt("20020202");
		objIN3.setDays(PopulateDataType.populateCWE(HL7Constants.HL7_SUBCOMPONENT), "469");//DTN
		objIN3.setNonConcurCodeOrDesc(objCWE);
		objIN3.setnonConcurEffectiveDtOrTm("20030303");//DTM
		objIN3.addPhysicianReviewer(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));//XCN
		objIN3.addCertificationContactPhNo(PopulateDataType.populateXTN(HL7Constants.HL7_COMPONENT));//XTN
		objIN3.setAppealReason(objCWE);
		objIN3.setCertificationAgency(objCWE);
		objIN3.addCertificationAgencyPhNo(PopulateDataType.populateXTN(HL7Constants.HL7_COMPONENT));//XTN
		objIN3.addPrecertificationRequirement(PopulateDataType.populateICD(HL7Constants.HL7_COMPONENT));//ICD
		objIN3.setSecondOpinionDate("20030303");
		objIN3.setSecondOpinionStatus(objCWE);
		objIN3.addSecondOpinionDocumentationReceived(objCWE);
		objIN3.addSecondOpinionPhysician(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));//XCN
		objIN3.setCertificationType(objCWE);
		objIN3.setCertificationCategory(objCWE);
		
		return objIN3;
	}

	/**
	 /** populates IN3 Segment
	 * @return IN3
	 */ 
	public IN3 populateIN3(IN3 objTempIN3)
	{
		//IN3 segment
		IN3 objIN3 = new IN3();
		objIN3.setSetID_IN3(objTempIN3.getSetID_IN3());
		objIN3.setCertificationNo(objTempIN3.getCertificationNo());//CX
		if(objTempIN3.getCertifiedBy().size() != 0)
			objIN3.setCertifiedBy(objTempIN3.getCertifiedBy());//XCN
		objIN3.setCertificationRequired(objTempIN3.getCertificationRequired());
		objIN3.setPenalty(objTempIN3.getPenalty());
		objIN3.setCertificationDtOrTm(objTempIN3.getCertificationDtOrTm());//DTM
		objIN3.setCertificationModifyDateOrTime(objTempIN3.getCertificationModifyDtOrTm());//DTM
		if(objTempIN3.getOperator().size() != 0)
			objIN3.setOperator(objTempIN3.getOperator());//XCN
		objIN3.setCertificationBeginDt(objTempIN3.getCertificationBeginDt());
		objIN3.setCertificationEndDt(objTempIN3.getCertificationEndDt());
		objIN3.setDays(objTempIN3.getDays());//DTN
		objIN3.setNonConcurCodeOrDesc(objTempIN3.getNonConcurCodeOrDesc());
		objIN3.setnonConcurEffectiveDtOrTm(objTempIN3.getNonConcurEffectiveDtOrTm());//DTM
		if(objTempIN3.getPhysicianReviewer().size() != 0)
			objIN3.setPhysicianReviewer(objTempIN3.getPhysicianReviewer());//XCN
		if(objTempIN3.getCertificationContactPhNo().size() != 0)
			objIN3.setCertificationContactPhNo(objTempIN3.getCertificationContactPhNo());//XTN
		objIN3.setAppealReason(objTempIN3.getAppealReason());
		objIN3.setCertificationAgency(objTempIN3.getCertificationAgency());
		if(objTempIN3.getCertificationAgencyPhNo().size() != 0)
			objIN3.setCertificationAgencyPhNo(objTempIN3.getCertificationAgencyPhNo());//XTN
		if(objTempIN3.getPrecertificationRequirement().size() != 0)
			objIN3.setPrecertificationRequirement(objTempIN3.getPrecertificationRequirement());//ICD
		objIN3.setSecondOpinionDate(objTempIN3.getSecondOpinionDate());
		objIN3.setSecondOpinionStatus(objTempIN3.getSecondOpinionStatus());
		if(objTempIN3.getSecondOpinionDocumentationReceived().size() != 0)
			objIN3.setSecondOpinionDocumentationReceived(objTempIN3.getSecondOpinionDocumentationReceived());
		if(objTempIN3.getSecondOpinionPhysician().size() != 0)
			objIN3.setSecondOpinionPhysician(objTempIN3.getSecondOpinionPhysician());//XCN
		objIN3.setCertificationType(objTempIN3.getCertificationType());
		objIN3.setCertificationCategory(objTempIN3.getCertificationCategory());
		return objIN3;
	}
	
	
	/**
	 * populates ROL Segment
	 * @return ROL
	 */
	public  ROL populateROL()
	{
		CWE objCWE = PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		
		//ROL segment
		ROL objROL = new ROL();
		objROL.setRoleInstanceID(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));
		objROL.setActionCode("AD");
		objROL.setRole_ROL(objCWE);
		objROL.addRolePerson(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));
		objROL.setRoleBeginDateTime("20030303");//DTM
		objROL.setRoleEndDateTime("20030303");//DTM
		objROL.setRoleDuration(objCWE);
		objROL.setRoleActionReason(objCWE);
		objROL.addProviderType(objCWE);
		objROL.setOrganizationUnitType(objCWE);
		objROL.addOfficeOrHome_AddressOrBirthplace(PopulateDataType.populateXAD(HL7Constants.HL7_COMPONENT));//XAD
		objROL.addPhone(PopulateDataType.populateXTN(HL7Constants.HL7_COMPONENT));//XTN
		objROL.setPersonsLocation(PopulateDataType.populatePL(HL7Constants.HL7_COMPONENT));
		objROL.setOrganization(PopulateDataType.populateXON(HL7Constants.HL7_COMPONENT));
		return objROL;
	}

	/**
	 /** populates ROL Segment
	 * @return ROL
	 */ 
	public ROL populateROL(ROL objTempROL)
	{
		//ROL segment
		ROL objROL = new ROL();
		objROL.setRoleInstanceID(objTempROL.getRoleInstanceID());
		objROL.setActionCode(objTempROL.getActionCode());
		objROL.setRole_ROL(objTempROL.getRole_ROL());
		if(objTempROL.getRolePerson().size() != 0)
			objROL.setRolePerson(objTempROL.getRolePerson());
		objROL.setRoleBeginDateTime(objTempROL.getRoleBeginDateTime());//DTM
		objROL.setRoleEndDateTime(objTempROL.getRoleEndDateTime());//DTM
		objROL.setRoleDuration(objTempROL.getRoleDuration());
		objROL.setRoleActionReason(objTempROL.getRoleActionReason());
		if(objTempROL.getProviderType().size() != 0)
			objROL.setProviderType(objTempROL.getProviderType());
		objROL.setOrganizationUnitType(objTempROL.getOrganizationUnitType());
		if(objTempROL.getOfficeOrHome_AddrOrBirthplace().size() != 0)
			objROL.setOfficeOrHome_AddressOrBirthplace(objTempROL.getOfficeOrHome_AddrOrBirthplace());//XAD
		if(objTempROL.getPhone().size() != 0)
			objROL.setPhone(objTempROL.getPhone());//XTN
		objROL.setPersonsLocation(objTempROL.getPersonsLocation());
		objROL.setOrganization(objTempROL.getOrganization());
		return objROL;
	}

	
	/**
	 * populates RF1 Segment
	 * @return RF1
	 */
	public RF1 populateRF1()
	{
		//RF1 Segment
		RF1 objRF1 = new RF1();
		objRF1.setOriginatingReferralIdentifier(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));
		objRF1.setEffectiveDate("20030303");
		objRF1.setExpirationDate("20080303");
		objRF1.setProcessDate("20030303");
		objRF1.addReferralReason(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		objRF1.addExternalReferralIdentifier(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));
		return objRF1;
	}

	/**
	 /** populates RF1 Segment
	 * @return RF1
	 */ 
	public RF1 populateRF1(RF1 objTempRF1)
	{
		//RF1 Segment
		RF1 objRF1 = new RF1();
		objRF1.setOriginatingReferralIdentifier(objTempRF1.getOriginatingReferralIdentifier());
		objRF1.setEffectiveDate(objTempRF1.getEffectiveDate());
		objRF1.setExpirationDate(objTempRF1.getExpirationDate());
		objRF1.setProcessDate(objTempRF1.getProcessDate());
		if(objTempRF1.getReferralReason().size() != 0)
			objRF1.setReferralReason(objTempRF1.getReferralReason());//CWE
		if(objTempRF1.getExternalReferralIdentifier().size() != 0)
			objRF1.setExternalReferralIdentifier(objTempRF1.getExternalReferralIdentifier());
		return objRF1;
	}
	
	/**
	 * populates AUT Segment
	 * @return AUT
	 */
	public AUT populateAUT()
	{
		MO objPrice = PopulateDataType.populateMO(HL7Constants.HL7_COMPONENT);
		//AUT Segment
		AUT objAUT = new AUT();
		objAUT.setAuthorizingPayorPlanID(PopulateDataType.populateCWE(HL7Constants.HL7_SUBCOMPONENT));
		objAUT.setAuthorizingPayorCompanyID(PopulateDataType.populateCWE(HL7Constants.HL7_SUBCOMPONENT));
		objAUT.setAuthorizingPayorCompanyName("C-DAC");
		objAUT.setAuthorizationEffectiveDate("20030303");
		objAUT.setAuthorizationExpirationDate("20080303");
		objAUT.setAuthorizationIdentifier("EID", "N", "U Id", "x500");
		objAUT.setReimbursementLimit(objPrice, null, "340", "440", null, "P");//CP
		objAUT.setAuthorizationReferralType(PopulateDataType.populateCWE(HL7Constants.HL7_SUBCOMPONENT));
		objAUT.setProcessDate("20030303");
		
		return objAUT;
	}

	/**
	 /** populates AUT Segment
	 * @return AUT
	 */ 
	public AUT populateAUT(AUT objTempAUT)
	{
		//AUT Segment
		AUT objAUT = new AUT();
		objAUT.setAuthorizingPayorPlanID(objTempAUT.getAuthorizingPayorPlanID());
		objAUT.setAuthorizingPayorCompanyID(objTempAUT.getAuthorizingPayorCompanyID());
		objAUT.setAuthorizingPayorCompanyName(objTempAUT.getAuthorizingPayorCompanyName());
		objAUT.setAuthorizationEffectiveDate(objTempAUT.getAuthorizationEffectiveDate());
		objAUT.setAuthorizationExpirationDate(objTempAUT.getAuthorizationExpirationDate());
		objAUT.setAuthorizationIdentifier(objTempAUT.getAuthorizationIdentifier());
		objAUT.setReimbursementLimit(objTempAUT.getReimbursementLimit());//CP
		objAUT.setAuthorizationReferralType(objTempAUT.getAuthorizationReferralType());
		objAUT.setProcessDate(objTempAUT.getProcessDate());
		return objAUT;
	}
	
	/**
	 * populates CTD Segment
	 * @return CTD
	 */
	public CTD populateCTD()
	{

		
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		
		//CTD segment
		CTD objCTD = new CTD();    
		objCTD.addContactRole(objCWE);   
		objCTD.addContactAddress(PopulateDataType.populateXAD(HL7Constants.HL7_COMPONENT));//XAD     
		objCTD.setContactLocation(PopulateDataType.populatePL(HL7Constants.HL7_COMPONENT));    
		objCTD.addContactCommunicationInformation(PopulateDataType.populateXTN(HL7Constants.HL7_COMPONENT));//XTN    
		objCTD.setPreferredMethodContact(objCWE);//CWE
		objCTD.addContactIdentifiers(null);
		return objCTD;
	}

	/**
	 /** populates CTD Segment
	 * @return CTD
	 */ 
	public CTD populateCTD(CTD objTempCTD)
	{
		//CTD segment
		CTD objCTD = new CTD();
		if(objTempCTD.getContactRole().size() != 0)
			objCTD.setContactRole(objTempCTD.getContactRole());
		if(objTempCTD.getContactAddress().size() != 0)
			objCTD.setContactAddress(objTempCTD.getContactAddress());//XAD
		objCTD.setContactLocation(objTempCTD.getContactLocation());
		if(objTempCTD.getContactCommunicationInformation().size() != 0)
			objCTD.setContactCommunicationInformation(objTempCTD.getContactCommunicationInformation());//XTN
		objCTD.setPreferredMethodContact(objTempCTD.getPreferredMethodContact());//CWE
		if(objTempCTD.getContactIdentifiers().size() != 0)
			objCTD.setContactIdentifiers(objTempCTD.getContactIdentifiers());
		return objCTD;
	}
	
	/**
	 * populates PRD Segment
	 * @return PRD
	 */
	public PRD populatePRD()
	{

		EI objComprehensiveLocationIdentifier = PopulateDataType.populateEI(HL7Constants.HL7_SUBCOMPONENT);	
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		HD objHD=PopulateDataType.populateHD(HL7Constants.HL7_SUBCOMPONENT);
		
		//PRD Segment
		PRD objPRD = new PRD();		     
		objPRD.addProviderRole(objCWE);     
		objPRD.addProviderName(PopulateDataType.populateXPN(HL7Constants.HL7_COMPONENT));    
		objPRD.addProviderAddress(PopulateDataType.populateXAD(HL7Constants.HL7_COMPONENT));     
		objPRD.addProviderCommunicationInformation(PopulateDataType.populateXTN(HL7Constants.HL7_COMPONENT));     
		objPRD.setPreferredMethodofContact(objCWE);
		objPRD.setEffectiveStartDateofProviderRole("20030303");
		objPRD.setEffectiveEndDateofProviderRole("20080303");
		return objPRD;
	}

	/**
	 /** populates PRD Segment
	 * @return PRD
	 */ 
	public PRD populatePRD(PRD objTempPRD)
	{
		//PRD Segment
		PRD objPRD = new PRD();
		if(objTempPRD.getProviderRole().size() != 0)
			objPRD.setProviderRole(objTempPRD.getProviderRole());
		if(objTempPRD.getProviderName().size() != 0)
			objPRD.setProviderName(objTempPRD.getProviderName());
		if(objTempPRD.getProviderAddress().size() != 0)
			objPRD.setProviderAddress(objTempPRD.getProviderAddress());
		if(objTempPRD.getProviderCommunicationInformation().size() != 0)
			objPRD.setProviderCommunicationInformation(objTempPRD.getProviderCommunicationInformation());
		objPRD.setPreferredMethodofContact(objTempPRD.getPreferredMethodofContact());
		objPRD.setEffectiveStartDateofProviderRole(objTempPRD.getEffectiveStartDateofProviderRole());
		objPRD.setEffectiveEndDateofProviderRole(objTempPRD.getEffectiveEndDateofProviderRole());
		return objPRD;
	}
	
	/**
	 * populates PID Segment
	 * @return PID
	 */
	public PID populatePID()
	{
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		CX objCX=PopulateDataType.populateCX(HL7Constants.HL7_COMPONENT);
		//PID Segment
		PID objPID = new PID();
		objPID.setSetID_PID("5");
		objPID.addPatientIdentifierList(objCX);//CX
		objPID.addPatientName(PopulateDataType.populateXPN(HL7Constants.HL7_COMPONENT));//XPN    
		objPID.addMotherMaidenName(PopulateDataType.populateXPN(HL7Constants.HL7_COMPONENT));//XPN     
		objPID.setDateTimeOfBirth("20040304");     
		objPID.setAdministrativeSex(objCWE);
		objPID.addRace(objCWE);
		objPID.addPatientAddress(PopulateDataType.populateXAD(HL7Constants.HL7_COMPONENT));//XAD
		objPID.addPhoneNumberHome(PopulateDataType.populateXTN(HL7Constants.HL7_COMPONENT));//XTN    
		objPID.addPhoneNumberBusiness(PopulateDataType.populateXTN(HL7Constants.HL7_COMPONENT));//XTN     
		objPID.setPrimaryLanguage(objCWE);     
		objPID.setMaritalStatus(objCWE);     
		objPID.setReligion(objCWE);
		objPID.setPatientAccountNumber(objCX);//CX
		objPID.addMotherIdentifier(objCX);//CX     
		objPID.addEthnicGroup(objCWE);
		objPID.setMultipleBirthIndicator("Y");
		objPID.addCitizenship(objCWE);     
		objPID.setVeteransMilitaryStatus(objCWE);
		objPID.setPatientDeathDateTime("20030303");//DTM
		objPID.setPatientDeathIndicator("Y");
		objPID.setIdentityUnknownIndicator("N");     
		objPID.addIdentityReliabilityCode(objCWE);     
		objPID.setLastUpdateDateTime("20030303");
		objPID.setLastUpdateFacility("NID", "UI", "GUID");		     
		objPID.setTaxonomicClassificationCode(objCWE);     
		objPID.setBreedCode(objCWE);
		objPID.addProductionClassCode(objCWE);     
		objPID.addTribalCitizenship(objCWE);
		return objPID;
	}

	/**
	 /** populates PID Segment
	 * @return PID
	 */ 
	public PID populatePID(PID objTempPID)
	{
		//PID Segment
		PID objPID = new PID();
		objPID.setSetID_PID(objTempPID.getSetID_PID());
		if(objTempPID.getPatientIdentifierList().size() != 0)
			objPID.setPatientIdentifierList(objTempPID.getPatientIdentifierList());//CX	
		if(objTempPID.getPatientName().size() != 0)
			objPID.setPatientName(objTempPID.getPatientName());//XPN
		if(objTempPID.getMotherMaidenName().size() != 0)
			objPID.setMotherMaidenName(objTempPID.getMotherMaidenName());//XPN
		objPID.setDateTimeOfBirth(objTempPID.getDateTimeOfBirth());
		objPID.setAdministrativeSex(objTempPID.getAdministrativeSex());	
		if(objTempPID.getRace().size() != 0)
			objPID.setRace(objTempPID.getRace());
		if(objTempPID.getPatientAddress().size() != 0)
			objPID.setPatientAddress(objTempPID.getPatientAddress());//XAD		     
		if(objTempPID.getPhoneNumberHome().size() != 0)
			objPID.setPhoneNumberHome(objTempPID.getPhoneNumberHome());//XTN
		if(objTempPID.getPhoneNumberBusiness().size() != 0)
			objPID.setPhoneNumberBusiness(objTempPID.getPhoneNumberBusiness());//XTN
		objPID.setPrimaryLanguage(objTempPID.getPrimaryLanguage());
		objPID.setMaritalStatus(objTempPID.getMaritalStatus());
		objPID.setReligion(objTempPID.getReligion());
		objPID.setPatientAccountNumber(objTempPID.getPatientAccountNumber());//CX
		if(objTempPID.getMotherIdentifier().size() != 0)
			objPID.setMotherIdentifier(objTempPID.getMotherIdentifier());//CX
		if(objTempPID.getEthnicGroup().size() != 0)
			objPID.setEthnicGroup(objTempPID.getEthnicGroup());
		objPID.setMultipleBirthIndicator(objTempPID.getMultipleBirthIndicator());
		if(objTempPID.getCitizenship().size() != 0)
			objPID.setCitizenship(objTempPID.getCitizenship());
		objPID.setVeteransMilitaryStatus(objTempPID.getVeteransMilitaryStatus());		     
		objPID.setPatientDeathDateTime(objTempPID.getPatientDeathDateTime());//DTM
		objPID.setPatientDeathIndicator(objTempPID.getPatientDeathIndicator());
		objPID.setIdentityUnknownIndicator(objTempPID.getIdentityUnknownIndicator());
		if(objTempPID.getIdentityReliabilityCode().size() != 0)
			objPID.setIdentityReliabilityCode(objTempPID.getIdentityReliabilityCode());
		objPID.setLastUpdateDateTime(objTempPID.getLastUpdateDateTime());
		objPID.setLastUpdateFacility(objTempPID.getLastUpdateFacility());	
		objPID.setTaxonomicClassificationCode(objTempPID.getTaxonomicClassificationCode());		
		objPID.setBreedCode(objTempPID.getBreedCode());
		if(objTempPID.getProductionClassCode().size() != 0)
			objPID.setProductionClassCode(objTempPID.getProductionClassCode());
		if(objTempPID.getTribalCitizenship().size() != 0)
			objPID.setTribalCitizenship(objTempPID.getTribalCitizenship());
		if(objTempPID.getPatientTelecommunicationInformation().size() != 0)
		objPID.setPatientTelecommunicationInformation(objTempPID.getPatientTelecommunicationInformation());
		return objPID;
	}

	/**
	 * populates ACC Segment
	 * @return ACC
	 */
	public ACC populateACC()
	{
		
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		
		XAD objXAD=PopulateDataType.populateXAD(HL7Constants.HL7_COMPONENT);
		XCN objXCN=PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT);
		ACC objACC = new ACC();
		objACC.setAccidentDateOrTime("20030303");//DTM
		objACC.setAccidentCode(objCWE);
		objACC.setAutoAccidentState(objCWE);
		objACC.setAccidentJobRelatedIndicator("Y");
		objACC.setAccidentDeathIndicator("N");
		objACC.setEnteredBy(objXCN);
		objACC.setPoliceNotifiedIndicator("Y");
		objACC.setAccidentAddress(objXAD);
		return objACC;
	}

	/**
	 /** populates ACC Segment
	 * @return ACC
	 */ 
	public ACC populateACC(ACC objTempACC)
	{
		//ACC segment
		ACC objACC = new ACC();
		objACC.setAccidentDateOrTime(objTempACC.getAccidentDateOrTime());//DTM
		objACC.setAccidentCode(objTempACC.getAccidentCode());
		objACC.setAutoAccidentState(objTempACC.getAutoAccidentState());
		objACC.setAccidentJobRelatedIndicator(objTempACC.getAccidentJobRelatedIndicator());
		objACC.setAccidentDeathIndicator(objTempACC.getAccidentDeathIndicator());
		objACC.setEnteredBy(objTempACC.getEnteredBy());//XCN
		objACC.setPoliceNotifiedIndicator(objTempACC.getPoliceNotifiedIndicator());
		objACC.setAccidentAddress(objTempACC.getAccidentAddress());//XAD		
		
		return objACC;
	}

	/**
	 * populates OBR Segment
	 * @return OBR
	 */
	public OBR populateOBR()
	{
		
	
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		XCN objXCN=PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT);
		MO objMO = PopulateDataType.populateMO(HL7Constants.HL7_SUBCOMPONENT);
		objMO.setQuantity("99");
		//OBR Segment
		OBR objOBR = new OBR();
		objOBR.setSetID_OBR("2");//SI
		objOBR.setUniversalServiceIdentifier(objCWE);//CWE
		objOBR.setObservationDateTime("200702");//DTM
		objOBR.addOrderingProvider(objXCN);//XCN
		objOBR.addOrderCallbackPhoneNumber(PopulateDataType.populateXTN(HL7Constants.HL7_COMPONENT));//XTN
		objOBR.setResultsRptStatusChng_DateTime("20070202");//DTM
		objOBR.setChargetoPractice(objMO,PopulateDataType.populateCWE(HL7Constants.HL7_SUBCOMPONENT));//MOC
		objOBR.setDiagnosticServSectID("AU");//ID
		objOBR.setResultStatus("A");//ID		    
		objOBR.setParentResult(PopulateDataType.populatePRL(HL7Constants.HL7_SUBCOMPONENT));	    
		objOBR.addResultCopiesTo(objXCN);//XCN
		objOBR.addReasonforStudy(objCWE);//CWE
		objOBR.setScheduledDateTime("20070202");//DTM
		objOBR.addTransportLogisticsofCollectedSample(objCWE);//CWE
		objOBR.addCollectorComment(objCWE);//CWE
		objOBR.setTransportArrangementResponsibility(objCWE);//CWE
		objOBR.addPlannedPatientTransportComment(objCWE);//CWE
		objOBR.setProcedureCode(PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT));//CNE
		objOBR.addProcedureCodeModifier(PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT));//CNE
		objOBR.addPlacerSupplementalServiceInformation(objCWE);//CWE
		objOBR.addFillerSupplementalServiceInformation(objCWE);//CWE
		objOBR.setMedicallyNecessaryDuplicateProcedureReason(objCWE);//CWE
		objOBR.setResultHandling(objCWE);//IS
		objOBR.setParentUniversalServiceIdentifier(objCWE);//CWE
		
		return objOBR;
	}

	/**
	 /** populates OBR Segment
	 * @return OBR
	 */ 
	public OBR populateOBR(OBR objTempOBR)
	{
		//OBR Segment
		OBR objOBR = new OBR();
		objOBR.setSetID_OBR(objTempOBR.getSetID_OBR());//SI
		objOBR.setUniversalServiceIdentifier(objTempOBR.getUniversalServiceIdentifier());//CWE
		objOBR.setObservationDateTime(objTempOBR.getObservationDateTime());//DTM
		if(objTempOBR.getOrderingProvider().size() != 0)
			objOBR.setOrderingProvider(objTempOBR.getOrderingProvider());//XCN
		if(objTempOBR.getOrderCallbackPhoneNumber().size() != 0)
			objOBR.setOrderCallbackPhoneNumber(objTempOBR.getOrderCallbackPhoneNumber());//XTN
		objOBR.setResultsRptStatusChng_DateTime(objTempOBR.getResultsRptStatusChng_DateTime());//DTM
		objOBR.setChargetoPractice(objTempOBR.getChargetoPractice());//MOC
		objOBR.setDiagnosticServSectID(objTempOBR.getDiagnosticServSectID());//ID
		objOBR.setResultStatus(objTempOBR.getResultStatus());//ID
		objOBR.setParentResult(objTempOBR.getParentResult());//PRL
		if(objTempOBR.getResultCopiesTo().size() != 0)
			objOBR.setResultCopiesTo(objTempOBR.getResultCopiesTo());//XCN
		objOBR.setParent(objTempOBR.getParent());//EIP
		if(objTempOBR.getReasonforStudy().size() != 0)
			objOBR.setReasonforStudy(objTempOBR.getReasonforStudy());//CWE
		objOBR.setScheduledDateTime(objTempOBR.getScheduledDateTime());//DTM
		objOBR.setNumberofSampleContainers(objTempOBR.getNumberofSampleContainers());//NM
		if(objTempOBR.getTransportLogisticsofCollectedSample().size() != 0)
			objOBR.setTransportLogisticsofCollectedSample(objTempOBR.getTransportLogisticsofCollectedSample());//CWE
		if(objTempOBR.getCollectorComment().size() != 0)
			objOBR.setCollectorComment(objTempOBR.getCollectorComment());//CWE
		objOBR.setTransportArrangementResponsibility(objTempOBR.getTransportArrangementResponsibility());//CWE
		if(objTempOBR.getPlannedPatientTransportComment().size() != 0)
			objOBR.setPlannedPatientTransportComment(objTempOBR.getPlannedPatientTransportComment());//CWE
		objOBR.setProcedureCode(objTempOBR.getProcedureCode());//CWE
		if(objTempOBR.getProcedureCodeModifier().size() != 0)
			objOBR.setProcedureCodeModifier(objTempOBR.getProcedureCodeModifier());//CWE
		if(objTempOBR.getPlacerSupplementalServiceInformation().size() != 0)
			objOBR.setPlacerSupplementalServiceInformation(objTempOBR.getPlacerSupplementalServiceInformation());//CWE
		if(objTempOBR.getFillerSupplementalServiceInformation().size() != 0)
			objOBR.setFillerSupplementalServiceInformation(objTempOBR.getFillerSupplementalServiceInformation());//CWE
		objOBR.setMedicallyNecessaryDuplicateProcedureReason(objTempOBR.getMedicallyNecessaryDuplicateProcedureReason());//CWE
		objOBR.setResultHandling(objTempOBR.getResultHandling());//IS
		objOBR.setParentUniversalServiceIdentifier(objTempOBR.getParentUniversalServiceIdentifier());
		objOBR.setParentOrder(objTempOBR.getParentOrder());
		return objOBR;
	}
	
	
	/**
	 * populates NTE Segment
	 * @return NTE
	 */
	public NTE populateNTE()
	{
		//NTE segment
		NTE objNTE = new NTE();
		objNTE.setSetID_NTE("2");
		objNTE.setCommentType(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));
		objNTE.setEnteredBy(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));
		objNTE.setEffectiveStartDate("20170101");
		objNTE.setExpirationDate("20171231");
		return objNTE;
	}

	/** populates NTE Segment
	 * @return NTE
	 */ 
	public NTE populateNTE(NTE objTempNTE)
	{
		//NTE segment
		NTE objNTE = new NTE();
		objNTE.setSetID_NTE(objTempNTE.getSetID_NTE());
		objNTE.setCommentType(objTempNTE.getCommentType());
		objNTE.setEnteredBy(objTempNTE.getEnteredBy());
		objNTE.setEffectiveStartDate(objTempNTE.getEffectiveStartDate());
		objNTE.setExpirationDate(objTempNTE.getExpirationDate());
		return objNTE;
	}
	
	
	
	

	/**
	 * populates QAK Segment
	 * @return QAK
	 */
	public QAK populateQAK()
	{
		//QAK Segment
		QAK objQAK = new QAK(); 
		objQAK.setQueryTag("QT123");
		objQAK.setMessageQueryName(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));	     
		objQAK.setHitCountTotal("10");
		objQAK.setHitsremaining("5");
		return objQAK;
	}

	/** populates QAK Segment
	 * @return QAK
	 */ 
	public QAK populateQAK(QAK objTempQAK)
	{
		//QAK Segment
		QAK objQAK = new QAK(); 
		objQAK.setQueryTag(objTempQAK.getQueryTag());
		objQAK.setMessageQueryName(objTempQAK.getMessageQueryName());
		objQAK.setHitCountTotal(objTempQAK.getHitCountTotal());
		objQAK.setHitsremaining(objTempQAK.getHitsremaining());
		return objQAK;
	}

	
	/**
	 * populates ORC Segment
	 * @return ORC
	 */
	public ORC populateORC()
	{
		CWE objCWE = PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		EI objEI = PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT);
		
		//ORC Segment
		ORC objORC = new ORC(); 
		objORC.setOrderControl("CH");
		objORC.setPlacerOrderNumber(objEI);
		objORC.setFillerOrderNumber(objEI);//EI
		objORC.setPlacerGroupNumber(PopulateDataType.populateEIP(HL7Constants.HL7_SUBCOMPONENT));  
		objORC.setDateTimeOfTransaction("20070202");//DTM		    
		objORC.addEnteredBy(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));
		objORC.addVerifiedBy(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));//XCN
		objORC.addOrderingProvider(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));//XCN
		objORC.setEntererLocation(PopulateDataType.populatePL(HL7Constants.HL7_SUBCOMPONENT));
		objORC.addCallBackPhNo(PopulateDataType.populateXTN(HL7Constants.HL7_COMPONENT));//XTN
		objORC.setOrderEffectiveDateTime("20070202");//DTM
		objORC.setOrderControlCodeReason(objCWE);//CWE
		objORC.setEnteringOrganization(objCWE);//CWE
		objORC.setEnteringDevice(objCWE);//CWE
		objORC.addActionBy(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));//XCN
		objORC.setAdvancedBeneficiaryNoticeCode(objCWE);//CWE
		objORC.addOrderingFacilityName(PopulateDataType.populateXON(HL7Constants.HL7_COMPONENT));//XON
		objORC.addOrderingFacilityAddress(PopulateDataType.populateXAD(HL7Constants.HL7_COMPONENT));//XAD
		objORC.addOrderingFacilityPhNo(PopulateDataType.populateXTN(HL7Constants.HL7_COMPONENT));//XTN
		objORC.addOrderingProviderAddress(PopulateDataType.populateXAD(HL7Constants.HL7_COMPONENT));//XAD
		objORC.setOrderStatusModifier(objCWE);//CWE
		objORC.setAdvancedBeneficiaryNoticeOverrideReason(objCWE);//CWE
		objORC.setFillersExpectedAvailabilityDateTime("20070202");//DTM
		objORC.setConfidentialityCode(objCWE);//CWE
		objORC.setOrderType(objCWE);//CWE
		objORC.setEntererAuthorizationMode(PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT));//CNE
		objORC.setParentUniversalServiceIdentifier(objCWE);
		objORC.addAlternatePlacerOrderNumber(PopulateDataType.populateCX(HL7Constants.HL7_COMPONENT));
		objORC.addOrderWorkflowProfile(objCWE);
		return objORC;
	}

	/**
	 /** populates ORC Segment
	 * @return ORC
	 */ 
	public ORC populateORC(ORC objTempORC)
	{
		//ORC Segment
		ORC objORC = new ORC(); 
		objORC.setOrderControl(objTempORC.getOrderControl());
		objORC.setPlacerOrderNumber(objTempORC.getPlacerOrderNumber());//EI
		objORC.setFillerOrderNumber(objTempORC.getFillerOrderNumber());//EI
		objORC.setPlacerGroupNumber(objTempORC.getPlacerGroupNumber());//EI
		objORC.setDateTimeOfTransaction(objTempORC.getDateTimeOfTransaction());//DTM
		if(objTempORC.getEnteredBy().size() != 0)
			objORC.setEnteredBy(objTempORC.getEnteredBy());//XCN
		if(objTempORC.getVerifiedBy().size() != 0)
			objORC.setVerifiedBy(objTempORC.getVerifiedBy());//XCN
		if(objTempORC.getOrderingProvider().size() != 0)
			objORC.setOrderingProvider(objTempORC.getOrderingProvider());//XCN
		objORC.setEntererLocation(objTempORC.getEntererLocation());//PL
		if(objTempORC.getCallBackPhNo().size() != 0)
			objORC.setCallBackPhNo(objTempORC.getCallBackPhNo());//XTN
		objORC.setOrderEffectiveDateTime(objTempORC.getOrderEffectiveDateTime());//DTM
		objORC.setOrderControlCodeReason(objTempORC.getOrderControlCodeReason());//CWE
		objORC.setEnteringOrganization(objTempORC.getEnteringOrganization());//CWE
		objORC.setEnteringDevice(objTempORC.getEnteringDevice());//CWE
		if(objTempORC.getActionBy().size() != 0)
			objORC.setActionBy(objTempORC.getActionBy());//XCN
		objORC.setAdvancedBeneficiaryNoticeCode(objTempORC.getAdvancedBeneficiaryNoticeCode());//CWE
		if(objTempORC.getOrderingFacilityName().size() != 0)
			objORC.setOrderingFacilityName(objTempORC.getOrderingFacilityName());//XON
		if(objTempORC.getOrderingFacilityAddress().size() != 0)
			objORC.setOrderingFacilityAddress(objTempORC.getOrderingFacilityAddress());//XAD
		if(objTempORC.getOrderingFacilityPhNo().size() != 0)
			objORC.setOrderingFacilityPhNo(objTempORC.getOrderingFacilityPhNo());//XTN
		if(objTempORC.getOrderingProviderAddress().size() != 0)
			objORC.setOrderingProviderAddress(objTempORC.getOrderingProviderAddress());//XAD
		objORC.setOrderStatusModifier(objTempORC.getOrderStatusModifier());//CWE
		objORC.setAdvancedBeneficiaryNoticeOverrideReason(objTempORC.getAdvancedBeneficiaryNoticeOverrideReason());//CWE
		objORC.setFillersExpectedAvailabilityDateTime(objTempORC.getFillersExpectedAvailabilityDateTime());//DTM
		objORC.setConfidentialityCode(objTempORC.getConfidentialityCode());//CWE
		objORC.setOrderType(objTempORC.getOrderType());//CWE
		objORC.setEntererAuthorizationMode(objTempORC.getEntererAuthorizationMode());//CNE
		objORC.setParentUniversalServiceIdentifier(objTempORC.getParentUniversalServiceIdentifier());
		objORC.setAlternatePlacerOrderNumber(objTempORC.getAlternatePlacerOrderNumber());
		objORC.setOrderWorkflowProfile(objTempORC.getOrderWorkflowProfile());
		return objORC;
	}
	
	/**
	 * populates ERR Segment
	 * @return ERR
	 */
	public ERR populateERR()
	{
		CWE objCWE =PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		
		//ERR Segment
		ERR objERR = new ERR();      
		objERR.addErrorLocation("MRG", "12", "", "", "", "");    
		objERR.setHL7ErrorCode(objCWE);//CWE
		objERR.setSeverity("W");     
		objERR.setApplicationErrorCode(objCWE);
		objERR.addInformPersonIndicator(objCWE);
		objERR.setOverrideType(objCWE);//CWE
		objERR.addOverrideReasonCode(objCWE);//CWE     
		objERR.addHelpDeskContactPoint(PopulateDataType.populateXTN(HL7Constants.HL7_COMPONENT));//XTN
		return objERR;
	}
	
	/**
	 /** populates ERR Segment
	 * @return ERR
	 */ 
	public ERR populateERR(ERR objTempERR)
	{
		//ERR Segment
		ERR objERR = new ERR(); 
		if(objTempERR.getErrorLocation().size() != 0)
			objERR.setErrorLocation(objTempERR.getErrorLocation());
		objERR.setHL7ErrorCode(objTempERR.getHL7ErrorCode());//CWE
		objERR.setSeverity(objTempERR.getSeverity());
		objERR.setApplicationErrorCode(objTempERR.getApplicationErrorCode());
		objERR.setInformPersonIndicator(objTempERR.getInformPersonIndicator());
		objERR.setOverrideType(objTempERR.getOverrideType());//CWE
		if(objTempERR.getOverrideReasonCode().size() != 0)
			objERR.setOverrideReasonCode(objTempERR.getOverrideReasonCode());//CWE
		if(objTempERR.getHelpDeskContactPoint().size() != 0)
			objERR.setHelpDeskContactPoint(objTempERR.getHelpDeskContactPoint());//XTN
		return objERR;
	}
	
	/**
	 * populates GOL Segment
	 * @return GOL
	 */
	public GOL populateGOL()
	{
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		
		
		//GOL Segment
		GOL objGOL = new GOL(); 
		objGOL.setActionCode("AD");//ID
		objGOL.setActionDateTime("20070202");//DTM
		objGOL.setGoalID(objCWE);//CWE
		objGOL.setGoalInstanceID(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));//EI
		objGOL.setEpisodeofCareID(null);//EI
		objGOL.setGoalListPriority("5");//NM
		objGOL.setGoalClassification(objCWE);//CWE
		objGOL.setGoalManagementDiscipline(objCWE);//CWE
		objGOL.setCurrentGoalReviewStatus(objCWE);//CWE
		objGOL.setCurrentGoalReviewDateTime("20170707");//DTM
		objGOL.setNextGoalReviewDateTime("20171007");//DTM
		objGOL.setPreviousGoalReviewDateTime("20170407");//DTM
		objGOL.setGoalEvaluation(objCWE);//CWE
		objGOL.setGoalLifeCycleStatus(objCWE);//CWE
		objGOL.addGoalTargetType(objCWE);//CWE
		objGOL.addGoalTargetName(PopulateDataType.populateXPN(HL7Constants.HL7_COMPONENT));//XPN
		objGOL.setMoodCode(PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT));//CNE
		return objGOL;
	}

	/**
	 /** populates GOL Segment
	 * @return GOL
	 */ 
	public GOL populateGOL(GOL objTempGOL)
	{
		//GOL Segment
		GOL objGOL = new GOL(); 
		objGOL.setActionCode(objTempGOL.getActionCode());//ID
		objGOL.setActionDateTime(objTempGOL.getActionDateTime());//DTM
		objGOL.setGoalID(objTempGOL.getGoalID());//CWE
		objGOL.setGoalInstanceID(objTempGOL.getGoalInstanceID());//EI
		objGOL.setEpisodeofCareID(objTempGOL.getEpisodeofCareID());//EI
		objGOL.setGoalListPriority(objTempGOL.getGoalListPriority());//NM
		objGOL.setGoalClassification(objTempGOL.getGoalClassification());//CWE
		objGOL.setGoalManagementDiscipline(objTempGOL.getGoalManagementDiscipline());//CWE
		objGOL.setCurrentGoalReviewStatus(objTempGOL.getCurrentGoalReviewStatus());//CWE
		objGOL.setCurrentGoalReviewDateTime(objTempGOL.getCurrentGoalReviewDateTime());//DTM
		objGOL.setNextGoalReviewDateTime(objTempGOL.getNextGoalReviewDateTime());//DTM
		objGOL.setPreviousGoalReviewDateTime(objTempGOL.getPreviousGoalReviewDateTime());//DTM
		objGOL.setGoalEvaluation(objTempGOL.getGoalEvaluation());//CWE
		objGOL.setGoalLifeCycleStatus(objTempGOL.getGoalLifeCycleStatus());//CWE
		if(objTempGOL.getGoalTargetType().size() != 0)
			objGOL.setGoalTargetType(objTempGOL.getGoalTargetType());//CWE
		if(objTempGOL.getGoalTargetName().size() != 0)
			objGOL.setGoalTargetName(objTempGOL.getGoalTargetName());//XPN
		objGOL.setMoodCode(objTempGOL.getMoodCode());//CNE
		return objGOL;
	}
	

	/**
	 * populates PRB Segment
	 * @return PRB
	 */
	public PRB populatePRB()
	{
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		//PRB Segment
		PRB objPRB = new PRB();
		objPRB.setActionCode("AD");
		objPRB.setActionDateOrTime("20070202");//DTM
		objPRB.setProblemID(objCWE);//CWE
		objPRB.setProblemInstanceID(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));//EI
		objPRB.setMoodCode(PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT));//CNE
		return objPRB;
	}

	/**
	 * populates PRB Segment
	 * @return PRB
	 */
	public PRB populatePRB(PRB objTempPRB)
	{
		//PRB Segment
		PRB objPRB = new PRB();
		objPRB.setActionCode(objTempPRB.getActionCode());
		objPRB.setActionDateOrTime(objTempPRB.getActionDateOrTime());//DTM
		objPRB.setProblemID(objTempPRB.getProblemID());//CWE
		objPRB.setProblemInstanceID(objTempPRB.getProblemInstanceID());//EI
		objPRB.setMoodCode(objTempPRB.getMoodCode());//CNE
		return objPRB;
	}
	

	/**
	 * populates PTH Segment
	 * @return PTH
	 */
	public PTH populatePTH()
	{
		//PTH Segment
		PTH objPTH = new PTH();
		objPTH.setActionCode("AD");
		objPTH.setPathwayID(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		objPTH.setPathwayInstanceID(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));//EI
		objPTH.setPathwayEstablishedDateTime("20110202");//DTM
		objPTH.setPathwayLifeCycleStatus(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		objPTH.setChangePathwayLifeCycleStatusDateTime("20110202");//DTM
		objPTH.setMoodCode(PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT));//CNE
		return objPTH;		
	}

	/**
	 /** populates PTH Segment
	 * @return PTH
	 */ 
	public PTH populatePTH(PTH objTempPTH)
	{
		//PTH Segment
		PTH objPTH = new PTH();
		objPTH.setActionCode(objTempPTH.getActionCode());
		objPTH.setPathwayID(objTempPTH.getPathwayID());//CWE
		objPTH.setPathwayInstanceID(objTempPTH.getPathwayInstanceID());//EI
		objPTH.setPathwayEstablishedDateTime(objTempPTH.getPathwayEstablishedDateTime());//DTM
		objPTH.setPathwayLifeCycleStatus(objTempPTH.getPathwayLifeCycleStatus());//CWE
		objPTH.setChangePathwayLifeCycleStatusDateTime(objTempPTH.getChangePathwayLifeCycleStatusDateTime());//DTM
		objPTH.setMoodCode(objTempPTH.getMoodCode());//CNE
		return objPTH;		
	}

	/**
	 * populates VAR Segment
	 * @return VAR
	 */
	public VAR populateVAR()
	{

		//VAR Segment
		VAR objVAR = new VAR();
		objVAR.setVarianceInstanceID(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));//EI
		objVAR.setDocumentedDateTime("20110202");//DTM
		objVAR.addVarianceOriginator(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));//XCN
		objVAR.setVarianceClassification(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		return objVAR;
	}

	/**
	 /** populates VAR Segment
	 * @return VAR
	 */ 
	public VAR populateVAR(VAR objTempVAR)
	{
		//VAR Segment
		VAR objVAR = new VAR();
		objVAR.setVarianceInstanceID(objTempVAR.getVarianceInstanceID());//EI
		objVAR.setDocumentedDateTime(objTempVAR.getDocumentedDateTime());//DTM
		if(objTempVAR.getVarianceOriginator().size() != 0)
			objVAR.setVarianceOriginator(objTempVAR.getVarianceOriginator());//XCN
		objVAR.setVarianceClassification(objTempVAR.getVarianceClassification());//CWE

		return objVAR;
	}
	
	
	/**
	 * populates AIG Segment
	 * @return AIG
	 */
	public AIG populateAIG()
	{
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		
		//AIG Segment
		AIG objAIG = new AIG();
		objAIG.setSetID_AIG("5");
		objAIG.setSegmentActionCode("A");
		objAIG.setResourceID(objCWE);//CWE
		objAIG.setResourceType(objCWE);//CWE   
		objAIG.setStartDateTime("20110202");//DTM
		objAIG.setStartDateTimeOffset("5");//NM
		objAIG.setStartDateTimeOffsetUnits(PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT));//CWE
		objAIG.setAllowSubstitutionCode(objCWE);//IS
		objAIG.setFillerStatusCode(objCWE);//CWE
		
		return objAIG;
	}	

	/**
	 /** populates AIG Segment
	 * @return AIG
	 */ 
	public AIG populateAIG(AIG objTempAIG)
	{
		//AIG Segment
		AIG objAIG = new AIG();
		objAIG.setSetID_AIG(objTempAIG.getSetID_AIG());
		objAIG.setSegmentActionCode(objTempAIG.getSegmentActionCode());
		objAIG.setResourceID(objTempAIG.getResourceID());//CWE
		objAIG.setResourceType(objTempAIG.getResourceType());//CWE
		objAIG.setStartDateTime(objTempAIG.getStartDateTime());//DTM
		objAIG.setStartDateTimeOffset(objTempAIG.getStartDateTimeOffset());//NM
		objAIG.setStartDateTimeOffsetUnits(objTempAIG.getStartDateTimeOffsetUnits());//CWE
		objAIG.setAllowSubstitutionCode(objTempAIG.getAllowSubstitutionCode());//IS
		objAIG.setFillerStatusCode(objTempAIG.getFillerStatusCode());//CWE
		return objAIG;
	}

	
	
	/**
	 * populates AIL Segment
	 * @return AIL
	 */
	public AIL populateAIL()
	{
		
		//AIL Segment
		AIL objAIL = new AIL();
		objAIL.setSetID_AIL("4");
		objAIL.setSegmentActionCode("A");
		objAIL.setLocationType_AIL(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		objAIL.setStartDateTime("20110202");//DTM
		objAIL.setStartDateTimeOffset("5");//NM
		objAIL.setStartDateTimeOffsetUnits(PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT));//CWE
		objAIL.setAllowSubstitutionCode(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//IS
		objAIL.setFillerStatusCode(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		
		return objAIL;
	}

	/**
	 /** populates AIL Segment
	 * @return AIL
	 */ 
	public AIL populateAIL(AIL objTempAIL)
	{
		//AIL Segment
		AIL objAIL = new AIL();
		objAIL.setSetID_AIL(objTempAIL.getSetID_AIL());
		objAIL.setSegmentActionCode(objTempAIL.getSegmentActionCode());
		objAIL.setLocationType_AIL(objTempAIL.getLocationType_AIL());//CWE
		objAIL.setStartDateTime(objTempAIL.getStartDateTime());//DTM
		objAIL.setStartDateTimeOffset(objTempAIL.getStartDateTimeOffset());//NM
		objAIL.setStartDateTimeOffsetUnits(objTempAIL.getStartDateTimeOffsetUnits());//CWE
		objAIL.setAllowSubstitutionCode(objTempAIL.getAllowSubstitutionCode());//IS
		objAIL.setFillerStatusCode(objTempAIL.getFillerStatusCode());//CWE
		return objAIL;
	}


	/**
	 * populates AIP Segment
	 * @return AIP
	 */
	public AIP populateAIP()
	{

		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		//AIP Segment
		AIP objAIP = new AIP();
		objAIP.setSetID_AIP("3");
		objAIP.setSegmentActionCode("A");
		objAIP.addPersonnelResourceID(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));//XCN
		objAIP.setResourceType(objCWE);//CWE
		objAIP.setStartDateTime("20110202");//DTM
		objAIP.setStartDateTimeOffset("5");//NM
		objAIP.setStartDateTimeOffsetUnits(PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT));//CWE
		
		return objAIP;
	}

	/**
	 /** populates AIP Segment
	 * @return AIP
	 */ 
	public AIP populateAIP(AIP objTempAIP)
	{
		//AIP Segment
		AIP objAIP = new AIP();
		objAIP.setSetID_AIP(objTempAIP.getSetID_AIP());
		objAIP.setSegmentActionCode(objTempAIP.getSegmentActionCode());
		if(objTempAIP.getPersonnelResourceID().size() != 0)
			objAIP.setPersonnelResourceID(objTempAIP.getPersonnelResourceID());//XCN
		objAIP.setResourceType(objTempAIP.getResourceType());//CWE
		objAIP.setStartDateTime(objTempAIP.getStartDateTime());//DTM
		objAIP.setStartDateTimeOffset(objTempAIP.getStartDateTimeOffset());//NM
		objAIP.setStartDateTimeOffsetUnits(objTempAIP.getStartDateTimeOffsetUnits());//CWE
		return objAIP;
	}

	/**
	 * populates AIS Segment
	 * @return AIS
	 */
	public AIS populateAIS()
	{
		//AIS Segment
		AIS objAIS = new AIS();
		objAIS.setSetID_AIS("2");
		objAIS.setSegmentActionCode("A");
		objAIS.setUniversalServiceIdentifier(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		objAIS.setStartDateTime("20110202");//DTM
		objAIS.setStartDateTimeOffset("5");//NM
		objAIS.setStartDateTimeOffsetUnits(PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT));//CWE
		objAIS.setAllowSubstitutionCode(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//IS
		objAIS.setFillerStatusCode(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		
		return objAIS;
	}

	/**
	 /** populates AIS Segment
	 * @return AIS
	 */ 
	public AIS populateAIS(AIS objTempAIS)
	{
		//AIS Segment
		AIS objAIS = new AIS();
		objAIS.setSetID_AIS(objTempAIS.getSetID_AIS());
		objAIS.setSegmentActionCode(objTempAIS.getSegmentActionCode());
		objAIS.setUniversalServiceIdentifier(objTempAIS.getUniversalServiceIdentifier());//CWE
		objAIS.setStartDateTime(objTempAIS.getStartDateTime());//DTM
		objAIS.setStartDateTimeOffset(objTempAIS.getStartDateTimeOffset());//NM
		objAIS.setStartDateTimeOffsetUnits(objTempAIS.getStartDateTimeOffsetUnits());//CWE
		objAIS.setAllowSubstitutionCode(objTempAIS.getAllowSubstitutionCode());//IS
		objAIS.setFillerStatusCode(objTempAIS.getFillerStatusCode());//CWE
		return objAIS;
	}


	/**
	 * populates APR Segment
	 * @return APR
	 */
	public APR populateAPR()
	{

		//APR Segment
		APR objAPR = new APR();
		objAPR.addTimeSelectionCriteria(PopulateDataType.populateSCV(HL7Constants.HL7_COMPONENT));
		objAPR.addResourceSelectionCriteria(PopulateDataType.populateSCV(HL7Constants.HL7_SUBCOMPONENT));//SCV
		
		return objAPR;
	}

	/**
	 /** populates APR Segment
	 * @return APR
	 */ 
	public APR populateAPR(APR objTempAPR)
	{
		//APR Segment
		APR objAPR = new APR();
		if(objTempAPR.getTimeSelectionCriteria().size() != 0)
			objAPR.setTimeSelectionCriteria(objTempAPR.getTimeSelectionCriteria());//SCV
		if(objTempAPR.getResourceSelectionCriteria().size() != 0)
			objAPR.setResourceSelectionCriteria(objTempAPR.getResourceSelectionCriteria());//SCV
		
		return objAPR;
	}
	
	
	/**
	 * populates ARQ Segment
	 * @return ARQ
	 */
	public ARQ populateARQ()
	{
		
		EI objEI = PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT);		
		//ARQ Segment
		ARQ objARQ = new ARQ();
		objARQ.setPlacerAppointmentID(objEI);//EI
		objARQ.setFillerAppointmentID(objEI);//EI
		objARQ.setOccurrenceNumber("145");
		objARQ.setAppointmentDurationUnits(PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT));//CNE
		objARQ.addPlacerContactPerson(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));
		objARQ.addPlacerContactPhoneNumber(PopulateDataType.populateXTN(HL7Constants.HL7_COMPONENT));//XTN
		objARQ.addPlacerContactAddress(PopulateDataType.populateXAD(HL7Constants.HL7_COMPONENT));//XAD
		objARQ.addEnteredByPerson(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));//XCN
		objARQ.addEnteredByPhoneNumber(PopulateDataType.populateXTN(HL7Constants.HL7_COMPONENT));//XTN
		objARQ.addPlacerOrderNumber(objEI);//EI
		objARQ.addFillerOrderNumber(objEI);//EI
		
		return objARQ;
	}

	/**
	 /** populates ARQ Segment
	 * @return ARQ
	 */ 
	public ARQ populateARQ(ARQ objTempARQ)
	{
		//ARQ Segment
		ARQ objARQ = new ARQ();
		objARQ.setPlacerAppointmentID(objTempARQ.getPlacerAppointmentID());//EI
		objARQ.setFillerAppointmentID(objTempARQ.getFillerAppointmentID());//EI
		objARQ.setOccurrenceNumber(objTempARQ.getOccurrenceNumber());
		objARQ.setAppointmentDurationUnits(objTempARQ.getAppointmentDurationUnits());//CWE
		if(objTempARQ.getPlacerContactPerson().size() != 0)
			objARQ.setPlacerContactPerson(objTempARQ.getPlacerContactPerson());
		if(objTempARQ.getPlacerContactPhoneNumber().size() != 0)
			objARQ.setPlacerContactPhoneNumber(objTempARQ.getPlacerContactPhoneNumber());//XTN
		if(objTempARQ.getPlacerContactAddress().size() != 0)
			objARQ.setPlacerContactAddress(objTempARQ.getPlacerContactAddress());//XAD
		if(objTempARQ.getEnteredByPerson().size() != 0)
			objARQ.setEnteredByPerson(objTempARQ.getEnteredByPerson());//XCN
		if(objTempARQ.getEnteredByPhoneNumber().size() != 0)
			objARQ.setEnteredByPhoneNumber(objTempARQ.getEnteredByPhoneNumber());//XTN
		if(objTempARQ.getPlacerOrderNumber().size() != 0)
			objARQ.setPlacerOrderNumber(objTempARQ.getPlacerOrderNumber());//EI
		if(objTempARQ.getFillerOrderNumber().size() != 0)
			objARQ.setFillerOrderNumber(objTempARQ.getFillerOrderNumber());//EI
		return objARQ;
	}

	
	/**
	 * populates SCH Segment
	 * @return SCH
	 */
	public SCH populateSCH()
	{
		CWE objCWE = PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		EI objComprehensiveLocationIdentifier = PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT);
		
		//SCH Segment
		SCH objSCH = new SCH();
		objSCH.setPlacerAppointmentID(objComprehensiveLocationIdentifier);//EI
		objSCH.setFillerAppointmentID(objComprehensiveLocationIdentifier);//EI
		objSCH.setOccurrenceNumber("45");
		objSCH.setEventReason(objCWE);//CWE   
		objSCH.setAppointmentDurationUnits(PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT));//CWE
		objSCH.setPlacerContactPhoneNumber(PopulateDataType.populateXTN(HL7Constants.HL7_COMPONENT));//XTN
		objSCH.addPlacerContactAddress(PopulateDataType.populateXAD(HL7Constants.HL7_COMPONENT));//XAD
		objSCH.addFillerContactPerson(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));//XCN
		objSCH.setFillerContactPhoneNumber(PopulateDataType.populateXTN(HL7Constants.HL7_COMPONENT));//XTN
		objSCH.addFillerContactAddress(PopulateDataType.populateXAD(HL7Constants.HL7_COMPONENT));//XAD
		objSCH.addEnteredByPerson(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));//XCN
		objSCH.addEnteredByPhoneNumber(PopulateDataType.populateXTN(HL7Constants.HL7_COMPONENT));//XTN
		objSCH.setParentFillerAppointmentID(objComprehensiveLocationIdentifier);//EI
		objSCH.addPlacerOrderNumber(objComprehensiveLocationIdentifier);//EI
		objSCH.addFillerOrderNumber(objComprehensiveLocationIdentifier);//EI
		return objSCH;
	}

	/**
	 /** populates SCH Segment
	 * @return SCH
	 */ 
	public SCH populateSCH(SCH objTempSCH)
	{
		//SCH Segment
		SCH objSCH = new SCH();
		objSCH.setPlacerAppointmentID(objTempSCH.getPlacerAppointmentID());//EI
		objSCH.setFillerAppointmentID(objTempSCH.getFillerAppointmentID());//EI
		objSCH.setOccurrenceNumber(objTempSCH.getOccurrenceNumber());
		objSCH.setEventReason(objTempSCH.getEventReason());//CWE   
		objSCH.setAppointmentDurationUnits(objTempSCH.getAppointmentDurationUnits());//CWE
		objSCH.setPlacerContactPhoneNumber(objTempSCH.getPlacerContactPhoneNumber());//XTN
		if(objTempSCH.getPlacerContactAddress().size() != 0)
			objSCH.setPlacerContactAddress(objTempSCH.getPlacerContactAddress());//XAD
		if(objTempSCH.getFillerContactPerson().size() != 0)
			objSCH.setFillerContactPerson(objTempSCH.getFillerContactPerson());//XCN
		objSCH.setFillerContactPhoneNumber(objTempSCH.getFillerContactPhoneNumber());//XTN
		if(objTempSCH.getFillerContactAddress().size() != 0)
			objSCH.setFillerContactAddress(objTempSCH.getFillerContactAddress());//XAD
		if(objTempSCH.getEnteredByPerson().size() != 0)
			objSCH.setEnteredByPerson(objTempSCH.getEnteredByPerson());//XCN
		if(objTempSCH.getEnteredByPhoneNumber().size() != 0)
			objSCH.setEnteredByPhoneNumber(objTempSCH.getEnteredByPhoneNumber());//XTN
		objSCH.setParentFillerAppointmentID(objTempSCH.getParentFillerAppointmentID());//EI
		if(objTempSCH.getPlacerOrderNumber().size() != 0)
			objSCH.setPlacerOrderNumber(objTempSCH.getPlacerOrderNumber());//EI
		if(objTempSCH.getFillerOrderNumber().size() != 0)
			objSCH.setFillerOrderNumber(objTempSCH.getFillerOrderNumber());//EI
		return objSCH;
	}

	
	
	/**
	 * populates RGS Segment
	 * @return RGS
	 */
	public RGS populateRGS()
	{

		//RGS Segment
		RGS objRGS = new RGS();
		objRGS.setSetID_RGS("1");
		objRGS.setSegmentActionCode("A");
		
		return objRGS;
	}

	/**
	 /** populates RGS Segment
	 * @return RGS
	 */ 
	public RGS populateRGS(RGS objTempRGS)
	{
		//RGS Segment
		RGS objRGS = new RGS();
		objRGS.setSetID_RGS(objTempRGS.getSetID_RGS());
		objRGS.setSegmentActionCode(objTempRGS.getSegmentActionCode());
		return objRGS;
	}
	
	
	
	/**
	 * populates DSC Segment
	 * @return DSC
	 */
	public DSC populateDSC()
	{
		//DSC Segment
		DSC objDSC = new DSC();
		objDSC.setContinuationPointer("pointer");
		objDSC.setContinuationStyle("F");
		return objDSC;
	}

	/**
	 /** populates DSC Segment
	 * @return DSC
	 */ 
	public DSC populateDSC(DSC objTempDSC)
	{
		//DSC Segment
		DSC objDSC = new DSC();
		objDSC.setContinuationPointer(objTempDSC.getContinuationPointer());
		objDSC.setContinuationStyle(objTempDSC.getContinuationStyle());
		return objDSC;
	}
	
	
	
	
	/**
	 * populates TQ1 Segment
	 * @return TQ1
	 */
	public TQ1 populateTQ1()
	{
     
		CWE objCWE = PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);		

		//TQ1 segment
		TQ1 objTQ1 = new TQ1(); 
		objTQ1.setSetID_TQ1("2");//SI
		objTQ1.setQuantity("5", objCWE);//CQ
		objTQ1.addRelativeTimeAndUnits("5", objCWE);//CQ
		objTQ1.setServiceDuration("5", objCWE);//CQ
		objTQ1.setStartDateTime("20110202");//DTM
		objTQ1.setEndDateTime("20110202");//DTM
		objTQ1.addPriority(objCWE);//CWE
		objTQ1.setConjunction("S");
		objTQ1.setOccurrenceDuration("", objCWE);//CQ
		objTQ1.setTotalOccurrences("5");//NM
		return objTQ1;
	}

	/**
	 /** populates TQ1 Segment
	 * @return TQ1
	 */ 
	public TQ1 populateTQ1(TQ1 objTempTQ1)
	{
		//TQ1 segment
		TQ1 objTQ1 = new TQ1(); 
		objTQ1.setSetID_TQ1(objTempTQ1.getSetID_TQ1());//SI
		objTQ1.setQuantity(objTempTQ1.getQuantity());//CQ
		if(objTempTQ1.getRelativeTimeAndUnits().size() != 0)
			objTQ1.setRelativeTimeAndUnits(objTempTQ1.getRelativeTimeAndUnits());//CQ
		objTQ1.setServiceDuration(objTempTQ1.getServiceDuration());//CQ
		objTQ1.setStartDateTime(objTempTQ1.getStartDateTime());//DTM
		objTQ1.setEndDateTime(objTempTQ1.getEndDateTime());//DTM
		if(objTempTQ1.getPriority().size() != 0)
			objTQ1.setPriority(objTempTQ1.getPriority());//CWE
		objTQ1.setConjunction(objTempTQ1.getConjunction());
		objTQ1.setOccurrenceDuration(objTempTQ1.getOccurrenceDuration());//CQ
		objTQ1.setTotalOccurrences(objTempTQ1.getTotalOccurrences());//NM
		return objTQ1;
	}

	/**
	 * populates TQ2 Segment
	 * @return TQ2
	 */
	public TQ2 populateTQ2()
	{
		EI objEI = PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT);
		
		TQ2 objTQ2 = new TQ2();
		objTQ2.setSetID_TQ2("3");//SI
		objTQ2.setSequenceResultsFlag("S");//ID
		objTQ2.addRelatedPlacerNo(objEI);//EI
		objTQ2.addRelatedFillerNo(objEI);//EI
		objTQ2.addRelatedPlacerGroupNo(objEI);//EI
		objTQ2.setSequenceConditionCode("EE");//ID
		objTQ2.setCyclicEntryExitIndicator("*");//ID
		objTQ2.setSequenceCondTimeInterval("5",PopulateDataType.populateCWE(HL7Constants.HL7_SUBCOMPONENT));//CQ
		objTQ2.setCyclicGroupMaxNoOfRepeats("5");//NM
		objTQ2.setSpecialServiceRequestRelationship("N");//ID
		return objTQ2;
	}

	/**
	 /** populates TQ2 Segment
	 * @return TQ2
	 */ 
	public TQ2 populateTQ2(TQ2 objTempTQ2)
	{
		TQ2 objTQ2 = new TQ2();
		objTQ2.setSetID_TQ2(objTempTQ2.getSetID_TQ2());//SI
		objTQ2.setSequenceResultsFlag(objTempTQ2.getSequenceResultsFlag());//ID
		if(objTempTQ2.getRelatedPlacerNo().size() != 0)
			objTQ2.setRelatedPlacerNo(objTempTQ2.getRelatedPlacerNo());//EI
		if(objTempTQ2.getRelatedFillerNo().size() != 0)
			objTQ2.setRelatedFillerNo(objTempTQ2.getRelatedFillerNo());//EI
		if(objTempTQ2.getRelatedPlacerGroupNo().size() != 0)
			objTQ2.setRelatedPlacerGroupNo(objTempTQ2.getRelatedPlacerGroupNo());//EI
		objTQ2.setSequenceConditionCode(objTempTQ2.getSequenceConditionCode());//ID
		objTQ2.setCyclicEntryExitIndicator(objTempTQ2.getCyclicEntryExitIndicator());//ID
		objTQ2.setSequenceCondTimeInterval(objTempTQ2.getSequenceCondTimeInterval());//CQ
		objTQ2.setCyclicGroupMaxNoOfRepeats(objTempTQ2.getCyclicGroupMaxNoOfRepeats());//NM
		objTQ2.setSpecialServiceRequestRelationship(objTempTQ2.getSpecialServiceRequestRelationship());//ID
		return objTQ2;
	}

	/**
	 * populates PD1 Segment
	 * @return PD1
	 */
	public PD1 populatePD1()
	{
		
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		CX objCX=PopulateDataType.populateCX(HL7Constants.HL7_COMPONENT);
		XON objXON=PopulateDataType.populateXON(HL7Constants.HL7_COMPONENT);
		
		//PD1 Segment
		PD1 objPD1 = new PD1();
		objPD1.addLivingDependency(objCWE);//IS
		objPD1.setLivingArrangement(objCWE);//IS
		objPD1.addPatientPrimaryFacility(objXON);
		objPD1.setStudentIndicator(objCWE);//IS
		objPD1.setHandicap(objCWE);//IS
		objPD1.setLivingWillCode(objCWE);//IS
		objPD1.setOrganDonorCode(objCWE);//IS
		objPD1.setSeparateBill("Y");//ID
		objPD1.addDuplicatePatient(objCX);
		objPD1.setPublicityCode(objCWE);//CWE
		objPD1.setProtectionIndicator("Y");//ID
		objPD1.setProtectionIEDate("19850212");//DT
		objPD1.addPlaceOfWorship(objXON);
		objPD1.addAdvanceDirectiveCode(objCWE);//CWE
		objPD1.setImmunizationRegistryStatus(objCWE);//IS
		objPD1.setImmunizationRSEffectiveDate("19850212");//DT
		objPD1.setPublicityCodeEffectiveDate("19850212");//DT
		objPD1.setMilitaryBranch(objCWE);//IS
		objPD1.setMilitaryRank_Grade(objCWE);//IS
		objPD1.setMilitaryStatus(objCWE);//IS
		return objPD1;
	}
	/**
	 /** populates PD1 Segment
	 * @return PD1
	 */ 
	public PD1 populatePD1(PD1 objTempPD1)
	{
		//PD1 Segment
		PD1 objPD1 = new PD1();
		if(objTempPD1.getLivingDependency().size() != 0)
			objPD1.setLivingDependency(objTempPD1.getLivingDependency());//IS
		objPD1.setLivingArrangement(objTempPD1.getLivingArrangement());//IS
		if(objTempPD1.getPatientPrimaryFacility().size() != 0)
			objPD1.setPatientPrimaryFacility(objTempPD1.getPatientPrimaryFacility());//XON
		objPD1.setStudentIndicator(objTempPD1.getStudentIndicator());//IS
		objPD1.setHandicap(objTempPD1.getHandicap());//IS
		objPD1.setLivingWillCode(objTempPD1.getLivingWillCode());//IS
		objPD1.setOrganDonorCode(objTempPD1.getOrganDonorCode());//IS
		objPD1.setSeparateBill(objTempPD1.getSeparateBill());//ID
		if(objTempPD1.getDuplicatePatient().size() != 0)
			objPD1.setDuplicatePatient(objTempPD1.getDuplicatePatient());//CX
		objPD1.setPublicityCode(objTempPD1.getPublicityCode());//CWE
		objPD1.setProtectionIndicator(objTempPD1.getProtectionIndicator());//ID
		objPD1.setProtectionIEDate(objTempPD1.getProtectionIEDate());//DT
		if(objTempPD1.getPlaceOfWorship().size() != 0)
			objPD1.setPlaceOfWorship(objTempPD1.getPlaceOfWorship());//XON
		if(objTempPD1.getAdvanceDirectiveCode().size() != 0)
			objPD1.setAdvanceDirectiveCode(objTempPD1.getAdvanceDirectiveCode());//CWE
		objPD1.setImmunizationRegistryStatus(objTempPD1.getImmunizationRegistryStatus());//IS
		objPD1.setImmunizationRSEffectiveDate(objTempPD1.getImmunizationRSEffectiveDate());//DT
		objPD1.setPublicityCodeEffectiveDate(objTempPD1.getPublicityCodeEffectiveDate());//DT
		objPD1.setMilitaryBranch(objTempPD1.getMilitaryBranch());//IS
		objPD1.setMilitaryRank_Grade(objTempPD1.getMilitaryRank_Grade());//IS
		objPD1.setMilitaryStatus(objTempPD1.getMilitaryStatus());//IS
		return objPD1;
	}

	
	
	/**
	 * populates CSR Segment
	 * @return CSR
	 */
	public CSR populateCSR()
	{

		//CSR Segment
		CWE objCWE = PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		CX objCX=PopulateDataType.populateCX(HL7Constants.HL7_COMPONENT);
		XCN objXCN=PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT);
		
		CSR objCSR = new CSR();
		objCSR.setSponsorStudyID(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));
		objCSR.setAlternateStudyID(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));
		objCSR.setInstitutionRegisteringthePatient(objCWE);
		objCSR.setSponsorPatientID(objCX);
		objCSR.setAlternatePatientID_CSR(objCX);
		objCSR.setDateTimeOfPatientStudyRegistration("20170705");
		objCSR.addPersonPerformingStudyRegistration(objXCN);
		objCSR.addStudyAuthorizingProvider(objXCN);
		objCSR.setDatetimePatientStudyConsentSigned("20170705");
		objCSR.setPatientStudyEligibilityStatus(objCWE);
		objCSR.addStudyRandomizationDatetime("20170220");
		objCSR.addRandomizedStudyArm(objCWE);
		objCSR.addStratumforStudyRandomization(objCWE);
		objCSR.setPatientEvaluabilityStatus(objCWE);
		objCSR.setDatetimeEndedStudy("201707051235");	
		objCSR.setReasonEndedStudy(objCWE);
		return objCSR;
	}
	/**
	 /** populates CSR Segment
	 * @return CSR
	 */ 
	public CSR populateCSR(CSR objTempCSR)
	{
		//CSR Segment
		CSR objCSR = new CSR();
		objCSR.setSponsorStudyID(objTempCSR.getSponsorStudyID());
		objCSR.setAlternateStudyID(objTempCSR.getAlternateStudyID());
		objCSR.setInstitutionRegisteringthePatient(objTempCSR.getInstitutionRegisteringthePatient());
		objCSR.setSponsorPatientID(objTempCSR.getSponsorPatientID());
		objCSR.setAlternatePatientID_CSR(objTempCSR.getAlternatePatientID_CSR());
		objCSR.setDateTimeOfPatientStudyRegistration(objTempCSR.getDateTimeOfPatientStudyRegistration());
		if(objTempCSR.getPersonPerformingStudyRegistration().size() != 0)
			objCSR.setPersonPerformingStudyRegistration(objTempCSR.getPersonPerformingStudyRegistration());
		if(objTempCSR.getStudyAuthorizingProvider().size() != 0)
			objCSR.setStudyAuthorizingProvider(objTempCSR.getStudyAuthorizingProvider());
		objCSR.setDatetimePatientStudyConsentSigned(objTempCSR.getDatetimePatientStudyConsentSigned());
		objCSR.setPatientStudyEligibilityStatus(objTempCSR.getPatientStudyEligibilityStatus());
		if(objTempCSR.getStudyRandomizationDatetime().size() != 0)
			objCSR.setStudyRandomizationDatetime(objTempCSR.getStudyRandomizationDatetime());
		if(objTempCSR.getRandomizedStudyArm().size() != 0)
			objCSR.setRandomizedStudyArm(objTempCSR.getRandomizedStudyArm());
		if(objTempCSR.getStratumforStudyRandomization().size() != 0)
			objCSR.setStratumforStudyRandomization(objTempCSR.getStratumforStudyRandomization());
		objCSR.setPatientEvaluabilityStatus(objTempCSR.getPatientEvaluabilityStatus());
		objCSR.setDatetimeEndedStudy(objTempCSR.getDatetimeEndedStudy());	
		objCSR.setReasonEndedStudy(objTempCSR.getReasonEndedStudy());
		return objCSR;
	}

	
	/**
	 * populates CSP Segment
	 * @return CSP
	 */
	public CSP populateCSP()
	{
		//CSP Segment
		CSP objCSP = new CSP();
		CWE objCWE = PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);

		objCSP.setStudyPhaseIdentifier(objCWE);
		objCSP.setDatetimeStudyPhaseBegan("20170220");
		objCSP.setDatetimeStudyPhaseEnded("20170705");
		objCSP.setStudyPhaseEvaluability(objCWE);
		return objCSP;
	}

	/**
	 /** populates CSP Segment
	 * @return CSP
	 */ 
	public CSP populateCSP(CSP objTempCSP)
	{
		//CSP Segment
		CSP objCSP = new CSP();
		objCSP.setStudyPhaseIdentifier(objTempCSP.getStudyPhaseIdentifier());
		objCSP.setDatetimeStudyPhaseBegan(objTempCSP.getDatetimeStudyPhaseBegan());
		objCSP.setDatetimeStudyPhaseEnded(objTempCSP.getDatetimeStudyPhaseEnded());
		objCSP.setStudyPhaseEvaluability(objTempCSP.getStudyPhaseEvaluability());
		return objCSP;
	}
	
	
	
	

	/**
	 * populates SPM Segment
	 * @return SPM
	 */
	public SPM populateSPM()
	{

		EI objEI = PopulateDataType.populateEI(HL7Constants.HL7_SUBCOMPONENT);
		CWE objCWE =PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT); 
		
		//SPM segment
		SPM objSPM = new SPM();
		objSPM.setSetID_SPM("8");//SI
		objSPM.setSpecimenID(objEI, objEI);//EIP
		objSPM.addSpecimenParentIDs(objEI, objEI);//EIP
		objSPM.setSpecimenType(objCWE);//CWE
		objSPM.addSpecimenTypeModifier(objCWE);//CWE
		objSPM.addSpecimenAdditives(objCWE);//CWE
		objSPM.setSpecimenCollectionMethod(objCWE);//CWE
		objSPM.setSpecimenSourceSite(objCWE);//CWE
		objSPM.addSpecimenSourceSiteModifier(objCWE);//CWE
		objSPM.setSpecimenCollectionSite(objCWE);//CWE
		objSPM.addSpecimenRole(objCWE);//CWE
		objSPM.setSpecimenCollectionAmount("5",PopulateDataType.populateCWE(HL7Constants.HL7_SUBCOMPONENT));//CQ
		objSPM.setGroupedSpecimenCount("5");//NM
		objSPM.addSpecimenDescription("A");//ST
		objSPM.addSpecimenHandlingCode(objCWE);//CWE
		objSPM.addSpecimenRiskCode(objCWE);//CWE
		objSPM.setSpecimenCollectionDateTime(objEffectiveDate, objExpirationDate);//DR
		objSPM.setSpecimenReceivedDateTime("20110202");//DTM
		objSPM.setSpecimenExpirationDateTime("20110202");//DTM
		objSPM.setSpecimenAvailability("Y");
		objSPM.addSpecimenRejectReason(objCWE);//CWE
		objSPM.setSpecimenQuality(objCWE);//CWE
		objSPM.setSpecimenAppropriateness(objCWE);//CWE
		objSPM.addSpecimenCondition(objCWE);//CWE
		objSPM.setSpecimenCurrentQuantity("5",PopulateDataType.populateCWE(HL7Constants.HL7_SUBCOMPONENT));//CQ
		objSPM.setNumberofSpecimenContainers("5");//NM
		objSPM.setContainerType(objCWE);//CWE
		objSPM.setContainerCondition(objCWE);//CWE
		objSPM.setSpecimenChildRole(objCWE);//CWE
		objSPM.addAccessionID(PopulateDataType.populateCX(HL7Constants.HL7_COMPONENT));
		objSPM.setShipmentID(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));
		
		return objSPM;
	}

	/**
	 /** populates SPM Segment
	 * @return SPM
	 */ 
	public SPM populateSPM(SPM objTempSPM)
	{
		//SPM segment
		SPM objSPM = new SPM();
		objSPM.setSetID_SPM(objTempSPM.getSetID_SPM());//SI
		objSPM.setSpecimenID(objTempSPM.getSpecimenID());//EIP
		if(objTempSPM.getSpecimenParentIDs().size() != 0)
			objSPM.setSpecimenParentIDs(objTempSPM.getSpecimenParentIDs());//EIP
		objSPM.setSpecimenType(objTempSPM.getSpecimenType());//CWE
		if(objTempSPM.getSpecimenTypeModifier().size() != 0)
			objSPM.setSpecimenTypeModifier(objTempSPM.getSpecimenTypeModifier());//CWE
		if(objTempSPM.getSpecimenAdditives().size() != 0)
			objSPM.setSpecimenAdditives(objTempSPM.getSpecimenAdditives());//CWE
		objSPM.setSpecimenCollectionMethod(objTempSPM.getSpecimenCollectionMethod());//CWE
		objSPM.setSpecimenSourceSite(objTempSPM.getSpecimenSourceSite());//CWE
		if(objTempSPM.getSpecimenSourceSiteModifier().size() != 0)
			objSPM.setSpecimenSourceSiteModifier(objTempSPM.getSpecimenSourceSiteModifier());//CWE
		objSPM.setSpecimenCollectionSite(objTempSPM.getSpecimenCollectionSite());//CWE
		if(objTempSPM.getSpecimenRole().size() != 0)
			objSPM.setSpecimenRole(objTempSPM.getSpecimenRole());//CWE
		objSPM.setSpecimenCollectionAmount(objTempSPM.getSpecimenCollectionAmount());//CQ
		objSPM.setGroupedSpecimenCount(objTempSPM.getGroupedSpecimenCount());//NM
		objSPM.setSpecimenDescription(objTempSPM.getSpecimenDescription());//ST
		if(objTempSPM.getSpecimenHandlingCode().size() != 0)
			objSPM.setSpecimenHandlingCode(objTempSPM.getSpecimenHandlingCode());//CWE
		if(objTempSPM.getSpecimenRiskCode().size() != 0)
			objSPM.setSpecimenRiskCode(objTempSPM.getSpecimenRiskCode());//CWE
		objSPM.setSpecimenCollectionDateTime(objTempSPM.getSpecimenCollectionDateTime());//DR
		objSPM.setSpecimenReceivedDateTime(objTempSPM.getSpecimenReceivedDateTime());//DTM
		objSPM.setSpecimenExpirationDateTime(objTempSPM.getSpecimenExpirationDateTime());//DTM
		objSPM.setSpecimenAvailability(objTempSPM.getSpecimenAvailability());
		if(objTempSPM.getSpecimenRejectReason().size() != 0)
			objSPM.setSpecimenRejectReason(objTempSPM.getSpecimenRejectReason());//CWE
		objSPM.setSpecimenQuality(objTempSPM.getSpecimenQuality());//CWE
		objSPM.setSpecimenAppropriateness(objTempSPM.getSpecimenAppropriateness());//CWE
		if(objTempSPM.getSpecimenCondition().size() != 0)
			objSPM.setSpecimenCondition(objTempSPM.getSpecimenCondition());//CWE
		objSPM.setSpecimenCurrentQuantity(objTempSPM.getSpecimenCurrentQuantity());//CQ
		objSPM.setNumberofSpecimenContainers(objTempSPM.getNumberofSpecimenContainers());//NM
		objSPM.setContainerType(objTempSPM.getContainerType());//CWE
		objSPM.setContainerCondition(objTempSPM.getContainerCondition());//CWE
		objSPM.setSpecimenChildRole(objTempSPM.getSpecimenChildRole());//CWE
		if(objTempSPM.getAccessionID().size()!=0)
			objSPM.setAccessionID(objTempSPM.getAccessionID());
		objSPM.setShipmentID(objTempSPM.getShipmentID());
		
		return objSPM;
	}


	
	/**
	 * populates SAC Segment
	 * @return SAC
	 */
	public SAC populateSAC()
	{
		
		NM objNM = PopulateDataType.populateNM(HL7Constants.HL7_SUBCOMPONENT);
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		EI objEI = PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT);
		
		//SAC segment
		SAC objSAC = new SAC();
		objSAC.setExternalAccessionIdentifier(objEI);//EI
		objSAC.setAccessionIdentifier(objEI);//EI
		objSAC.setContainerIdentifier(objEI);//EI
		objSAC.setPrimaryParentContainerIdentifier(objEI);//EI
		objSAC.setEquipmentContainerIdentifier(objEI);//EI	
		objSAC.setRegistrationDateTime("20110202");//DTM
		objSAC.setContainerStatus(objCWE);//CWE
		objSAC.setCarrierType(objCWE);//CWE
		objSAC.setCarrierIdentifier(null);//EI
		objSAC.setPositioninCarrier(null);
		objSAC.setTrayType_SAC(objCWE);//CWE
		objSAC.setTrayIdentifier(objEI);//EI
		objSAC.setPositioninTray("5", "5", "5", "5");//NA
		objSAC.addLocation(objCWE);//CWE
		objSAC.setContainerHeight(objNM);//NM
		objSAC.setContainerDiameter(objNM);//NM
		objSAC.setBarrierDelta(objNM);//NM
		objSAC.setBottomDelta(objNM);//NM
		objSAC.setContainerHeightDiameterDeltaUnits(objCWE);//CWE
		objSAC.setContainerVolume(objNM);//NM
		objSAC.setAvailableSpecimenVolume(objNM);//NM
		objSAC.setInitialSpecimenVolume(objNM);//NM
		objSAC.setVolumeUnits(objCWE);//CWE
		objSAC.setSeparatorType(objCWE);//CWE
		objSAC.setCapType(objCWE);//CWE
		objSAC.addAdditive(objCWE);//CWE 
		objSAC.setSpecimenComponent(objCWE);//CWE
		objSAC.setDilutionFactor(null);//SN
		objSAC.setTreatment(objCWE);//CWE
		objSAC.setTemperature(PopulateDataType.populateSN(HL7Constants.HL7_COMPONENT));//SN
		objSAC.setHemolysisIndex(objNM);//NM
		objSAC.setHemolysisIndexUnits(objCWE);//CWE
		objSAC.setLipemiaIndex(objNM);
		objSAC.setLipemiaIndexUnits(objCWE);//CWE
		objSAC.setIcterusIndex(objNM);//NM
		objSAC.setIcterusIndexUnits(objCWE);//CWE
		objSAC.setFibrinIndex(objNM);//NM
		objSAC.setFibrinIndexUnits(objCWE);//CWE
		objSAC.addSystemInducedContaminants(objCWE);//CWE
		objSAC.addDrugInterference(objCWE);//CWE
		objSAC.setArtificialBlood(objCWE);//CWE
		objSAC.addSpecialHandlingCode(objCWE);//CWE 
		objSAC.addOtherEnvironmentalFactors(objCWE);//CWE
		return objSAC;
	}

	/**
	 /** populates SAC Segment
	 * @return SAC
	 */ 
	public SAC populateSAC(SAC objTempSAC)
	{
		//SAC segment
		SAC objSAC = new SAC();
		objSAC.setExternalAccessionIdentifier(objTempSAC.getExternalAccessionIdentifier());//EI
		objSAC.setAccessionIdentifier(objTempSAC.getAccessionIdentifier());//EI
		objSAC.setContainerIdentifier(objTempSAC.getContainerIdentifier());//EI
		objSAC.setPrimaryParentContainerIdentifier(objTempSAC.getPrimaryParentContainerIdentifier());//EI
		objSAC.setEquipmentContainerIdentifier(objTempSAC.getEquipmentContainerIdentifier());//EI
		objSAC.setRegistrationDateTime(objTempSAC.getRegistrationDateTime());//DTM
		objSAC.setContainerStatus(objTempSAC.getContainerStatus());//CWE
		objSAC.setCarrierType(objTempSAC.getCarrierType());//CWE
		objSAC.setCarrierIdentifier(objTempSAC.getCarrierIdentifier());//EI
		objSAC.setPositioninCarrier(objTempSAC.getPositionInCarrier());//NA
		objSAC.setTrayType_SAC(objTempSAC.getTrayType_SAC());//CWE
		objSAC.setTrayIdentifier(objTempSAC.getTrayIdentifier());//EI
		objSAC.setPositioninTray(objTempSAC.getPositionInTray());//NA
		if(objTempSAC.getLocation().size() != 0)
			objSAC.setLocation(objTempSAC.getLocation());//CWE
		objSAC.setContainerHeight(objTempSAC.getContainerHeight());//NM
		objSAC.setContainerDiameter(objTempSAC.getContainerDiameter());//NM
		objSAC.setBarrierDelta(objTempSAC.getBarrierDelta());//NM
		objSAC.setBottomDelta(objTempSAC.getBottomDelta());//NM
		objSAC.setContainerHeightDiameterDeltaUnits(objTempSAC.getContainerHeightDiameterDeltaUnits());//CWE
		objSAC.setContainerVolume(objTempSAC.getContainerVolume());//NM
		objSAC.setAvailableSpecimenVolume(objTempSAC.getAvailableSpecimenVolume());//NM
		objSAC.setInitialSpecimenVolume(objTempSAC.getInitialSpecimenVolume());//NM
		objSAC.setVolumeUnits(objTempSAC.getVolumeUnits());//CWE
		objSAC.setSeparatorType(objTempSAC.getSeparatorType());//CWE
		objSAC.setCapType(objTempSAC.getCapType());//CWE
		if(objTempSAC.getAdditive().size() != 0)
			objSAC.setAdditive(objTempSAC.getAdditive());//CWE 
		objSAC.setSpecimenComponent(objTempSAC.getSpecimenComponent());//CWE
		objSAC.setDilutionFactor(objTempSAC.getDilutionFactor());//SN
		objSAC.setTreatment(objTempSAC.getTreatment());//CWE
		objSAC.setTemperature(objTempSAC.getTemperature());//SN
		objSAC.setHemolysisIndex(objTempSAC.getHemolysisIndex());//NM
		objSAC.setHemolysisIndexUnits(objTempSAC.getHemolysisIndexUnits());//CWE
		objSAC.setLipemiaIndex(objTempSAC.getLipemiaIndex());     
		objSAC.setLipemiaIndexUnits(objTempSAC.getLipemiaIndexUnits());//CWE
		objSAC.setIcterusIndex(objTempSAC.getIcterusIndex());//NM
		objSAC.setIcterusIndexUnits(objTempSAC.getIcterusIndexUnits());//CWE
		objSAC.setFibrinIndex(objTempSAC.getFibrinIndex());//NM
		objSAC.setFibrinIndexUnits(objTempSAC.getFibrinIndexUnits());//CWE
		if(objTempSAC.getSystemInducedContaminants().size() != 0)
			objSAC.setSystemInducedContaminants(objTempSAC.getSystemInducedContaminants());//CWE
		if(objTempSAC.getDrugInterference().size() != 0)
			objSAC.setDrugInterference(objTempSAC.getDrugInterference());//CWE
		objSAC.setArtificialBlood(objTempSAC.getArtificialBlood());//CWE
		if(objTempSAC.getSpecialHandlingCode().size() != 0)
			objSAC.setSpecialHandlingCode(objTempSAC.getSpecialHandlingCode());//CWE 
		if(objTempSAC.getOtherEnvironmentalFactors().size() != 0)
			objSAC.setOtherEnvironmentalFactors(objTempSAC.getOtherEnvironmentalFactors());//CWE
		return objSAC;
	}
	
	
	/**
	 * populates TCD Segment
	 * @return TCD
	 */
	public TCD populateTCD()
	{
		//TCD segment
		TCD objTCD = new TCD();
  
		objTCD.setUniversalServiceIdentifier(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		objTCD.setAuto_DilutionFactor("At","12","D","13");//SN
		objTCD.setRerunDilutionFactor("At","12","D","13");//SN
		objTCD.setPre_DilutionFactor("At","12","D","13");//SN
		objTCD.setEndogenousContentofPre_DilutionDiluent("At","12","D","13");//SN
		objTCD.setAutomaticRepeatAllowed("Y");//ID
		objTCD.setReflexAllowed("Y");//ID
		objTCD.setAnalyteRepeatStatus(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		
		return objTCD; 
	}

	/**
	 /** populates TCD Segment
	 * @return TCD
	 */ 
	public TCD populateTCD(TCD objTempTCD)
	{
		//TCD segment
		TCD objTCD = new TCD();
		objTCD.setUniversalServiceIdentifier(objTempTCD.getUniversalServiceIdentifier());//CWE
		objTCD.setAuto_DilutionFactor(objTempTCD.getAuto_DilutionFactor());//SN
		objTCD.setRerunDilutionFactor(objTempTCD.getRerunDilutionFactor());//SN
		objTCD.setPre_DilutionFactor(objTempTCD.getPre_DilutionFactor());//SN
		objTCD.setEndogenousContentofPre_DilutionDiluent(objTempTCD.getEndogenousContentofPre_DilutionDiluent());//SN
		objTCD.setAutomaticRepeatAllowed(objTempTCD.getAutomaticRepeatAllowed());//ID
		objTCD.setReflexAllowed(objTempTCD.getReflexAllowed());//ID
		objTCD.setAnalyteRepeatStatus(objTempTCD.getAnalyteRepeatStatus());//CWE
		return objTCD; 
	}
	
	
	/**
	 * populates FT1 Segment
	 * @return FT1
	 */
	public FT1 populateFT1()
	{
		//FT1 segment

		EI objComprehensiveLocationIdentifier = PopulateDataType.populateEI(HL7Constants.HL7_SUBCOMPONENT);
		objComprehensiveLocationIdentifier.setEntityIdentifier("Entity Identifier");
		objComprehensiveLocationIdentifier.setNamespaceId("NAMESPACWE");
		objComprehensiveLocationIdentifier.setUniversalId("UniversalId");
		objComprehensiveLocationIdentifier.setUniversalIdType("x500");
		
		MO objPrice = PopulateDataType.populateMO(HL7Constants.HL7_SUBCOMPONENT);
		objPrice.setQuantity("99");
		objPrice.setDenomination("USD");
		
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		
		//FT1 Segment
		FT1 objFT1 = new FT1();
		objFT1.setSetIDFT1("1");//SI
		objFT1.setTransactionID("T1");//ST
		objFT1.setTransactionBatchID("TB1");//ST
		objFT1.setTransactionDate(objExpirationDate, objExpirationDate);//DR
		objFT1.setTransactionPostingDate("20030303");//DTM
		objFT1.setTransactionType(objCWE);//IS
		objFT1.setTransactionCode(objCWE);//CWE
		objFT1.setDepartmentCode(objCWE);//CWE
		objFT1.setFeeSchedule(objCWE);//IS
		objFT1.setPatientType(objCWE);//IS
		objFT1.addDiagnosisCode_FT1(objCWE);//CWE
		objFT1.addPerformedByCode(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));//XCN
		objFT1.addOrderedByCode(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));//XCN
		objFT1.setFillerOrderNumber(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));//EI
		objFT1.addEnteredByCode(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));//XCN
		objFT1.setProcedureCode(PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT));//CWE
		objFT1.addProcedureCodeModifier(PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT));//CWE
		objFT1.setAdvancedBeneficiaryNoticeCode(objCWE);//CWE
		objFT1.setMedicallyNecessaryDuplicateProcedureReason(objCWE);//CWE
		objFT1.setNDCCode(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CNE
		objFT1.setPaymentReferenceID(PopulateDataType.populateCX(HL7Constants.HL7_COMPONENT));//CX
		objFT1.addPerformingFacility(PopulateDataType.populateXON(HL7Constants.HL7_COMPONENT));
		objFT1.setOrderingFacility(PopulateDataType.populateXON(HL7Constants.HL7_COMPONENT));
		objFT1.setItemNumber(objCWE);
		objFT1.setSpecialProcessingCode(objCWE);
		objFT1.setClinicCode(objCWE);
		objFT1.setReferralNumber(PopulateDataType.populateCX(HL7Constants.HL7_COMPONENT));
		objFT1.setServiceProviderTaxonomyCode(objCWE);
		objFT1.setRevenueCode(objCWE);
		objFT1.setNDCQtyAndUOM("20",PopulateDataType.populateCWE(HL7Constants.HL7_SUBCOMPONENT));
		return objFT1;
	}

	/**
	 /** populates FT1 Segment
	 * @return FT1
	 */ 
	public FT1 populateFT1(FT1 objTempFT1)
	{
		//FT1 Segment
		FT1 objFT1 = new FT1();
		objFT1.setSetIDFT1(objTempFT1.getSetID_FT1());//SI
		objFT1.setTransactionID(objTempFT1.getTransactionID());//ST
		objFT1.setTransactionBatchID(objTempFT1.getTransactionBatchID());//ST
		objFT1.setTransactionDate(objTempFT1.getTransactionDate());//DR
		objFT1.setTransactionPostingDate(objTempFT1.getTransactionPostingDate());//DTM
		objFT1.setTransactionType(objTempFT1.getTransactionType());//IS
		objFT1.setTransactionCode(objTempFT1.getTransactionCode());//CWE
		objFT1.setDepartmentCode(objTempFT1.getDepartmentCode());//CWE
		objFT1.setFeeSchedule(objTempFT1.getFeeSchedule());//IS
		objFT1.setPatientType(objTempFT1.getPatientType());//IS
		if(objTempFT1.getDiagnosisCode_FT1().size() != 0)
			objFT1.setDiagnosisCode_FT1(objTempFT1.getDiagnosisCode_FT1());//CWE
		if(objTempFT1.getPerformedByCode().size() != 0)
			objFT1.setPerformedByCode(objTempFT1.getPerformedByCode());//XCN
		if(objTempFT1.getOrderedByCode().size() != 0)
			objFT1.setOrderedByCode(objTempFT1.getOrderedByCode());//XCN
		objFT1.setFillerOrderNumber(objTempFT1.getFillerOrderNumber());//EI
		if(objTempFT1.getEnteredByCode().size() != 0)
			objFT1.setEnteredByCode(objTempFT1.getEnteredByCode());//XCN
		objFT1.setProcedureCode(objTempFT1.getProcedureCode());//CWE
		if(objTempFT1.getProcedureCodeModifier().size() != 0)
			objFT1.setProcedureCodeModifier(objTempFT1.getProcedureCodeModifier());//CWE
		objFT1.setAdvancedBeneficiaryNoticeCode(objTempFT1.getAdvancedBeneficiaryNoticeCode());//CWE
		objFT1.setMedicallyNecessaryDuplicateProcedureReason(objTempFT1.getMedicallyNecessaryDuplicateProcedureReason());//CWE
		objFT1.setNDCCode(objTempFT1.getNDCCode());//CNE
		objFT1.setPaymentReferenceID(objTempFT1.getPaymentReferenceID());//CX
		if(objTempFT1.getPerformingFacility().size()!=0)
			objFT1.setPerformingFacility(objTempFT1.getPerformingFacility());
		objFT1.setOrderingFacility(objTempFT1.getOrderingFacility());
		objFT1.setItemNumber(objTempFT1.getItemNumber());
		objFT1.setSpecialProcessingCode(objTempFT1.getSpecialProcessingCode());
		objFT1.setClinicCode(objTempFT1.getClinicCode());
		objFT1.setReferralNumber(objTempFT1.getReferralNumber());
		objFT1.setServiceProviderTaxonomyCode(objTempFT1.getServiceProviderTaxonomyCode());
		objFT1.setRevenueCode(objTempFT1.getRevenueCode());
		objFT1.setNDCQtyAndUOM(objTempFT1.getNDCQtyAndUOM());
		
		return objFT1;
	}
	
	
	/**
	 * populates CTI Segment
	 * @return CTI
	 */
	public CTI populateCTI()
	{
		//CTI Segment
		CTI objCTI = new CTI();
		objCTI.setSponsorStudyID(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));//EI
		objCTI.setStudyPhaseIdentifier(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		objCTI.setStudyScheduledTimePoint(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		
		return objCTI;
	}

	/**
	 /** populates CTI Segment
	 * @return CTI
	 */ 
	public CTI populateCTI(CTI objTempCTI)
	{
		//CTI Segment
		CTI objCTI = new CTI();
		objCTI.setSponsorStudyID(objTempCTI.getSponsorStudyID());//EI
		objCTI.setStudyPhaseIdentifier(objTempCTI.getStudyPhaseIdentifier());//CWE
		objCTI.setStudyScheduledTimePoint(objTempCTI.getStudyScheduledTimePoint());//CWE
		return objCTI;
	}
	
	
	/**
	 * populates BLG Segment
	 * @return BLG
	 */
	public BLG populateBLG()
	{
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		
		//BLG Segment
		BLG objBLG = new BLG();
		objBLG.setWhenToCharge("S", objEffectiveDate);//CCD
		objBLG.setChargeType("CH");//ID
		objBLG.setAccountID(PopulateDataType.populateCX(HL7Constants.HL7_COMPONENT));//CX
		objBLG.setChargeTypeReason(objCWE);//CWE
		return objBLG;
	}

	/**
	 /** populates BLG Segment
	 * @return BLG
	 */ 
	public BLG populateBLG(BLG objTempBLG)
	{
		//BLG Segment
		BLG objBLG = new BLG();
		objBLG.setWhenToCharge(objTempBLG.getWhenToCharge());//CCD
		objBLG.setChargeType(objTempBLG.getChargeType());//ID
		objBLG.setAccountID(objTempBLG.getAccountID());//CX
		objBLG.setChargeTypeReason(objTempBLG.getChargeTypeReason());//CWE
		return objBLG;
	}
	
	
	/**
	 * populates NCK Segment
	 * @return NCK
	 */
	public NCK populateNCK()
	{
		//NCK Segment
		NCK objNCK = new NCK();
		objNCK.setSystemDateTime("20110202");//DTM
		return objNCK;
	}

	/**
	 /** populates NCK Segment
	 * @return NCK
	 */ 
	public NCK populateNCK(NCK objTempNCK)
	{
		//NCK Segment
		NCK objNCK = new NCK();
		objNCK.setSystemDateTime(objTempNCK.getSystemDateTime());//DTM
		return objNCK;
	}
	
	
	/**
	 * populates NST Segment
	 * @return NST
	 */
	public NST populateNST()
	{
		//NST segment
		NST objNST = new NST();
		objNST.setStatisticsAvailable("Y");//ID
		objNST.setSourceType("I");
		objNST.setStatisticsStart("20110202");//DTM
		objNST.setStatisticsEnd("20110202");//DTM
		objNST.setReceiveCharacterCount("5");//NM
		objNST.setSendCharacterCount("5");//NM
		objNST.setMessagesReceived("5");//NM
		objNST.setMessagesSent("5");//NM
		objNST.setChecksumErrorsReceived("5");//NM
		
		return objNST;
	}

	/**
	 /** populates NST Segment
	 * @return NST
	 */ 
	public NST populateNST(NST objTempNST)
	{
		//NST segment
		NST objNST = new NST();
		objNST.setStatisticsAvailable(objTempNST.getStatisticsAvailable());//ID
		objNST.setSourceType(objTempNST.getSourceType());
		objNST.setStatisticsStart(objTempNST.getStatisticsStart());//DTM
		objNST.setStatisticsEnd(objTempNST.getStatisticsEnd());//DTM
		objNST.setReceiveCharacterCount(objTempNST.getReceiveCharacterCount());//NM
		objNST.setSendCharacterCount(objTempNST.getSendCharacterCount());//NM
		objNST.setMessagesReceived(objTempNST.getMessagesReceived());//NM
		objNST.setMessagesSent(objTempNST.getMessagesSent());//NM
		objNST.setChecksumErrorsReceived(objTempNST.getChecksumErrorsReceived());//NM
		
		return objNST;
	}
	

	/**
	 * populates NSC Segment
	 * @return NSC
	 */
	public NSC populateNSC()
	{
		HD objHD = PopulateDataType.populateHD(HL7Constants.HL7_COMPONENT);
		
		//NSC segment
		NSC objNSC = new NSC();
		objNSC.setApplicationChangeType(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//IS
		objNSC.setCurrentCPU("AMD");//ST
		objNSC.setCurrentApplication(objHD);//HD
		objNSC.setCurrentFacility(objHD);//HD
		objNSC.setNewApplication(objHD);//HD
		objNSC.setNewFacility(objHD);//HD
		
		return objNSC;
	}

	/**
	 /** populates NSC Segment
	 * @return NSC
	 */ 
	public NSC populateNSC(NSC objTempNSC)
	{
		//NSC segment
		NSC objNSC = new NSC();
		objNSC.setApplicationChangeType(objTempNSC.getApplicationChangeType());//IS
		objNSC.setCurrentCPU(objTempNSC.getCurrentCPU());//ST
		objNSC.setCurrentApplication(objTempNSC.getCurrentApplication());//HD
		objNSC.setCurrentFacility(objTempNSC.getCurrentFacility());//HD
		objNSC.setNewApplication(objTempNSC.getNewApplication());//HD
		objNSC.setNewFacility(objTempNSC.getNewFacility());//HD
		return objNSC;
	}


	
	
	
	/**
	 * populates EQU Segment
	 * @return EQU
	 */
	public EQU populateEQU()
	{
		//EQU segment
		EQU objEQU = new EQU();
		objEQU.setEquipmentInstanceIdentifier("Ent", "NA", "Un Id", "x500");//EI
		objEQU.setEventDate_Time("20110202");//DTM
		objEQU.setEquipmentState(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		objEQU.setLocal_RemoteControlState(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		objEQU.setAlertLevel(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		return objEQU;
	}

	/**
	 /** populates EQU Segment
	 * @return EQU
	 */ 
	public EQU populateEQU(EQU objTempEQU)
	{
		//EQU segment
		EQU objEQU = new EQU();
		objEQU.setEquipmentInstanceIdentifier(objTempEQU.getEquipmentInstanceIdentifier());//EI
		objEQU.setEventDate_Time(objTempEQU.getEventDate_Time());//DTM
		objEQU.setEquipmentState(objTempEQU.getEquipmentState());//CWE
		objEQU.setLocal_RemoteControlState(objTempEQU.getLocal_RemoteControlState());//CWE
		objEQU.setAlertLevel(objTempEQU.getAlertLevel());//CWE
		return objEQU;
	}
	
	
	/**
	 * populates ISD Segment
	 * @return ISD
	 */
	public ISD populateISD()
	{
		//ISD segment
		ISD objISD = new ISD();
		objISD.setReferenceInteractionNumber("5");//NM
		objISD.setInteractionTypeIdentifier(null);//CWE
		objISD.setInteractionActiveState(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		return objISD;
	}
	/**
	 /** populates ISD Segment
	 * @return ISD
	 */ 
	public ISD populateISD(ISD objTempISD)
	{
		//ISD segment
		ISD objISD = new ISD();
		objISD.setReferenceInteractionNumber(objTempISD.getReferenceInteractionNumber());//NM
		objISD.setInteractionTypeIdentifier(objTempISD.getInteractionTypeIdentifier());//CWE
		objISD.setInteractionActiveState(objTempISD.getInteractionActiveState());//CWE
		return objISD;
	}
	
	/**
	 * populates EQP Segment
	 * @return EQP
	 */
	public EQP populateEQP()
	{
		//EQP segment
		EQP objEQP = new EQP();
		objEQP.setEventtype(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		objEQP.setStartDate_Time("20110202");//DTM
		objEQP.setEndDate_Time("20110202");//DTM
		objEQP.setTransactionData("TRX_ABC");//FT
		return objEQP;
	}

	/**
	 /** populates EQP Segment
	 * @return EQP
	 */ 
	public EQP populateEQP(EQP objTempEQP)
	{
		//EQP segment
		EQP objEQP = new EQP();
		objEQP.setEventtype(objTempEQP.getEventtype());//CWE
		objEQP.setStartDate_Time(objTempEQP.getStartDate_Time());//DTM
		objEQP.setEndDate_Time(objTempEQP.getEndDate_Time());//DTM
		objEQP.setTransactionData(objTempEQP.getTransactionData());//FT
		return objEQP;
	}
	
	/**
	 * populates ECD Segment
	 * @return ECD
	 */
	public ECD populateECD()
	{
		
		//ECD segment
		ECD objECD = new ECD();
		objECD.setReferenceCommandNumber("5");//NM
		objECD.setRemoteControlCommand(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		objECD.setResponseRequired("Y");//ID	
		return objECD;
	}

	/**
	 /** populates ECD Segment
	 * @return ECD
	 */ 
	public ECD populateECD(ECD objTempECD)
	{
		//ECD segment
		ECD objECD = new ECD();
		objECD.setReferenceCommandNumber(objTempECD.getReferenceCommandNumber());//NM
		objECD.setRemoteControlCommand(objTempECD.getRemoteControlCommand());//CWE
		objECD.setResponseRequired(objTempECD.getResponseRequired());//ID
	
		return objECD;
	}
	
	/**
	 * populates CNS Segment
	 * @return CNS
	 */
	public CNS populateCNS()
	{
		//CNS segment
		CNS objCNS = new CNS();
		objCNS.setStartingNotificationReferenceNumber("123");//NM
		objCNS.setEndingNotificationReferenceNumber("567");//NM
		objCNS.setStartingNotificationDate_Time("20110202");//DTM
		objCNS.setEndingNotificationDate_Time("20110202");//DTM
		objCNS.setStartingNotificationCode(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		objCNS.setEndingNotificationCode(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		return objCNS;
	}

	/**
	 /** populates CNS Segment
	 * @return CNS
	 */ 
	public CNS populateCNS(CNS objTempCNS)
	{
		//CNS segment
		CNS objCNS = new CNS();
		objCNS.setStartingNotificationReferenceNumber(objTempCNS.getStartingNotificationReferenceNumber());//NM
		objCNS.setEndingNotificationReferenceNumber(objTempCNS.getEndingNotificationReferenceNumber());//NM
		objCNS.setStartingNotificationDate_Time(objTempCNS.getStartingNotificationDate_Time());//DTM
		objCNS.setEndingNotificationDate_Time(objTempCNS.getEndingNotificationDate_Time());//DTM
		objCNS.setStartingNotificationCode(objTempCNS.getStartingNotificationCode());//CWE
		objCNS.setEndingNotificationCode(objTempCNS.getEndingNotificationCode());//CWE
		return objCNS;
	}
	
	/**
	 * populates TCC Segment
	 * @return TCC
	 */
	public TCC populateTCC()
	{
		//TCC segment
		TCC objTCC = new TCC();
		objTCC.setUniversalServiceIdentifier(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		objTCC.setTestApplicationIdentifier(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));//EI
		objTCC.setAutoDilutionFactorDefault("Ot","12","D","13");//SN
		objTCC.setRerunDilutionFactorDefault("Ot","12","D","13");//SN
		objTCC.setPreDilutionFactorDefault("Ot","12","D","13");//SN
		objTCC.setEndogenousContentofPreDilutionDiluent("Ot","12","D","13");//SN
		objTCC.setInventoryLimitsWarningLevel("5");//NM
		objTCC.setAutomaticRerunAllowed("Y");//ID
		objTCC.setAutomaticRepeatAllowed("Y");//ID
		objTCC.setAutomaticReflexAllowed("Y");//ID
		objTCC.setEquipmentDynamicRange("Ot","12","D","13");//SN
		objTCC.setUnits(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		objTCC.setProcessingType(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		objTCC.setTestCriticality(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		return objTCC;
	}

	/**
	 /** populates TCC Segment
	 * @return TCC
	 */ 
	public TCC populateTCC(TCC objTempTCC)
	{
		//TCC segment
		TCC objTCC = new TCC();
		objTCC.setUniversalServiceIdentifier(objTempTCC.getUniversalServiceIdentifier());//CWE
		objTCC.setTestApplicationIdentifier(objTempTCC.getTestApplicationIdentifier());//EI
		objTCC.setAutoDilutionFactorDefault(objTempTCC.getAutoDilutionFactorDefault());//SN
		objTCC.setRerunDilutionFactorDefault(objTempTCC.getRerunDilutionFactorDefault());//SN
		objTCC.setPreDilutionFactorDefault(objTempTCC.getPreDilutionFactorDefault());//SN
		objTCC.setEndogenousContentofPreDilutionDiluent(objTempTCC.getEndogenousContentofPreDilutionDiluent());//SN
		objTCC.setInventoryLimitsWarningLevel(objTempTCC.getInventoryLimitsWarningLevel());//NM
		objTCC.setAutomaticRerunAllowed(objTempTCC.getAutomaticRerunAllowed());//ID
		objTCC.setAutomaticRepeatAllowed(objTempTCC.getAutomaticRepeatAllowed());//ID
		objTCC.setAutomaticReflexAllowed(objTempTCC.getAutomaticReflexAllowed());//ID
		objTCC.setEquipmentDynamicRange(objTempTCC.getEquipmentDynamicRange());//SN
		objTCC.setUnits(objTempTCC.getUnits());//CWE
		objTCC.setProcessingType(objTempTCC.getProcessingType());//CWE
		objTCC.setTestCriticality(objTempTCC.getTestCriticality());//CWE
		return objTCC;
	}

	/**
	 * populates EVN Segment
	 * @return EVN
	 */
	public EVN populateEVN()
	{
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		XCN objXCN=PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT);
		
		//EVN segment	
		EVN objEVN = new EVN();
		objEVN.setRecordedDateTime("20110202");//DTM
		objEVN.setDateTimePlannedEvent("20170222");//DTM
		objEVN.setEventReasonCode(objCWE);//IS
		objEVN.addOperatorID(objXCN);//XCN
		objEVN.setEventOccurred("20110202");//DTM
		objEVN.setEventFacility(PopulateDataType.populateHD(HL7Constants.HL7_COMPONENT));//HD
		return objEVN;
	}

	/**
	 /** populates EVN Segment
	 * @return EVN
	 */ 
	public EVN populateEVN(EVN objTempEVN)
	{
		//EVN segment
		EVN objEVN = new EVN();
		objEVN.setRecordedDateTime(objTempEVN.getRecordedDateTime());//DTM
		objEVN.setDateTimePlannedEvent(objTempEVN.getDateTimePlannedEvent());//DTM
		objEVN.setEventReasonCode(objTempEVN.getEventReasonCode());//IS
		if(objTempEVN.getOperatorID().size() != 0)
			objEVN.setOperatorID(objTempEVN.getOperatorID());//XCN
		objEVN.setEventOccurred(objTempEVN.getEventOccurred());//DTM
		objEVN.setEventFacility(objTempEVN.getEventFacility());//HD
		return objEVN;
	}

	
	/**
	 * populates TXA Segment
	 * @return TXA
	 */
	public TXA populateTXA()
	{
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		
		//TXA Segment
		TXA objTXA = new TXA(); 
		objTXA.setSetID_TXA("12");
		objTXA.setDocumentType(objCWE);//IS
		objTXA.setDocumentContentPresentation("AP");//ID
		objTXA.setActivityDateTime("20110202");//DTM
		objTXA.addPrimaryActivityProviderCodeName(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));//XCN
		objTXA.setOriginationDateTime("20110202");//DTM
		objTXA.setTranscriptionDateTime("20110202");//DTM
		objTXA.addEditDateTime("20110202");//DTM
		objTXA.addOriginatorCodeName(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));//XCN
		objTXA.addAssignedDocumentAuthenticator(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));//XCN
		objTXA.addTranscriptionistCodeName(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));//XCN
		objTXA.setUniqueDocumentNumber(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));//EI
		objTXA.setParentDocumentNumber(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));//EI
		objTXA.setDocumentCompletionStatus("DI");//ID
		objTXA.setDocumentConfidentialityStatus("V");//ID
		objTXA.setDocumentAvailabilityStatus("AV");//ID
		objTXA.setDocumentStorageStatus("AC");//ID
		objTXA.addAuthenticationPersonTimeStamp(PopulateDataType.populatePPN(HL7Constants.HL7_COMPONENT));//PPN
		objTXA.addDistributedCopies(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));//XCN
		objTXA.addFolderAssignment(objCWE);
		objTXA.setAgreedDueDateTime("20171221");
		return objTXA;
	}

	/**
	 /** populates TXA Segment
	 * @return TXA
	 */ 
	public TXA populateTXA(TXA objTempTXA)
	{
		//TXA segment
		TXA objTXA = new TXA();
		objTXA.setSetID_TXA(objTempTXA.getSetID_TXA());//SI
		objTXA.setDocumentType(objTempTXA.getDocumentType());//IS
		objTXA.setDocumentContentPresentation(objTempTXA.getDocumentContentPresentation());//ID
		objTXA.setActivityDateTime(objTempTXA.getActivityDateTime());//DTM
		if(objTempTXA.getPrimaryActivityProviderCodeName().size() != 0)
			objTXA.setPrimaryActivityProviderCodeName(objTempTXA.getPrimaryActivityProviderCodeName());//XCN
		objTXA.setOriginationDateTime(objTempTXA.getOriginationDateTime());//DTM
		objTXA.setTranscriptionDateTime(objTempTXA.getTranscriptionDateTime());//DTM
		if(objTempTXA.getEditDateTime().size() != 0)
			objTXA.setEditDateTime(objTempTXA.getEditDateTime());//DTM
		if(objTempTXA.getOriginatorCodeName().size() != 0)
			objTXA.setOriginatorCodeName(objTempTXA.getOriginatorCodeName());//XCN
		if(objTempTXA.getAssignedDocumentAuthenticator().size() != 0)
			objTXA.setAssignedDocumentAuthenticator(objTempTXA.getAssignedDocumentAuthenticator());//XCN
		if(objTempTXA.getTranscriptionistCodeName().size() != 0)
			objTXA.setTranscriptionistCodeName(objTempTXA.getTranscriptionistCodeName());//XCN
		objTXA.setUniqueDocumentNumber(objTempTXA.getUniqueDocumentNumber());//EI
		objTXA.setParentDocumentNumber(objTempTXA.getParentDocumentNumber());//EI
		objTXA.setDocumentCompletionStatus(objTempTXA.getDocumentCompletionStatus());//ID
		objTXA.setDocumentConfidentialityStatus(objTempTXA.getDocumentConfidentialityStatus());//ID
		objTXA.setDocumentAvailabilityStatus(objTempTXA.getDocumentAvailabilityStatus());//ID
		objTXA.setDocumentStorageStatus(objTempTXA.getDocumentStorageStatus());//ID
		if(objTempTXA.getAuthenticationPersonTimeStamp().size() != 0)
			objTXA.setAuthenticationPersonTimeStamp(objTempTXA.getAuthenticationPersonTimeStamp());//PPN
		if(objTempTXA.getDistributedCopies().size() != 0)
			objTXA.setDistributedCopies(objTempTXA.getDistributedCopies());//XCN
		if(objTempTXA.getFolderAssignment().size() != 0)
			objTXA.setFolderAssignment(objTempTXA.getFolderAssignment());
		objTXA.setAgreedDueDateTime(objTempTXA.getAgreedDueDateTime());
		return objTXA;
	}
	
	
	/**
	 * populates STF Segment
	 * @return STF
	 */
	public STF populateSTF()
	{
		
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		CX objCX=PopulateDataType.populateCX(HL7Constants.HL7_COMPONENT);
		XPN objXPN=PopulateDataType.populateXPN(HL7Constants.HL7_COMPONENT);
		XTN objXTN=PopulateDataType.populateXTN(HL7Constants.HL7_COMPONENT);
		XAD objXAD=PopulateDataType.populateXAD(HL7Constants.HL7_COMPONENT);
		
		
		//STF segment
		STF objSTF = new STF();
		objSTF.setPrimaryKeyValueSTF(objCWE);//CWE
		objSTF.addStaffIdentifierList(objCX);//CX
		objSTF.addStaffName(objXPN);//XPN
		objSTF.addStaffType(objCWE);//CWE
		objSTF.setAdministrativeSex(objCWE);//CWE
		objSTF.setActive_InactiveFlag("A");//ID
		objSTF.addDepartment(objCWE);//CWE
		objSTF.addHospitalServiceSTF(objCWE);//CWE
		objSTF.addPhone(objXTN);//XTN
		objSTF.addOffice_HomeAddress_Birthplace(objXAD);//XAD
		objSTF.addInstitutionActivationDate(PopulateDataType.populateDTM(HL7Constants.HL7_SUBCOMPONENT),PopulateDataType.populateCWE(HL7Constants.HL7_SUBCOMPONENT));
		objSTF.addInstitutionInactivationDate(PopulateDataType.populateDTM(HL7Constants.HL7_SUBCOMPONENT),PopulateDataType.populateCWE(HL7Constants.HL7_SUBCOMPONENT));//DIN
		objSTF.addBackupPersonID(objCWE);//CWE
		objSTF.addEMailAddress("abc@cdac.in");//ST
		objSTF.setPreferredMethodofContact(objCWE);//CWE
		objSTF.setMaritalStatus(objCWE);//CWE
		objSTF.setJobTitle("A");//ST
		objSTF.setJobCodeClass(PopulateDataType.populateCWE(HL7Constants.HL7_SUBCOMPONENT),PopulateDataType.populateCWE(HL7Constants.HL7_SUBCOMPONENT), "JobText");//JCC
		objSTF.setEmploymentStatusCode(objCWE);//CWE
		objSTF.setAdditionalInsuredonAuto("Y");//ID
		objSTF.setDriversLicenseNumberStaff(PopulateDataType.populateDLN(HL7Constants.HL7_COMPONENT));
		objSTF.setCopyAutoIns("Y");//ID
		objSTF.setRace(objCWE);//CWE
		objSTF.setEthnicGroup(objCWE);//CWE
		objSTF.setReactivationApprovalIndicator("Y");//ID
		objSTF.addCitizenship(objCWE);//CWE
		objSTF.setDeathIndicator("Y");//ID
		objSTF.setInstitutionRelationshipTypeCode(objCWE);//CWE
		objSTF.setInstitutionRelationshipPeriod(objExpirationDate, objExpirationDate);//DR
		objSTF.addCostCenterCode(objCWE);//CWE
		objSTF.setGenericClassificationIndicator("Y");//ID
		objSTF.setInactiveReasonCode(objCWE);//CWE
		objSTF.addGenericResourceTypeOrCategory(objCWE);
		objSTF.setReligion(objCWE);
		objSTF.setSignature(PopulateDataType.populateED(HL7Constants.HL7_COMPONENT));
		return objSTF;
	}

	/**
	 /** populates STF Segment
	 * @return STF
	 */ 
	public STF populateSTF(STF objTempSTF)
	{
		//STF segment
		STF objSTF = new STF();
		objSTF.setPrimaryKeyValueSTF(objTempSTF.getPrimaryKeyValueSTF());//CWE
		if(objTempSTF.getStaffIdentifierList().size() != 0)
			objSTF.setStaffIdentifierList(objTempSTF.getStaffIdentifierList());//CX
		if(objTempSTF.getStaffName().size() != 0)
			objSTF.setStaffName(objTempSTF.getStaffName());//XPN
		if(objTempSTF.getStaffType().size() != 0)
			objSTF.setStaffType(objTempSTF.getStaffType());//IS
		objSTF.setAdministrativeSex(objTempSTF.getAdministrativeSex());//IS
		objSTF.setActive_InactiveFlag(objTempSTF.getActive_InactiveFlag());//ID
		if(objTempSTF.getDepartment().size() != 0)
			objSTF.setDepartment(objTempSTF.getDepartment());//CWE
		if(objTempSTF.getHospitalServiceSTF().size() != 0)
			objSTF.setHospitalServiceSTF(objTempSTF.getHospitalServiceSTF());//CWE
		if(objTempSTF.getPhone().size() != 0)
			objSTF.setPhone(objTempSTF.getPhone());//XTN
		if(objTempSTF.getOffice_HomeAddress_Birthplace().size() != 0)
			objSTF.setOffice_HomeAddress_Birthplace(objTempSTF.getOffice_HomeAddress_Birthplace());//XAD
		if(objTempSTF.getInstitutionActivationDate().size() != 0)
			objSTF.setInstitutionActivationDate(objTempSTF.getInstitutionActivationDate());//DIN
		if(objTempSTF.getInstitutionInactivationDate().size() != 0)
			objSTF.setInstitutionInactivationDate(objTempSTF.getInstitutionInactivationDate());//DIN
		if(objTempSTF.getBackupPersonID().size() != 0)
			objSTF.setBackupPersonID(objTempSTF.getBackupPersonID());//CWE
		if(objTempSTF.getEMailAddress().size() != 0)
			objSTF.setEMailAddress(objTempSTF.getEMailAddress());//ST
		objSTF.setPreferredMethodofContact(objTempSTF.getPreferredMethodofContact());//CWE
		objSTF.setMaritalStatus(objTempSTF.getMaritalStatus());//CWE
		objSTF.setJobTitle(objTempSTF.getJobTitle());//ST
		objSTF.setJobCodeClass(objTempSTF.getJobCodeClass());//JCC
		objSTF.setEmploymentStatusCode(objTempSTF.getEmploymentStatusCode());//CWE
		objSTF.setAdditionalInsuredonAuto(objTempSTF.getAdditionalInsuredonAuto());//ID
		objSTF.setDriversLicenseNumberStaff(objTempSTF.getDriversLicenseNumberStaff());//DLN
		objSTF.setCopyAutoIns(objTempSTF.getCopyAutoIns());//ID
		objSTF.setRace(objTempSTF.getRace());//CWE
		objSTF.setEthnicGroup(objTempSTF.getEthnicGroup());//CWE
		objSTF.setReactivationApprovalIndicator(objTempSTF.getReactivateApprovalIndicator());//ID
		if(objTempSTF.getCitizenship().size() != 0)
			objSTF.setCitizenship(objTempSTF.getCitizenship());//CWE
		objSTF.setDeathIndicator(objTempSTF.getDeathIndicator());//ID
		objSTF.setInstitutionRelationshipTypeCode(objTempSTF.getInstitutionRelationshipTypeCode());//CWE
		objSTF.setInstitutionRelationshipPeriod(objTempSTF.getInstitutionRelationshipPeriod());//DR
		if(objTempSTF.getCostCenterCode().size() != 0)
			objSTF.setCostCenterCode(objTempSTF.getCostCenterCode());//CWE
		objSTF.setGenericClassificationIndicator(objTempSTF.getGenericClassificationIndicator());//ID
		objSTF.setInactiveReasonCode(objTempSTF.getInactiveReasonCode());//CWE
		if(objTempSTF.getGenericResourceTypeOrCategory().size() != 0)
			objSTF.setGenericResourceTypeOrCategory(objTempSTF.getGenericResourceTypeOrCategory());//CWE
		objSTF.setReligion(objTempSTF.getReligion());
		objSTF.setSignature(objTempSTF.getSignature());
		return objSTF;
	}
	
	/**
	 * populates PRA Segment
	 * @return PRA
	 */
	public PRA populatePRA()
	{
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		EI objEI = PopulateDataType.populateEI(HL7Constants.HL7_SUBCOMPONENT);
		//PRA Segment
		PRA objPRA = new PRA();
		objPRA.setPrimaryKeyValue_PRA(objCWE);//CWE
		objPRA.addPractitionerGroup(objCWE);//CWE
		objPRA.addPractitionerCategory(objCWE);//IS
		objPRA.setProviderBilling("I");//ID
		objPRA.addSpecialty("CDAC", "Ministry", "C", "19850212");//SPD
		objPRA.addPrivileges(PopulateDataType.populateCWE(HL7Constants.HL7_SUBCOMPONENT),PopulateDataType.populateCWE(HL7Constants.HL7_SUBCOMPONENT), "19850212", "19850212", objEI);//PIP
		objPRA.setInstitution(objCWE);//CWE
		objPRA.addGovernmentReimbursementBillingEligibility(objCWE);//CWE
		objPRA.setSetID_PRA("1");//SI
		return objPRA;
	}

	/**
	 /** populates PRA Segment
	 * @return PRA
	 */ 
	public PRA populatePRA(PRA objTempPRA)
	{
		//PRA segment
		PRA objPRA = new PRA();
		objPRA.setPrimaryKeyValue_PRA(objTempPRA.getPrimaryKeyValue_PRA());//CWE
		if(objTempPRA.getPractitionerGroup().size() != 0)
			objPRA.setPractitionerGroup(objTempPRA.getPractitionerGroup());//CWE
		if(objTempPRA.getPractitionerCategory().size() != 0)
			objPRA.setPractitionerCategory(objTempPRA.getPractitionerCategory());//IS
		objPRA.setProviderBilling(objTempPRA.getProviderBilling());//ID
		if(objTempPRA.getSpecialty().size() != 0)
			objPRA.setSpecialty(objTempPRA.getSpecialty());//SPD
		if(objTempPRA.getPrivileges().size() != 0)
			objPRA.setPrivileges(objTempPRA.getPrivileges());//PIP
		objPRA.setInstitution(objTempPRA.getInstitution());//CWE
		if(objTempPRA.getGovernmentReimbursementBillingEligibility().size() != 0)
			objPRA.setGovernmentReimbursementBillingEligibility(objTempPRA.getGovernmentReimbursementBillingEligibility());//CWE
		objPRA.setSetID_PRA(objTempPRA.getSetID_PRA());//SI
		return objPRA;
	}
	
	
	/**
	 * populates ORG Segment
	 * @return ORG
	 */
	public ORG populateORG()
	{
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		//ORG segment
		ORG objORG = new ORG();
		objORG.setSetID_ORG("1");//SI
		objORG.setOrganizationUnitCode(objCWE);//CWE
		objORG.setOrganizationUnitTypeCode(objCWE);//CWE
		objORG.setPrimaryOrgUnitIndicator("Y");//ID
		objORG.setPractitionerOrgUnitIdentifier(PopulateDataType.populateCX(HL7Constants.HL7_COMPONENT));
		objORG.setHealthCareProviderTypeCode(objCWE);//CWE
		objORG.setHealthCareProviderClassificationCode(objCWE);//CWE
		objORG.setHealthCareProviderAreaofSpecializationCode(objCWE);//CWE
		objORG.setEffectiveDateRange(objExpirationDate, objExpirationDate);//DR
		objORG.setEmploymentStatusCode(objCWE);//CWE
		objORG.setBoardApprovalIndicator("Y");//ID
		objORG.setPrimaryCarePhysicianIndicator("Y");//ID
		objORG.addCodedRepresentationofMethod(objCWE);//CWE(Cost Center Code)
		return objORG;
	}

	/**
	 /** populates ORG Segment
	 * @return ORG
	 */ 
	public ORG populateORG(ORG objTempORG)
	{
		//ORG segment
		ORG objORG = new ORG();
		objORG.setSetID_ORG(objTempORG.getSetID_ORG());//SI
		objORG.setOrganizationUnitCode(objTempORG.getOrganizationUnitCode());//CWE
		objORG.setOrganizationUnitTypeCode(objTempORG.getOrganizationUnitTypeCode());//CWE
		objORG.setPrimaryOrgUnitIndicator(objTempORG.getPrimaryOrgUnitIndicator());//ID
		objORG.setPractitionerOrgUnitIdentifier(objTempORG.getPractitionerOrgUnitIdentifier());//CX
		objORG.setHealthCareProviderTypeCode(objTempORG.getHealthCareProviderTypeCode());//CWE
		objORG.setHealthCareProviderClassificationCode(objTempORG.getHealthCareProviderClassificationCode());//CWE
		objORG.setHealthCareProviderAreaofSpecializationCode(objTempORG.getHealthCareProviderAreaofSpecializationCode());//CWE
		objORG.setEffectiveDateRange(objTempORG.getEffectiveDateRange());//DR
		objORG.setEmploymentStatusCode(objTempORG.getEmploymentStatusCode());//CWE
		objORG.setBoardApprovalIndicator(objTempORG.getBoardApprovalIndicator());//ID
		objORG.setPrimaryCarePhysicianIndicator(objTempORG.getPrimaryCarePhysicianIndicator());//ID
		if(objTempORG.getCodedRepresentationofMethod().size() != 0)
			objORG.setCodedRepresentationofMethod(objTempORG.getCodedRepresentationofMethod());//CWE (Cost Center Code)
		return objORG;
	}
	
	/**
	 * populates AFF Segment
	 * @return AFF
	 */
	public AFF populateAFF()
	{

		
		//AFF segment
		AFF objAFF = new AFF();
		objAFF.setSetID_AFF("1");//SI
		objAFF.setProfessionalOrganization(PopulateDataType.populateXON(HL7Constants.HL7_COMPONENT));
		objAFF.setProfessionalOrganizationAddress(PopulateDataType.populateXAD(HL7Constants.HL7_COMPONENT));//XAD
		objAFF.addProfessionalOrganizationAffiliationDateRange(objExpirationDate, objExpirationDate);//DR
		return objAFF;
	}

	/**
	 /** populates AFF Segment
	 * @return AFF
	 */ 
	public AFF populateAFF(AFF objTempAFF)
	{
		//AFF segment
		AFF objAFF = new AFF();
		objAFF.setSetID_AFF(objTempAFF.getSetID_AFF());//SI
		objAFF.setProfessionalOrganization(objTempAFF.getProfessionalOrganization());//XON
		objAFF.setProfessionalOrganizationAddress(objTempAFF.getProfessionalOrganizationAddress());//XAD
		if(objTempAFF.getProfessionalOrganizationAffiliationDateRange().size() != 0)
			objAFF.setProfessionalOrganizationAffiliationDateRange(objTempAFF.getProfessionalOrganizationAffiliationDateRange());//DR
		return objAFF;
	}
	
	
	/**
	 * populates LAN Segment
	 * @return LAN
	 */
	public LAN populateLAN()
	{
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		//LAN segment
		LAN objLAN = new LAN();
		objLAN.setSetID_LAN("1");//SI
		objLAN.setLanguageCode(objCWE);//CWE
		objLAN.addLanguageAbilityCode(null);//CWE
		objLAN.setLanguageProficiencyCode(objCWE);//CWE
		return objLAN;
	}

	/**
	 /** populates LAN Segment
	 * @return LAN
	 */ 
	public LAN populateLAN(LAN objTempLAN)
	{
		//LAN segment
		LAN objLAN = new LAN();
		objLAN.setSetID_LAN(objTempLAN.getSetID_LAN());//SI
		objLAN.setLanguageCode(objTempLAN.getLanguageCode());//CWE
		if(objTempLAN.getLanguageAbilityCode().size() != 0)
			objLAN.setLanguageAbilityCode(objTempLAN.getLanguageAbilityCode());//CWE
		objLAN.setLanguageProficiencyCode(objTempLAN.getLanguageProficiencyCode());//CWE
		return objLAN;
	}
	
	/**
	 * populates EDU Segment
	 * @return EDU
	 */
	public EDU populateEDU()
	{
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		
		//EDU segment
		EDU objEDU = new EDU();
		objEDU.setSetID_EDU("1");//SI
		objEDU.setAcademicDegree(objCWE);//CWE
		objEDU.setAcademicDegreeProgramDateRange(objExpirationDate, objExpirationDate);//DR
		objEDU.setAcademicDegreeProgramParticipationDateRange(objExpirationDate, objExpirationDate);//DR
		objEDU.setSchool(PopulateDataType.populateXON(HL7Constants.HL7_COMPONENT));
		objEDU.setSchoolTypeCode(null);//CWE
		objEDU.setSchoolAddress(PopulateDataType.populateXAD(HL7Constants.HL7_COMPONENT));//XAD
		objEDU.addMajorFieldofStudy(objCWE);//CWE
		return objEDU;
	}

	/**
	 /** populates EDU Segment
	 * @return EDU
	 */ 
	public EDU populateEDU(EDU objTempEDU)
	{
		//EDU segment
		EDU objEDU = new EDU();
		objEDU.setSetID_EDU(objTempEDU.getSetID_EDU());//SI
		objEDU.setAcademicDegree(objTempEDU.getAcademicDegree());//IS
		objEDU.setAcademicDegreeProgramDateRange(objTempEDU.getAcademicDegreeProgramDateRange());//DR
		objEDU.setAcademicDegreeProgramParticipationDateRange(objTempEDU.getAcademicDegreeProgramParticipationDateRange());//DR
		objEDU.setSchool(objTempEDU.getSchool());//XON
		objEDU.setSchoolTypeCode(objTempEDU.getSchoolTypeCode());//CWE
		objEDU.setSchoolAddress(objTempEDU.getSchoolAddress());//XAD
		if(objTempEDU.getMajorFieldofStudy().size() != 0)
			objEDU.setMajorFieldofStudy(objTempEDU.getMajorFieldofStudy());//CWE
		return objEDU;
	}

	/**
	 * populates CER Segment
	 * @return CER
	 */
	public CER populateCER()
	{
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		
		//CER segment
		CER objCER = new CER();
		objCER.setSetID_CER("1");//SI
		objCER.setGrantingAuthority(PopulateDataType.populateXON(HL7Constants.HL7_COMPONENT));//XON
		objCER.setIssuingAuthority(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));//XCN
		objCER.setSignatureofIssuingAuthority(PopulateDataType.populateED(HL7Constants.HL7_COMPONENT));//ED
		objCER.setSubjectID(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));//ID
		objCER.setSubjectName("HL7");//ST
		objCER.addSubjectDirectoryAttributeExtension(objCWE);//CWE
		objCER.setSubjectPublicKeyInfo(objCWE);//CWE
		objCER.setAuthorityKeyIdentifier(objCWE);//CWE
		objCER.setBasicConstraint("Y");//ID
		objCER.addCRLDistributionPoint(objCWE);//CWE
		objCER.setRevocationReasonCode(objCWE);//CWE
		objCER.setCertificateStatus(objCWE);//CWE
		return objCER;
	}

	/**
	 /** populates CER Segment
	 * @return CER
	 */ 
	public CER populateCER(CER objTempCER)
	{
		//CER segment
		CER objCER = new CER();
		objCER.setSetID_CER(objTempCER.getSetID_CER());//SI
		objCER.setGrantingAuthority(objTempCER.getGrantingAuthority());//XON
		objCER.setIssuingAuthority(objTempCER.getIssuingAuthority());//XCN
		objCER.setSignatureofIssuingAuthority(objTempCER.getSignatureofIssuingAuthority());//ED
		objCER.setSubjectID(objTempCER.getSubjectID());//ID
		objCER.setSubjectName(objTempCER.getSubjectName());//ST
		if(objTempCER.getSubjectDirectoryAttributeExtension().size() != 0)
			objCER.setSubjectDirectoryAttributeExtension(objTempCER.getSubjectDirectoryAttributeExtension());//CWE
		objCER.setSubjectPublicKeyInfo(objTempCER.getSubjectPublicKeyInfo());//CWE
		objCER.setAuthorityKeyIdentifier(objTempCER.getAuthorityKeyIdentifier());//CWE
		objCER.setBasicConstraint(objTempCER.getBasicConstraint());//ID
		if(objTempCER.getCRLDistributionPoint().size() != 0)
			objCER.setCRLDistributionPoint(objTempCER.getCRLDistributionPoint());//CWE
		objCER.setRevocationReasonCode(objTempCER.getRevocationReasonCode());//CWE
		objCER.setCertificateStatus(objTempCER.getCertificateStatus());//CWE
		return objCER;
	}
	
	/**
	 * populates QPD Segment
	 * @return QPD
	 */
	public QPD populateQPD()
	{
		//QPD segment
		QPD objQPD = new QPD();
		objQPD.setMessageQueryName(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		objQPD.setQueryTag("A");//ST
		ISingleCollection<IDataType> userParameters = new SingleCollection<IDataType>();
		HD objHD = PopulateDataType.populateHD(HL7Constants.HL7_SUBCOMPONENT);
		SAD objStreetAddress = PopulateDataType.populateSAD(HL7Constants.HL7_SUBCOMPONENT);
		userParameters.add(objHD);
		userParameters.add(objStreetAddress);
		objQPD.setUserParameters(userParameters);//varies
		return objQPD;
	}

	/**
	 /** populates QPD Segment
	 * @return QPD
	 */ 
	public QPD populateQPD(QPD objTempQPD)
	{
		//QPD segment
		QPD objQPD = new QPD();
		objQPD.setMessageQueryName(objTempQPD.getMessageQueryName());//CWE
		objQPD.setQueryTag(objTempQPD.getQueryTag());//ST
		objQPD.setUserParameters(objTempQPD.getUserParameters());//varies
		return objQPD;
	}

	
	/**
	 * populates RCP Segment
	 * @return RCP
	 */
	public RCP populateRCP()
	{
		
		//RCP segment
		RCP objRCP = new RCP();
		objRCP.setQueryPriority("D");//ID
		objRCP.setQuantityLimitedRequest("5", null);//CQ
		objRCP.setResponseModality(PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT));//CWE
		objRCP.setExecutionDeliveryTime("20110202");//DTM
		objRCP.setModifyIndicator("N");//ID
		objRCP.addSortField("SortbyField", "A");
		objRCP.addSegmentgroupinclusion("N");//ID
		return objRCP;
	}

	/**
	 /** populates RCP Segment
	 * @return RCP
	 */ 
	public RCP populateRCP(RCP objTempRCP)
	{
		//RCP segment
		RCP objRCP = new RCP();
		objRCP.setQueryPriority(objTempRCP.getQueryPriority());//ID
		objRCP.setQuantityLimitedRequest(objTempRCP.getQuantityLimitedRequest());//CQ
		objRCP.setResponseModality(objTempRCP.getResponseModality());//CWE
		objRCP.setExecutionDeliveryTime(objTempRCP.getExecutionDeliveryTime());//DTM
		objRCP.setModifyIndicator(objTempRCP.getModifyIndicator());//ID
		if(objTempRCP.getSortField().size() != 0)
			objRCP.setSortField(objTempRCP.getSortField());
		if(objTempRCP.getSegmentgroupinclusion().size() != 0)
			objRCP.setSegmentgroupinclusion(objTempRCP.getSegmentgroupinclusion());//ID
		return objRCP;
	}

	
	
	/**
	 * populates MFI Segment
	 * @return MFI
	 */
	public MFI populateMFI()
	{
		
		//MFI segment
		MFI objMFI = new MFI();
		objMFI.setMasterFileIdentifier(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		objMFI.setFileLevelEventCode("REP");//ID
		objMFI.setEnteredDateTime("20110202");//DTM
		objMFI.setEffectiveDateTime("20110202");//DTM
		objMFI.setResponseLevelCode("NE");//ID
		return objMFI;
	}

	/**
	 /** populates MFI Segment
	 * @return MFI
	 */ 
	public MFI populateMFI(MFI objTempMFI)
	{
		//MFI segment
		MFI objMFI = new MFI();
		objMFI.setMasterFileIdentifier(objTempMFI.getMasterFileIdentifier());//CWE
		objMFI.setFileLevelEventCode(objTempMFI.getFileLevelEventCode());//ID
		objMFI.setEnteredDateTime(objTempMFI.getEnteredDateTime());//DTM
		objMFI.setEffectiveDateTime(objTempMFI.getEffectiveDateTime());//DTM
		objMFI.setResponseLevelCode(objTempMFI.getResponseLevelCode());//ID
		return objMFI;
	}
	
	/**
	 * populates MFE Segment
	 * @return MFE
	 */
	public MFE populateMFE()
	{
		HD objHD = PopulateDataType.populateHD(HL7Constants.HL7_SUBCOMPONENT);
		EI objComprehensiveLocationIdentifier = PopulateDataType.populateEI(HL7Constants.HL7_SUBCOMPONENT);
		
		IDataType objDataType = PopulateDataType.populatePL(HL7Constants.HL7_SUBCOMPONENT);
		((PL)objDataType).setPointOfCare(objHD);
		((PL)objDataType).setRoom(objHD);
		((PL)objDataType).setBed(objHD);
		((PL)objDataType).setAssigningAuthorityForLocation(objAssigningAuthority);
		((PL)objDataType).setLocationStatus("LOC_status");
		((PL)objDataType).setPersonLocationType("H");
		((PL)objDataType).setBuilding("Building");
		((PL)objDataType).setFloor("Floor");
		((PL)objDataType).setLocationDescription("LocationDescription");
		((PL)objDataType).setComprehensiveLocationIdentifier(objComprehensiveLocationIdentifier);
		((PL)objDataType).setAssigningAuthorityForLocation(objAssigningAuthority);
		//MFE segment
		MFE objMFE = new MFE();
		objMFE.setRecordLevelEventCode("MAD");//ID
		objMFE.setMFNControlID("A");//ST
		objMFE.addPrimaryKeyValueType("PL");//ID
		objMFE.addprimaryKeyValueMFE(objDataType);//varies
		objMFE.setEnteredBy(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));
		return objMFE;
	}

	/**
	 /** populates MFE Segment
	 * @return MFE
	 */ 
	public MFE populateMFE(MFE objTempMFE)
	{
		//MFE segment
		MFE objMFE = new MFE();
		objMFE.setRecordLevelEventCode(objTempMFE.getRecordLevelEventCode());//ID
		objMFE.setMFNControlID(objTempMFE.getMFNControlID());//ST
		objMFE.setPrimaryKeyValueType(objTempMFE.getPrimaryKeyValueType());//ID
		objMFE.setprimaryKeyValueMFE(objTempMFE.getPrimaryKeyValueMFE());//varies
		objMFE.setEnteredBy(objTempMFE.getEnteredBy());
		return objMFE;
	}
	
	
	
	
	/**
	 * populates OM1 Segment
	 * @return OM1
	 */	
	public OM1 populateOM1()
	{
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		//OM1 segment
		OM1 objOM1 = new OM1();
		objOM1.setSequenceNumberTestObservationMasterFile("5");//NM
		objOM1.setProducerServiceTestObservationID(objCWE);//CWE
		objOM1.setSpecimenRequired("Y");//ID
		objOM1.setProducerID(objCWE);//CWE
		objOM1.setObservationDescription("strObservationDescription");//TX
		objOM1.setOtherServiceTestObservationIDsfortheObservation(objCWE);//CWE
		objOM1.addOtherNames("A");//ST
		objOM1.setPreferredReportNamefortheObservation("A");//ST
		objOM1.setPreferredShortNameorMnemonicforObservation("A");//ST
		objOM1.setPreferredLongNamefortheObservation("A");//ST
		objOM1.setOrderability("Y");//ID
		objOM1.addIdentityofInstrumentUsedtoPerformthisStudy(objCWE);//CWE
		objOM1.addCodedRepresentationofMethod(objCWE);//CWE
		objOM1.setPortableDeviceIndicator("Y");//ID
		objOM1.addObservationProducingDepartmentSection(objCWE);//CWE
		objOM1.setTelephoneNumberofSection(PopulateDataType.populateXTN(HL7Constants.HL7_COMPONENT));//XTN
		objOM1.setNatureofServiceTestObservation(objCWE);//IS
		objOM1.setReportSubheader(objCWE);//CWE
		objOM1.setReportDisplayOrder("A");//ST
		objOM1.setDateTimeStampforanychangeinDefinitionfortheObservation("20110202");//DTM
		objOM1.setEffectiveDateTimeofChange("20110202");//DTM
		objOM1.setTypicalTurnAroundTime("5",PopulateDataType.populateCWE(HL7Constants.HL7_SUBCOMPONENT));//NM (Backward)
		objOM1.setProcessingTime("5");//NM
		objOM1.addProcessingPriority("S");//ID
		objOM1.setReportingPriority("C");//ID
		objOM1.addOutsideSiteWhereObservationmaybePerformed(objCWE);//CWE
		objOM1.addAddressofOutsideSite(PopulateDataType.populateXAD(HL7Constants.HL7_COMPONENT));//XAD
		objOM1.setPhoneNumberofOutsideSite(PopulateDataType.populateXTN(HL7Constants.HL7_COMPONENT));//XTN
		objOM1.setConfidentialityCode(objCWE);//CWE
		objOM1.setObservationsRequiredtoInterprettheObservation(objCWE);//CWE
		objOM1.setContraindicationstoObservations(objCWE);//CWE
		objOM1.addReflexTestsObservations(objCWE);//CWE
		objOM1.setFixedCannedMessage(objCWE);//CWE
		objOM1.setProcedureMedication(objCWE);//CWE
		objOM1.addServiceTestObservationPerformanceSchedule("A");//ST
		objOM1.setKindofQuantityObserved(objCWE);//CWE
		objOM1.setPointVersusInterval(objCWE);//CWE
		objOM1.setChallengeInformation("BS");//TX
		objOM1.setRelationshipModifier(objCWE);//CWE
		objOM1.setTargetAnatomicSiteOfTest(objCWE);//CWE
		return objOM1;
	}

	/**
	 /** populates OM1 Segment
	 * @return OM1
	 */ 
	public OM1 populateOM1(OM1 objTempOM1)
	{
		//OM1 segment
		OM1 objOM1 = new OM1();
		objOM1.setSequenceNumberTestObservationMasterFile(objTempOM1.getSequenceNumberTestObservationMasterFile());//NM
		objOM1.setProducerServiceTestObservationID(objTempOM1.getProducerServiceTestObservationID());//CWE
		if(objTempOM1.getPermittedDataTypes().size() != 0)
			objOM1.setPermittedDataTypes(objTempOM1.getPermittedDataTypes());//ID
		objOM1.setSpecimenRequired(objTempOM1.getSpecimenRequired());//ID
		objOM1.setProducerID(objTempOM1.getProducerID());//CWE
		objOM1.setObservationDescription(objTempOM1.getObservationDescription());//TX
		objOM1.setOtherServiceTestObservationIDsfortheObservation(objTempOM1.getOtherServiceTestObservationIDsfortheObservation());//CWE
		if(objTempOM1.getOtherNames().size() != 0)
			objOM1.setOtherNames(objTempOM1.getOtherNames());//ST
		objOM1.setPreferredReportNamefortheObservation(objTempOM1.getPreferredReportNamefortheObservation());//ST
		objOM1.setPreferredShortNameorMnemonicforObservation(objTempOM1.getPreferredShortNameorMnemonicforObservation());//ST
		objOM1.setPreferredLongNamefortheObservation(objTempOM1.getPreferredLongNamefortheObservation());//ST
		objOM1.setOrderability(objTempOM1.getOrderability());//ID
		if(objTempOM1.getIdentityofInstrumentUsedtoPerformthisStudy().size() != 0)
			objOM1.setIdentityofInstrumentUsedtoPerformthisStudy(objTempOM1.getIdentityofInstrumentUsedtoPerformthisStudy());//CWE
		objOM1.setCodedRepresentationofMethod(objTempOM1.getCodedRepresentationofMethod());//CWE
		objOM1.setPortableDeviceIndicator(objTempOM1.getPortableDeviceIndicator());//ID
		if(objTempOM1.getObservationProducingDepartmentSection().size() != 0)
			objOM1.setObservationProducingDepartmentSection(objTempOM1.getObservationProducingDepartmentSection());//CWE
		objOM1.setTelephoneNumberofSection(objTempOM1.getTelephoneNumberofSection());//XTN
		objOM1.setNatureofServiceTestObservation(objTempOM1.getNatureofServiceTestObservation());//IS
		objOM1.setReportSubheader(objTempOM1.getReportSubheader());//CWE
		objOM1.setReportDisplayOrder(objTempOM1.getReportDisplayOrder());//ST
		objOM1.setDateTimeStampforanychangeinDefinitionfortheObservation(objTempOM1.getDateTimeStampforanychangeinDefinitionfortheObservation());//DTM
		objOM1.setEffectiveDateTimeofChange(objTempOM1.getEffectiveDateTimeofChange());//DTM
		objOM1.setTypicalTurnAroundTime(objTempOM1.getTypicalTurnAroundTime());//NM
		objOM1.setProcessingTime(objTempOM1.getProcessingTime());//NM
		if(objTempOM1.getProcessingPriority().size() != 0)
			objOM1.setProcessingPriority(objTempOM1.getProcessingPriority());//ID
		objOM1.setReportingPriority(objTempOM1.getReportingPriority());//ID
		if(objTempOM1.getOutsideSiteWhereObservationmaybePerformed().size() != 0)
			objOM1.setOutsideSiteWhereObservationmaybePerformed(objTempOM1.getOutsideSiteWhereObservationmaybePerformed());//CWE
		if(objTempOM1.getAddressofOutsideSite().size() != 0)
			objOM1.setAddressofOutsideSite(objTempOM1.getAddressofOutsideSite());//XAD
		objOM1.setPhoneNumberofOutsideSite(objTempOM1.getPhoneNumberofOutsideSite());//XTN
		objOM1.setConfidentialityCode(objTempOM1.getConfidentialityCode());//CWE
		objOM1.setObservationsRequiredtoInterprettheObservation(objTempOM1.getObservationsRequiredtoInterprettheObservation());//CWE
		objOM1.setContraindicationstoObservations(objTempOM1.getContraindicationstoObservations());//CWE
		if(objTempOM1.getReflexTestsObservations().size() != 0)
			objOM1.setReflexTestsObservations(objTempOM1.getReflexTestsObservations());//CWE
		objOM1.setFixedCannedMessage(objTempOM1.getFixedCannedMessage());//CWE
		objOM1.setProcedureMedication(objTempOM1.getProcedureMedication());//CWE
		if(objTempOM1.getServiceTestObservationPerformanceSchedule().size() != 0)
			objOM1.setServiceTestObservationPerformanceSchedule(objTempOM1.getServiceTestObservationPerformanceSchedule());//ST
 		objOM1.setKindofQuantityObserved(objTempOM1.getKindofQuantityObserved());//CWE
		objOM1.setPointVersusInterval(objTempOM1.getPointVersusInterval());//CWE
		objOM1.setChallengeInformation(objTempOM1.getChallengeInformation());//TX
		objOM1.setRelationshipModifier(objTempOM1.getRelationshipModifier());//CWE
		objOM1.setTargetAnatomicSiteOfTest(objTempOM1.getTargetAnatomicSiteOfTest());//CWE
		return objOM1;
	}
	

	/**
	 * populates OM2 Segment
	 * @return OM2
	 */	
	public OM2 populateOM2()
	{
		NR objNR = PopulateDataType.populateNR(HL7Constants.HL7_SUBCOMPONENT);
		objNR.setLowValue("2");
		objNR.setHighValue("5");
		//OM2 segment
		OM2 objOM2 = new OM2();
		objOM2.setSequenceNumberTestObservationMasterFile("5");//NM
		objOM2.setUnitsofMeasure(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		objOM2.addRangeofDecimalPrecision("5");//NM
		objOM2.setCorrespondingSIUnitsofMeasure(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		objOM2.addCriticalRangeforOrdinalandContinuousObservations(PopulateDataType.populateRFR(HL7Constants.HL7_SUBCOMPONENT));//RFR
		objOM2.setAbsoluteRangeforOrdinalandContinuousObservations(PopulateDataType.populateRFR(HL7Constants.HL7_SUBCOMPONENT));//RFR
		objOM2.setMinimumMeaningfulIncrements("5");//NM
		return objOM2;
	}

	/**
	 /** populates OM2 Segment
	 * @return OM2
	 */ 
	public OM2 populateOM2(OM2 objTempOM2)
	{
		//OM2 segment
		OM2 objOM2 = new OM2();
		objOM2.setSequenceNumberTestObservationMasterFile(objTempOM2.getSequenceNumberTestObservationMasterFile());//NM
		objOM2.setUnitsofMeasure(objTempOM2.getUnitsofMeasure());//CWE
		if(objTempOM2.getRangeofDecimalPrecision().size() != 0)
			objOM2.setRangeofDecimalPrecision(objTempOM2.getRangeofDecimalPrecision());//NM
		objOM2.setCorrespondingSIUnitsofMeasure(objTempOM2.getCorrespondingSIUnitsofMeasure());//CWE
		if(objTempOM2.getCriticalRangeforOrdinalandContinuousObservations().size() != 0)
			objOM2.setCriticalRangeforOrdinalandContinuousObservations(objTempOM2.getCriticalRangeforOrdinalandContinuousObservations());//RFR
		objOM2.setAbsoluteRangeforOrdinalandContinuousObservations(objTempOM2.getAbsoluteRangeforOrdinalandContinuousObservations());//RFR
		objOM2.setMinimumMeaningfulIncrements(objTempOM2.getMinimumMeaningfulIncrements());//NM
		return objOM2;
	}

	/**
	 * populates OM3 Segment
	 * @return OM3
	 */	
	public OM3 populateOM3()
	{
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		//OM3 segment
		OM3 objOM3 = new OM3();
		objOM3.setSequenceNumberTestObservationMasterFile("5");//NM
		objOM3.setPreferredCodingSystem(objCWE);//CWE
		objOM3.setValidCodedAnswers(objCWE);//CWE
		objOM3.addNormalTextCodesforCategoricalObservations(objCWE);//CWE
		objOM3.addAbnormalTextCodesforCategoricalObservations(objCWE);//CWE
		objOM3.addCriticalTextCodesforCategoricalObservations(objCWE);//CWE
		return objOM3;
	}

	/**
	 /** populates OM3 Segment
	 * @return OM3
	 */ 
	public OM3 populateOM3(OM3 objTempOM3)
	{
		//OM3 segment
		OM3 objOM3 = new OM3();
		objOM3.setSequenceNumberTestObservationMasterFile(objTempOM3.getSequenceNumberTestObservationMasterFile());//NM
		objOM3.setPreferredCodingSystem(objTempOM3.getPreferredCodingSystem());//CWE
		objOM3.setValidCodedAnswers(objTempOM3.getValidCodedAnswers());//CWE
		if(objTempOM3.getNormalTextCodesforCategoricalObservations().size() != 0)
			objOM3.setNormalTextCodesforCategoricalObservations(objTempOM3.getNormalTextCodesforCategoricalObservations());//CWE
		if(objTempOM3.getAbnormalTextCodesforCategoricalObservations().size() != 0)
			objOM3.setAbnormalTextCodesforCategoricalObservations(objTempOM3.getAbnormalTextCodesforCategoricalObservations());//CWE
		if(objTempOM3.getCriticalTextCodesforCategoricalObservations().size() != 0)
			objOM3.setCriticalTextCodesforCategoricalObservations(objTempOM3.getCriticalTextCodesforCategoricalObservations());//CWE
		return objOM3;
	}

	/**
	 * populates OM4 Segment
	 * @return OM4
	 */
	public OM4 populateOM4()
	{
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		//OM4 segment
		OM4 objOM4 = new OM4();
		objOM4.setSequenceNumberTestObservationMasterFile("5");//NM
		objOM4.setDerivedSpecimen("P");//ID
		objOM4.setContainerVolume("5");//NM
		objOM4.setContainerUnits(objCWE);//CWE
		objOM4.setSpecimen(objCWE);//CWE
		objOM4.setAdditive(objCWE);//CWE
		objOM4.setNormalCollectionVolume("5",PopulateDataType.populateCWE(HL7Constants.HL7_SUBCOMPONENT));//CQ
		objOM4.setMinimumCollectionVolume("5",PopulateDataType.populateCWE(HL7Constants.HL7_SUBCOMPONENT));//CQ
		objOM4.addSpecimenPriorities("S");//ID
		objOM4.setSpecimenRetentionTime("5",PopulateDataType.populateCWE(HL7Constants.HL7_SUBCOMPONENT));//CQ
		objOM4.addSpecimenHandlingCode(objCWE);
		objOM4.addTaxonomicClassificationCode(objCWE);
		return objOM4;
	}

	/**
	 /** populates OM4 Segment
	 * @return OM4
	 */ 
	public OM4 populateOM4(OM4 objTempOM4)
	{
		//OM4 segment
		OM4 objOM4 = new OM4();
		objOM4.setSequenceNumberTestObservationMasterFile(objTempOM4.getSequenceNumberTestObservationMasterFile());//NM
		objOM4.setDerivedSpecimen(objTempOM4.getDerivedSpecimen());//ID
		objOM4.setContainerVolume(objTempOM4.getContainerVolume());//NM
		objOM4.setContainerUnits(objTempOM4.getContainerUnits());//CWE
		objOM4.setSpecimen(objTempOM4.getSpecimen());//CWE
		objOM4.setAdditive(objTempOM4.getAdditive());//CWE
		objOM4.setNormalCollectionVolume(objTempOM4.getNormalCollectionVolume());//CQ
		objOM4.setMinimumCollectionVolume(objTempOM4.getMinimumCollectionVolume());//CQ
		if(objTempOM4.getSpecimenPriorities().size() != 0)
			objOM4.setSpecimenPriorities(objTempOM4.getSpecimenPriorities());//ID
		objOM4.setSpecimenRetentionTime(objTempOM4.getSpecimenRetentionTime());//CQ
		if(objTempOM4.getSpecimenHandlingCode().size() != 0)
			objOM4.setSpecimenHandlingCode(objTempOM4.getSpecimenHandlingCode());
		objOM4.setTaxonomicClassificationCode(objTempOM4.getTaxonomicClassificationCode());
		return objOM4;
	}
	
	/**
	 * populate OM5 Segment
	 * @return objOM5 object OM5 of Segment
	 */
	public OM5 populateOM5()
	{
		OM5 objOM5 = new OM5();

		objOM5.setSequenceNumberTestObservationMasterFile("20"); //NM
		objOM5.addTestObservationsIncludedwithinanOrderedTestBattery(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE

		return objOM5;
	}

	/**
	 /** populate OM5 Segment
	 * @return objOM5 object OM5 of Segment
	 */ 
	public OM5 populateOM5(OM5 objTempOM5)
	{
		OM5 objOM5 = new OM5();

		objOM5.setSequenceNumberTestObservationMasterFile(objTempOM5.getSequenceNumberTestObservationMasterFile()); //NM
		if(objTempOM5.getTestObservationsIncludedwithinanOrderedTestBattery().size() != 0)
			objOM5.setTestObservationsIncludedwithinanOrderedTestBattery(objTempOM5.getTestObservationsIncludedwithinanOrderedTestBattery());//CWE

		return objOM5;
	}
	
	/**
	 * populate OM6 Segment
	 * @return objOM6 object OM6 of Segment
	 */
	public OM6 populateOM6()
	{
		OM6 objOM6 = new OM6();

		objOM6.setSequenceNumberTestObservationMasterFile("20"); //NM
		objOM6.setDerivationRule("strSoftwareProduct");//TX

		return objOM6;
	}

	/**
	 /** populate OM6 Segment
	 * @return objOM6 object OM6 of Segment
	 */ 
	public OM6 populateOM6(OM6 objTempOM6)
	{
		OM6 objOM6 = new OM6();
		objOM6.setSequenceNumberTestObservationMasterFile(objTempOM6.getSequenceNumberTestObservationMasterFile()); //NM
		objOM6.setDerivationRule(objTempOM6.getDerivationRule());//TX

		return objOM6;
	}

	/**
	 * populate OM7 Segment
	 * @return objOM7 object OM7 of Segment
	 */
	public OM7 populateOM7()
	{
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		
		OM7 objOM7 = new OM7();
		objOM7.setSequenceNumberTestObservationMasterFile("20"); //NM
		objOM7.setUniversalServiceIdentifier(objCWE);//CWE
		objOM7.addCategoryIdentifier(objCWE);//CWE
		objOM7.setEffectiveTestServiceStartDateTime("20090203"); //DTM
		objOM7.setEffectiveTestServiceEndDateTime("20090203"); //DTM
		objOM7.setTestServiceDefaultDurationQuantity("20"); //NM
		objOM7.setTestServiceDefaultDurationUnits(objCWE);//CWE
		objOM7.setTestServiceDefaultFrequency(objCWE); //IS
		objOM7.setConsentIndicator("Y"); //ID
		objOM7.setConsentIdentifier(objCWE);//CWE
		objOM7.setConsentEffectiveStartDateTime("20090203"); //DTM
		objOM7.setConsentEffectiveEndDateTime("20090203"); //DTM
		objOM7.setConsentIntervalQuantity("20"); //NM
		objOM7.setConsentIntervalUnits(objCWE);//CWE
		objOM7.setConsentWaitingPeriodQuantity("20"); //NM
		objOM7.setConsentWaitingPeriodUnits(objCWE);//CWE
		objOM7.setEffectiveDateTimeOfChange("20090203"); //DTM
		objOM7.setEnteredBy(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));//XCN
		objOM7.addOrderableAtLocation(PopulateDataType.populatePL(HL7Constants.HL7_COMPONENT));//PL
		objOM7.setFormularyStatus(objCWE); //IS
		objOM7.setSpecialOrderIndicator("Y");
		objOM7.addPrimaryKeyValueCDM(objCWE);//CWE

		return objOM7;
	}

	/**
	 /** populate OM7 Segment
	 * @return objOM7 object OM7 of Segment
	 */ 
	public OM7 populateOM7(OM7 objTempOM7)
	{
		OM7 objOM7 = new OM7();
		objOM7.setSequenceNumberTestObservationMasterFile(objTempOM7.getSequenceNumberTestObservationMasterFile()); //NM
		objOM7.setUniversalServiceIdentifier(objTempOM7.getUniversalServiceIdentifier());//CWE
		if(objTempOM7.getCategoryIdentifier().size() != 0)
			objOM7.setCategoryIdentifier(objTempOM7.getCategoryIdentifier());//CWE
		objOM7.setEffectiveTestServiceStartDateTime(objTempOM7.getEffectiveTestServiceStartDateTime()); //DTM
		objOM7.setEffectiveTestServiceEndDateTime(objTempOM7.getEffectiveTestServiceEndDateTime()); //DTM
		objOM7.setTestServiceDefaultDurationQuantity(objTempOM7.getTestServiceDefaultDurationQuantity()); //NM
		objOM7.setTestServiceDefaultDurationUnits(objTempOM7.getTestServiceDefaultDurationUnits());//CWE
		objOM7.setTestServiceDefaultFrequency(objTempOM7.getTestServiceDefaultFrequency()); //IS
		objOM7.setConsentIndicator(objTempOM7.getConsentIndicator()); //ID
		objOM7.setConsentIdentifier(objTempOM7.getConsentIdentifier());//CWE
		objOM7.setConsentEffectiveStartDateTime(objTempOM7.getConsentEffectiveStartDateTime()); //DTM
		objOM7.setConsentEffectiveEndDateTime(objTempOM7.getConsentEffectiveEndDateTime()); //DTM
		objOM7.setConsentIntervalQuantity(objTempOM7.getConsentIntervalQuantity()); //NM
		objOM7.setConsentIntervalUnits(objTempOM7.getConsentIntervalUnits());//CWE
		objOM7.setConsentWaitingPeriodQuantity(objTempOM7.getConsentWaitingPeriodQuantity()); //NM
		objOM7.setConsentWaitingPeriodUnits(objTempOM7.getConsentWaitingPeriodUnits());//CWE
		objOM7.setEffectiveDateTimeOfChange(objTempOM7.getEffectiveDateTimeOfChange()); //DTM
		objOM7.setEnteredBy(objTempOM7.getEnteredBy());//XCN
		if(objTempOM7.getOrderableAtLocation().size() != 0)
			objOM7.setOrderableAtLocation(objTempOM7.getOrderableAtLocation());//PL
		objOM7.setFormularyStatus(objTempOM7.getFormularyStatus()); //IS
		objOM7.setSpecialOrderIndicator(objTempOM7.getSpecialOrderIndicator());
		if(objTempOM7.getPrimaryKeyValueCDM().size() != 0)
			objOM7.setPrimaryKeyValueCDM(objTempOM7.getPrimaryKeyValueCDM());//CWE

		return objOM7;
	}

	/**
	 * populates MFA Segment
	 * @return MFA
	 */
	public MFA populateMFA()
	{
		HD objHD = PopulateDataType.populateHD(HL7Constants.HL7_SUBCOMPONENT);
		EI objComprehensiveLocationIdentifier = PopulateDataType.populateEI(HL7Constants.HL7_SUBCOMPONENT);
		objComprehensiveLocationIdentifier.setEntityIdentifier("Entity Identifier");
		objComprehensiveLocationIdentifier.setNamespaceId("NAMESPACE");
		objComprehensiveLocationIdentifier.setUniversalId("UniversalId");
		objComprehensiveLocationIdentifier.setUniversalIdType("DNS");
		IDataType objDataType = PopulateDataType.populatePL(HL7Constants.HL7_SUBCOMPONENT);
		((PL)objDataType).setPointOfCare(objHD);
		((PL)objDataType).setRoom(objHD);
		((PL)objDataType).setBed(objHD);
		((PL)objDataType).setAssigningAuthorityForLocation(objAssigningAuthority);
		((PL)objDataType).setLocationStatus("LOC_status");
		((PL)objDataType).setPersonLocationType("H");
		((PL)objDataType).setBuilding("Building");
		((PL)objDataType).setFloor("Floor");
		((PL)objDataType).setLocationDescription("LocationDescription");
		((PL)objDataType).setComprehensiveLocationIdentifier(objComprehensiveLocationIdentifier);
		((PL)objDataType).setAssigningAuthorityForLocation(objAssigningAuthority);
		//MFA segment
		MFA objMFA = new MFA();
		objMFA.setRecordLevelEventCode("MAD");//ID
		objMFA.setEventCompletionDate_Time("20110202");//DTM
		objMFA.setMFNRecordLevelErrorReturn(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		objMFA.addPrimaryKeyValueType("PL");//ID
		objMFA.addprimaryKeyValueMFA(objDataType);//varies
		return objMFA;
	}

	/**
	 /** populates MFA Segment
	 * @return MFA
	 */ 
	public MFA populateMFA(MFA objTempMFA)
	{
		//MFA segment
		MFA objMFA = new MFA();
		objMFA.setRecordLevelEventCode(objTempMFA.getRecordLevelEventCode());//ID
		objMFA.setEventCompletionDate_Time(objTempMFA.getEventCompletionDate_Time());//DTM
		objMFA.setMFNRecordLevelErrorReturn(objTempMFA.getMFNRecordLevelErrorReturn());//CWE
		objMFA.setPrimaryKeyValueType(objTempMFA.getPrimaryKeyValueTypeMFA());//ID
		objMFA.setprimaryKeyValueMFA(objTempMFA.getPrimaryKeyValueMFA());//varies
		return objMFA;
	}


	/**
	 * populates UB2 Segment
	 * @return UB2
	 */
	public UB2 populateUB2()
	{
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		
		
		NM objNonMonetaryValueAmountQuantity=PopulateDataType.populateNM(HL7Constants.HL7_SUBCOMPONENT);
		
	
		//UB2 segment
		UB2 objUB2 = new UB2();
		objUB2.setSetID("1");//SI
		objUB2.addConditionCode(objCWE);//IS
		objUB2.setCoveredDays("200");//ST
		objUB2.setNonCoveredDays("165");//ST
		objUB2.addValueAmountAndCode(PopulateDataType.populateCWE(HL7Constants.HL7_SUBCOMPONENT), PopulateDataType.populateMO(HL7Constants.HL7_SUBCOMPONENT), objNonMonetaryValueAmountQuantity,PopulateDataType.populateCWE(HL7Constants.HL7_SUBCOMPONENT));
		objUB2.addOccuranceCodeAndDate(PopulateDataType.populateCNE(HL7Constants.HL7_SUBCOMPONENT), "19850212");//OCD
		objUB2.addOccuranceSpanCodeOrDates(PopulateDataType.populateCNE(HL7Constants.HL7_SUBCOMPONENT), "19850212", "19850312");//OSP
		
		return objUB2;
	}

	/**
	 /** populates UB2 Segment
	 * @return UB2
	 */ 
	public UB2 populateUB2(UB2 objTempUB2)
	{
		//UB2 segment
		UB2 objUB2 = new UB2();
		objUB2.setSetID(objTempUB2.getSetID());//SI
		if(objTempUB2.getConditionCode().size() != 0)
			objUB2.setConditionCode(objTempUB2.getConditionCode());//IS
		objUB2.setCoveredDays(objTempUB2.getCoveredDays());//ST
		objUB2.setNonCoveredDays(objTempUB2.getNonCoveredDays());//ST
		if(objTempUB2.getValueAmountAndCode().size() != 0)
			objUB2.setValueAmountAndCode(objTempUB2.getValueAmountAndCode());//UVC
		if(objTempUB2.getOccuranceCodeAndDate().size() != 0)
			objUB2.setOccuranceCodeAndDate(objTempUB2.getOccuranceCodeAndDate());//OCD
		if(objTempUB2.getOccuranceSpanCodeOrDates().size() != 0)
			objUB2.setOccuranceSpanCodeOrDates(objTempUB2.getOccuranceSpanCodeOrDates());//OSP
	 
		return objUB2;
	}
	
	
	/**
	 * populates DSP Segment
	 * @return DSP
	 */
	public DSP populateDSP()
	{
		DSP objDSP = new DSP();
		objDSP.setSetIDDSP("1");//SI
		objDSP.setDataLine("10");//TX
		objDSP.setLogicalBreakPoint("P");//ST
		
		return objDSP;
	}

	/**
	 /** populates DSP Segment
	 * @return DSP
	 */ 
	public DSP populateDSP(DSP objTempDSP)
	{
		DSP objDSP = new DSP();
		objDSP.setSetIDDSP(objTempDSP.getSetIDDSP());//SI
		objDSP.setDataLine(objTempDSP.getDataLine());//TX
		objDSP.setLogicalBreakPoint(objTempDSP.getLogicalBreakPoint());//ST
		return objDSP;
	}
	

	/**
	 * populates RDF Segment
	 * @return RDF
	 */
	public RDF populateRDF()
	{
		//RDF segment
		RDF objRDF = new RDF();
		objRDF.setNumberofColumnsperRow("999");//NM
		objRDF.addColumnDescription("AD", "R", "16");//RCD
		return objRDF;
	}

	/**
	 /** populates RDF Segment
	 * @return RDF
	 */ 
	public RDF populateRDF(RDF objTempRDF)
	{
		//RDF segment
		RDF objRDF = new RDF();
		objRDF.setNumberofColumnsperRow(objTempRDF.getNumberofColumnsperRow());//NM
		if(objTempRDF.getColumnDescription().size() != 0)
			objRDF.setColumnDescription(objTempRDF.getColumnDescription());//RCD
		return objRDF;
	}

	/**
	 * populates QRI Segment
	 * @return QRI
	 */
	public QRI populateQRI()
	{
		QRI objQRI =new QRI();
		objQRI.setCandidateConfidence("12.32");
		objQRI.addMatchReasonCode(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));
		objQRI.setAlgorithmDescriptor(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));
		return objQRI;
	}

	/**
	 /** populates QRI Segment
	 * @return QRI
	 */ 
	public QRI populateQRI(QRI objTempQRI)
	{
		QRI objQRI =new QRI();
		objQRI.setCandidateConfidence(objTempQRI.getCandidateConfidence());
		if(objTempQRI.getMatchReasonCode().size() != 0)
			objQRI.setMatchReasonCode(objTempQRI.getMatchReasonCode());
		objQRI.setAlgorithmDescriptor(objTempQRI.getAlgorithmDescriptor());
		return objQRI;
	}
	

	/**
	 * populate RDT Segment
	 * @return RDT
	 */
	public RDT populateRDT()
	{
		//RDT Segment
		RDT objRDT = new RDT();
		ISingleCollection<IDataType> objColumnValues = new SingleCollection<IDataType>();
		HD objHD = PopulateDataType.populateHD(HL7Constants.HL7_SUBCOMPONENT);
		
		SAD objStreetAddress = PopulateDataType.populateSAD(HL7Constants.HL7_SUBCOMPONENT);
		
		objColumnValues.add(objHD);
		objColumnValues.add(objStreetAddress);
		objRDT.setColumnValues(objColumnValues);
		return objRDT;
	}

	/**
	 /** populate RDT Segment
	 * @return RDT
	 */ 
	public RDT populateRDT(RDT objTempRDT)
	{
		//RDT Segment
		RDT objRDT = new RDT();
		objRDT.setColumnValues(objTempRDT.getColumnValue());
		return objRDT;
	}	


	/**
	 * populate PDA SEGMENT
	 * @return PDA
	 */
	public PDA populatePDA()
	{
		CWE objCWE = PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		
		PDA objPDA = new PDA();
		objPDA.addDeathCauseCode(objCWE);
		objPDA.setDeathLocation(PopulateDataType.populatePL(HL7Constants.HL7_COMPONENT));
		objPDA.setDeathCertifiedIndicator("N");
		objPDA.setDeathCertificateSignedDate_Time("20030303");//DTM
		objPDA.setAutopsyIndicator("N");
		objPDA.setAutopsyStartAndEndDateTime(objEffectiveDate, objExpirationDate);
		objPDA.setCoronerIndicator("Y");
		return objPDA;
	}

	/**
	 /** populate PDA SEGMENT
	 * @return PDA
	 */ 
	public PDA populatePDA(PDA objTempPDA)
	{
		//PDA Segment
		PDA objPDA = new PDA();
		if(objTempPDA.getDeathCauseCode().size() != 0)
			objPDA.setDeathCauseCode(objTempPDA.getDeathCauseCode());
		objPDA.setDeathLocation(objTempPDA.getDeathLocation());//PL
		objPDA.setDeathCertifiedIndicator(objTempPDA.getDeathCertifiedIndicator());
		objPDA.setDeathCertificateSignedDate_Time(objTempPDA.getDeathCertificateSignedDateTime());//DTM
		objPDA.setAutopsyIndicator(objTempPDA.getAutopsyIndicator());
		objPDA.setAutopsyStartAndEndDateTime(objTempPDA.getAutopsyStartAndEndDateTime());
		objPDA.setCoronerIndicator(objTempPDA.getCoronerIndicator());
		return objPDA;
	}
	

	/**
	 * ABS segment
	 * @return objABS
	 */
	public ABS populateABS()
	{

		ABS objABS = new ABS();
		objABS.setDischargeCareProvider(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));//XCN
		objABS.setTransferMedicalServiceCode(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));
		objABS.setDateOrTimeOfAttestation("20040304");
		objABS.setAttestedBy(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));
		objABS.setAbstractCompletionDateOrTime("20040304");
		objABS.setAbstractedBy(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));
		objABS.setCaseCategoryCode(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));
		objABS.setCaesarianSectionIndicator("Y");
		objABS.setGestationCategoryCode(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));
		objABS.setNewbornCode(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));
		objABS.setStillbornIndicator("Y");

		return objABS;
	}

	/**
	 /** ABS segment
	 * @return objABS
	 */ 
	public ABS populateABS(ABS objTempABS)
	{
		ABS objABS = new ABS();
		objABS.setDischargeCareProvider(objTempABS.getDischargeCareProvider());//XCN
		objABS.setTransferMedicalServiceCode(objTempABS.getTransferMedicalServiceCode());
		objABS.setDateOrTimeOfAttestation(objTempABS.getDateOrTimeOfAttestation());
		objABS.setAttestedBy(objTempABS.getAttestedBy());
		objABS.setAbstractCompletionDateOrTime(objTempABS.getAbstractCompletionDateOrTime());
		objABS.setAbstractedBy(objTempABS.getAbstractedBy());
		objABS.setCaseCategoryCode(objTempABS.getCaseCategoryCode());
		objABS.setCaesarianSectionIndicator(objTempABS.getCaesarianSectionIndicator());
		objABS.setGestationCategoryCode(objTempABS.getGestationCategoryCode());
		objABS.setNewbornCode(objTempABS.getNewBornCode());
		objABS.setStillbornIndicator(objTempABS.getStillBornIndicator());

		return objABS;
	}
	
	
	/**
	 * BLC segment
	 * @return objBLC
	 */
	public BLC populateBLC()
	{
		

		BLC objBLC = new BLC();
		
		objBLC.setBloodAmount(PopulateDataType.populateCQ(HL7Constants.HL7_COMPONENT));
		objBLC.setBloodProductCode(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));
		return objBLC;	
	}

	/**
	 /** BLC segment
	 * @return objBLC
	 */ 
	public BLC populateBLC(BLC objTempBLC)
	{
		BLC objBLC = new BLC();
		objBLC.setBloodAmount(objTempBLC.getBloodAmount());
		objBLC.setBloodProductCode(objTempBLC.getBloodProductCode());
		return objBLC;	
	}
	
	
	/**
	 *RMI segment
	 *@return objRMI 
	 */
	public RMI populateRMI()
	{
		RMI objRMI = new RMI();
		objRMI.setRiskManagementIncidentCode(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));
		objRMI.setDateOrTimeIncident("20040303");
		objRMI.setIncidentTypeCode(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));
		return objRMI;
	}

	/**
	 /**RMI segment
	 *@return objRMI 
	 */ 
	public RMI populateRMI(RMI objTempRMI)
	{
		RMI objRMI = new RMI();
		objRMI.setRiskManagementIncidentCode(objTempRMI.getRiskManagementIncidentCode());
		objRMI.setDateOrTimeIncident(objTempRMI.getDateOrTimeIncident());
		objRMI.setIncidentTypeCode(objTempRMI.getIncidentTypeCode());
		return objRMI;
	}
	
	

	/**
	 *GP1 segment
	 *@return objGP1 
	 */
	public GP1 populateGP1()
	{
		
		GP1 objGP1 = new GP1();
		objGP1.setTypeOfBillCode(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));
		objGP1.addRevenueCode(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));
		objGP1.setOverallClaimDispositionCode(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));
		objGP1.addOCEEditsPerVisitCode(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));

		
		return objGP1;
	}

	/**
	 /**GP1 segment
	 *@return objGP1 
	 */ 
	public GP1 populateGP1(GP1 objTempGP1)
	{
		GP1 objGP1 = new GP1();
		objGP1.setTypeOfBillCode(objTempGP1.getTypeOfBillCode());
		if(objTempGP1.getRevenueCode().size() != 0)
			objGP1.setRevenueCode(objTempGP1.getRevenueCode());
		objGP1.setOverallClaimDispositionCode(objTempGP1.getOverallClaimDispositionCode());
		if(objTempGP1.getOCEEditsPerVisitCode().size() != 0)
			objGP1.setOCEEditsPerVisitCode(objTempGP1.getOCEEditsPerVisitCode());
		return objGP1;
	}

	/**
	 *GP2 segment
	 *@return objGP2 
	 */
	public GP2 populateGP2()
	{
		

		GP2 objGP2 = new GP2();
		objGP2.setRevenueCode(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//IS
		objGP2.setCharge(PopulateDataType.populateCP(HL7Constants.HL7_COMPONENT));//CP
		objGP2.setReimbursementActionCode(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//IS
		objGP2.setDenialOrRejectionCode(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//IS
		objGP2.addOCEEditCode(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//IS
		objGP2.setAmbulatoryPaymentClassificationCode(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		objGP2.setExpectedCMSPaymentAmount(PopulateDataType.populateCP(HL7Constants.HL7_COMPONENT));//CP
		objGP2.setReimbursementTypeCode(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//IS
		objGP2.setCoPayAmount(PopulateDataType.populateCP(HL7Constants.HL7_COMPONENT));//CP
		objGP2.setPayRatePerServiceUnit("999");//NM
		return objGP2;
	}

	/**
	 /**GP2 segment
	 *@return objGP2 
	 */ 
	public GP2 populateGP2(GP2 objTempGP2)
	{
		GP2 objGP2 = new GP2();
		objGP2.setRevenueCode(objTempGP2.getRevenueCode());//IS
		objGP2.setCharge(objTempGP2.getCharge());//CP
		objGP2.setReimbursementActionCode(objTempGP2.getReimbursementActionCode());//IS
		objGP2.setDenialOrRejectionCode(objTempGP2.getDenialOrRejectionCode());//IS
		if(objTempGP2.getOCEEditCode().size() != 0)
			objGP2.setOCEEditCode(objTempGP2.getOCEEditCode());//IS
		objGP2.setAmbulatoryPaymentClassificationCode(objTempGP2.getAmbulatoryPaymentClassificationCode());//CE
		objGP2.setPaymentAdjustmentCode(objTempGP2.getPaymentAdjustmentCode());//IS
		objGP2.setExpectedCMSPaymentAmount(objTempGP2.getExpectedCMSPaymentAmount());//CP
		objGP2.setReimbursementTypeCode(objTempGP2.getReimbursementTypeCode());//IS
		objGP2.setCoPayAmount(objTempGP2.getCoPayAmount());//CP
		objGP2.setPayRatePerServiceUnit(objTempGP2.getPayRatePerServiceUnit());//NM
		return objGP2;
	}
	
	
	
	/**
	 * populate RQD Segment
	 * @return RQD
	 */
	public RQD populateRQD()
	{
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		//RQD Segment
		RQD objRQD = new RQD();
		objRQD.setRequisitionLineNumber("1");//SI
		objRQD.setItemCode_Internal(objCWE);//CWE
		objRQD.setItemCode_External(objCWE);//CWE
		objRQD.setHospitalItemCode(objCWE);//CWE
		objRQD.setRequisitionUnitMeasure(objCWE);//CWE
		objRQD.setCostCenterAccountNumber(PopulateDataType.populateCX(HL7Constants.HL7_COMPONENT));
		objRQD.setItemNaturalAccountCode(objCWE);//IS
		objRQD.setDeliverToID(objCWE);//CWE
		objRQD.setDateNeeded("19850212");//DT
		return objRQD;
	}

	/**
	 /** populate RQD Segment
	 * @return RQD
	 */ 
	public RQD populateRQD(RQD objTempRQD)
	{
		//RQD Segment
		RQD objRQD = new RQD();
		objRQD.setRequisitionLineNumber(objTempRQD.getRequisitionLineNumber());//SI
		objRQD.setItemCode_Internal(objTempRQD.getItemCode_Internal());//CWE
		objRQD.setItemCode_External(objTempRQD.getItemCode_External());//CWE
		objRQD.setHospitalItemCode(objTempRQD.getHospitalItemCode());//CWE
		objRQD.setRequisitionUnitMeasure(objTempRQD.getRequisitionUnitMeasure());//CWE
		objRQD.setCostCenterAccountNumber(objTempRQD.getCostCenterAccountNumber());
		objRQD.setItemNaturalAccountCode(objTempRQD.getItemNaturalAccountCode());//IS
		objRQD.setDeliverToID(objTempRQD.getDeliverToID());//CWE
		objRQD.setDateNeeded(objTempRQD.getDateNeeded());//DT
		return objRQD;
	}

	
	/**
	 * populate RQ1 Segment
	 * @return objRQ1 object of RQ1 Segment
	 */
	public RQ1 populateRQ1()
	{
		RQ1 objRQ1 = new RQ1();
		objRQ1.setManufacturerIdentifier(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		objRQ1.setManufacturerCatalog("MCAT");//ST
		objRQ1.setVendorID(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		objRQ1.setVendorCatalog("VCAT");//ST
		objRQ1.setTaxable("Y");//ID
		objRQ1.setSubstituteAllowed("Y");//ID
		return objRQ1;
	}

	/**
	 /** populate RQ1 Segment
	 * @return objRQ1 object of RQ1 Segment
	 */ 
	public RQ1 populateRQ1(RQ1 objTempRQ1)
	{
		RQ1 objRQ1 = new RQ1();
		objRQ1.setManufacturerIdentifier(objTempRQ1.getManufacturerIdentifier());//CWE
		objRQ1.setManufacturerCatalog(objTempRQ1.getManufacturerCatalog());//ST
		objRQ1.setVendorID(objTempRQ1.getVendorID());//CWE
		objRQ1.setVendorCatalog(objTempRQ1.getVendorCatalog());//ST
		objRQ1.setTaxable(objTempRQ1.getTaxable());//ID
		objRQ1.setSubstituteAllowed(objTempRQ1.getSubstituteAllowed());//ID
		return objRQ1;
	}
	
	
	
	/**
	 * populate RXO Segment
	 * @return objRXO object of RXO Segment
	 */
	public RXO populateRXO()
	{
		CWE objCWE = PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);

		RXO objRXO = new RXO();
		objRXO.setRequestedGiveCode(objCWE);//CWE
		objRXO.setRequestedGiveAmt_Min("1");//NM
		objRXO.setRequestedGiveAmt_Max("2");//NM
		objRXO.setRequestedGiveUnits(objCWE);//CWE
		objRXO.setRequestedDosageForm(objCWE);//CWE
		objRXO.addProviderPharmacyTreatmentInstructions(objCWE);//CWE
		objRXO.addProvidersAdministrationInstructions(objCWE);//CWE
		objRXO.setAllowSubstitutions("N");//ID
		objRXO.setRequestedDispenseCode(objCWE);//CWE
		objRXO.setRequestedDispenseAmount("5");//NM
		objRXO.setRequestedDispenseUnits(objCWE);//CWE
		objRXO.setNoOfRefills("5");//NM
		objRXO.addOrderingProviderDEANo(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));//XCN
		objRXO.addPharmacistTreatmentSupplierVerifierID(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));//XCN
		objRXO.setNeedsHumanReview("Y");//ID
		objRXO.setRequestedGivePer("N");//ST
		objRXO.setRequestedGiveStrength("5");//NM
		objRXO.setRequestedGiveStrengthUnits(objCWE);//CWE
		objRXO.addIndication(objCWE);//CWE
		objRXO.setRequestedGiveRateAmt("N");//ST
		objRXO.setRequestedGiveRateUnits(objCWE);//CWE
		objRXO.setTotalDailyDose("5",PopulateDataType.populateCWE(HL7Constants.HL7_SUBCOMPONENT));//CQ
		objRXO.addSupplementaryCode(objCWE);//CWE
		objRXO.setRequestedDrugStrengthVolume("5");//NM
		objRXO.setRequestedDrugStrengthVolumeUnits(objCWE);//CWE
		objRXO.setMoodCode(PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT));
		objRXO.setDispensingPharmacy(objCWE);
		objRXO.setDispensingPharmacyAddress(PopulateDataType.populateXAD(HL7Constants.HL7_COMPONENT));
		
		return objRXO;
	}

	/**
	 /** populate RXO Segment
	 * @return objRXO object of RXO Segment
	 */ 
	public RXO populateRXO(RXO objTempRXO)
	{
		RXO objRXO = new RXO();
		objRXO.setRequestedGiveCode(objTempRXO.getRequestedGiveCode());//CWE
		objRXO.setRequestedGiveAmt_Min(objTempRXO.getRequestedGiveAmt_Min());//NM
		objRXO.setRequestedGiveAmt_Max(objTempRXO.getRequestedGiveAmt_Max());//NM
		objRXO.setRequestedGiveUnits(objTempRXO.getRequestedGiveUnits());//CWE
		objRXO.setRequestedDosageForm(objTempRXO.getRequestedDosageForm());//CWE
		if(objTempRXO.getProviderPharmacyTreatmentInstructions().size() != 0)
			objRXO.setProviderPharmacyTreatmentInstructions(objTempRXO.getProviderPharmacyTreatmentInstructions());//CWE
		if(objTempRXO.getProvidersAdministrationInstructions().size() != 0)
			objRXO.setProvidersAdministrationInstructions(objTempRXO.getProvidersAdministrationInstructions());//CWE
		objRXO.setAllowSubstitutions(objTempRXO.getAllowSubstitutions());//ID
		objRXO.setRequestedDispenseCode(objTempRXO.getRequestedDispenseCode());//CWE
		objRXO.setRequestedDispenseAmount(objTempRXO.getRequestedDispenseAmount());//NM
		objRXO.setRequestedDispenseUnits(objTempRXO.getRequestedDispenseUnits());//CWE
		objRXO.setNoOfRefills(objTempRXO.getNoOfRefills());//NM
		if(objTempRXO.getOrderingProviderDEANo().size() != 0)
			objRXO.setOrderingProviderDEANo(objTempRXO.getOrderingProviderDEANo());//XCN
		if(objTempRXO.getPharmacistTreatmentSupplierVerifierID().size() != 0)
			objRXO.setPharmacistTreatmentSupplierVerifierID(objTempRXO.getPharmacistTreatmentSupplierVerifierID());//XCN
		objRXO.setNeedsHumanReview(objTempRXO.getNeedsHumanReview());//ID
		objRXO.setRequestedGivePer(objTempRXO.getRequestedGivePer());//ST
		objRXO.setRequestedGiveStrength(objTempRXO.getRequestedGiveStrength());//NM
		objRXO.setRequestedGiveStrengthUnits(objTempRXO.getRequestedGiveStrengthUnits());//CWE
		if(objTempRXO.getIndication().size() != 0)
			objRXO.setIndication(objTempRXO.getIndication());//CWE
		objRXO.setRequestedGiveRateAmt(objTempRXO.getRequestedGiveRateAmt());//ST
		objRXO.setRequestedGiveRateUnits(objTempRXO.getRequestedGiveRateUnits());//CWE
		objRXO.setTotalDailyDose(objTempRXO.getTotalDailyDose());//CQ
		if(objTempRXO.getSupplementaryCode().size() != 0)
			objRXO.setSupplementaryCode(objTempRXO.getSupplementaryCode());//CWE
		objRXO.setRequestedDrugStrengthVolume(objTempRXO.getRequestedDrugStrengthVolume());//NM
		objRXO.setRequestedDrugStrengthVolumeUnits(objTempRXO.getRequestedDrugStrengthVolumeUnits());//CWE
		objRXO.setMoodCode(objTempRXO.getMoodCode());
		objRXO.setDispensingPharmacy(objTempRXO.getDispensingPharmacy());
		objRXO.setDispensingPharmacyAddress(objTempRXO.getDispensingPharmacyAddress());
	
		return objRXO;
	}

	
	
	/**
	 * populate RXC Segment
	 * @return objRXC object of RXC Segment
	 */
	public RXC populateRXC()
	{
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		
		RXC objRXC = new RXC();
		objRXC.setRXComponentType("B");//ID
		objRXC.setComponentCode(objCWE);//CWE
		objRXC.setComponentAmount("500");//NM
		objRXC.setComponentUnits(objCWE);//CWE
		objRXC.addSupplementaryCode(objCWE);//CWE
		objRXC.setDispenseAmount(PopulateDataType.populateNM(HL7Constants.HL7_SUBCOMPONENT));
		objRXC.setDispenseUnits(objCWE);
		
		return objRXC;
	}

	/**
	 /** populate RXC Segment
	 * @return objRXC object of RXC Segment
	 */ 
	public RXC populateRXC(RXC objTempRXC)
	{
		RXC objRXC = new RXC();
		objRXC.setRXComponentType(objTempRXC.getRxComponentType());//ID
		objRXC.setComponentCode(objTempRXC.getComponentCode());//CWE
		objRXC.setComponentAmount(objTempRXC.getComponentAmount());//NM
		objRXC.setComponentUnits(objTempRXC.getComponentUnits());//CWE
		if(objTempRXC.getSupplementaryCode().size() != 0)
			objRXC.setSupplementaryCode(objTempRXC.getSupplementaryCode());//CWE
		objRXC.setDispenseAmount(objTempRXC.getDispenseAmount());
		objRXC.setDispenseUnits(objTempRXC.getDispenseUnits());
		
		return objRXC;
	}
	
	
	/**
	 * populate BPO Segment
	 * @return objBPO object of BPO Segment
	 */
	public BPO populateBPO()
	{
		//BPO Segment
		BPO objBPO = new BPO();
		objBPO.setSetID_BPO("1");//SI
		objBPO.setBPUniversalServiceIdentifier(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		objBPO.addBPProcessingRequirements(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		objBPO.setBPQuantity("123");//NM
		objBPO.setBPAmount("123");//NM
		objBPO.setBPUnits(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		objBPO.setBPIntendedUseDateTime("20030303");//DTM
		objBPO.setBPRequestedDispenseDateTime("20030303");//DTM
		objBPO.addBPIndicationforUse(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		objBPO.setBPInformedConsentIndicator("Y");//ID
		return objBPO;
	}

	/**
	 /** populate BPO Segment
	 * @return objBPO object of BPO Segment
	 */ 
	public BPO populateBPO(BPO objTempBPO)
	{
		//BPO Segment
		BPO objBPO = new BPO();
		objBPO.setSetID_BPO(objTempBPO.getSetID_BPO());//SI
		objBPO.setBPUniversalServiceIdentifier(objTempBPO.getBPUniversalServiceIdentifier());
		if(objTempBPO.getBPProcessingRequirements().size() != 0)
			objBPO.setBPProcessingRequirements(objTempBPO.getBPProcessingRequirements());//CWE
		objBPO.setBPQuantity(objTempBPO.getBPQuantity());//NM
		objBPO.setBPAmount(objTempBPO.getBPAmount());//NM
		objBPO.setBPUnits(objTempBPO.getBPUnits());//CWE
		objBPO.setBPIntendedUseDateTime(objTempBPO.getBPIntendedUseDateTime());//DTM
		objBPO.setBPRequestedDispenseDateTime(objTempBPO.getBPRequestedDispenseDateTime());//DTM
		if(objTempBPO.getBPIndicationforUse().size() != 0)
			objBPO.setBPIndicationforUse(objTempBPO.getBPIndicationforUse());//CWE
		objBPO.setBPInformedConsentIndicator(objTempBPO.getBPInformedConsentIndicator());//ID
		return objBPO;
	}

	
	/**
	 * populate IPC Segment
	 * @return objIPC object of IPC Segment
	 */
	public IPC populateIPC()
	{
		EI objEI = PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT);
		//IPC Segment
		IPC objIPC = new IPC();
		objIPC.setAccessionIdentifier(objEI);//EI
		objIPC.setRequestedProcedureID("E Id", "N", "U Id", "x500");//EI
		objIPC.setStudyInstanceUID(objEI);//EI
		objIPC.setScheduledProcedureStepID("E Id", "N", "U Id", "x500");//EI
		objIPC.setModality(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		objIPC.addProtocolCode(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		objIPC.addScheduledProcedureStepLocation(PopulateDataType.populateCWE(HL7Constants.HL7_SUBCOMPONENT) );//CWE
		return objIPC;
	}

	/**
	 /** populate IPC Segment
	 * @return objIPC object of IPC Segment
	 */ 
	public IPC populateIPC(IPC objTempIPC)
	{
		//IPC Segment
		IPC objIPC = new IPC();
		objIPC.setAccessionIdentifier(objTempIPC.getAccessionIdentifier());//EI
		objIPC.setRequestedProcedureID(objTempIPC.getRequestedProcedureID());//EI
		objIPC.setStudyInstanceUID(objTempIPC.getStudyInstanceUID());//EI
		objIPC.setScheduledProcedureStepID(objTempIPC.getScheduledProcedureStepID());//EI
		objIPC.setModality(objTempIPC.getModality());//CWE
		if(objTempIPC.getProtocolCode().size() != 0)
			objIPC.setProtocolCode(objTempIPC.getProtocolCode());//CWE
		if(objTempIPC.getScheduledProcedureStepLocation().size() != 0)
			objIPC.setScheduledProcedureStepLocation(objTempIPC.getScheduledProcedureStepLocation());//CWE
		return objIPC;
	}
	
	
	/**
	 * populate RXD Segment
	 * @return objRXD object of RXD Segment
	 */
	public RXD populateRXD()
	{

		CWE objCWE = PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);

		RXD objRXD = new RXD();
		objRXD.setDispenseSub_IDCounter("123");//NM
		objRXD.setDispenseGiveCode(objCWE);//CWE
		objRXD.setDateTimeDispensed("20030303");//DTM
		objRXD.setActualDispenseAmount("123");//NM
		objRXD.setActualDispenseUnits(objCWE);//CWE
		objRXD.setPrescriptionNumber("12345 ");//ST
		objRXD.setNumberofRefillsRemaining("123");//NM
		objRXD.addDispensingProvider(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));//XCN
		objRXD.setSubstitutionStatus("N");//ID
		objRXD.setTotalDailyDose("5", null);//CQ
		objRXD.setNeedsHumanReview("Y");//ID
		objRXD.addSpecialDispensingInstructions(objCWE);
		objRXD.addSubstanceLotNumber("N");//ST
		objRXD.addSubstanceExpirationDate("20030303");//DTM
		objRXD.addSubstanceManufacturerName(objCWE);//CWE
		objRXD.addIndication(objCWE);//CWE
		objRXD.setDispensePackageSize("123");//NM
		objRXD.setDispensePackageSizeUnit(objCWE);//CWE
		objRXD.setDispensePackageMethod("TR");//ID
		objRXD.addSupplementaryCode(objCWE);//CWE
		objRXD.setInitiatingLocation(objCWE);//CWE
		objRXD.setPackagingAssemblyLocation(objCWE);//CWE
		objRXD.setActualDrugStrengthVolume("123");//NM
		objRXD.setActualDrugStrengthVolumeUnits(objCWE);//CWE
		objRXD.setDispensetoPharmacy(objCWE);//CWE
		objRXD.setDispensetoPharmacyAddress(PopulateDataType.populateXAD(HL7Constants.HL7_COMPONENT));//XAD
		objRXD.setPharmacyOrderType("M");//ID
		objRXD.setDispenseType(objCWE);//CWE
		objRXD.addPharmacyPhoneNumber( PopulateDataType.populateXTN(HL7Constants.HL7_SUBCOMPONENT));
		objRXD.addDispenseTagIdentifier(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));
		
		return objRXD;
	}

	/**
	 /** populate RXD Segment
	 * @return objRXD object of RXD Segment
	 */ 
	public RXD populateRXD(RXD objTempRXD)
	{
		RXD objRXD = new RXD();
		objRXD.setDispenseSub_IDCounter(objTempRXD.getDispenseSub_IDCounter());//NM
		objRXD.setDispenseGiveCode(objTempRXD.getDispenseGiveCode());//CWE
		objRXD.setDateTimeDispensed(objTempRXD.getDateTimeDispensed());//DTM
		objRXD.setActualDispenseAmount(objTempRXD.getActualDispenseAmount());//NM
		objRXD.setActualDispenseUnits(objTempRXD.getActualDispenseUnits());//CWE
		objRXD.setPrescriptionNumber(objTempRXD.getPrescriptionNumber());//ST
		objRXD.setNumberofRefillsRemaining(objTempRXD.getNumberofRefillsRemaining());//NM
		if(objTempRXD.getDispensingProvider().size() != 0)
			objRXD.setDispensingProvider(objTempRXD.getDispensingProvider());//XCN
		objRXD.setSubstitutionStatus(objTempRXD.getSubstitutionStatus());//ID
		objRXD.setTotalDailyDose(objTempRXD.getTotalDailyDose());//CQ
		objRXD.setNeedsHumanReview(objTempRXD.getNeedsHumanReview());//ID
		if(objTempRXD.getSpecialDispensingInstructions().size() != 0)
			objRXD.setSpecialDispensingInstructions(objTempRXD.getSpecialDispensingInstructions());//CWE
		if(objTempRXD.getSubstanceLotNumber().size() != 0)
			objRXD.setSubstanceLotNumber(objTempRXD.getSubstanceLotNumber());//ST
		if(objTempRXD.getSubstanceExpirationDate().size() != 0)
			objRXD.setSubstanceExpirationDate(objTempRXD.getSubstanceExpirationDate());//DTM
		if(objTempRXD.getSubstanceManufacturerName().size() != 0)
			objRXD.setSubstanceManufacturerName(objTempRXD.getSubstanceManufacturerName());//CWE
		if(objTempRXD.getIndication().size() != 0)
			objRXD.setIndication(objTempRXD.getIndication());//CWE
		objRXD.setDispensePackageSize(objTempRXD.getDispensePackageSize());//NM
		objRXD.setDispensePackageSizeUnit(objTempRXD.getDispensePackageSizeUnit());//CWE
		objRXD.setDispensePackageMethod(objTempRXD.getDispensePackageMethod());//ID
		if(objTempRXD.getSupplementaryCode().size() != 0)
			objRXD.setSupplementaryCode(objTempRXD.getSupplementaryCode());//CWE
		objRXD.setInitiatingLocation(objTempRXD.getInitiatingLocation());//CWE
		objRXD.setPackagingAssemblyLocation(objTempRXD.getPackagingAssemblyLocation());//CWE
		objRXD.setActualDrugStrengthVolume(objTempRXD.getActualDrugStrengthVolume());//NM
		objRXD.setActualDrugStrengthVolumeUnits(objTempRXD.getActualDrugStrengthVolumeUnits());//CWE
		objRXD.setDispensetoPharmacy(objTempRXD.getDispensetoPharmacy());//CWE
		objRXD.setDispensetoPharmacyAddress(objTempRXD.getDispensetoPharmacyAddress());//XAD
		objRXD.setPharmacyOrderType(objTempRXD.getPharmacyOrderType());//ID
		objRXD.setDispenseType(objTempRXD.getDispenseType());//CWE
		if(objTempRXD.getPharmacyPhoneNumber().size()!=0)
			objRXD.setPharmacyPhoneNumber(objTempRXD.getPharmacyPhoneNumber());
		if(objTempRXD.getDispenseTagIdentifier().size()!=0)
			objRXD.setDispenseTagIdentifier(objTempRXD.getDispenseTagIdentifier());
		return objRXD;
	}

	
	
	/**
	 * populate BPX Segment
	 * @return objBPX object of BPX Segment
	 */
	public BPX populateBPX()
	{
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		
		BPX objBPX = new BPX();
		objBPX.setSetID_BPX("2");//SI
		objBPX.setBPDispenseStatus(objCWE);//CWE
		objBPX.setBPStatus("C");//ID
		objBPX.setBPDateTimeofStatus("20030303");//DTM
		objBPX.setBCDonationID("E ID", "N", "U Id", "DNS");//EI
		objBPX.setBCComponent(PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT));//CNE
		objBPX.setBCDonationTypeIntendedUse(PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT));//CNE
		objBPX.setCPCommercialProduct(objCWE);//CWE
		objBPX.setCPManufacturer(PopulateDataType.populateXON(HL7Constants.HL7_COMPONENT));//XON
		objBPX.setCPLotNumber("E ID", "N", "U Id", "DNS");//EI
		objBPX.setBPBloodGroup(PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT));//CNE
		objBPX.addBCSpecialTesting(PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT));//CNE
		objBPX.setBPExpirationDateTime("20030303");//DTM
		objBPX.setBPQuantity("123");//NM
		objBPX.setBPUniqueID("E ID", "N", "U Id", "DNS");//EI
		objBPX.setBPActualDispensedToAddress(PopulateDataType.populateXAD(HL7Constants.HL7_COMPONENT));//XAD
		objBPX.setBPDispensedtoReceiver(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));//XCN
		objBPX.setBPDispensingIndividual(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));//XCN
		
		return objBPX;
	}

	/**
	 /** populate BPX Segment
	 * @return objBPX object of BPX Segment
	 */ 
	public BPX populateBPX(BPX objTempBPX)
	{
		BPX objBPX = new BPX();
		objBPX.setSetID_BPX(objTempBPX.getSetID_BPX());//SI
		objBPX.setBPDispenseStatus(objTempBPX.getBPDispenseStatus());//CWE
		objBPX.setBPStatus(objTempBPX.getBPStatus());//ID
		objBPX.setBPDateTimeofStatus(objTempBPX.getBPDateTimeofStatus());//DTM
		objBPX.setBCDonationID(objTempBPX.getBCDonationID());//EI
		objBPX.setBCComponent(objTempBPX.getBCComponent());//CNE
		objBPX.setBCDonationTypeIntendedUse(objTempBPX.getBCDonationTypeIntendedUse());//CNE
		objBPX.setCPCommercialProduct(objTempBPX.getCPCommercialProduct());//CWE
		objBPX.setCPManufacturer(objTempBPX.getCPManufacturer());//XON
		objBPX.setCPLotNumber(objTempBPX.getCPLotNumber());//EI
		objBPX.setBPBloodGroup(objTempBPX.getBPBloodGroup());//CNE
		if(objTempBPX.getBCSpecialTesting().size() != 0)
			objBPX.setBCSpecialTesting(objTempBPX.getBCSpecialTesting());//CNE
		objBPX.setBPExpirationDateTime(objTempBPX.getBPExpirationDateTime());//DTM
		objBPX.setBPQuantity(objTempBPX.getBPQuantity());//NM
		objBPX.setBPUniqueID(objTempBPX.getBPUniqueID());//EI
		objBPX.setBPActualDispensedToAddress(objTempBPX.getBPActualDispensedToAddress());//XAD
		objBPX.setBPDispensedtoReceiver(objTempBPX.getBPDispensedtoReceiver());//XCN
		objBPX.setBPDispensingIndividual(objTempBPX.getBPDispensingIndividual());//XCN
		return objBPX;
	}
	
	

	/**
	 * populate ODS Segment
	 * @return objODS object of ODS Segment
	 */
	public ODS populateODS()
	{
		ODS objODS = new ODS();
		objODS.setType("D");//ID
		objODS.addServicePeriod(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		objODS.addDietSupplementPreferenceCode(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		
		return objODS;
	}

	/**
	 /** populate ODS Segment
	 * @return objODS object of ODS Segment
	 */ 
	public ODS populateODS(ODS objTempODS)
	{
		ODS objODS = new ODS();
		objODS.setType(objTempODS.getType());//ID
		if(objTempODS.getServicePeriod().size() != 0)
			objODS.setServicePeriod(objTempODS.getServicePeriod());//CWE
		if(objTempODS.getDietSupplementPreferenceCode().size() != 0)
			objODS.setDietSupplementPreferenceCode(objTempODS.getDietSupplementPreferenceCode());//CWE
	
		return objODS;
	}
	
	
	
	/**
	 * populate ODT Segment
	 * @return objODT object of ODT Segment
	 */
	public ODT populateODT()
	{
		ODT objODT = new ODT();
		objODT.setTrayType(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		objODT.addServicePeriod(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		
		return objODT;
	}

	/**
	 /** populate ODT Segment
	 * @return objODT object of ODT Segment
	 */ 
	public ODT populateODT(ODT objTempODT)
	{
		ODT objODT = new ODT();
		objODT.setTrayType(objTempODT.getTrayType());//CWE
		if(objTempODT.getServicePeriod().size() != 0)
			objODT.setServicePeriod(objTempODT.getServicePeriod());//CWE
		return objODT;
	}
	
	
	/**
	 * populate BTX Segment
	 * @return objBTX object of BTX Segment
	 */
	public BTX populateBTX()
	{
		HD objHD = PopulateDataType.populateHD(HL7Constants.HL7_SUBCOMPONENT);
		CNE objCNE=PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT);
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		
		BTX objBTX = new BTX();
		objBTX.setSetID_BTX("1");//SI
		objBTX.setBCDonationID("E Id", "N", "U Id", "x500");//EI
		objBTX.setBCComponent(objCNE);//CNE
		objBTX.setBCBloodGroup(objCNE);//CNE
		objBTX.setCPCommercialProduct(objCWE);//CWE
		objBTX.setCPManufacturer("CDAC",PopulateDataType.populateCWE(HL7Constants.HL7_SUBCOMPONENT), objHD, "AM", objHD, "I", "text");//XON
		objBTX.setCPLotNumber("E Id", "N", "U Id", "x500");//EI
		objBTX.setBPQuantity("123");//NM
		objBTX.setBPTransfusionDispositionStatus(objCWE);//CWE
		objBTX.setBPMessageStatus("C");//ID
		objBTX.setBPDateTimeOfStatus("20030507");//DTM
		objBTX.setBPTransfusionAdministrator(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));
		objBTX.setBPTransfusionVerifier(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));
		objBTX.setBPTransfusionStartDTofStatus("20030507");//DTM
		objBTX.setBPTransfusionEndDTofStatus("20030507");//DTM
		objBTX.addBPAdverseReactionType(objCWE);//CWE
		objBTX.setBPTransfusionInterruptedReason(objCWE);//CWE
		objBTX.setBPUniqueID(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));
		return objBTX;
	}

	/**
	 /** populate BTX Segment
	 * @return objBTX object of BTX Segment
	 */ 
	public BTX populateBTX(BTX objTempBTX)
	{
		BTX objBTX = new BTX();
		objBTX.setSetID_BTX(objTempBTX.getSetID_BTX());//SI
		objBTX.setBCDonationID(objTempBTX.getBcDonationID());//EI
		objBTX.setBCComponent(objTempBTX.getBcComponent());//CNE
		objBTX.setBCBloodGroup(objTempBTX.getBcBloodGroup());//CNE
		objBTX.setCPCommercialProduct(objTempBTX.getCpCommercialProduct());//CWE
		objBTX.setCPManufacturer(objTempBTX.getCpManufacturer());//XON
		objBTX.setCPLotNumber(objTempBTX.getCpLotNumber());//EI
		objBTX.setBPQuantity(objTempBTX.getBpQuantity());//NM
		objBTX.setBPTransfusionDispositionStatus(objTempBTX.getBpTransfusionDispositionStatus());//CWE
		objBTX.setBPMessageStatus(objTempBTX.getBpMessageStatus());//ID
		objBTX.setBPDateTimeOfStatus(objTempBTX.getBpDateTimeOfStatus());//DTM
		objBTX.setBPTransfusionAdministrator(objTempBTX.getBpTransfusionAdministrator());
		objBTX.setBPTransfusionVerifier(objTempBTX.getBpTransfusionVerifier());
		objBTX.setBPTransfusionStartDTofStatus(objTempBTX.getBpTransfusionStartDTofStatus());//DTM
		objBTX.setBPTransfusionEndDTofStatus(objTempBTX.getBpTransfusionEndDTofStatus());//DTM
		if(objTempBTX.getBpAdverseReactionType().size() != 0)
			objBTX.setBPAdverseReactionType(objTempBTX.getBpAdverseReactionType());//CWE
		objBTX.setBPTransfusionInterruptedReason(objTempBTX.getBpTransfusionInterruptedReason());//CWE
		objBTX.setBPUniqueID(objTempBTX.getBPUniqueID());
		return objBTX;
	}

	
	/**
	 * populate RXE Segment
	 * @return objRXE object of RXE Segment
	 */
	public RXE populateRXE()
	{
		CWE objCWE =PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
	
							
		RXE objRXE = new RXE();
		objRXE.setGiveCode(objCWE);//CWE
		objRXE.setGiveAmount_Minimum("123");//NM
		objRXE.setGiveUnits(objCWE);//CWE
		objRXE.addProviderAdministrationInstructions(objCWE);//CWE
		objRXE.setSubstitutionStatus("N");//ID
		objRXE.setDispenseAmount("123");//NM
		objRXE.setDispenseUnits(objCWE);//CWE
		objRXE.setNumberofRefills("123");//NM
		objRXE.addOrderingProviderDEANumber(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));//XCN
		objRXE.addPharmacistTreatSupplierVerifierID(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));//XCN
		objRXE.setPrescriptionNumber("N");//ST
		objRXE.setNumberofRefillsRemaining("123");//NM
		objRXE.setNumberofRefillsDosesDispensed("123");//NM
		objRXE.setDTofMostRecentRefillorDoseDispensed("20030507");//DTM
		objRXE.setTotalDailyDose("5",PopulateDataType.populateCWE(HL7Constants.HL7_SUBCOMPONENT));//CQ
		objRXE.setNeedsHumanReview("Y");//ID
		objRXE.addSpecialDispensingInstructions(objCWE);
		objRXE.setGivePerTimeUnit("N");//ST
		objRXE.setGiveRateAmount("N");//ST
		objRXE.setGiveRateUnits(objCWE);//CWE
		objRXE.setGiveStrength("123");//NM
		objRXE.setGiveStrengthUnits(objCWE);//CWE
		objRXE.addGiveIndication(objCWE);//CWE
		objRXE.setDispensePackageMethod("TR");//ID
		objRXE.addSupplementaryCode(objCWE);//CWE
		objRXE.setOriginalOrderDateTime("20070202");//DTM
		objRXE.setGiveDrugStrengthVolume("123");//NM
		objRXE.setGiveDrugStrengthVolumeUnits(objCWE);//CWE
		objRXE.setControlledSubstanceSchedule(objCWE);//CWE
		objRXE.setFormularyStatus("Y");//ID
		objRXE.addPharmaceuticalSubstanceAlternative(objCWE);//CWE
		objRXE.setPharmacyofMostRecentFill(objCWE);//CWE
		objRXE.setInitialDispenseAmount("123");//NM
		objRXE.setDispensingPharmacy(objCWE);//CWE
		objRXE.setDispensingPharmacyAddress(PopulateDataType.populateXAD(HL7Constants.HL7_COMPONENT));//XAD
		objRXE.setDeliver_toAddress(PopulateDataType.populateXAD(HL7Constants.HL7_COMPONENT));//XAD
		objRXE.setPharmacyOrderType("M");//ID
		return objRXE;
	}

	/**
	 /** populate RXE Segment
	 * @return objRXE object of RXE Segment
	 */ 
	public RXE populateRXE(RXE objTempRXE)
	{
		RXE objRXE = new RXE();
		objRXE.setGiveCode(objTempRXE.getGiveCode());//CWE
		objRXE.setGiveAmount_Minimum(objTempRXE.getGiveAmount_Minimum());//NM
		objRXE.setGiveUnits(objTempRXE.getGiveUnits());//CWE
  		if(objTempRXE.getProviderAdministrationInstructions().size() != 0)
			objRXE.setProviderAdministrationInstructions(objTempRXE.getProviderAdministrationInstructions());//CWE
		objRXE.setSubstitutionStatus(objTempRXE.getSubstitutionStatus());//ID
		objRXE.setDispenseAmount(objTempRXE.getDispenseAmount());//NM
		objRXE.setDispenseUnits(objTempRXE.getDispenseUnits());//CWE
		objRXE.setNumberofRefills(objTempRXE.getNumberofRefills());//NM
		if(objTempRXE.getOrderingProviderDEANumber().size() != 0)
			objRXE.setOrderingProviderDEANumber(objTempRXE.getOrderingProviderDEANumber());//XCN
		if(objTempRXE.getPharmacistTreatSupplierVerifierID().size() != 0)
			objRXE.setPharmacistTreatSupplierVerifierID(objTempRXE.getPharmacistTreatSupplierVerifierID());//XCN
		objRXE.setPrescriptionNumber(objTempRXE.getPrescriptionNumber());//ST
		objRXE.setNumberofRefillsRemaining(objTempRXE.getNumberofRefillsRemaining());//NM
		objRXE.setNumberofRefillsDosesDispensed(objTempRXE.getNumberofRefillsDosesDispensed());//NM
		objRXE.setDTofMostRecentRefillorDoseDispensed(objTempRXE.getDTofMostRecentRefillorDoseDispensed());//DTM
		objRXE.setTotalDailyDose(objTempRXE.getTotalDailyDose());//CQ
		objRXE.setNeedsHumanReview(objTempRXE.getNeedsHumanReview());//ID
		if(objTempRXE.getSpecialDispensingInstructions().size() != 0)
			objRXE.setSpecialDispensingInstructions(objTempRXE.getSpecialDispensingInstructions());//CWE
		objRXE.setGivePerTimeUnit(objTempRXE.getGivePerTimeUnit());//ST
		objRXE.setGiveRateAmount(objTempRXE.getGiveRateAmount());//ST
		objRXE.setGiveRateUnits(objTempRXE.getGiveRateUnits());//CWE
		objRXE.setGiveStrength(objTempRXE.getGiveStrength());//NM
		objRXE.setGiveStrengthUnits(objTempRXE.getGiveStrengthUnits());//CWE
		if(objTempRXE.getGiveIndication().size() != 0)
			objRXE.setGiveIndication(objTempRXE.getGiveIndication());//CWE
		objRXE.setDispensePackageMethod(objTempRXE.getDispensePackageMethod());//ID
		if(objTempRXE.getSupplementaryCode().size() != 0)
			objRXE.setSupplementaryCode(objTempRXE.getSupplementaryCode());//CWE
		objRXE.setOriginalOrderDateTime(objTempRXE.getOriginalOrderDateTime());//DTM
		objRXE.setGiveDrugStrengthVolume(objTempRXE.getGiveDrugStrengthVolume());//NM
		objRXE.setGiveDrugStrengthVolumeUnits(objTempRXE.getGiveDrugStrengthVolumeUnits());//CWE
		objRXE.setControlledSubstanceSchedule(objTempRXE.getControlledSubstanceSchedule());//CWE
		objRXE.setFormularyStatus(objTempRXE.getFormularyStatus());//ID
		if(objTempRXE.getPharmaceuticalSubstanceAlternative().size() != 0)
			objRXE.setPharmaceuticalSubstanceAlternative(objTempRXE.getPharmaceuticalSubstanceAlternative());//CWE
		objRXE.setPharmacyofMostRecentFill(objTempRXE.getPharmacyofMostRecentFill());//CWE
		objRXE.setInitialDispenseAmount(objTempRXE.getInitialDispenseAmount());//NM
		objRXE.setDispensingPharmacy(objTempRXE.getDispensingPharmacy());//CWE
		objRXE.setDispensingPharmacyAddress(objTempRXE.getDispensingPharmacyAddress());//XAD
		objRXE.setDeliver_toAddress(objTempRXE.getDeliver_toAddress());//XAD
		objRXE.setPharmacyOrderType(objTempRXE.getPharmacyOrderType());//ID
		return objRXE;
	}
	
	
	/**
	 * populate RXG Segment
	 * @return objRXG object of RXG Segment
	 */
	public RXG populateRXG()
	{
		CWE objCWE = PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
	
		RXG objRXG = new RXG();
		objRXG.setGiveSub_IDCounter("123");//NM
		objRXG.setGiveCode(objCWE);//CWE
		objRXG.setGiveAmount_Minimum("123");//NM
		objRXG.setGiveUnits(objCWE);//CWE
		objRXG.setSubstitutionStatus("N");//ID
		objRXG.setNeedsHumanReview("Y");//ID
		objRXG.addSpecialAdministrationInstructions(objCWE);
		objRXG.setGivePerTimeUnit("A");//ST
		objRXG.setGiveStrengthUnits(objCWE);//CWE
		objRXG.addSubstanceExpirationDate("20070202");//DTM
		objRXG.addSubstanceManufacturerName(objCWE);//CWE
		objRXG.addIndication(objCWE);//CWE
		objRXG.setGiveDrugStrengthVolume("123");//NM
		objRXG.setGiveDrugStrengthVolumeUnits(objCWE);//CWE
		objRXG.setGiveBarcodeIdentifier(objCWE);//CWE
		objRXG.setPharmacyOrderType("M");//ID
		objRXG.setDispensetoPharmacy(objCWE);
		objRXG.setDispensetoPharmacyAddress(PopulateDataType.populateXAD(HL7Constants.HL7_COMPONENT));
		objRXG.setDeliver_toPatientLocation(PopulateDataType.populatePL(HL7Constants.HL7_COMPONENT));
		objRXG.setDeliver_toAddress(PopulateDataType.populateXAD(HL7Constants.HL7_COMPONENT));
		objRXG.setDispenseAmount("4444");
		objRXG.setDispenseUnits(objCWE);
		
		return objRXG;
	}

	/**
	 /** populate RXG Segment
	 * @return objRXG object of RXG Segment
	 */ 
	public RXG populateRXG(RXG objTempRXG)
	{
		RXG objRXG = new RXG();
		objRXG.setGiveSub_IDCounter(objTempRXG.getGiveSub_IDCounter());//NM
		objRXG.setGiveCode(objTempRXG.getGiveCode());//CWE
		objRXG.setGiveAmount_Minimum(objTempRXG.getGiveAmount_Minimum());//NM
		objRXG.setGiveUnits(objTempRXG.getGiveUnits());//CWE
		objRXG.setSubstitutionStatus(objTempRXG.getSubstitutionStatus());//ID
		objRXG.setNeedsHumanReview(objTempRXG.getNeedsHumanReview());//ID
		if(objTempRXG.getSpecialAdministrationInstructions().size()!=0)
			objRXG.setSpecialAdministrationInstructions(objTempRXG.getSpecialAdministrationInstructions());
		objRXG.setGivePerTimeUnit(objTempRXG.getGivePerTimeUnit());//ST
		objRXG.setGiveStrengthUnits(objTempRXG.getGiveStrengthUnits());//CWE
		if(objTempRXG.getSubstanceExpirationDate().size() != 0)
			objRXG.setSubstanceExpirationDate(objTempRXG.getSubstanceExpirationDate());//DTM
		if(objTempRXG.getSubstanceManufacturerName().size() != 0)
			objRXG.setSubstanceManufacturerName(objTempRXG.getSubstanceManufacturerName());//CWE
		if(objTempRXG.getIndication().size() != 0)
			objRXG.setIndication(objTempRXG.getIndication());//CWE
		objRXG.setGiveDrugStrengthVolume(objTempRXG.getGiveDrugStrengthVolume());//NM
		objRXG.setGiveDrugStrengthVolumeUnits(objTempRXG.getGiveDrugStrengthVolumeUnits());//CWE
		objRXG.setGiveBarcodeIdentifier(objTempRXG.getGiveBarcodeIdentifier());//CWE
		objRXG.setPharmacyOrderType(objTempRXG.getPharmacyOrderType());//ID
		objRXG.setDispensetoPharmacy(objTempRXG.getDispensetoPharmacy());
		objRXG.setDispensetoPharmacyAddress(objTempRXG.getDispensetoPharmacyAddress());
		objRXG.setDeliver_toPatientLocation(objTempRXG.getDeliver_toPatientLocation());
		objRXG.setDeliver_toAddress(objTempRXG.getDeliver_toAddress());
		objRXG.setDispenseAmount(objTempRXG.getDispenseAmount());
		objRXG.setDispenseUnits(objTempRXG.getDispenseUnits());
		
		return objRXG;
	}
	
	
	/**
	 * populate CSS Segment
	 * @return objCSS object of CSS Segment
	 */
	public CSS populateCSS()
	{
		CWE objCWE = PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);

		CSS objCSS = new CSS();
		objCSS.setStudyScheduledTimePoint(objCWE);//CWE
		objCSS.addStudyQualityControlCodes(objCWE);//CWE
		return objCSS;
	}

	/**
	 /** populate CSS Segment
	 * @return objCSS object of CSS Segment
	 */ 
	public CSS populateCSS(CSS objTempCSS)
	{

		CSS objCSS = new CSS();
		objCSS.setStudyScheduledTimePoint(objTempCSS.getStudyScheduledTimePoint());//CWE
		if(objTempCSS.getStudyQualityControlCodes().size() != 0)
			objCSS.setStudyQualityControlCodes(objTempCSS.getStudyQualityControlCodes());//CWE
		return objCSS;
	}	
	
	/**
	 * populate RXA Segment
	 * @return objRXA object of RXA Segment
	 */
	public RXA populateRXA()
	{
		FN objFamilyName = PopulateDataType.populateFN(HL7Constants.HL7_SUBCOMPONENT);
		
		HD objAssigningAuthority = PopulateDataType.populateHD(HL7Constants.HL7_SUBCOMPONENT);
		
		HD objAssigningFacility = PopulateDataType.populateHD(HL7Constants.HL7_SUBCOMPONENT);
		
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
					
		CWE objAssigningAgencyOrDepartment =PopulateDataType.populateCWE(HL7Constants.HL7_SUBCOMPONENT);
	
		RXA objRXA = new RXA();
		objRXA.setGiveSub_IDCounter("998");//NM
		objRXA.setAdministrationSub_IDCounter("999");//NM
		objRXA.setDateTimeStartofAdministration("20030303");//DTM
		objRXA.setDateTimeEndofAdministration("20030303");//DTM
		objRXA.setAdministeredCode(objCWE);//CWE
		objRXA.setAdministeredAmount("8888");
		objRXA.setAdministeredUnits(objCWE);//CWE
		objRXA.setAdministeredDosageForm(objCWE);//CWE
		objRXA.addAdministrationNotes(objCWE);//CWE
		objRXA.addAdministeringProvider	(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));//XCN
		objRXA.setAdministeredPerTimeUnit("89");//ST
		objRXA.setAdministeredStrength("12");
		objRXA.setAdministeredStrengthUnits(objCWE);//CWE
		objRXA.addSubstanceLotNumber("Nui");//ST
		objRXA.addSubstanceExpirationDate("20090909");//DTM
		objRXA.addSubstanceManufacturerName(objCWE);//CWE
		objRXA.addSubstanceTreatmentRefusalReason(objCWE);//CWE
		
		return objRXA;
	}	

	/**
	 /** populate RXA Segment
	 * @return objRXA object of RXA Segment
	 */ 
	public RXA populateRXA(RXA objTempRXA)
	{
		RXA objRXA = new RXA();
		objRXA.setGiveSub_IDCounter(objTempRXA.getGiveSub_IDCounter());//NM
		objRXA.setAdministrationSub_IDCounter(objTempRXA.getAdministrationSub_IDCounter());//NM
		objRXA.setDateTimeStartofAdministration(objTempRXA.getDateTimeStartofAdministration());//DTM
		objRXA.setDateTimeEndofAdministration(objTempRXA.getDateTimeEndofAdministration());//DTM
		objRXA.setAdministeredCode(objTempRXA.getAdministeredCode());//CWE
		objRXA.setAdministeredAmount(objTempRXA.getAdministeredAmount());
		objRXA.setAdministeredUnits(objTempRXA.getAdministeredUnits());//CWE
		objRXA.setAdministeredDosageForm(objTempRXA.getAdministeredDosageForm());//CWE
		if(objTempRXA.getAdministrationNotes().size() != 0)
			objRXA.setAdministrationNotes(objTempRXA.getAdministrationNotes());//CWE
		if(objTempRXA.getAdministeringProvider	().size() != 0)
			objRXA.setAdministeringProvider	(objTempRXA.getAdministeringProvider	());//XCN
		objRXA.setAdministeredPerTimeUnit(objTempRXA.getAdministeredPerTimeUnit());//ST
		objRXA.setAdministeredStrength(objTempRXA.getAdministeredStrength());
		objRXA.setAdministeredStrengthUnits(objTempRXA.getAdministeredStrengthUnits());//CWE
		if(objTempRXA.getSubstanceLotNumber().size() != 0)
			objRXA.setSubstanceLotNumber(objTempRXA.getSubstanceLotNumber());//ST
		if(objTempRXA.getSubstanceExpirationDate().size() != 0)
			objRXA.setSubstanceExpirationDate(objTempRXA.getSubstanceExpirationDate());//DTM
		if(objTempRXA.getSubstanceManufacturerName().size() != 0)
			objRXA.setSubstanceManufacturerName(objTempRXA.getSubstanceManufacturerName());//CWE
		if(objTempRXA.getSubstanceTreatmentRefusalReason().size() != 0)
			objRXA.setSubstanceTreatmentRefusalReason(objTempRXA.getSubstanceTreatmentRefusalReason());//CWE
		
		return objRXA;
	}

	
	
	/**
	 * populate RXR Segment
	 * @return objRXR object of RXR Segment
	 */
	public RXR populateRXR()
	{
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		
		RXR objRXR = new RXR();
		objRXR.setRoute(objCWE);//CWE
		objRXR.setAdministrationSite(objCWE);//CWE
		objRXR.setAdministrationDevice(objCWE);//CWE
		
		return objRXR;
	}

	/**
	 /** populate RXR Segment
	 * @return objRXR object of RXR Segment
	 */ 
	public RXR populateRXR(RXR objTempRXR)
	{
		RXR objRXR = new RXR();

		objRXR.setRoute(objTempRXR.getRoute());//CWE
		objRXR.setAdministrationSite(objTempRXR.getAdministrationSite());//CWE
		objRXR.setAdministrationDevice(objTempRXR.getAdministrationDevice());//CWE
		
		return objRXR;
	}
	
	
	/**
	 * populate SID Segment
	 * @return objSID object of SID Segment
	 */
	public SID populateSID()
	{
		SID objSID = new SID();
		CWE objCWE = PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		objSID.setApplicationMethodIdentifier(objCWE);//CWE
		objSID.setSubstanceLotNumber("NUI");//ST
		objSID.setSubstanceContainerIdentifier("U123");//ST
		objSID.setSubstanceManufacturerIdentifier(objCWE);//CWE
		return objSID;
	}

	/**
	 /** populate SID Segment
	 * @return objSID object of SID Segment
	 */ 
	public SID populateSID(SID objTempSID)
	{
		SID objSID = new SID();

		objSID.setApplicationMethodIdentifier(objTempSID.getApplicationMethodIdentifier());//CWE
		objSID.setSubstanceLotNumber(objTempSID.getSubstanceLotNumber());//ST
		objSID.setSubstanceContainerIdentifier(objTempSID.getSubstanceContainerIdentifier());//ST
		objSID.setSubstanceManufacturerIdentifier(objTempSID.getSubstanceManufacturerIdentifier());//CWE
		return objSID;
	}
	
	

	/**
	 * populate INV Segment
	 * @return INV
	 */
	public INV populateINV()
	{		
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		
		INV objINV = new INV();
		objINV.setSubstanceIdentifier(objCWE);//CWE
		objINV.addSubstanceStatus(objCWE);//CWE
		objINV.setSubstanceType(objCWE);//CWE
		objINV.setInventoryContainerIdentifier(objCWE);//CWE
		objINV.setContainerCarrierIdentifier(objCWE);//CWE 
		objINV.setPositiononCarrier(objCWE);//CWE
		objINV.setExpirationDateTime("20090112");//DTM
		objINV.setFirstUsedDateTime("20090112");//DTM
		objINV.addTestFluidIdentifier(objCWE);//CWE
		
		objINV.setOnBoardStabilityTime("5",objCWE);//CQ
		objINV.setTargetValue("5",PopulateDataType.populateCWE(HL7Constants.HL7_SUBCOMPONENT));//CQ

		return objINV;
	}

	/**
	 /** populate INV Segment
	 * @return INV
	 */ 
	public INV populateINV(INV objTempINV)
	{
		INV objINV = new INV();

		objINV.setSubstanceIdentifier(objTempINV.getSubstanceIdentifier());//CWE
		if(objTempINV.getSubstanceStatus().size() != 0)
			objINV.setSubstanceStatus(objTempINV.getSubstanceStatus());//CWE
		objINV.setSubstanceType(objTempINV.getSubstanceType());//CWE
		objINV.setInventoryContainerIdentifier(objTempINV.getInventoryContainerIdentifier());//CWE
		objINV.setContainerCarrierIdentifier(objTempINV.getContainerCarrierIdentifier());//CWE 
		objINV.setPositiononCarrier(objTempINV.getPositiononCarrier());//CWE
		objINV.setExpirationDateTime(objTempINV.getExpirationDateTime());//DTM
		objINV.setFirstUsedDateTime(objTempINV.getFirstUsedDateTime());//DTM
		if(objTempINV.getTestFluidIdentifier().size() != 0)
			objINV.setTestFluidIdentifier(objTempINV.getTestFluidIdentifier());//CWE
		objINV.setOnBoardStabilityTime(objTempINV.getOnBoardStabilityTime());//CQ
		objINV.setTargetValue(objTempINV.getTargetValue());//CQ

		return objINV;
	}

	
	/**
	 * populate MRG Segment
	 * @return objMRG
	 */
	public MRG populateMRG()
	{
		CX objCX=PopulateDataType.populateCX(HL7Constants.HL7_COMPONENT);
		
		MRG objMRG = new MRG();
		objMRG.addPriorPatientIdentifierList(objCX);//CX
		objMRG.setPriorPatientAccountNumber(objCX);//CX
		objMRG.setPriorVisitNumber(objCX);//CX
		return objMRG;
	}

	/**
	 /** populate MRG Segment
	 * @return objMRG
	 */ 
	public MRG populateMRG(MRG objTempMRG)
	{
		MRG objMRG = new MRG();
		if(objTempMRG.getPriorPatientIdentifierList().size() != 0)
			objMRG.setPriorPatientIdentifierList(objTempMRG.getPriorPatientIdentifierList());//CX
		objMRG.setPriorPatientAccountNumber(objTempMRG.getPriorPatientAccountNumber());//CX
		objMRG.setPriorVisitNumber(objTempMRG.getPriorVisitNumber());//CX
		return objMRG;
	}

	/**
	 * populate IAM Segment
	 * @return objIAM
	 */
	public IAM populateIAM()
	{
		CWE objCWE = PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		CNE objCNE = PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT);
		XPN objXPN = PopulateDataType.populateXPN(HL7Constants.HL7_COMPONENT);
	
		IAM objIAM = new IAM();
		objIAM.setSetID_IAM("2");//SI
		objIAM.setAllergenTypeCode(objCWE);//CWE
		objIAM.setAllergenCodeMnemonicDesc(objCWE);//CWE
		objIAM.setAllergySeverityCode(objCWE);//CWE
		objIAM.addAllergyReactionCode("A");//ST
		objIAM.setAllergyActionCode(objCNE);//CNE
		objIAM.setAllergyUniqueIdentifier("Entity Identifier", "NAMESPACWE", "UniversalId", "x500");//EI
		objIAM.setSensitivityCausativeAgentCode(objCWE);//CWE
		objIAM.setAllergenGrpCodeMnemonicDesc(objCWE);//CWE
		objIAM.setOnsetDate("19850212");//DT
		objIAM.setReportedBy(objXPN);//XPN
		
		return objIAM;
	}

	/**
	 /** populate IAM Segment
	 * @return objIAM
	 */ 
	public IAM populateIAM(IAM objTempIAM)
	{
		IAM objIAM = new IAM();
		objIAM.setSetID_IAM(objTempIAM.getSetID_IAM());//SI
		objIAM.setAllergenTypeCode(objTempIAM.getAllergenTypeCode());//CWE
		objIAM.setAllergenCodeMnemonicDesc(objTempIAM.getAllergenCodeMnemonicDesc());//CWE
		objIAM.setAllergySeverityCode(objTempIAM.getAllergySeverityCode());//CWE
		if(objTempIAM.getAllergyReactionCode().size() != 0)
			objIAM.setAllergyReactionCode(objTempIAM.getAllergyReactionCode());//ST
		objIAM.setAllergyActionCode(objTempIAM.getAllergyActionCode());//CNE
		objIAM.setAllergyUniqueIdentifier(objTempIAM.getAllergyUniqueIdentifier());//EI
		objIAM.setSensitivityCausativeAgentCode(objTempIAM.getSensitivityCausativeAgentCode());//CWE
		objIAM.setAllergenGrpCodeMnemonicDesc(objTempIAM.getAllergenGrpCodeMnemonicDesc());//CWE
		objIAM.setOnsetDate(objTempIAM.getOnsetDate());//DT
		objIAM.setReportedBy(objTempIAM.getReportedBy());//XPN
		
		return objIAM;
	}

	
	

	/**
	 * populate NPU Segment
	 * @return objNPU
	 */
	public NPU populateNPU()
	{
	

		NPU objNPU = new NPU();
		objNPU.setBedLocation(PopulateDataType.populatePL(HL7Constants.HL7_COMPONENT));//PL
		objNPU.setBedStatus(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//IS
		return objNPU;
	}

	/**
	 /** populate NPU Segment
	 * @return objNPU
	 */ 
	public NPU populateNPU(NPU objTempNPU)
	{
		NPU objNPU = new NPU();
		objNPU.setBedLocation(objTempNPU.getBedLocation());//PL
		objNPU.setBedStatus(objTempNPU.getBedStatus());//IS
		return objNPU;
	}	

	
	

	
	/**
	 * populate NDS Segment
	 * @return objNDS
	 */
	public NDS populateNDS()
	{
		NDS objNDS = new NDS();
		objNDS.setNotificationReferenceNumber("15"); //NM
		objNDS.setNotificationDateTime("20090112");//DTM
		objNDS.setNotificationAlertSeverity(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		objNDS.setNotificationCode(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		return objNDS;
	}	

	/**
	 /** populate NDS Segment
	 * @return objNDS
	 */ 
	public NDS populateNDS(NDS objTempNDS)
	{
		NDS objNDS = new NDS();
		objNDS.setNotificationReferenceNumber(objTempNDS.getNotificationReferenceNumber()); //NM
		objNDS.setNotificationDateTime(objTempNDS.getNotificationDateTime());//DTM
		objNDS.setNotificationAlertSeverity(objTempNDS.getNotificationAlertSeverity());//CWE
		objNDS.setNotificationCode(objTempNDS.getNotificationCode());//CWE
		return objNDS;
	}

	/**
	 * populate ECR Segment
	 * @return objECR
	 */
	public ECR populateECR()
	{
		ECR objECR = new ECR();
		objECR.setCommandResponse(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		objECR.setDateTimeCompleted("20090112");//DTM
		return objECR;
	}

	/**
	 /** populate ECR Segment
	 * @return objECR
	 */ 
	public ECR populateECR(ECR objTempECR)
	{
		ECR objECR = new ECR();
		objECR.setCommandResponse(objTempECR.getCommandResponse());//CWE
		objECR.setDateTimeCompleted(objTempECR.getDateTimeCompleted());//DTM

		return objECR;
	}
	
	/**
	 * populate QID Segment
	 * @return objQID object QID of Segment
	 */
	public QID populateQID()
	{
		QID objQID = new QID();
		objQID.setQueryTag("OnsetDateText");//ST
		objQID.setMessageQueryName(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));//CWE
		return objQID;
	}

	/**
	 /** populate QID Segment
	 * @return objQID object QID of Segment
	 */ 
	public QID populateQID(QID objTempQID)
	{
		QID objQID = new QID();
		objQID.setQueryTag(objTempQID.getQueryTag());//ST
		objQID.setMessageQueryName(objTempQID.getMessageQueryName());//CWE
		return objQID;
	}
	
	
	
	

	/**
	 * populate PES Segment
	 * @return objPES
	 */
	public PES populatePES()
	{
		
		XTN objXTN = PopulateDataType.populateXTN(HL7Constants.HL7_COMPONENT);
		XON objXON=	PopulateDataType.populateXON(HL7Constants.HL7_COMPONENT);
		XCN objXCN = PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT);
		XAD objXAD = PopulateDataType.populateXAD(HL7Constants.HL7_COMPONENT);
		
		PES objPES = new PES();
		objPES.addSenderOrganizationName(objXON);//XON
		objPES.addSenderIndividualName(objXCN);//XCN
		objPES.addSenderAddress(objXAD);//XAD
		objPES.addSenderTelephone(objXTN);//XTN
		objPES.setSenderSequenceNumber("15");//NM
		objPES.setSenderAwareDateTime("20170607");//DTM
		objPES.setEventReportDate("20170607");//DTM
		objPES.addEventReportTimingType("CO");//ID
		objPES.setEventReportSource("C");//ID
		objPES.addEventReportedTo("M");//ID
		return objPES;
	}

	/**
	 /** populate PES Segment
	 * @return objPES
	 */ 
	public PES populatePES(PES objTempPES)
	{
		PES objPES = new PES();

		if(objTempPES.getSenderOrganizationName().size() != 0)
			objPES.setSenderOrganizationName(objTempPES.getSenderOrganizationName());//XON
		if(objTempPES.getSenderIndividualName().size() != 0)
			objPES.setSenderIndividualName(objTempPES.getSenderIndividualName());//XCN
		if(objTempPES.getSenderAddress().size() != 0)
			objPES.setSenderAddress(objTempPES.getSenderAddress());//XAD
		if(objTempPES.getSenderTelephone().size() != 0)
			objPES.setSenderTelephone(objTempPES.getSenderTelephone());//XTN
		objPES.setSenderSequenceNumber(objTempPES.getSenderSequenceNumber());//NM
		objPES.setSenderAwareDateTime(objTempPES.getSenderAwareDateTime());//DTM
		objPES.setEventReportDate(objTempPES.getEventReportDate());//DTM
		if(objTempPES.getEventReportTimingType().size() != 0)
			objPES.setEventReportTimingType(objTempPES.getEventReportTimingType());//ID
		objPES.setEventReportSource(objTempPES.getEventReportSource());//ID
		if(objTempPES.getEventReportedTo().size() != 0)
			objPES.setEventReportedTo(objTempPES.getEventReportedTo());//ID
		return objPES;
	}

	/**
	 * populate PEO Segment
	 * @return objPEO
	 */
	public PEO populatePEO()
	{
		CWE objCWE = PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		XTN objXTN = PopulateDataType.populateXTN(HL7Constants.HL7_COMPONENT);		
		XPN objXPN = PopulateDataType.populateXPN(HL7Constants.HL7_COMPONENT);
		XAD objXAD = PopulateDataType.populateXAD(HL7Constants.HL7_COMPONENT);

		PEO objPEO = new PEO();
		objPEO.addEventIdentifiersUsed(objCWE);//CWE
		objPEO.addEventSymptomDiagnosisCode(objCWE);//CWE
		objPEO.setEventOnsetDateTime("20170607");//DTM
		objPEO.addEventLocationOccurredAddress(objXAD);//XAD
		objPEO.addEventQualification("I");//ID
		objPEO.setEventSerious("Y");//ID
		objPEO.setEventExpected("Y");//ID
		objPEO.addEventOutcome("D");//ID
		objPEO.setPatientOutcome("R");//ID
		objPEO.addCauseOfDeath(objCWE);//CWE
		objPEO.addPrimaryObserverName(objXPN);//XPN
		objPEO.addPrimaryObserverAddress(objXAD);//XAD
		objPEO.addPrimaryObserverTelephone(objXTN);//XTN
		objPEO.setPrimaryObserverQualification("P");//ID
		objPEO.setConfirmationProvidedBy("P");//ID
		objPEO.setPrimaryObserverIdentityMayBeDivulged("Y");//ID
		return objPEO;
	}

	/**
	 /** populate PEO Segment
	 * @return objPEO
	 */ 
	public PEO populatePEO(PEO objTempPEO)
	{
		PEO objPEO = new PEO();

		if(objTempPEO.getEventIdentifiersUsed().size() != 0)
			objPEO.setEventIdentifiersUsed(objTempPEO.getEventIdentifiersUsed());//CWE
		if(objTempPEO.getEventSymptomDiagnosisCode().size() != 0)
			objPEO.setEventSymptomDiagnosisCode(objTempPEO.getEventSymptomDiagnosisCode());//CWE
		objPEO.setEventOnsetDateTime(objTempPEO.getEventOnsetDateTime());//DTM
		if(objTempPEO.getEventLocationOccurredAddress().size() != 0)
			objPEO.setEventLocationOccurredAddress(objTempPEO.getEventLocationOccurredAddress());//XAD
		if(objTempPEO.getEventQualification().size() != 0)
			objPEO.setEventQualification(objTempPEO.getEventQualification());//ID
		objPEO.setEventSerious(objTempPEO.getEventSerious());//ID
		objPEO.setEventExpected(objTempPEO.getEventExpected());//ID
		if(objTempPEO.getEventOutcome().size() != 0)
			objPEO.setEventOutcome(objTempPEO.getEventOutcome());//ID
		objPEO.setPatientOutcome(objTempPEO.getPatientOutcome());//ID
		if(objTempPEO.getCauseOfDeath().size() != 0)
			objPEO.setCauseOfDeath(objTempPEO.getCauseOfDeath());//CWE
		if(objTempPEO.getPrimaryObserverName().size() != 0)
			objPEO.setPrimaryObserverName(objTempPEO.getPrimaryObserverName());//XPN
		if(objTempPEO.getPrimaryObserverAddress().size() != 0)
			objPEO.setPrimaryObserverAddress(objTempPEO.getPrimaryObserverAddress());//XAD
		if(objTempPEO.getPrimaryObserverTelephone().size() != 0)
			objPEO.setPrimaryObserverTelephone(objTempPEO.getPrimaryObserverTelephone());//XTN
		objPEO.setPrimaryObserverQualification(objTempPEO.getPrimaryObserverQualification());//ID
		objPEO.setConfirmationProvidedBy(objTempPEO.getConfirmationProvidedBy());//ID
		objPEO.setPrimaryObserverIdentityMayBeDivulged(objTempPEO.getPrimaryObserverIdentity());//ID
		return objPEO;
	}

	/**
	 * populate PCR Segment
	 * @return objPCR
	 */
	public PCR populatePCR()
	{
		CWE objCWE = PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		

		PCR objPCR = new PCR();
		objPCR.setImplicatedProduct(objCWE);//CWE
		objPCR.setGenericProduct("C");
		objPCR.setProductClass(objCWE);//CWE
		objPCR.setTotalDurationOfTherapy("5",PopulateDataType.populateCWE(HL7Constants.HL7_SUBCOMPONENT));//CQ
		objPCR.setSingleUseDevice(objCWE);//IS
		objPCR.setIndicationForProductUse(objCWE);//CWE
		objPCR.setProductProblem(objCWE);//IS
		objPCR.addProductSerialLotNumber("ANY");//ST
		objPCR.setEvaluatedProductSource("A");//ID
		objPCR.setDeviceOperatorQualifications("P");//ID
		objPCR.setRelatednessAssessment("H");//ID
		objPCR.addActionTakenInResponseToTheEvent("WP");//ID
		objPCR.addEventCausalityObservations("AW");//ID
		objPCR.addIndirectExposureMechanism("B");//ID

		return objPCR;
	}

	/**
	 /** populate PCR Segment
	 * @return objPCR
	 */ 
	public PCR populatePCR(PCR objTempPCR)
	{
		PCR objPCR = new PCR();
		
		objPCR.setImplicatedProduct(objTempPCR.getImplicatedProduct());//CWE
		objPCR.setGenericProduct(objTempPCR.getGenericProduct());
		objPCR.setProductClass(objTempPCR.getProductClass());//CWE
		objPCR.setTotalDurationOfTherapy(objTempPCR.getTotalDurationOfTherapy());//CQ
		objPCR.setSingleUseDevice(objTempPCR.getSingleUseDevice());//IS
		objPCR.setIndicationForProductUse(objTempPCR.getIndicationForProductUse());//CWE
		objPCR.setProductProblem(objTempPCR.getProductProblem());//IS
		if(objTempPCR.getProductSerialLotNumber().size() != 0)
			objPCR.setProductSerialLotNumber(objTempPCR.getProductSerialLotNumber());//ST
		objPCR.setEvaluatedProductSource(objTempPCR.getEvaluatedProductSource());//ID
		objPCR.setDeviceOperatorQualifications(objTempPCR.getDeviceOperatorQualifications());//ID
		objPCR.setRelatednessAssessment(objTempPCR.getRelatednessAssessment());//ID
		if(objTempPCR.getActionTakenInResponseToTheEvent().size() != 0)
			objPCR.setActionTakenInResponseToTheEvent(objTempPCR.getActionTakenInResponseToTheEvent());//ID
		if(objTempPCR.getEventCausalityObservations().size() != 0)
			objPCR.setEventCausalityObservations(objTempPCR.getEventCausalityObservations());//ID
		if(objTempPCR.getIndirectExposureMechanism().size() != 0)
			objPCR.setIndirectExposureMechanism(objTempPCR.getIndirectExposureMechanism());//ID

		return objPCR;
	}
	
	/**
	 * populate CDM Segment
	 * @return objCDM object CDM of Segment
	 */
	public CDM populateCDM()
	{
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);

		CDM objCDM = new CDM();
		objCDM.setPrimaryKeyValueCDM(objCWE); //CWE
		objCDM.setChargeDescriptionShort("OnsetDateText"); //ST
		objCDM.setDescriptionOverrideIndicator(objCWE); //IS
		objCDM.addExplodingCharges(objCWE); //CWE
		objCDM.addProcedureCode(PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT)); //CNE
		objCDM.setActiveInactiveFlag("A");  //ID
		objCDM.addInventoryNumber(objCWE); //CWE
		objCDM.setRoomFeeIndicator("Y"); //ID
		return objCDM;
	}

	/**
	 /** populate CDM Segment
	 * @return objCDM object CDM of Segment
	 */ 
	public CDM populateCDM(CDM objTempCDM)
	{
		CDM objCDM = new CDM();
		objCDM.setPrimaryKeyValueCDM(objTempCDM.getPrimaryKeyValueCDM()); //CWE
		objCDM.setChargeDescriptionShort(objTempCDM.getChargeDescriptionShort()); //ST
		objCDM.setDescriptionOverrideIndicator(objTempCDM.getDescriptionOverrideIndicator()); //IS
		if(objTempCDM.getExplodingCharges().size() != 0)
			objCDM.setExplodingCharges(objTempCDM.getExplodingCharges()); //CWE
		if(objTempCDM.getProcedureCode().size() != 0)
			objCDM.setProcedureCode(objTempCDM.getProcedureCode()); //CWE
		objCDM.setActiveInactiveFlag(objTempCDM.getActiveInactiveFlag());  //ID
		if(objTempCDM.getInventoryNumber().size() != 0)
			objCDM.setInventoryNumber(objTempCDM.getInventoryNumber()); //CWE
		objCDM.setRoomFeeIndicator(objTempCDM.getRoomFeeIndicator()); //ID
		return objCDM;
	}

	
	/**
	 * populate PRC Segment
	 * @return objPRC object PRC of Segment
	 */
	public PRC populatePRC()
	{
		PRC objPRC = new PRC();
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		
		objPRC.setPrimaryKeyValue_PRC(objCWE); //CWE
		objPRC.addFacilityID_PRC(objCWE); //CWE
		objPRC.addDepartment(objCWE); //CWE
		objPRC.addValidPatientClasses(objCWE); //IS
		objPRC.addPrice(PopulateDataType.populateCP(HL7Constants.HL7_COMPONENT));//CP
		objPRC.addFormula("OnsetDateText"); //ST
		objPRC.setEffectiveStartDate("20090112"); //DTM
		objPRC.setEffectiveEndDate("20090203"); //DTM
		objPRC.setPriceOverrideFlag(objCWE); //IS
		objPRC.addBillingCategory(objCWE); //CWE
		objPRC.setChargeableFlag("Y"); //ID
		objPRC.setActive_InactiveFlag("A"); //ID
		objPRC.setCost("5","USD"); //MO
		objPRC.setChargeOnIndicator(objCWE); //IS

		return objPRC;
	}

	/**
	 /** populate PRC Segment
	 * @return objPRC object PRC of Segment
	 */ 
	public PRC populatePRC(PRC objTempPRC)
	{
		PRC objPRC = new PRC();
		objPRC.setPrimaryKeyValue_PRC(objTempPRC.getPrimaryKeyValue_PRC()); //CWE
		if(objTempPRC.getFacilityID_PRC().size() != 0)
			objPRC.setFacilityID_PRC(objTempPRC.getFacilityID_PRC()); //CWE
		if(objTempPRC.getDepartment().size() != 0)
			objPRC.setDepartment(objTempPRC.getDepartment()); //CWE
		if(objTempPRC.getValidPatientClasses().size() != 0)
			objPRC.setValidPatientClasses(objTempPRC.getValidPatientClasses()); //IS
		if(objTempPRC.getPrice().size() != 0)
			objPRC.setPrice(objTempPRC.getPrice());//CP
		if(objTempPRC.getFormula().size() != 0)
			objPRC.setFormula(objTempPRC.getFormula()); //ST
		objPRC.setEffectiveStartDate(objTempPRC.getEffectiveStartDate()); //DTM
		objPRC.setEffectiveEndDate(objTempPRC.getEffectiveEndDate()); //DTM
		objPRC.setPriceOverrideFlag(objTempPRC.getPriceOverrideFlag()); //IS
		if(objTempPRC.getBillingCategory().size() != 0)
			objPRC.setBillingCategory(objTempPRC.getBillingCategory()); //CWE
		objPRC.setChargeableFlag(objTempPRC.getChargeableFlag()); //ID
		objPRC.setActive_InactiveFlag(objTempPRC.getActive_InactiveFlag()); //ID
		objPRC.setCost(objTempPRC.getCost()); //MO
		objPRC.setChargeOnIndicator(objTempPRC.getChargeOnIndicator()); //IS

		return objPRC;
	}


	/**
	 * populate LOC Segment
	 * @return objLOC object LOC of Segment
	 */
	public LOC populateLOC()
	{
		
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_SUBCOMPONENT);
		
		EI objComprehensiveLocationIdentifier = PopulateDataType.populateEI(HL7Constants.HL7_SUBCOMPONENT);

		HD objHD = PopulateDataType.populateHD(HL7Constants.HL7_SUBCOMPONENT);

		LOC objLOC = new LOC();
		objLOC.setPrimaryKeyValueLoc(objHD,objHD,objHD, objAssigningAuthority, "LOC_status", "H","Building", "Floor","LocationDescription", objComprehensiveLocationIdentifier, objAssigningAuthority);//PL
		objLOC.addLocationTypeLOC(objCWE); //IS
		objLOC.addOrganizationNameLOC(PopulateDataType.populateXON(HL7Constants.HL7_COMPONENT));//XON
		objLOC.addLocationAddress(PopulateDataType.populateXAD(HL7Constants.HL7_COMPONENT));//XAD
		objLOC.addLocationPhone(PopulateDataType.populateXTN(HL7Constants.HL7_COMPONENT));//XTN
		objLOC.addLicenseNumber(objCWE); //CWE
		objLOC.addLocationEquipment(objCWE); //IS
		objLOC.setLocationServiceCode(objCWE); //IS

		return objLOC;
	}

	/**
	 /** populate LOC Segment
	 * @return objLOC object LOC of Segment
	 */ 
	public LOC populateLOC(LOC objTempLOC)
	{
		LOC objLOC = new LOC();

		objLOC.setPrimaryKeyValueLoc(objTempLOC.getPrimaryKeyValueLoc());//PL
		if(objTempLOC.getLocationTypeLOC().size() != 0)
			objLOC.setLocationTypeLOC(objTempLOC.getLocationTypeLOC()); //ST
		if(objTempLOC.getOrganizationNameLOC().size() != 0)
			objLOC.setOrganizationNameLOC(objTempLOC.getOrganizationNameLOC());//XON
		if(objTempLOC.getLocationAddress().size() != 0)
			objLOC.setLocationAddress(objTempLOC.getLocationAddress());//XAD
		if(objTempLOC.getLocationPhone().size() != 0)
			objLOC.setLocationPhone(objTempLOC.getLocationPhone());//XTN
		if(objTempLOC.getLicenseNumber().size() != 0)
			objLOC.setLicenseNumber(objTempLOC.getLicenseNumber()); //CWE
		if(objTempLOC.getLocationEquipment().size() != 0)
			objLOC.setLocationEquipment(objTempLOC.getLocationEquipment()); //IS
		objLOC.setLocationServiceCode(objTempLOC.getLocationServiceCode()); //IS

		return objLOC;
	}
	
	
	
	
	/**
	 * populate LCH Segment
	 * @return objLCH object LCH of Segment
	 */
	public LCH populateLCH()
	{
		LCH objLCH = new LCH();	
		objLCH.setPrimaryKeyValueLCH(PopulateDataType.populatePL(HL7Constants.HL7_COMPONENT));//PL
		objLCH.setSegmentActionCode("A"); //ID
		objLCH.setLocationCharacteristicID(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT)); //CWE
		objLCH.setLocationCharacteristicValueLCH(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT)); //CWE

		return objLCH;
	}

	/**
	 /** populate LCH Segment
	 * @return objLCH object LCH of Segment
	 */ 
	public LCH populateLCH(LCH objTempLCH)
	{
		LCH objLCH = new LCH();
		objLCH.setPrimaryKeyValueLCH(objTempLCH.getPrimaryKeyValueLCH());//PL
		objLCH.setSegmentActionCode(objTempLCH.getSegmentActionCode()); //ID
		objLCH.setLocationCharacteristicID(objTempLCH.getLocationCharacteristicID()); //CWE
		objLCH.setLocationCharacteristicValueLCH(objTempLCH.getLocationCharacteristicValueLCH()); //CWE

		return objLCH;
	}

	/**
	 * populate LRL Segment
	 * @return objLRL object LRL of Segment
	 */
	public LRL populateLRL()
	{
		LRL objLRL = new LRL();		
		objLRL.setPrimaryKeyValueLRL(PopulateDataType.populatePL(HL7Constants.HL7_COMPONENT));//PL
		objLRL.setLocationRelationshipID(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT)); //CWE
		objLRL.addOrganizationalLocationRelationshipValue(PopulateDataType.populateXON(HL7Constants.HL7_COMPONENT));//XON
		objLRL.setPatientLocationRelationshipValue(PopulateDataType.populatePL(HL7Constants.HL7_COMPONENT));//PL

		return objLRL;
	}

	/**
	 /** populate LRL Segment
	 * @return objLRL object LRL of Segment
	 */ 
	public LRL populateLRL(LRL objTempLRL)
	{
		LRL objLRL = new LRL();

		objLRL.setPrimaryKeyValueLRL(objTempLRL.getPrimaryKeyValueLRL());//PL
		objLRL.setLocationRelationshipID(objTempLRL.getLocationRelationshipID()); //CWE
		if(objTempLRL.getOrganizationalLocationRelationshipValue().size() != 0)
			objLRL.setOrganizationalLocationRelationshipValue(objTempLRL.getOrganizationalLocationRelationshipValue());//XON
		objLRL.setPatientLocationRelationshipValue(objTempLRL.getPatientLocationRelationshipValue());//PL

		return objLRL;
	}

	/**
	 * populate LDP Segment
	 * @return objLDP object LDP of Segment
	 */
	public LDP populateLDP()
	{
		
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);

		LDP objLDP = new LDP();
		objLDP.setPrimaryKeyValueLDP(PopulateDataType.populatePL(HL7Constants.HL7_COMPONENT));//PL
		objLDP.setLocationDepartment(objCWE); //CWE
		objLDP.addLocationService(objCWE); //IS
		objLDP.addSpecialtyType(objCWE); //CWE
		objLDP.addValidPatientClasses(objCWE); //IS
		objLDP.setActiveInactiveFlag("A"); //ID
		objLDP.setInactivatedReason("OnsetDateText"); //ST
		objLDP.addVisitingHours("A", "A", "0630", "1030"); //VH
		objLDP.setContactPhone(PopulateDataType.populateXTN(HL7Constants.HL7_COMPONENT));//XTN
		return objLDP;
	}

	/**
	 /** populate LDP Segment
	 * @return objLDP object LDP of Segment
	 */ 
	public LDP populateLDP(LDP objTempLDP)
	{
		LDP objLDP = new LDP();
		objLDP.setPrimaryKeyValueLDP(objTempLDP.getPrimaryKeyValueLDP());//PL
		objLDP.setLocationDepartment(objTempLDP.getLocationDepartment()); //CWE
		if(objTempLDP.getLocationService().size() != 0)
			objLDP.setLocationService(objTempLDP.getLocationService()); //IS
		if(objTempLDP.getSpecialtyType().size() != 0)
			objLDP.setSpecialtyType(objTempLDP.getSpecialtyType()); //CWE
		if(objTempLDP.getValidPatientClasses().size() != 0)
			objLDP.setValidPatientClasses(objTempLDP.getValidPatientClasses()); //IS
		objLDP.setActiveInactiveFlag(objTempLDP.getActiveInactiveFlag()); //ID
		objLDP.setInactivatedReason(objTempLDP.getInactivatedReason()); //ST
		if(objTempLDP.getVisitingHours().size() != 0)
			objLDP.setVisitingHours(objTempLDP.getVisitingHours()); //VH
		objLDP.setContactPhone(objTempLDP.getContactPhone());//XTN
		return objLDP;
	}
	
	
	/**
	 * populate LCC Segment
	 * @return objLCC object LCC of Segment
	 */
	public LCC populateLCC()
	{
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		LCC objLCC = new LCC();
		objLCC.setPrimaryKeyValueLCC(PopulateDataType.populatePL(HL7Constants.HL7_COMPONENT));//PL
		objLCC.setLocationDepartment(objCWE); //CWE
		objLCC.addChargeCode(objCWE); //CWE
		return objLCC;
	}

	/**
	 /** populate LCC Segment
	 * @return objLCC object LCC of Segment
	 */ 
	public LCC populateLCC(LCC objTempLCC)
	{
		LCC objLCC = new LCC();
		objLCC.setPrimaryKeyValueLCC(objTempLCC.getPrimaryKeyValueLCC());//PL
		objLCC.setLocationDepartment(objTempLCC.getLocationDepartment()); //CWE
		if(objTempLCC.getChargeCode().size() != 0)
			objLCC.setChargeCode(objTempLCC.getChargeCode()); //CWE
		return objLCC;
	}
	
	
	
	/**
	 * populate CM0 Segment
	 * @return objCM0 object CM0 of Segment
	 */
	public CM0 populateCM0()
	{
		CM0 objCM0 = new CM0();


		objCM0.setSetID_CM0("2"); //SI
		objCM0.setSponsorStudyID("Entity Identifier", "NAMESPACWE", "UniversalId", "x500");//EI
		objCM0.setTitleofStudy("OnsetDateText"); //ST
		objCM0.setLastIRBApprovalDate("19850212");//DT
		objCM0.addContactforStudy(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));//XCN
		objCM0.setContactTelephoneNumber(PopulateDataType.populateXTN(HL7Constants.HL7_COMPONENT));//XTN
		objCM0.addContactAddress(PopulateDataType.populateXAD(HL7Constants.HL7_COMPONENT));//XAD
		return objCM0;
	}

	/**
	 /** populate CM0 Segment
	 * @return objCM0 object CM0 of Segment
	 */ 
	public CM0 populateCM0(CM0 objTempCM0)
	{
		CM0 objCM0 = new CM0();

		objCM0.setSetID_CM0(objTempCM0.getSetID_CM0()); //SI
		objCM0.setSponsorStudyID(objTempCM0.getSponsorStudyID());//EI
		objCM0.setTitleofStudy(objTempCM0.getTitleofStudy()); //ST
		objCM0.setLastIRBApprovalDate(objTempCM0.getLastIRBApprovalDate());//DT
		if(objTempCM0.getContactforStudy().size() != 0)
			objCM0.setContactforStudy(objTempCM0.getContactforStudy());//XCN
		objCM0.setContactTelephoneNumber(objTempCM0.getContactTelephoneNumber());//XTN
		if(objTempCM0.getContactAddress().size() != 0)
			objCM0.setContactAddress(objTempCM0.getContactAddress());//XAD
		return objCM0;
	}

	/**
	 * populate CM1 Segment
	 * @return objCM1 object CM1 of Segment
	 */
	public CM1 populateCM1()
	{
		CM1 objCM1 = new CM1();

		objCM1.setSetID_CM1("2");//SI
		objCM1.setStudyPhaseIdentifier(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT)); //CWE
		objCM1.setDescriptionofStudyPhase("OnsetDateText"); //ST

		return objCM1;
	}

	/**
	 /** populate CM1 Segment
	 * @return objCM1 object CM1 of Segment
	 */ 
	public CM1 populateCM1(CM1 objTempCM1)
	{
		CM1 objCM1 = new CM1();

		objCM1.setSetID_CM1(objTempCM1.getSetID_CM1());//SI
		objCM1.setStudyPhaseIdentifier(objTempCM1.getStudyPhaseIdentifier()); //CWE
		objCM1.setDescriptionofStudyPhase(objTempCM1.getDescriptionofStudyPhase()); //ST

		return objCM1;
	}

	/**
	 * populate CM2 Segment
	 * @return objCM2 object CM2 of Segment
	 */
	public CM2 populateCM2()
	{
		CM2 objCM2 = new CM2();

		objCM2.setSetID_CM2("2"); //SI
		objCM2.setScheduledTimePoint(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT)); //CWE
		objCM2.addEventsScheduledThisTimePoint(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT)); //CWE

		return objCM2;
	}

	/**
	 /** populate CM2 Segment
	 * @return objCM2 object CM2 of Segment
	 */ 
	public CM2 populateCM2(CM2 objTempCM2)
	{
		CM2 objCM2 = new CM2();
		objCM2.setSetID_CM2(objTempCM2.getSetID_CM2()); //SI
		objCM2.setScheduledTimePoint(objTempCM2.getScheduledTimePoint()); //CWE
		if(objTempCM2.getEventsScheduledThisTimePoint().size() != 0)
			objCM2.setEventsScheduledThisTimePoint(objTempCM2.getEventsScheduledThisTimePoint()); //CWE

		return objCM2;
	}
	
	/**
	 * populate SGH segement
	 * return SGH
	 */
	public SGH populateSGH()
	{
		//SGH Segment
		SGH objSGH=new SGH();
		objSGH.setSegmentGroupName("HL7");
		objSGH.setSetID_SGH("1");
		
		return objSGH;
	}
	
	/**
	 * populate SGH segement
	 * return SGH
	 */
	public SGH populateSGH(SGH objTempSGH)
	{
		//SGH Segment
		SGH objSGH=new SGH();
		objSGH.setSegmentGroupName(objTempSGH.getSegmentGroupName());
		objSGH.setSetID_SGH(objTempSGH.getSetID_SGH());
		
		return objSGH;
	}
	
	/**
	 * populate SGT Segment
	 * @return SGT
	 */
	public SGT populateSGT()
	{
		//SGt Segment
		SGT objSGT=new SGT();
		objSGT.setSegmentGroupName("HL7");
		objSGT.setSetID_SGT("1");
		
		return objSGT;
	}
	
	/**
	 * populate SGT Segment
	 * @return SGT
	 */
	public SGT populateSGT(SGT objTempSGT)
	{
		//SGt Segment
		SGT objSGT=new SGT();
		objSGT.setSegmentGroupName(objTempSGT.getSegmentGroupName());
		objSGT.setSetID_SGT(objTempSGT.getSetID_SGT());
		
		return objSGT;
	}
	
	/**
	 * populate SHP Segment
	 * @return SHP
	 */
	public SHP populateSHP()
	{
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		EI objEI=PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT);
		
		//SHP Segment
		SHP objSHP=new SHP();
		objSHP.addInternalShipmentID(objEI);
		objSHP.addShipmentCondition(objCWE);
		objSHP.addShipmentConfidentiality(objCWE);
		objSHP.addShipmentHandlingCode(objCWE);
		objSHP.setShipmentID(objEI);
		objSHP.setShipmentStatusDateTime("20170707");

		return objSHP;
	}
	
	/**
	 * populate SHP Segment
	 * @return SHP
	 */
	public SHP populateSHP(SHP objTempSHP)
	{
		
		//SHP Segment
		SHP objSHP=new SHP();
		if(objTempSHP.getInternalShipmentID().size()!=0)
			objSHP.setInternalShipmentID(objTempSHP.getInternalShipmentID());
		if(objTempSHP.getShipmentCondition().size()!=0)
			objSHP.setShipmentCondition(objTempSHP.getShipmentCondition());
		if(objTempSHP.getShipmentCondidentiality().size()!=0)
			objSHP.setShipmentConfidentiality(objTempSHP.getShipmentCondidentiality());
		if(objTempSHP.getShipmentHandlingCode().size()!=0)
			objSHP.setShipmentHandlingCode(objTempSHP.getShipmentHandlingCode());
		objSHP.setShipmentID(objTempSHP.getShipmentID());
		objSHP.setShipmentStatusDateTime(objTempSHP.getShipmentStatusDateTime());

		return objSHP;
	}
	
	/**
	 * populate PAC Segment
	 * @return PAC
	 */
	public PAC populatePAC()
	{
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		EI objEI=PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT);
		
		//PAC Segment
		PAC objPAC=new PAC();
		objPAC.setPackageID(objEI);
		objPAC.setPackageType(objCWE);
		objPAC.setParentPackageID(objEI);
		objPAC.setPositionInParentPackage(PopulateDataType.populateNA(HL7Constants.HL7_COMPONENT));
		objPAC.setSetID_PAC("1");
		
		return objPAC;
	}
	
	/**
	 * populate PAC Segment
	 * @return PAC
	 */
	public PAC populatePAC(PAC objTempPAC)
	{
		
		//PAC Segment
		PAC objPAC=new PAC();
		objPAC.setSetID_PAC(objTempPAC.getSetID_PAC());
		objPAC.setPackageID(objTempPAC.getPackageID());
		objPAC.setParentPackageID(objTempPAC.getParentPackageID());
		objPAC.setPositionInParentPackage(objTempPAC.getPositionInParentPackage());
		objPAC.setPackageType(objTempPAC.getPackageType());
		
		return objPAC;
	}
	
	
	/**
	 * populate RXV Segment
	 * @retrun RXV
	 */
	public RXV populateRXV()
	{
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		
		//RXV Segment
		RXV objRXV=new RXV();
		objRXV.setActionCode("A");
		objRXV.setBolusDoseVolumeUnits(objCWE);
		objRXV.setBolusType("C");
		objRXV.setLockoutInterval("20",PopulateDataType.populateCWE(HL7Constants.HL7_SUBCOMPONENT));
		objRXV.setMaxDoseAmountVolume(PopulateDataType.populateNM(HL7Constants.HL7_SUBCOMPONENT));
		objRXV.setMaxDoseAmountVolumeUnits(objCWE);
		objRXV.setPCAType("PC");
		objRXV.setSetID_RXV("ID12");
		objRXV.setSyringeManufacturer(objCWE);
		objRXV.setSyringeModelNumber(objCWE);
		objRXV.setSyringeSizeUnits(objCWE);
	
		return objRXV;
	}
	
	/**
	 * populate RXV Segment
	 * @retrun RXV
	 */
	public RXV populateRXV(RXV objTempRXV)
	{
		
		//RXV Segment
		RXV objRXV=new RXV();
		objRXV.setActionCode(objTempRXV.getActionCode());
		objRXV.setBolusDoseVolumeUnits(objTempRXV.getBolusDoseVolumeUnits());
		objRXV.setBolusType(objTempRXV.getBolusType());
		objRXV.setLockoutInterval(objTempRXV.getLockoutInterval());
		objRXV.setMaxDoseAmountVolume(objTempRXV.getMaxDoseAmountVolume());
		objRXV.setMaxDoseAmountVolumeUnits(objTempRXV.getMaxDoseAmountVolumeUnits());
		objRXV.setPCAType(objTempRXV.getPCAType());
		objRXV.setSetID_RXV(objTempRXV.getSetID_RXV());
		objRXV.setSyringeManufacturer(objTempRXV.getSyringeManufacturer());
		objRXV.setSyringeModelNumber(objTempRXV.getSyringeModelNumber());
		objRXV.setSyringeSizeUnits(objTempRXV.getSyringeSizeUnits());
	
		return objRXV;
	}
	
	
	/**
	 * populates REL Segment
	 * @return REL
	 */
	public REL populateREL()
	{
		
		
		CWE objCWE = PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		XCN objXCN =PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT);
		XON objXON =PopulateDataType.populateXON(HL7Constants.HL7_COMPONENT);
		XAD objXAD=PopulateDataType.populateXAD(HL7Constants.HL7_COMPONENT);
		XTN objXTN =PopulateDataType.populateXTN(HL7Constants.HL7_COMPONENT);

		//REL Segment
		REL objREL = new REL();
		objREL.setSetID_REL("1");
		objREL.setRelationshipType(objCWE);
		objREL.setThisRelationshipInstanceIdentifier(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));
		objREL.setSourceInformationInstanceIdentifier(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));
		objREL.setTargetInformationInstanceIdentifier(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));
		objREL.setAssertingPerson(objXCN);//XCN
		objREL.setAssertingOrganization(objXON);//XON
		objREL.setAssertorAddress(objXAD);//XAD
		objREL.setAssertorContact(objXTN);//XTN
		objREL.setAssertionDateRange(PopulateDataType.populateDR(HL7Constants.HL7_COMPONENT));
		objREL.setCertaintyofRelationship(objCWE);
		
		return objREL;		
	}

	/**
	 /** populates REL Segment
	 * @return REL
	 */ 
	public REL populateREL(REL objTempREL)
	{
		//REL Segment
		REL objREL = new REL();
		objREL.setSetID_REL(objTempREL.getSetID_REL());
		objREL.setRelationshipType(objTempREL.getRelationshipType());
		objREL.setThisRelationshipInstanceIdentifier(objTempREL.getThisRelationshipInstanceIdentifier());
		objREL.setSourceInformationInstanceIdentifier(objTempREL.getSourceInformationInstanceIdentifier());
		objREL.setTargetInformationInstanceIdentifier(objTempREL.getTargetInformationInstanceIdentifier());
		objREL.setAssertingPerson(objTempREL.getAssertingPerson());//XCN
		objREL.setAssertingOrganization(objTempREL.getAssertingOrganization());//XON
		objREL.setAssertorAddress(objTempREL.getAssertorAddress());//XAD
		objREL.setAssertorContact(objTempREL.getAssertorContact());//XTN
		objREL.setAssertionDateRange(objTempREL.getAssertionDateRange());
		objREL.setCertaintyofRelationship(objTempREL.getCertaintyofRelationship());
		return objREL;		
	}
	
	/**
	 * Populate PRT Segment
	 * @return PRT
	 */
	public PRT populatePRT()
	{
		EI objEI=PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT);
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		XCN objXCN=PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT);
		XON objXON=PopulateDataType.populateXON(HL7Constants.HL7_COMPONENT);
		PL objPL=PopulateDataType.populatePL(HL7Constants.HL7_COMPONENT);
		
		PRT objPRT=new PRT();
		objPRT.setParticipationInstanceID(objEI);
		objPRT.setActionCode("AD");
		objPRT.setParticipation(objCWE);
		objPRT.addParticipationPerson(objXCN);
		objPRT.setParticipationPersonProviderType(objCWE);
		objPRT.setParticipationOrganizationUnitType(objCWE);
		objPRT.addParticipationOrganization(objXON);
		objPRT.addParticipationLocation(objPL);
		objPRT.addParticipationDevice(objEI);
		objPRT.setParticipationQualitativeDuration(objCWE);
		objPRT.addParticipationAddress(PopulateDataType.populateXAD(HL7Constants.HL7_COMPONENT));
		objPRT.addParticipantTelecommunicationAddress(PopulateDataType.populateXTN(HL7Constants.HL7_COMPONENT));
		objPRT.setParticipantDeviceIdentifier(objEI);
		objPRT.setParticipationDeviceDonationIdentification(objEI);
		objPRT.setParticipationDeviceType(PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT));
		return objPRT;
	}
	/**
	 * Populate PRT Segment
	 * @return PRT
	 */
	public PRT populatePRT(PRT objTempPRT)
	{
		PRT objPRT=new PRT();
		objPRT.setParticipationInstanceID(objTempPRT.getParticipationInstanceID());
		objPRT.setActionCode(objTempPRT.getActionCode());
		objPRT.setParticipation(objTempPRT.getParticipation());
		if(objTempPRT.getParticipationPerson().size() != 0)
			objPRT.setParticipationPerson(objTempPRT.getParticipationPerson());
		objPRT.setParticipationPersonProviderType(objTempPRT.getParticipationPersonProviderType());
		objPRT.setParticipationOrganizationUnitType(objTempPRT.getParticipationOrganizationUnitType());
		if(objTempPRT.getParticipationOrganization().size() != 0)
			objPRT.setParticipationOrganization(objTempPRT.getParticipationOrganization());
		if(objTempPRT.getParticipationLocation().size() != 0)
			objPRT.setParticipationLocation(objTempPRT.getParticipationLocation());
		if(objTempPRT.getParticipationDevice().size() != 0)
			objPRT.setParticipationDevice(objTempPRT.getParticipationDevice());
		objPRT.setParticipationQualitativeDuration(objTempPRT.getParticipationQualitativeDuration());
		if(objTempPRT.getParticipationAddress().size() != 0)
			objPRT.setParticipationAddress(objTempPRT.getParticipationAddress());
		if(objTempPRT.getParticipationTelecommunicationAddress().size() != 0)
			objPRT.setParticipantTelecommunicationAddress(objTempPRT.getParticipationTelecommunicationAddress());
		objPRT.setParticipantDeviceIdentifier(objTempPRT.getParticipationDeviceIdentifier());
		objPRT.setParticipationDeviceDonationIdentification(objTempPRT.getParticipationDeviceDonationIdentification());
		objPRT.setParticipationDeviceType(objTempPRT.getParticipationDeviceType());
		return objPRT;
	}

	/**
	 * popukate IAR Segment
	 * @return IAR
	 */
	public IAR populateIAR()
	{
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		//IAR Segment
		IAR objIAR=new IAR();
		objIAR.setAllergyReactionCode(objCWE);
		objIAR.setAllergySeverityCode(objCWE);
		objIAR.setSensitivityToCausativeAgentCode(objCWE);

		return objIAR;
	}
	
	/**
	 * popukate IAR Segment
	 * @return IAR
	 */
	public IAR populateIAR(IAR objTempIAR)
	{
		
		//IAR Segment
		IAR objIAR=new IAR();
		objIAR.setAllergyReactionCode(objTempIAR.getAllergyReactionCode());
		objIAR.setAllergySeverityCode(objTempIAR.getAllergySeverityCode());
		objIAR.setSensitivityToCausativeAgentCode(objTempIAR.getSensitivityToCausativeAgentCode());

		return objIAR;
	}
	
	/**
	 * populate DMI Segment
	 * @return objDMI object of DMI Segment
	 */
	public DMI populateDMI()
	{
		DMI objDMI = new DMI();
		objDMI.setMajorDiagnosticCategory(PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT));
		objDMI.setLowerAndUpperTrimPoints(PopulateDataType.populateNR(HL7Constants.HL7_COMPONENT));
		objDMI.setAverageLengthOfStay("50");
		objDMI.setRelativeWeight("70");
		return objDMI;
	}
	/**
	 * populate DMI Segment
	 * @return objDMI object of DMI Segment
	 */
	public DMI populateDMI(DMI objTempDMI)
	{
		DMI objDMI = new DMI();
		objDMI.setMajorDiagnosticCategory(objTempDMI.getMajorDiagnosticCategoryGroup());
		objDMI.setLowerAndUpperTrimPoints(objTempDMI.getLowerAndUpperTrimPoints());
		objDMI.setAverageLengthOfStay(objTempDMI.getAverageLengthOfStay());
		objDMI.setRelativeWeight(objTempDMI.getRelativeWeight());
		return objDMI;
	}
	
	/**
	 * populates CON Segment
	 * @return CON
	 */
	public ConsentSeg populateCON()
	{
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		
		//CON Segment
		ConsentSeg objCON=new ConsentSeg();
		objCON.setConsentBypassReason(objCWE);
		objCON.setConsentDiscussionDateTime("20170315");
		objCON.setConsentEffectiveDateTime("20170315");
		objCON.setConsentEndDateTime("20170316");
		objCON.addConsenterID(PopulateDataType.populateXPN(HL7Constants.HL7_COMPONENT));
		objCON.setConsentFormNumber(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));
		objCON.setConsentMode(PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT));
		objCON.setConsentNondisclosureReason(objCWE);
		objCON.setConsentStatus(PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT));
		objCON.setConsentType(objCWE);
		objCON.setLanguageTranslatedTo(objCWE);
		objCON.setNonsubjectConsenterReason(objCWE);
		objCON.addRelationshipToSubject(objCWE);
		objCON.setSetID_CON("1");
		objCON.addSubjectspecificConsentBackgroundText("SUB");
		
		return objCON;
	}
	
	/**
	 * populates CON Segment
	 * @return CON
	 */
	public ConsentSeg populateCON(ConsentSeg objTempCON)
	{
		
		//CON Segment
		ConsentSeg objCON=new ConsentSeg();
		objCON.setConsentBypassReason(objTempCON.getConsentBypassReason());
		objCON.setConsentDiscussionDateTime(objTempCON.getConsentDiscussionDateTime());
		objCON.setConsentEffectiveDateTime(objTempCON.getConsentEffectiveDateTime());
		objCON.setConsentEndDateTime(objTempCON.getConsentEndDateTime());
		if(objTempCON.getConsenterID().size()!=0 )
			objCON.setConsenterID(objTempCON.getConsenterID());
		objCON.setConsentFormNumber(objTempCON.getConsentFormNumber());
		objCON.setConsentMode(objTempCON.getConsentMode());
		objCON.setConsentNondisclosureReason(objTempCON.getConsentNondisclosureReason());
		objCON.setConsentStatus(objTempCON.getConsentStatus());
		objCON.setConsentType(objTempCON.getConsentType());
		objCON.setLanguageTranslatedTo(objTempCON.getLanguageTranslatedTo());
		objCON.setNonsubjectConsenterReason(objTempCON.getNonsubjectConsenterReason());
		if(objTempCON.getRelationshiptoSubject().size()!=0)
			objCON.setRelationshipToSubject(objTempCON.getRelationshiptoSubject());
		objCON.setSetID_CON(objTempCON.getSetID_CON());
		if(objTempCON.getSubjectspecificConsentBackgroundText().size()!=0)
			objCON.setSubjectspecificConsentBackgroundText(objTempCON.getSubjectspecificConsentBackgroundText());
		return objCON;
	}
	
	/**
	 * populates CDO Segment
	 * @return CDO
	 */
	public CDO populateCDO()
	{
		
		//CDO Segment
		CDO objCDO=new CDO();
		objCDO.setActionCode("A");
		objCDO.setCumulativeDosageLimit("20",PopulateDataType.populateCWE(HL7Constants.HL7_SUBCOMPONENT));
		objCDO.setCumulativeDosageLimitTimeInterval("20",PopulateDataType.populateCWE(HL7Constants.HL7_SUBCOMPONENT));
		objCDO.setSetID_CDO("1");
		
		return objCDO;
	}
	
	/** populate CDO segment
	 * @return CDO
	 */
	public CDO populateCDO(CDO objTempCDO)
	{
		//CDO segment
		CDO objCDO=new CDO();
		objCDO.setActionCode(objTempCDO.getActionCode());
		objCDO.setCumulativeDosageLimit(objTempCDO.getCumulativeDosageLimit());
		objCDO.setCumulativeDosageLimitTimeInterval(objTempCDO.getCumulativeDosageLimitTimeInterval());
		objCDO.setSetID_CDO(objTempCDO.getSetID_CDO());
		
		return objCDO;
	}
	
	/**
	 * Populate ARV Segment
	 * @return ARV
	 */
	public ARV populateARV()
	{
	
		ARV objARV=new ARV();
		objARV.setAccessRestrictionActionCode(PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT));
		objARV.setAccessRestrictionDateRange(PopulateDataType.populateDR(HL7Constants.HL7_COMPONENT));
		objARV.setSetID("1");
		objARV.addAccessRestrictionReason(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));
		objARV.setAccessRestrictionValue(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));
		return objARV;
	}
	
	/**
	 * Populate ARV Segment
	 * @return ARV
	 */
	public ARV populateARV(ARV objTempARV)
	{
		
		ARV objARV=new ARV();
		objARV.setAccessRestrictionActionCode(objTempARV.getAccessRestrictionActionCode());
		objARV.setAccessRestrictionDateRange(objTempARV.getAccessRestrictionDateRange());
		objARV.setSetID(objTempARV.getSetID());
		if(objTempARV.getAccessRestrictionReason().size() != 0 )
			objARV.setAccessRestrictionReason(objTempARV.getAccessRestrictionReason());
		objARV.setAccessRestrictionValue(objTempARV.getAccessRestrictionValue());
		return objARV;
	}
	
	/**
	 * populates OMC Segment
	 * @return OMC
	 */
	public OMC populateOMC()
	{
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		//OMC segment
		OMC objOMC = new OMC();
		objOMC.setSequenceNumberTestObservationMasterFile("12");
		objOMC.setSegmentActionCode("A");
		objOMC.setSegmentUniqueKey(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));
		objOMC.setClinicalInformationRequest(objCWE);
		objOMC.addCollectionEventProcessStepLimit(objCWE);
		objOMC.setCommunicationLocation(objCWE);
		ISingleCollection<IDataType> userParameters = new SingleCollection<IDataType>();
		HD objHD = PopulateDataType.populateHD(HL7Constants.HL7_SUBCOMPONENT);
		
		SAD objStreetAddress = PopulateDataType.populateSAD(HL7Constants.HL7_SUBCOMPONENT);
		
		userParameters.add(objHD);
		userParameters.add(objStreetAddress);
		
		return objOMC;
	}

	/** populates OMC Segment
	 * @return OMC
	 */ 
	public OMC populateOMC(OMC objTempOMC)
	{
		//OMC segment
		OMC objOMC = new OMC();
		objOMC.setSequenceNumberTestObservationMasterFile(objTempOMC.getSequenceNumberTestObservationMasterFile());
		objOMC.setSegmentActionCode(objTempOMC.getSegmentActionCode());
		objOMC.setSegmentUniqueKey(objTempOMC.getSegmentUniqueKey());
		objOMC.setClinicalInformationRequest(objTempOMC.getClinicalInformationRequest());
		if(objTempOMC.getCollectionEventProcessStepLimit().size() != 0)
			objOMC.setCollectionEventProcessStepLimit(objTempOMC.getCollectionEventProcessStepLimit());
		objOMC.setCommunicationLocation(objTempOMC.getCommunicationLocation());
		if(objTempOMC.getTypeOfAnswer().size() != 0)
			objOMC.setTypeOfAnswer(objTempOMC.getTypeOfAnswer());
		return objOMC;
	}

	/**
	 * populates PSH Segment
	 * @return PSH
	 */
	public PSH populatePSH()
	{
		
		//PSH segment
		PSH objPSH = new PSH();
		objPSH.setReportType("Clinical");
		objPSH.setReportDate("20170707");
		objPSH.setReportIntervalStartDate("20170707");
		objPSH.setReportIntervalEndDate("20171231");
		objPSH.setQuantityinUse("50",PopulateDataType.populateCWE(HL7Constants.HL7_SUBCOMPONENT));
		objPSH.setQuantityinUseMethod("A");
		objPSH.setQuantityinUseComment("E");
		objPSH.addNoOfProductExpReportFiledByFacility("10");
		objPSH.addNoOfProductExpReportFiledByDistributor("20");
		
		return objPSH;
		
	}
	/**
	 * populates PSH Segment
	 * @return PSH
	 */
	public PSH populatePSH(PSH objTempPSH)
	{
		//PSH segment
		PSH objPSH = new PSH();
		objPSH.setReportType(objTempPSH.getReportType());
		objPSH.setReportDate(objTempPSH.getReportDate());
		objPSH.setReportIntervalStartDate(objTempPSH.getReportIntervalStartDate());
		objPSH.setReportIntervalEndDate(objTempPSH.getReportIntervalEndDate());
		objPSH.setQuantityinUse(objTempPSH.getQuantityinUse());
		objPSH.setQuantityinUseMethod(objTempPSH.getQuantityinUseMethod());
		objPSH.setQuantityinUseComment(objTempPSH.getQuantityinUseComment());
		if(objTempPSH.getNoOfProductExpReportFiledByFacility().size() != 0)
			objPSH.setNoOfProductExpReportFiledByFacility(objTempPSH.getNoOfProductExpReportFiledByFacility());
		if(objTempPSH.getNoOfProductExpReportFiledByDistributor().size() != 0)
			objPSH.setNoOfProductExpReportFiledByDistributor(objTempPSH.getNoOfProductExpReportFiledByDistributor());
		
		return objPSH;
	}
	
	/**
	 * populates OVR Segment
	 * @return OVR
	 */
	public OVR populateOVR()
	{
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		//OVR segment
		OVR objOVR = new OVR();
		objOVR.setbusinessRuleOverrideType(objCWE);
		objOVR.setbusinessRuleOverrideCode(objCWE);
		objOVR.setoverrideEnteredBy(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));
		objOVR.setoverrideAuthorizedBy(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));
		
		return objOVR;
	}
	/**
	 * populates OVR Segment
	 * @return OVR
	 */
	public OVR populateOVR(OVR objTempOVR)
	{
		//OVR segment
		OVR objOVR = new OVR();
	
		objOVR.setbusinessRuleOverrideType(objTempOVR.getbusinessRuleOverrideType());
		objOVR.setbusinessRuleOverrideCode(objTempOVR.getbusinessRuleOverrideCode());
		objOVR.setoverrideEnteredBy(objTempOVR.getoverrideEnteredBy());
		objOVR.setoverrideAuthorizedBy(objTempOVR.getoverrideAuthorizedBy());

		return objOVR;
		
	}
	
	/**
	 * populates PM1 Segment
	 * @return PM1
	 */
	public PM1 populatePM1()
	{
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		//PM1 segment
		PM1 objPM1 = new PM1();
		objPM1.setHealthPlanID(objCWE);
		objPM1.addInsuranceCompanyID(PopulateDataType.populateCX(HL7Constants.HL7_COMPONENT));
		objPM1.addInsuranceCompanyName(PopulateDataType.populateXON(HL7Constants.HL7_COMPONENT));
		objPM1.addInsuranceCompanyAddr(PopulateDataType.populateXAD(HL7Constants.HL7_COMPONENT));
		objPM1.addInsuranceCoContactPerson(PopulateDataType.populateXPN(HL7Constants.HL7_COMPONENT));
		objPM1.addInsuranceCoPhoneNumber(PopulateDataType.populateXTN(HL7Constants.HL7_COMPONENT));
		return objPM1;
	}
	/**
	 * populates PM1 Segment
	 * @return PM1
	 */
	public PM1 populatePM1(PM1 objTempPM1)
	{
		
		//PM1 segment
		PM1 objPM1 = new PM1();
		objPM1.setHealthPlanID(objTempPM1.getHealthPlanID());
		if(objTempPM1.getInsuranceCompanyID().size() != 0)
			objPM1.setInsuranceCompanyID(objTempPM1.getInsuranceCompanyID());
		if(objTempPM1.getInsuranceCompanyName().size() != 0)
			objPM1.setInsuranceCompanyName(objTempPM1.getInsuranceCompanyName());
		if(objTempPM1.getInsuranceCompanyAddr().size() !=0)
			objPM1.setInsuranceCompanyAddr(objTempPM1.getInsuranceCompanyAddr());
		if(objTempPM1.getInsuranceCoContactPerson().size() !=0)
			objPM1.setInsuranceCoContactPerson(objTempPM1.getInsuranceCoContactPerson());
		if(objTempPM1.getInsuranceCoPhoneNumber().size() !=0)
			objPM1.setInsuranceCoPhoneNumber(objTempPM1.getInsuranceCoPhoneNumber());
	
		return objPM1;
	}
	
	/**
	 * populates PDC Segment
	 * @return PDC
	 */
	public PDC populatePDC()
	{
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		//PDC segment
		PDC objPDC = new PDC();
		objPDC.addManufacturerDistributor(PopulateDataType.populateXON(HL7Constants.HL7_COMPONENT));
		objPDC.setCountry(objCWE);
		objPDC.setBrandName("CDAC");
		objPDC.setDeviceFamilyName("CDAC_RND");
		objPDC.setGenericName(objCWE);
		objPDC.setProductCode(objCWE);
		objPDC.setMarketingBasis("PMA");
		objPDC.setDateFirstMarketed("20170220");
		objPDC.setDateLastMarketed("20170707");
		return objPDC;
	}
	/**
	 * populates PDC Segment
	 * @return PDC
	 */
	public PDC populatePDC(PDC objTempPDC)
	{
		
		//PDC segment
		PDC objPDC = new PDC();
		if(objTempPDC.getManufacturerDistributor().size() != 0)
			objPDC.setManufacturerDistributor(objTempPDC.getManufacturerDistributor());
		objPDC.setCountry(objTempPDC.getCountry());
		objPDC.setBrandName(objTempPDC.getBrandName());
		objPDC.setDeviceFamilyName(objTempPDC.getDeviceFamilyName());
		objPDC.setGenericName(objTempPDC.getGenericName());
		objPDC.setProductCode(objTempPDC.getProductCode());
		objPDC.setMarketingBasis(objTempPDC.getMarketingBasis());
		objPDC.setDateFirstMarketed(objTempPDC.getDateFirstMarketed());
		objPDC.setDateLastMarketed(objTempPDC.getDateLastMarketed());
		return objPDC;
	}
	/**
	 * populates MCP Segment
	 * @return MCP
	 */
	public MCP populateMCP()
	{
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		//MCP segment
		MCP objMCP = new MCP();
		objMCP.setSetID_MCP("1");
		objMCP.setProducerServiceTestObservationID(objCWE);
		objMCP.setUniversalServicePriceRange_LowValue("35", "USD");
		objMCP.setUniversalServicePriceRange_HighValue("60", "USD");
		return objMCP;
		
	}
	/**
	 * populates MCP Segment
	 * @return MCP
	 */
	public MCP populateMCP(MCP objTempMCP)
	{
		
		//MCP segment
		MCP objMCP = new MCP();
		objMCP.setSetID_MCP(objTempMCP.getSetID_MCP());
		objMCP.setProducerServiceTestObservationID(objTempMCP.getProducerServiceTestObservationID());
		objMCP.setUniversalServicePriceRange_LowValue(objTempMCP.getUniversalServicePriceRange_LowValue());
		objMCP.setUniversalServicePriceRange_HighValue(objTempMCP.getUniversalServicePriceRange_HighValue());
		return objMCP;
		
	}
	
	/**
	 * populates FTS Segment
	 * @return FTS
	 */
	public FTS populateFTS()
	{
		
		//FTS segment
		FTS objFTS = new FTS();
		objFTS.setFileBatchCount("5");
		objFTS.setFileTrailerComment("EndofFile");
		return objFTS;
	}
	/**
	 * populates FTS Segment
	 * @return FTS
	 */
	public FTS populateFTS(FTS objTempFTS)
	{
		
		//FTS segment
		FTS objFTS = new FTS();
		objFTS.setFileBatchCount(objTempFTS.getFileBatchCount());
		objFTS.setFileTrailerComment(objTempFTS.getFileTrailerComment());
		return objFTS;
	}
	
	/**
	 * populates FHS Segment
	 * @return FHS
	 */
	public FHS populateFHS()
	{
		
		//FHS segment
		FHS objFHS = new FHS();
		objFHS.setFieldSeparator(PopulateDataType.populateST(HL7Constants.HL7_COMPONENT));
		objFHS.setEncodingChars(PopulateDataType.populateST(HL7Constants.HL7_COMPONENT));
		objFHS.setSendingApplication(PopulateDataType.populateHD(HL7Constants.HL7_COMPONENT));
		objFHS.setSendingFacility(PopulateDataType.populateHD(HL7Constants.HL7_COMPONENT));
		objFHS.setReceivingApplication(PopulateDataType.populateHD(HL7Constants.HL7_COMPONENT));
		objFHS.setReceivingFacility(PopulateDataType.populateHD(HL7Constants.HL7_COMPONENT));
		objFHS.setFileSendingNetworkAddress(PopulateDataType.populateHD(HL7Constants.HL7_COMPONENT));
		objFHS.setFileReceivingNetworkAddress(PopulateDataType.populateHD(HL7Constants.HL7_COMPONENT));
		return objFHS;
	}
	
	/**
	 * populates FHS Segment
	 * @return FHS
	 */
	public FHS populateFHS(FHS objTempFHS)
	{
		
		//FHS segment
		FHS objFHS = new FHS();
		objFHS.setFieldSeparator(objTempFHS.getFieldSeparator());
		objFHS.setEncodingChars(objTempFHS.getEncodingChar());
		objFHS.setSendingApplication(objTempFHS.getSendingApplication());
		objFHS.setSendingFacility(objTempFHS.getSendingFacility());
		objFHS.setReceivingApplication(objTempFHS.getReceivingApplication());
		objFHS.setReceivingFacility(objTempFHS.getReceivingFacility());
		objFHS.setFileSendingNetworkAddress(objTempFHS.getFileSendingNetworkAddress());
		objFHS.setFileReceivingNetworkAddress(objTempFHS.getFileReceivingNetworkAddress());
		return objFHS;
	}
	/**
	 * populates FAC Segment
	 * @return FAC
	 */
	public FAC populateFAC()
	{
		
		//FAC segment
		FAC objFAC = new FAC();
		objFAC.setFacilityID_FAC(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));
		objFAC.setFacilityType("U");
		objFAC.addFacilityAddress(PopulateDataType.populateXAD(HL7Constants.HL7_COMPONENT));
		objFAC.setFacilityTelecommunication(PopulateDataType.populateXTN(HL7Constants.HL7_COMPONENT));
		objFAC.addContactPerson(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));
		objFAC.addContactAddress(PopulateDataType.populateXAD(HL7Constants.HL7_COMPONENT));
		objFAC.addContactTelecommunication(PopulateDataType.populateXTN(HL7Constants.HL7_COMPONENT));
		objFAC.addSignatureAuthority(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));
		objFAC.addSignatureAuthorityAddress(PopulateDataType.populateXAD(HL7Constants.HL7_COMPONENT));
		objFAC.setSignatureAuthorityTelecommunication(PopulateDataType.populateXTN(HL7Constants.HL7_COMPONENT));
		return objFAC;
	}
	/**
	 * populates FAC Segment
	 * @return FAC
	 */
	public FAC populateFAC(FAC objTempFAC)
	{
		
		//FAC segment
		FAC objFAC = new FAC();
		objFAC.setFacilityID_FAC(objTempFAC.getFacilityID_FAC());
		objFAC.setFacilityType(objTempFAC.getFacilityType());
		if(objTempFAC.getFacilityAddress().size() !=0)
			objFAC.setFacilityAddress(objTempFAC.getFacilityAddress());
		objFAC.setFacilityTelecommunication(objTempFAC.getFacilityTelecommunication());
		if(objTempFAC.getContactPerson().size() !=0)
			objFAC.setContactPerson(objTempFAC.getContactPerson());
		if(objTempFAC.getContactAddress().size() !=0)
			objFAC.setContactAddress(objTempFAC.getContactAddress());
		if(objTempFAC.getContactTelecommunication().size() !=0)
		objFAC.setContactTelecommunication(objTempFAC.getContactTelecommunication());
		if(objTempFAC.getSignatureAuthority().size() !=0)
			objFAC.setSignatureAuthority(objTempFAC.getSignatureAuthority());
		if(objTempFAC.getSignatureAuthorityAddress().size() !=0)
			objFAC.setSignatureAuthorityAddress(objTempFAC.getSignatureAuthorityAddress());
		objFAC.setSignatureAuthorityTelecommunication(objTempFAC.getSignatureAuthorityTelecommunication());
		return objFAC;
	}
	
	/**
	 * populates DPS Segment
	 * @return DPS
	 */
	public DPS populateDPS()
	{
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		//DPS segment
		DPS objDPS = new DPS();
		objDPS.setDiagnosisCode_MCP(objCWE);
		objDPS.addProcedureCode(objCWE);
		objDPS.setEffectiveDateTime("20170707");
		objDPS.setExpirationDateTime("20171231");
		return objDPS;
	}
	/**
	 * populates DPS Segment
	 * @return DPS
	 */
	public DPS populateDPS(DPS objTempDPS)
	{
		
		//DPS segment
		DPS objDPS = new DPS();
		objDPS.setDiagnosisCode_MCP(objTempDPS.getDiagnosisCode_MCP());
		if(objTempDPS.getProcedureCode().size() !=0)
			objDPS.setProcedureCode(objTempDPS.getProcedureCode());
		objDPS.setEffectiveDateTime(objTempDPS.getEffectiveDateTime());
		objDPS.setExpirationDateTime(objTempDPS.getExpirationDateTime());
		return objDPS;
	}
	/**
	 * populates DON Segment
	 * @return DON
	 */
	public DON populateDON()
	{
		
		EI objEI=PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT);
		CNE objCNE=PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT);
		//DON segment
		DON objDON = new DON();
		objDON.setDonationIdentificationNumber(objEI);
		objDON.setDonationType(objCNE);
		objDON.setPhlebotomyStartDateTime("20170707");
		objDON.setPhlebotomyEndDateTime("20170731");
		objDON.setDonationDuration("10");
		objDON.setDonationDurationUnits(objCNE);
		objDON.addIntendedProcedureType(objCNE);
		objDON.addActualProcedureType(objCNE);
		objDON.setDonorEligibilityFlag("Y");
		objDON.setDonorEligibilityDate("20170731");
		objDON.addDonorEligibilityProcedureType(objCNE);
		objDON.setProcessInterruption(objCNE);
		objDON.setProcessInterruptionReason(objCNE);
		objDON.addPhlebotomyIssue(objCNE);
		objDON.setIntendedRecipientBloodRelative("Y");
		objDON.setIntendedRecipientName(PopulateDataType.populateXPN(HL7Constants.HL7_COMPONENT));
		objDON.setIntendedRecipientDOB("19990909");
		objDON.setIntendedRecipientFacility(PopulateDataType.populateXON(HL7Constants.HL7_COMPONENT));
		objDON.setIntendedRecipientProcedureDate("strTime");
		objDON.setIntendedRecipientOrderingProvider(PopulateDataType.populateXPN(HL7Constants.HL7_COMPONENT));
		objDON.setPhlebotomyStatus(objCNE);
		objDON.setArmStick(objCNE);
		objDON.setBleedStartPhlebotomist(PopulateDataType.populateXPN(HL7Constants.HL7_COMPONENT));
		objDON.setBleedEndPhlebotomist(PopulateDataType.populateXPN(HL7Constants.HL7_COMPONENT));
		objDON.setAphaeresisMachineSerialNumber("strAphaeresisMachineSerialNumber");
		objDON.setAphaeresisTypeMachine(PopulateDataType.populateST(HL7Constants.HL7_COMPONENT));
		objDON.setDonorReaction("N");
		objDON.setFinalReviewStaffID(PopulateDataType.populateXPN(HL7Constants.HL7_COMPONENT));
		objDON.setFinalReviewDateTime("20170707");
		objDON.setNumberofTubesCollected("10");
		objDON.addDonationSampleIdentifier(objEI);
		objDON.setDonationAcceptStaff(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));
		objDON.addDonationMaterialReviewStaff(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));
		return objDON;
	}
	
	/**
	 * populates DON Segment
	 * @return DON
	 */
	public DON populateDON(DON objTempDON)
	{
		
		
		//DON segment
		DON objDON = new DON();
		objDON.setDonationIdentificationNumber(objTempDON.getDonationIdentificationNumber());
		objDON.setDonationType(objTempDON.getDonationType());
		objDON.setPhlebotomyStartDateTime(objTempDON.getPhlebotomyStartDateTime());
		objDON.setPhlebotomyEndDateTime(objTempDON.getPhlebotomyEndDateTime());
		objDON.setDonationDuration(objTempDON.getDonationDuration());
		objDON.setDonationDurationUnits(objTempDON.getDonationDurationUnits());
		if(objTempDON.getIntendedProcedureType().size() !=0)
			objDON.setIntendedProcedureType(objTempDON.getIntendedProcedureType());
		if(objTempDON.getActualProcedureType().size() !=0)	
			objDON.setActualProcedureType(objTempDON.getActualProcedureType());
		objDON.setDonorEligibilityFlag(objTempDON.getDonorEligibilityFlag());
		objDON.setDonorEligibilityDate(objTempDON.getDonorEligibilityDate());
		if(objTempDON.getDonorEligibilityProcedureType().size() !=0)
			objDON.setDonorEligibilityProcedureType(objTempDON.getDonorEligibilityProcedureType());
		objDON.setProcessInterruption(objTempDON.getProcessInterruption());
		objDON.setProcessInterruptionReason(objTempDON.getProcessInterruptionReason());
		if(objTempDON.getPhlebotomyIssue().size() !=0)
			objDON.setPhlebotomyIssue(objTempDON.getPhlebotomyIssue());
		objDON.setIntendedRecipientBloodRelative(objTempDON.getIntendedRecipientBloodRelative());
		objDON.setIntendedRecipientName(objTempDON.getIntendedRecipientName());
		objDON.setIntendedRecipientDOB(objTempDON.getIntendedRecipientDOB());
		objDON.setIntendedRecipientFacility(objTempDON.getIntendedRecipientFacility());
		objDON.setIntendedRecipientProcedureDate(objTempDON.getIntendedRecipientProcedureDate());
		objDON.setIntendedRecipientOrderingProvider(objTempDON.getIntendedRecipientOrderingProvider());
		objDON.setPhlebotomyStatus(objTempDON.getPhlebotomyStatus());
		objDON.setArmStick(objTempDON.getArmStick());
		objDON.setBleedStartPhlebotomist(objTempDON.getBleedStartPhlebotomist());
		objDON.setBleedEndPhlebotomist(objTempDON.getBleedEndPhlebotomist());
		objDON.setAphaeresisMachineSerialNumber(objTempDON.getAphaeresisMachineSerialNumber());
		objDON.setAphaeresisTypeMachine(objTempDON.getAphaeresisTypeMachine());
		objDON.setDonorReaction(objTempDON.getDonorReaction());
		objDON.setFinalReviewStaffID(objTempDON.getFinalReviewStaffID());
		objDON.setFinalReviewDateTime(objTempDON.getFinalReviewDateTime());
		objDON.setNumberofTubesCollected(objTempDON.getNumberofTubesCollected());
		if(objTempDON.getDonationSampleIdentifier().size() !=0)
			objDON.setDonationSampleIdentifier(objTempDON.getDonationSampleIdentifier());
		objDON.setDonationAcceptStaff(objTempDON.getDonationAcceptStaff());
		if(objTempDON.getDonationMaterialReviewStaff().size() !=0)
			objDON.setDonationMaterialReviewStaff(objTempDON.getDonationMaterialReviewStaff());
		return objDON;
	}
	
	/**
	 *populate ADD Segment
	 * @return objADD object of ADD Segment
	 */
	public ADD populateADD()
	{
		ADD objADD = new ADD();
		objADD.setAddendumContinuationPointer("strAddendumContinuationPointer");
		return objADD;
	}

	/**
	 * populate ADD Segment
	 * @return objADD object of ADD Segment
	 */ 
	public ADD populateADD(ADD objTempADD)
	{
		ADD objADD = new ADD();
		objADD.setAddendumContinuationPointer(objTempADD.getAddendumContinuationPointer());
		return objADD;
	}
	
	
	/**
	 * populate BHS Segment
	 * @return objBHS object of BHS Segment
	 */
	public BHS populateBHS()
	{
		
		ST objST=PopulateDataType.populateST(HL7Constants.HL7_COMPONENT);
		HD objHD = PopulateDataType.populateHD(HL7Constants.HL7_COMPONENT);
		
		BHS objBHS= new BHS();
		objBHS.setBatchFieldSeparator(objST);
		objBHS.setBatchEncodingChars(objST);
		objBHS.setBatchSendingApplication(objHD);
		objBHS.setBatchSendingFacility(objHD);
		objBHS.setBatchReceivingApplication(objHD);
		objBHS.setBatchReceivingFacility(objHD);
		return objBHS;
		
	}

	/**
	 * populate BHS Segment
	 * @return objBHS object of BHS Segment
	 */ 
	public BHS populateBHS(BHS objTempBHS)
	{
		BHS objBHS= new BHS();

		objBHS.setBatchFieldSeparator(objTempBHS.getBatchFieldSeparator());
		objBHS.setBatchEncodingChars(objTempBHS.getBatchEncodingChar());
		objBHS.setBatchSendingApplication(objTempBHS.getBatchSendingApplication());
		objBHS.setBatchSendingFacility(objTempBHS.getBatchSendingFacility());
		objBHS.setBatchReceivingApplication(objTempBHS.getBatchReceivingApplication());
		objBHS.setBatchReceivingFacility(objTempBHS.getBatchReceivingFacility());

		return objBHS;
	}
	
	/**
	 * populate BTS Segment
	 * @return objBTS object of BTS Segment
	 */
	public BTS populateBTS()
	{
		BTS objBTS = new BTS();
		objBTS.setBatchMessageCount("5");
		objBTS.setBatchComment("EndOFBatch");
		objBTS.addBatchTotals("5");
		
		return objBTS;
	
	}

	/**
	* populate BTS Segment
	 * @return objBTS object of BTS Segment
	 */ 
	public BTS populateBTS(BTS objTempBTS)
	{
		BTS objBTS = new BTS();
		objBTS.setBatchMessageCount(objTempBTS.getBatchMessageCount());
		objBTS.setBatchComment(objTempBTS.getBatchComment());
		if(objTempBTS.getBatchTotals().size() != 0)
			objBTS.setBatchTotals(objTempBTS.getBatchTotals());
		
		return objBTS;

	}
	/**
	 * populate BUI Segment
	 * @return objBUI object of BUI Segment
	 */
	public BUI populateBUI()
	{
		BUI objBUI = new BUI();
		CWE objCWE=PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		CNE objCNE=PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT);
		XON objXON=PopulateDataType.populateXON(HL7Constants.HL7_COMPONENT);
		NR objNR=PopulateDataType.populateNR(HL7Constants.HL7_COMPONENT);

		objBUI.setSetID_BUI("1");
		objBUI.setBloodUnitIdentifier(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));		
		objBUI.setBloodUnitType(objCWE);
		objBUI.setBloodUnitWeight("5");
		objBUI.setWeightUnits(objCNE);
		objBUI.setBloodUnitVolume("450");
		objBUI.setVolumeUnits(objCNE);
		objBUI.setContainerCatalogNumber("124");
		objBUI.setContainerLotNumber("23");
		objBUI.setContainerManufacturer(objXON);//XON
		objBUI.setTransportTemperature(objNR);//NR
		objBUI.addTransportTemperatureUnits(objCNE);
		
		
		
		return objBUI;
	}

	/**
	 * populate BUI Segment
	 * @return objBUI object of BUI Segment
	 */ 
	public BUI populateBUI(BUI objTempBUI)
	{
		BUI objBUI = new BUI();
		objBUI.setSetID_BUI(objTempBUI.getSetID_BUI());
		objBUI.setBloodUnitIdentifier(objTempBUI.getBloodUnitIdentifier());		
		objBUI.setBloodUnitType(objTempBUI.getBloodUnitType());
		objBUI.setBloodUnitWeight(objTempBUI.getBloodUnitWeight());
		objBUI.setWeightUnits(objTempBUI.getWeightUnits());
		objBUI.setBloodUnitVolume(objTempBUI.getBloodUnitVolume());
		objBUI.setVolumeUnits(objTempBUI.getVolumeUnits());
		objBUI.setContainerCatalogNumber(objTempBUI.getContainerCatalogNumber());
		objBUI.setContainerLotNumber(objTempBUI.getContainerLotNumber());
		objBUI.setContainerManufacturer(objTempBUI.getContainerManufacturer());//XON
		objBUI.setTransportTemperature(objTempBUI.getTransportTemperature());//NR
		if(objTempBUI.getTransportTemperatureUnits().size() != 0)
			objBUI.setTransportTemperatureUnits(objTempBUI.getTransportTemperatureUnits());

		return objTempBUI;
	}
	/**
	 * populate MSG Segment
	 * @return objMSG object of MSG Segment
	 */
	public MSG populateMSG()
	{
		MSG objMSG=new MSG();
		objMSG.setMessageCode("1");
		objMSG.setMessageStructure("MSG");
		objMSG.setTriggerEvent("EVN");
		
		return objMSG;
	}
	/**
	 * populate MSG Segment
	 * @return objMSG object of MSG Segment
	 */
	public MSG populateMSG(MSG objTempMSG)
	{
		MSG objMSG=new MSG();
		objMSG.setMessageCode(objTempMSG.getMessageCode());
		objMSG.setMessageStructure(objTempMSG.getMessageStructure());
		objMSG.setTriggerEvent(objTempMSG.getTriggerEvent());
		
		return objMSG;
	}
	
	/**
	 * populate ZL7 Segment
	 * @return objZL7 object of ZL7 Segment
	 */
	public ZL7 populateZL7()
	{
		ZL7 objZL7=new ZL7();
		objZL7.setDateTimePlannedEvent(objEffectiveDate);
		objZL7.setEventFacility("NamespaceID", "UniversalID", "UniversalIDType");
		objZL7.setEventOccurred(objExpirationDate);
		objZL7.setEventReasonCode(PopulateDataType.populateIS(HL7Constants.HL7_COMPONENT));
		objZL7.addOperatorID(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));
		objZL7.setSimpleField("FLD");
		
		return objZL7;
	}

	/**
	 * populate ZL7 Segment
	 * @return objZL7 object of ZL7 Segment
	 */
	public ZL7 populateZL7(ZL7 objTempZL7)
	{
		ZL7 objZL7=new ZL7();
		objZL7.setDateTimePlannedEvent(objTempZL7.getDateTimePlannedEvent());
		objZL7.setEventFacility(objTempZL7.getEventFacility());
		objZL7.setEventOccurred(objTempZL7.getEventOccurred());
		objZL7.setEventReasonCode(objTempZL7.getEventReasonCode());
		objZL7.setEventTypeCode(objTempZL7.getEventTypeCode());
		if(objTempZL7.getOperatorID().size()!=0)
			objZL7.setOperatorID(objTempZL7.getOperatorID());
		objZL7.setRecordedDateTime(objTempZL7.getRecordedDateTime());
		objZL7.setSimpleField(objTempZL7.getSimpleField());
		
		return objZL7;
	}
	
	/**
	 * populate SLT Segment
	 * @return objSLT object of SLT Segment
	 */
	public SLT populateSLT()
	{
		SLT objSLT=new SLT();
		objSLT.setDeviceNumber(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));
		objSLT.setDeviceName(PopulateDataType.populateST(HL7Constants.HL7_COMPONENT));
		objSLT.setLotNumber(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));
		objSLT.setItemIdentifier(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));
		objSLT.setBarCode(PopulateDataType.populateST(HL7Constants.HL7_COMPONENT));
		
		return objSLT;
	}
	/**
	 * populate SLT Segment
	 * @return objSLT object of SLT Segment
	 */
	public SLT populateSLT(SLT objTempSLT)
	{
		SLT objSLT=new SLT();
		objSLT.setDeviceNumber(objSLT.getDeviceNumber());
		objSLT.setDeviceName(objTempSLT.getDeviceName());
		objSLT.setLotNumber(objTempSLT.getLotNumber());
		objSLT.setItemIdentifier(objTempSLT.getItemIdentifier());
		objSLT.setBarCode(objTempSLT.getBarCode());
		
		return objSLT;
	}
	
	/**
	 * populate SDD Segment
	 * @return objSDD object of SDD Segment
	 */
	public SDD populateSDD()
	{
		SDD objSDD=new SDD();
		objSDD.setLotNumber(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));
		objSDD.setDeviceNumber(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));
		objSDD.setDeviceName(PopulateDataType.populateST(HL7Constants.HL7_COMPONENT));
		objSDD.setDeviceDataState(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));
		objSDD.setLoadStatus(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));
		objSDD.setControlCode(PopulateDataType.populateNM(HL7Constants.HL7_COMPONENT));
		objSDD.setOperatorName(PopulateDataType.populateST(HL7Constants.HL7_COMPONENT));
		
		
		return objSDD;
	}
	/**
	 * populate SDD Segment
	 * @return objSDD object of SDD Segment
	 */
	public SDD populateSDD(SDD objTempSDD)
	{
		SDD objSDD=new SDD();
		objSDD.setLotNumber(objTempSDD.getLotNumber());
		objSDD.setDeviceNumber(objTempSDD.getDeviceNumber());
		objSDD.setDeviceName(objTempSDD.getDeviceName());
		objSDD.setDeviceDataState(objTempSDD.getDeviceDataState());
		objSDD.setLoadStatus(objTempSDD.getLoadStatus());
		objSDD.setControlCode(objTempSDD.getControlCode());
		objSDD.setOperatorName(objTempSDD.getOperatorName());
		
		
		return objSDD;
	}
	
	/**
	 * populate SCD Segment
	 * @return objSCD object of SCD Segment
	 */
	public SCD populateSCD()
	{
		SCD objSCD=new SCD();
		objSCD.setCycleStartTime(PopulateDataType.populateTM(HL7Constants.HL7_COMPONENT));
		objSCD.setCycleCount(PopulateDataType.populateNM(HL7Constants.HL7_COMPONENT));
		objSCD.setTempMax(PopulateDataType.populateCQ(HL7Constants.HL7_COMPONENT));
		objSCD.setTempMin(PopulateDataType.populateCQ(HL7Constants.HL7_COMPONENT));
		objSCD.setLoadNumber(PopulateDataType.populateNM(HL7Constants.HL7_COMPONENT));
		objSCD.setConditionTime(PopulateDataType.populateCQ(HL7Constants.HL7_COMPONENT));
		objSCD.setSterilizeTime(PopulateDataType.populateCQ(HL7Constants.HL7_COMPONENT));
		objSCD.setExhaustTime(PopulateDataType.populateCQ(HL7Constants.HL7_COMPONENT));
		objSCD.setTotalCycleTime(PopulateDataType.populateCQ(HL7Constants.HL7_COMPONENT));
		objSCD.setDeviceStatus(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));
		objSCD.setCycleStartDateTime(PopulateDataType.populateDTM(HL7Constants.HL7_COMPONENT));
		objSCD.setDryTime(PopulateDataType.populateCQ(HL7Constants.HL7_COMPONENT));
		objSCD.setLeakRate(PopulateDataType.populateCQ(HL7Constants.HL7_COMPONENT));
		objSCD.setControlTemperature(PopulateDataType.populateCQ(HL7Constants.HL7_COMPONENT));
		objSCD.setSterilizerTemperature(PopulateDataType.populateCQ(HL7Constants.HL7_COMPONENT));
		objSCD.setCycleCompleteTime(PopulateDataType.populateTM(HL7Constants.HL7_COMPONENT));
		objSCD.setUnderTemperature(PopulateDataType.populateCQ(HL7Constants.HL7_COMPONENT));
		objSCD.setOverTemperature(PopulateDataType.populateCQ(HL7Constants.HL7_COMPONENT));
		objSCD.setAbortCycle(PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT));
		objSCD.setAlarm(PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT));
		objSCD.setLongInChargePhase(PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT));
		objSCD.setLongInExhaustPhase(PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT));
		objSCD.setLongInFastExhaustPhase(PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT));
		objSCD.setReset(PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT));
		objSCD.setOperatorUnload(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));
		objSCD.setDoorOpen(PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT));
		objSCD.setReadingFailure(PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT));
		objSCD.setCycleType(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));
		objSCD.setThermalRinseTime(PopulateDataType.populateCQ(HL7Constants.HL7_COMPONENT));
		objSCD.setWashTime(PopulateDataType.populateCQ(HL7Constants.HL7_COMPONENT));
		objSCD.setInjectionRate(PopulateDataType.populateCQ(HL7Constants.HL7_COMPONENT));
		objSCD.setProcedureCode(PopulateDataType.populateCNE(HL7Constants.HL7_COMPONENT));
		objSCD.addPatientIdentifierList(PopulateDataType.populateCX(HL7Constants.HL7_COMPONENT));
		objSCD.setAttendingDoctor(PopulateDataType.populateXCN(HL7Constants.HL7_COMPONENT));
		objSCD.setDilutionFactor(PopulateDataType.populateSN(HL7Constants.HL7_COMPONENT));
		objSCD.setFillTime(PopulateDataType.populateCQ(HL7Constants.HL7_COMPONENT));
		objSCD.setInletTemperature(PopulateDataType.populateCQ(HL7Constants.HL7_COMPONENT));
		return objSCD;
	}
	/**
	 * populate SCD Segment
	 * @return objSCD object of SCD Segment
	 */
	public SCD populateSCD(SCD objTempSCD)
	{
		SCD objSCD=new SCD();
		objSCD.setCycleStartTime(objTempSCD.getCycleStartTime());
		objSCD.setCycleCount(objTempSCD.getCycleCount());
		objSCD.setTempMax(objTempSCD.getTempMax());
		objSCD.setTempMin(objTempSCD.getTempMin());
		objSCD.setLoadNumber(objTempSCD.getLoadNumber());
		objSCD.setConditionTime(objTempSCD.getConditionTime());
		objSCD.setSterilizeTime(objTempSCD.getSterilizeTime());
		objSCD.setExhaustTime(objTempSCD.getExhaustTime());
		objSCD.setTotalCycleTime(objTempSCD.getTotalCycleTime());
		objSCD.setDeviceStatus(objTempSCD.getDeviceStatus());
		objSCD.setCycleStartDateTime(objTempSCD.getCycleStartDateTime());
		objSCD.setDryTime(objTempSCD.getDryTime());
		objSCD.setLeakRate(objTempSCD.getLeakRate());
		objSCD.setControlTemperature(objTempSCD.getControlTemperature());
		objSCD.setSterilizerTemperature(objTempSCD.getSterilizerTemperature());
		objSCD.setCycleCompleteTime(objTempSCD.getCycleCompleteTime());
		objSCD.setUnderTemperature(objTempSCD.getUnderTemperature());
		objSCD.setOverTemperature(objTempSCD.getOverTemperature());
		objSCD.setAbortCycle(objTempSCD.getAbortCycle());
		objSCD.setAlarm(objTempSCD.getAlarm());
		objSCD.setLongInChargePhase(objTempSCD.getLongInChargePhase());
		objSCD.setLongInExhaustPhase(objTempSCD.getLongInExhaustPhase());
		objSCD.setLongInFastExhaustPhase(objTempSCD.getLongInFastExhaustPhase());
		objSCD.setReset(objTempSCD.getReset());
		objSCD.setOperatorUnload(objTempSCD.getOperatorUnload());
		objSCD.setDoorOpen(objTempSCD.getDoorOpen());
		objSCD.setReadingFailure(objTempSCD.getReadingFailure());
		objSCD.setCycleType(objTempSCD.getCycleType());
		objSCD.setThermalRinseTime(objTempSCD.getThermalRinseTime());
		objSCD.setWashTime(objTempSCD.getWashTime());
		objSCD.setInjectionRate(objTempSCD.getInjectionRate());
		objSCD.setProcedureCode(objTempSCD.getProcedureCode());
		if(objTempSCD.getPatientIdentifierList().size() != 0)
			objSCD.setPatientIdentifierList(objTempSCD.getPatientIdentifierList());
		objSCD.setAttendingDoctor(objTempSCD.getAttendingDoctor());
		objSCD.setDilutionFactor(objTempSCD.getDilutionFactor());
		objSCD.setFillTime(objTempSCD.getFillTime());
		objSCD.setInletTemperature(objTempSCD.getInletTemperature());
		
		
		return objSCD;
	}
	
	/**
	 * populate SCP Segment
	 * @return objSCP object of SCP Segment
	 */
	public SCP populateSCP()
	{
		SCP objSCP=new SCP();
		objSCP.setNumberOfDecontaminationSterilizationDevices(PopulateDataType.populateNM(HL7Constants.HL7_COMPONENT));
		objSCP.setDeviceNumber(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));
		objSCP.setDeviceName(PopulateDataType.populateST(HL7Constants.HL7_COMPONENT));
		objSCP.setLaborCalculationType(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));
		objSCP.setDateFormat(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));
		objSCP.setDeviceModelName(PopulateDataType.populateST(HL7Constants.HL7_COMPONENT));
		objSCP.setDeviceType(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));
		objSCP.setLotControl(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));
		
		
		return objSCP;
	}
	/**
	 * populate SCP Segment
	 * @return objSCP object of SCP Segment
	 */
	public SCP populateSCP(SCP objTempSCP)
	{
		SCP objSCP=new SCP();
		objSCP.setNumberOfDecontaminationSterilizationDevices(objTempSCP.getNumberOfDecontaminationSterilizationDevices());
		objSCP.setDeviceNumber(objTempSCP.getDeviceNumber());
		objSCP.setDeviceName(objTempSCP.getDeviceName());
		objSCP.setLaborCalculationType(objTempSCP.getLaborCalculationType());
		objSCP.setDateFormat(objTempSCP.getDateFormat());
		objSCP.setDeviceModelName(objTempSCP.getDeviceModelName());
		objSCP.setDeviceType(objTempSCP.getDeviceType());
		objSCP.setLotControl(objTempSCP.getLotControl());
		
		
		return objSCP;
	}
	
	/**
	 * Populate IVC Segment
	 * @return objIVC object of IVC Segment
	 */
	public IVC populateIVC()
	{
		IVC objIVC = new IVC();
		objIVC.setProviderInvoiceNumber(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));
		objIVC.setInvoiceControl(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));
		objIVC.setInvoiceReason(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));
		objIVC.setInvoiceType(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));
		objIVC.setInvoiceDateOrTime("20170717");
		objIVC.setInvoiceAmount(PopulateDataType.populateCP(HL7Constants.HL7_COMPONENT));
		objIVC.setProviderOrganization(PopulateDataType.populateXON(HL7Constants.HL7_COMPONENT));
		objIVC.setPayerOrganization(PopulateDataType.populateXON(HL7Constants.HL7_COMPONENT));
		objIVC.setBenefitGroup(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));
		
		return objIVC;
	}
	/**
	 * Populate IVC Segment
	 * @return objIVC object of IVC Segment
	 */
	public IVC populateIVC(IVC objTempIVC)
	{
		IVC objIVC = new IVC();
		objIVC.setProviderInvoiceNumber(objTempIVC.getProviderInvoiceNumber());
		objIVC.setInvoiceControl(objTempIVC.getInvoiceControl());
		objIVC.setInvoiceReason(objTempIVC.getInvoiceReason());
		objIVC.setInvoiceType(objTempIVC.getInvoiceType());
		objIVC.setInvoiceDateOrTime(objTempIVC.getInvoiceDateOrTime());
		objIVC.setInvoiceAmount(objTempIVC.getInvoiceAmount());
		objIVC.setProviderOrganization(objTempIVC.getProviderOrganization());
		objIVC.setPayerOrganization(objTempIVC.getPayerOrganization());
		objIVC.setBenefitGroup(objTempIVC.getBenefitGroup());
		
		return objIVC;
	}
	
	/**
	 * Populate PYE Segment
	 * @return objPYE object of PYE segment
	 */
	public PYE populatePYE()
	{
		PYE objPye = new PYE();
		objPye.setSetID_PYE("1");
		objPye.setPayeeType(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));
		return objPye;
	}
	
	/**
	 * Populate PYE Segment
	 * @return objPYE object of PYE segment
	 */
	public PYE populatePYE(PYE objTempPYE)
	{
		PYE objPye = new PYE();
		objPye.setSetID_PYE(objTempPYE.getSetID_PYE());
		objPye.setPayeeType(objTempPYE.getPayeeType());
		return objPye;
	}
	
	/**
	 * Populate IPR Segment
	 * @return objIPR object of IPR segment
	 */
	public IPR populateIPR()
	{
		IPR objIPR = new IPR();
		objIPR.setIPRIdentifier(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));
		objIPR.setProviderCrossReferenceIdentifier(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));
		objIPR.setPayerCrossReferenceIdentifier(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));
		objIPR.setIPRStatus(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));
		objIPR.setIPRDateOrTime("20170717");
		objIPR.setIPRChecksum("CHK");
		return objIPR;
	}
	
	/**
	 * Populate IPR Segment
	 * @return objIPR object of IPR segment
	 */
	public IPR populateIPR(IPR objTempIPR)
	{
		IPR objIPR = new IPR();
		objIPR.setIPRIdentifier(objTempIPR.getIPRIdentifier());
		objIPR.setProviderCrossReferenceIdentifier(objTempIPR.getProviderCrossReferenceIdentifier());
		objIPR.setPayerCrossReferenceIdentifier(objTempIPR.getPayerCrossReferenceIdentifier());
		objIPR.setIPRStatus(objTempIPR.getIPRStatus());
		objIPR.setIPRDateOrTime(objTempIPR.getIPRDateOrTime());
		objIPR.setIPRChecksum(objTempIPR.getIPRChecksum());
		return objIPR;
	}
	
	/**
	 * Populate PSS Segment
	 * @return objPSS object of PSS segment
	 */
	public PSS populatePSS()
	{
		PSS objPSS = new PSS();
		objPSS.setProviderProductOrServiceSectionNumber(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));
		objPSS.setProductOrServiceSectionSequenceNumber(PopulateDataType.populateSI(HL7Constants.HL7_COMPONENT));
		objPSS.setBilledAmount(PopulateDataType.populateCP(HL7Constants.HL7_COMPONENT));
		objPSS.setSectionDescriptionOrheading("Section or Grouping of Invoice");
		return objPSS;
	}
	
	/**
	 * Populate PSS Segment
	 * @return objPSS object of PSS segment
	 */
	public PSS populatePSS(PSS objTempPSS)
	{
		PSS objPSS = new PSS();
		objPSS.setProviderProductOrServiceSectionNumber(objTempPSS.getProviderProductOrServiceSectionNumber());
		objPSS.setProductOrServiceSectionSequenceNumber(objTempPSS.getProductOrServiceSectionSequenceNumber());
		objPSS.setBilledAmount(objTempPSS.getBilledAmount());
		objPSS.setSectionDescriptionOrheading(objTempPSS.getSectionDescriptionOrHeading());
		return objPSS;
	}
	
	/**
	 * Populate PSG Segment
	 * @return objPSG object of PSG Segment
	 */
	public PSG populatePSG()
	{
		PSG objPSG = new PSG();
		objPSG.setProviderProductOrServiceGroupNumber(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));
		objPSG.setProductOrServiceGroupSequenceNumber("13");
		objPSG.setAdjudicateAsGroup("Y");
		objPSG.setProductOrServiceGroupBilledAmount(PopulateDataType.populateCP(HL7Constants.HL7_COMPONENT));
		objPSG.setProductOrServiceGroupDescription("Description");
		return objPSG;
	}
	
	/**
	 * Populate PSG Segment
	 * @return objPSG object of PSG Segment
	 */
	public PSG populatePSG(PSG objTempPSG)
	{
		PSG objPSG = new PSG();
		objPSG.setProviderProductOrServiceGroupNumber(objTempPSG.getProviderProductOrServiceGroupNumber());
		objPSG.setProductOrServiceGroupSequenceNumber(objTempPSG.getProductOrServiceGroupSequenceNumber());
		objPSG.setAdjudicateAsGroup(objTempPSG.getAdjudicateAsGroup());
		objPSG.setProductOrServiceGroupBilledAmount(objTempPSG.getProductOrServiceGroupBilledAmount());
		objPSG.setProductOrServiceGroupDescription(objTempPSG.getProductOrServiceGroupDescription());
		return objPSG;
	}
	
	/**
	 * Populate PSL Segment
	 * @return objPSL object of PSL Segment
	 */
	public PSL populatePSL()
	{
		CWE objCWE = PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT);
		
		PSL objPSL = new PSL();
		objPSL.setProviderProductOrServiceLineItemNumber(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));
		objPSL.setProductOrServiceLineItemSequenceNumber("1");
		objPSL.setProductOrServiceLineItemStatus(objCWE);
		objPSL.setProductOrServiceCode(objCWE);
		objPSL.setRestrictedDusclosureIndicator("UNK");
		
		return objPSL;
	}
	
	/**
	 * Populate PSL Segment
	 * @return objPSL object of PSL Segment
	 */
	public PSL populatePSL(PSL objTempPSL)
	{
		PSL objPSL = new PSL();
		objPSL.setProviderProductOrServiceLineItemNumber(objTempPSL.getProviderProductOrServiceLineItemNumber());
		objPSL.setProductOrServiceLineItemSequenceNumber(objTempPSL.getProductOrServiceLineItemSequenceNumber());
		objPSL.setProductOrServiceLineItemStatus(objTempPSL.getProductOrServiceLineItemStatus());
		objPSL.setProductOrServiceCode(objTempPSL.getProductOrServiceCode());
		objPSL.setRestrictedDusclosureIndicator(objTempPSL.getRestrictedDusclosureIndicator());
		
		return objPSL;
	}
	
	/**
	 * Populate RFI Segment
	 * @return objRFI object of RFI Segment
	 */
	public RFI populateRFI()
	{
		RFI objRFI = new RFI();
		objRFI.setRequestDate("20170719");
		objRFI.setResponseDueDate("20170719");
		return objRFI;
	}
	
	/**
	 * Populate RFI Segment
	 * @return objRFI object of RFI Segment
	 */
	public RFI populateRFI(RFI objTempRFI)
	{
		RFI objRFI = new RFI();
		objRFI.setRequestDate(objTempRFI.getRequestDate());
		objRFI.setResponseDueDate(objTempRFI.getResponseDueDate());
		return objRFI;
	}
	
	/**
	 * Populate PMT Segment
	 * @return objPMT object of PMT Segment
	 */
	public PMT populatePMT()
	{
		PMT objPMT = new PMT();
		objPMT.setPaymentOrRemittanceAdviceNumber(PopulateDataType.populateEI(HL7Constants.HL7_COMPONENT));
		objPMT.setPaymentOrRemittanceEffectiveDateOrTime("20170719");
		objPMT.setPaymentOrRemittanceExpirationDateOrTime("20170719");
		objPMT.setPaymentMethod(PopulateDataType.populateCWE(HL7Constants.HL7_COMPONENT));
		objPMT.setPaymentOrRemittanceDateOrTime("20170719");
		objPMT.setPaymentOrRemittanceAmount(PopulateDataType.populateCP(HL7Constants.HL7_COMPONENT));
		objPMT.setPaymentOrganization(PopulateDataType.populateXON(HL7Constants.HL7_COMPONENT));
		return objPMT;
	}
	
	/**
	 * Populate PMT Segment
	 * @return objPMT object of PMT Segment
	 */
	public PMT populatePMT(PMT objTempPMT)
	{
		PMT objPMT = new PMT();
		objPMT.setPaymentOrRemittanceAdviceNumber(objTempPMT.getPaymentOrRemittanceAdviceNumber());
		objPMT.setPaymentOrRemittanceEffectiveDateOrTime(objTempPMT.getPaymentOrRemittanceEffectiveDateOrTime());
		objPMT.setPaymentOrRemittanceExpirationDateOrTime(objTempPMT.getPaymentOrRemittanceExpirationDateOrTime());
		objPMT.setPaymentMethod(objTempPMT.getPaymentMethod());
		objPMT.setPaymentOrRemittanceDateOrTime(objTempPMT.getPaymentOrRemittanceDateOrTime());
		objPMT.setPaymentOrRemittanceAmount(objTempPMT.getPaymentOrRemittanceAmount());
		objPMT.setPaymentOrganization(objTempPMT.getPaymentOrganization());
		return objPMT;
	}
}
