Java Code Examples for ims.core.vo.PersonAddress.setLine2()

The following are Jave code examples for showing how to use setLine2() of the ims.core.vo.PersonAddress class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 6 votes
private PersonAddress getlines(PersonAddress addressResult)
{
	if (addressResult == null)
		return null;
	
	addressResult.setLine1((form.txtAddress1().getValue()));
	addressResult.setLine2((form.txtAddress2().getValue()));
	addressResult.setLine3((form.txtAddress3().getValue()));
	addressResult.setLine4((form.txtAddress4().getValue()));
	if(ConfigFlag.DOM.HEARTS_REPLICATE_PATIENTS.getValue())
		addressResult.setLine5("");
	else
		addressResult.setLine5((form.txtAddress5().getValue()));
	
	return addressResult;
}
 
Example 2
Project: AvoinApotti   File: DemographicsImpl.java   View Source Code Vote up 6 votes
private PersonAddress extractPracticeAddressFromDTOPracticeRecord(Gp_practiceRecord gp_practice_record) 
{
	if (gp_practice_record == null)
		return null;

	PersonAddress voPracticeAddress = new PersonAddress();

	voPracticeAddress.setPhone(gp_practice_record.Practice_phone_no == null ? null : gp_practice_record.Practice_phone_no);
	voPracticeAddress.setFax(gp_practice_record.Practice_fax_no == null ? null: gp_practice_record.Practice_fax_no);
	voPracticeAddress.setLine1(gp_practice_record.Address_line1 == null ? null: gp_practice_record.Address_line1);
	voPracticeAddress.setLine2(gp_practice_record.Address_line2 == null ? null: gp_practice_record.Address_line2);
	voPracticeAddress.setLine3(gp_practice_record.Address_line3 == null ? null: gp_practice_record.Address_line3);
	voPracticeAddress.setLine4(gp_practice_record.Address_line4 == null ? null: gp_practice_record.Address_line4);
	voPracticeAddress.setLine5(gp_practice_record.Address_line5 == null ? null: gp_practice_record.Address_line5);
	// TODO ask leader voPracticeAddress.setCounty()
	return voPracticeAddress;
}
 
Example 3
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 6 votes
private void populateDataFromScreen() 
{
	OrganisationVo voOrganisation = form.getGlobalContext().Admin
			.getOrganisationVoIsNotNull() ? form.getGlobalContext().Admin
			.getOrganisationVo() : new OrganisationVo();
	PersonAddress voAddress = voOrganisation.getAddressIsNotNull() ? voOrganisation
			.getAddress()
			: new PersonAddress();
	voAddress.setLine1(form.txtOrgAdd1().getValue());
	voAddress.setLine2(form.txtOrgAdd2().getValue());
	voAddress.setLine3(form.txtOrgAdd3().getValue());
	voAddress.setLine4(form.txtOrgAdd4().getValue());
	voAddress.setLine5(form.txtOrgAdd5().getValue());
	voAddress.setCounty(form.cmbCounty().getValue());
	voAddress.setPhone(form.txtOrgPhone().getValue());
	voAddress.setFax(form.txtOrgFax().getValue());
	voAddress.setPostCode(form.txtPostCode().getValue());
	
	voOrganisation.setAddress(voAddress);

	voOrganisation.setIsActive(Boolean.TRUE);
	voOrganisation.setName(form.txtOrgName().getValue());
	voOrganisation.setType(OrganisationType.GPP);

	form.getGlobalContext().Admin.setOrganisationVo(voOrganisation);
}
 
Example 4
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 6 votes
private PersonAddress populateAddressData(AddressType addrType)
{
	PersonAddress voAddress = new PersonAddress();		
	
	if (form.ctnDetails().txtDetailsAddress1().getValue() != null)	
		voAddress.setLine1(form.ctnDetails().txtDetailsAddress1().getValue());
	if (form.ctnDetails().txtDetailsAddress2().getValue() != null)
		voAddress.setLine2(form.ctnDetails().txtDetailsAddress2().getValue());
	if (form.ctnDetails().txtDetailsAddress3().getValue() != null)
		voAddress.setLine3(form.ctnDetails().txtDetailsAddress3().getValue());
	if (form.ctnDetails().txtDetailsAddress4().getValue() != null)
		voAddress.setLine4(form.ctnDetails().txtDetailsAddress4().getValue());
	if (form.ctnDetails().txtDetailsAddress5().getValue() != null)
		voAddress.setLine5(form.ctnDetails().txtDetailsAddress5().getValue());
	
	voAddress.setPostCode(form.ctnDetails().txtDetailsPostCode().getValue());
	voAddress.setCounty(form.ctnDetails().cmbCounty().getValue());
	voAddress.setAddressType(addrType);  // WDEV-15936 Address type should always be set

	return voAddress;
}
 
Example 5
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 6 votes
protected ims.core.vo.OrgShortVo populateDataFromScreen(ims.core.vo.OrgShortVo value)
{
	if(value == null)
		value = new ims.core.vo.OrgShortVo();

	PersonAddress voPersonAdress = new PersonAddress();
	voPersonAdress.setCounty(form.lyr1().tabOrg().cmbOrgCounty().getValue());
	voPersonAdress.setFax(form.lyr1().tabOrg().txtOrgFax().getValue());
	voPersonAdress.setLine1(form.lyr1().tabOrg().txtOrgAdd1().getValue());
	voPersonAdress.setLine2(form.lyr1().tabOrg().txtOrgAdd2().getValue());
	voPersonAdress.setLine3(form.lyr1().tabOrg().txtOrgAdd3().getValue());
	voPersonAdress.setLine4(form.lyr1().tabOrg().txtOrgAdd4().getValue());
	voPersonAdress.setLine5(form.lyr1().tabOrg().txtOrgAdd5().getValue());		
	voPersonAdress.setPhone(form.lyr1().tabOrg().txtOrgPhone().getValue());
	voPersonAdress.setPostCode(form.lyr1().tabOrg().txtOrgPostCode().getValue());

	value.setAddress(voPersonAdress);
	
	value.setCodeMappings(getCodeMappings(form.lyr1().tabOrg().grdMappings()));
	value.setComment(form.lyr1().tabOrg().txtOrgComment().getValue());
	value.setType(ims.core.vo.lookups.OrganisationType.SUPPLIER);
	value.setName(form.lyr1().tabOrg().txtOrgName().getValue());
	return value;
}
 
Example 6
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 6 votes
private PersonAddress getlines(PersonAddress addressResult)
{
	if (addressResult == null)
		return null;
	
	addressResult.setLine1((form.txtAddress1().getValue()));
	addressResult.setLine2((form.txtAddress2().getValue()));
	addressResult.setLine3((form.txtAddress3().getValue()));
	addressResult.setLine4((form.txtAddress4().getValue()));
	if(ConfigFlag.DOM.HEARTS_REPLICATE_PATIENTS.getValue())
		addressResult.setLine5("");
	else
		addressResult.setLine5((form.txtAddress5().getValue()));
	
	addressResult.setAreaOfResidence(form.cmbAreaOfResidence().getValue());		//wdev-19176
	addressResult.setCounty(form.cmbCounty().getValue()); //WDEV-17700
	addressResult.setPostCode(form.txtPost().getValue()); //WDEV-17700
	
	return addressResult;
}
 
Example 7
Project: openmaxims-linux   File: Logic.java   View Source Code Vote up 6 votes
private PersonAddress populateAddressData(AddressType addrType)
{
	PersonAddress voAddress = new PersonAddress();		
	
	if (form.ctnDetails().txtDetailsAddress1().getValue() != null)	
		voAddress.setLine1(form.ctnDetails().txtDetailsAddress1().getValue());
	if (form.ctnDetails().txtDetailsAddress2().getValue() != null)
		voAddress.setLine2(form.ctnDetails().txtDetailsAddress2().getValue());
	if (form.ctnDetails().txtDetailsAddress3().getValue() != null)
		voAddress.setLine3(form.ctnDetails().txtDetailsAddress3().getValue());
	if (form.ctnDetails().txtDetailsAddress4().getValue() != null)
		voAddress.setLine4(form.ctnDetails().txtDetailsAddress4().getValue());
	if (form.ctnDetails().txtDetailsAddress5().getValue() != null)
		voAddress.setLine5(form.ctnDetails().txtDetailsAddress5().getValue());
	
	voAddress.setPostCode(form.ctnDetails().txtDetailsPostCode().getValue());
	voAddress.setCounty(form.ctnDetails().cmbCounty().getValue());
	voAddress.setAddressType(addrType);  // WDEV-15936 Address type should always be set

	return voAddress;
}
 
Example 8
Project: openmaxims-linux   File: Logic.java   View Source Code Vote up 6 votes
protected ims.core.vo.OrgShortVo populateDataFromScreen(ims.core.vo.OrgShortVo value)
{
	if(value == null)
		value = new ims.core.vo.OrgShortVo();

	PersonAddress voPersonAdress = new PersonAddress();
	voPersonAdress.setCounty(form.lyr1().tabOrg().cmbOrgCounty().getValue());
	voPersonAdress.setFax(form.lyr1().tabOrg().txtOrgFax().getValue());
	voPersonAdress.setLine1(form.lyr1().tabOrg().txtOrgAdd1().getValue());
	voPersonAdress.setLine2(form.lyr1().tabOrg().txtOrgAdd2().getValue());
	voPersonAdress.setLine3(form.lyr1().tabOrg().txtOrgAdd3().getValue());
	voPersonAdress.setLine4(form.lyr1().tabOrg().txtOrgAdd4().getValue());
	voPersonAdress.setLine5(form.lyr1().tabOrg().txtOrgAdd5().getValue());		
	voPersonAdress.setPhone(form.lyr1().tabOrg().txtOrgPhone().getValue());
	voPersonAdress.setPostCode(form.lyr1().tabOrg().txtOrgPostCode().getValue());

	value.setAddress(voPersonAdress);
	
	value.setCodeMappings(getCodeMappings(form.lyr1().tabOrg().grdMappings()));
	value.setComment(form.lyr1().tabOrg().txtOrgComment().getValue());
	value.setType(ims.core.vo.lookups.OrganisationType.SUPPLIER);
	value.setName(form.lyr1().tabOrg().txtOrgName().getValue());
	return value;
}
 
Example 9
Project: openMAXIMS   File: PDSDemographicsImpl.java   View Source Code Vote up 6 votes
private PersonAddress extractPracticeAddressFromDTOPracticeRecord(Gp_practiceRecord gp_practice_record) 
{
	if (gp_practice_record == null)
		return null;

	PersonAddress voPracticeAddress = new PersonAddress();

	voPracticeAddress.setPhone(gp_practice_record.Practice_phone_no == null ? null : gp_practice_record.Practice_phone_no);
	voPracticeAddress.setFax(gp_practice_record.Practice_fax_no == null ? null: gp_practice_record.Practice_fax_no);
	voPracticeAddress.setLine1(gp_practice_record.Address_line1 == null ? null: gp_practice_record.Address_line1);
	voPracticeAddress.setLine2(gp_practice_record.Address_line2 == null ? null: gp_practice_record.Address_line2);
	voPracticeAddress.setLine3(gp_practice_record.Address_line3 == null ? null: gp_practice_record.Address_line3);
	voPracticeAddress.setLine4(gp_practice_record.Address_line4 == null ? null: gp_practice_record.Address_line4);
	voPracticeAddress.setLine5(gp_practice_record.Address_line5 == null ? null: gp_practice_record.Address_line5);
	// TODO ask leader voPracticeAddress.setCounty()
	return voPracticeAddress;
}
 
Example 10
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 6 votes
private void populateDataFromScreen() 
{
	OrganisationVo voOrganisation = form.getGlobalContext().Admin
			.getOrganisationVoIsNotNull() ? form.getGlobalContext().Admin
			.getOrganisationVo() : new OrganisationVo();
	PersonAddress voAddress = voOrganisation.getAddressIsNotNull() ? voOrganisation
			.getAddress()
			: new PersonAddress();
	voAddress.setLine1(form.txtOrgAdd1().getValue());
	voAddress.setLine2(form.txtOrgAdd2().getValue());
	voAddress.setLine3(form.txtOrgAdd3().getValue());
	voAddress.setLine4(form.txtOrgAdd4().getValue());
	voAddress.setLine5(form.txtOrgAdd5().getValue());
	voAddress.setCounty(form.cmbCounty().getValue());
	voAddress.setPhone(form.txtOrgPhone().getValue());
	voAddress.setFax(form.txtOrgFax().getValue());
	voAddress.setPostCode(form.txtPostCode().getValue());
	
	voOrganisation.setAddress(voAddress);

	voOrganisation.setIsActive(Boolean.TRUE);
	voOrganisation.setName(form.txtOrgName().getValue());
	voOrganisation.setType(OrganisationType.GPP);

	form.getGlobalContext().Admin.setOrganisationVo(voOrganisation);
}
 
Example 11
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 6 votes
private PersonAddress populateAddressData(AddressType addrType)
{
	PersonAddress voAddress = new PersonAddress();		
	
	if (form.ctnDetails().txtDetailsAddress1().getValue() != null)	
		voAddress.setLine1(form.ctnDetails().txtDetailsAddress1().getValue());
	if (form.ctnDetails().txtDetailsAddress2().getValue() != null)
		voAddress.setLine2(form.ctnDetails().txtDetailsAddress2().getValue());
	if (form.ctnDetails().txtDetailsAddress3().getValue() != null)
		voAddress.setLine3(form.ctnDetails().txtDetailsAddress3().getValue());
	if (form.ctnDetails().txtDetailsAddress4().getValue() != null)
		voAddress.setLine4(form.ctnDetails().txtDetailsAddress4().getValue());
	if (form.ctnDetails().txtDetailsAddress5().getValue() != null)
		voAddress.setLine5(form.ctnDetails().txtDetailsAddress5().getValue());
	
	voAddress.setPostCode(form.ctnDetails().txtDetailsPostCode().getValue());
	voAddress.setCounty(form.ctnDetails().cmbCounty().getValue());
	voAddress.setAddressType(addrType);  // WDEV-15936 Address type should always be set

	return voAddress;
}
 
Example 12
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 6 votes
private PersonAddress populateAddressFromHistory(PciAddressHistoryVo value) 
{
	PersonAddress address = new PersonAddress();
	
	address.setLine1(value.getLine1());
	address.setLine2(value.getLine2());
	address.setLine3(value.getLine3());
	address.setLine4(value.getLine4());
	address.setLine5(value.getLine5());
	address.setCounty(value.getCounty());
	address.setPostCode(value.getPostCode());
	address.setUpdateDate(value.getUpdateDate());
	address.setNotificationDate(value.getNotificationDate());
	
	return address;
}
 
Example 13
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 6 votes
private PersonAddress getlines(PersonAddress addressResult)
{
	if (addressResult == null)
		return null;
	
	addressResult.setLine1((form.txtAddress1().getValue()));
	addressResult.setLine2((form.txtAddress2().getValue()));
	addressResult.setLine3((form.txtAddress3().getValue()));
	addressResult.setLine4((form.txtAddress4().getValue()));
	if(ConfigFlag.DOM.HEARTS_REPLICATE_PATIENTS.getValue())
		addressResult.setLine5("");
	else
		addressResult.setLine5((form.txtAddress5().getValue()));
	
	return addressResult;
}
 
Example 14
Project: openMAXIMS   File: DemographicsImpl.java   View Source Code Vote up 6 votes
private PersonAddress extractPracticeAddressFromDTOPracticeRecord(Gp_practiceRecord gp_practice_record) 
{
	if (gp_practice_record == null)
		return null;

	PersonAddress voPracticeAddress = new PersonAddress();

	voPracticeAddress.setPhone(gp_practice_record.Practice_phone_no == null ? null : gp_practice_record.Practice_phone_no);
	voPracticeAddress.setFax(gp_practice_record.Practice_fax_no == null ? null: gp_practice_record.Practice_fax_no);
	voPracticeAddress.setLine1(gp_practice_record.Address_line1 == null ? null: gp_practice_record.Address_line1);
	voPracticeAddress.setLine2(gp_practice_record.Address_line2 == null ? null: gp_practice_record.Address_line2);
	voPracticeAddress.setLine3(gp_practice_record.Address_line3 == null ? null: gp_practice_record.Address_line3);
	voPracticeAddress.setLine4(gp_practice_record.Address_line4 == null ? null: gp_practice_record.Address_line4);
	voPracticeAddress.setLine5(gp_practice_record.Address_line5 == null ? null: gp_practice_record.Address_line5);
	// TODO ask leader voPracticeAddress.setCounty()
	return voPracticeAddress;
}
 
Example 15
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 6 votes
private void populateDataFromScreen() 
{
	OrganisationVo voOrganisation = form.getGlobalContext().Admin
			.getOrganisationVoIsNotNull() ? form.getGlobalContext().Admin
			.getOrganisationVo() : new OrganisationVo();
	PersonAddress voAddress = voOrganisation.getAddressIsNotNull() ? voOrganisation
			.getAddress()
			: new PersonAddress();
	voAddress.setLine1(form.txtOrgAdd1().getValue());
	voAddress.setLine2(form.txtOrgAdd2().getValue());
	voAddress.setLine3(form.txtOrgAdd3().getValue());
	voAddress.setLine4(form.txtOrgAdd4().getValue());
	voAddress.setLine5(form.txtOrgAdd5().getValue());
	voAddress.setCounty(form.cmbCounty().getValue());
	voAddress.setPhone(form.txtOrgPhone().getValue());
	voAddress.setFax(form.txtOrgFax().getValue());
	voAddress.setPostCode(form.txtPostCode().getValue());
	
	voOrganisation.setAddress(voAddress);

	voOrganisation.setIsActive(Boolean.TRUE);
	voOrganisation.setName(form.txtOrgName().getValue());
	voOrganisation.setType(OrganisationType.GPP);

	form.getGlobalContext().Admin.setOrganisationVo(voOrganisation);
}
 
Example 16
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 6 votes
private PersonAddress populateAddressData(AddressType addrType)
{
	PersonAddress voAddress = new PersonAddress();		
	
	if (form.ctnDetails().txtDetailsAddress1().getValue() != null)	
		voAddress.setLine1(form.ctnDetails().txtDetailsAddress1().getValue());
	if (form.ctnDetails().txtDetailsAddress2().getValue() != null)
		voAddress.setLine2(form.ctnDetails().txtDetailsAddress2().getValue());
	if (form.ctnDetails().txtDetailsAddress3().getValue() != null)
		voAddress.setLine3(form.ctnDetails().txtDetailsAddress3().getValue());
	if (form.ctnDetails().txtDetailsAddress4().getValue() != null)
		voAddress.setLine4(form.ctnDetails().txtDetailsAddress4().getValue());
	if (form.ctnDetails().txtDetailsAddress5().getValue() != null)
		voAddress.setLine5(form.ctnDetails().txtDetailsAddress5().getValue());
	
	voAddress.setPostCode(form.ctnDetails().txtDetailsPostCode().getValue());
	voAddress.setCounty(form.ctnDetails().cmbCounty().getValue());
	voAddress.setAddressType(addrType);  // WDEV-15936 Address type should always be set

	return voAddress;
}
 
Example 17
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 6 votes
protected ims.core.vo.OrgShortVo populateDataFromScreen(ims.core.vo.OrgShortVo value)
{
	if(value == null)
		value = new ims.core.vo.OrgShortVo();

	PersonAddress voPersonAdress = new PersonAddress();
	voPersonAdress.setCounty(form.lyr1().tabOrg().cmbOrgCounty().getValue());
	voPersonAdress.setFax(form.lyr1().tabOrg().txtOrgFax().getValue());
	voPersonAdress.setLine1(form.lyr1().tabOrg().txtOrgAdd1().getValue());
	voPersonAdress.setLine2(form.lyr1().tabOrg().txtOrgAdd2().getValue());
	voPersonAdress.setLine3(form.lyr1().tabOrg().txtOrgAdd3().getValue());
	voPersonAdress.setLine4(form.lyr1().tabOrg().txtOrgAdd4().getValue());
	voPersonAdress.setLine5(form.lyr1().tabOrg().txtOrgAdd5().getValue());		
	voPersonAdress.setPhone(form.lyr1().tabOrg().txtOrgPhone().getValue());
	voPersonAdress.setPostCode(form.lyr1().tabOrg().txtOrgPostCode().getValue());

	value.setAddress(voPersonAdress);
	
	value.setCodeMappings(getCodeMappings(form.lyr1().tabOrg().grdMappings()));
	value.setComment(form.lyr1().tabOrg().txtOrgComment().getValue());
	value.setType(ims.core.vo.lookups.OrganisationType.SUPPLIER);
	value.setName(form.lyr1().tabOrg().txtOrgName().getValue());
	return value;
}
 
Example 18
Project: openmaxims-linux   File: Logic.java   View Source Code Vote up 6 votes
private PersonAddress getlines(PersonAddress addressResult)
{
	if (addressResult == null)
		return null;
	
	addressResult.setLine1((form.txtAddress1().getValue()));
	addressResult.setLine2((form.txtAddress2().getValue()));
	addressResult.setLine3((form.txtAddress3().getValue()));
	addressResult.setLine4((form.txtAddress4().getValue()));
	if(ConfigFlag.DOM.HEARTS_REPLICATE_PATIENTS.getValue())
		addressResult.setLine5("");
	else
		addressResult.setLine5((form.txtAddress5().getValue()));
	
	return addressResult;
}
 
Example 19
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 4 votes
private void populateDataFromScreen(LocSiteVo value)
{
	
	PersonAddress voAddress = new PersonAddress();			//wdev-16387
	
	voAddress.setLine1(form.ctn1().lyr1().tabLocSite().txtLocSiteAdd1().getValue());
	voAddress.setLine2(form.ctn1().lyr1().tabLocSite().txtLocSiteAdd2().getValue());
	voAddress.setLine3(form.ctn1().lyr1().tabLocSite().txtLocSiteAdd3().getValue());
	voAddress.setLine4(form.ctn1().lyr1().tabLocSite().txtLocSiteAdd4().getValue());
	voAddress.setLine5(form.ctn1().lyr1().tabLocSite().txtLocSiteAdd5().getValue());
	voAddress.setPhone(form.ctn1().lyr1().tabLocSite().txtLocSitePhone().getValue());
	voAddress.setFax(form.ctn1().lyr1().tabLocSite().txtLocSiteFaxNo().getValue());
	voAddress.setPostCode(form.ctn1().lyr1().tabLocSite().txtLocSitePostCode().getValue());
	voAddress.setCounty(form.ctn1().lyr1().tabLocSite().cmbLocSiteCounty().getValue());
	voAddress.setAddressType(AddressType.LOC_SITE);
	value.setAddress(voAddress.countFieldsWithValue() > 0 ? voAddress : null);

	value.setIsVirtual(new Boolean(form.ctn1().lyr1().tabLocSite().chkVirtualLocationSite().getValue()));//wdev-2730
	if(value.getID_Location() == null)
		value.setIsActive(Boolean.TRUE);
	
	value.setCodeMappings(getCodeMappings(form.ctn1().lyr1().tabLocSite().grdSiteMappings()));
	
	value.setName(form.ctn1().lyr1().tabLocSite().txtLocSiteName().getValue());
	value.setType(form.ctn1().lyr1().tabLocSite().cmbLocSiteType().getValue());
	value.setSecureAccommodation(new Boolean(form.ctn1().lyr1().tabLocSite().chkLocSiteSecure().getValue()));
	value.setAllSecureAccommodation(new Boolean(form.ctn1().lyr1().tabLocSite().chkLocSiteAllSecure().getValue()));
	value.setReferringHospital(new Boolean(form.ctn1().lyr1().tabLocSite().chkLocSiteReferringHos().getValue()));
	value.setTreatingHosp(new Boolean(form.ctn1().lyr1().tabLocSite().chkLocSiteTreatingHos().getValue()));
	
	//wdev-17000
	if( LocationType.WARD.equals(form.ctn1().lyr1().tabLocSite().cmbLocSiteType().getValue()) )
	{
		value.setDisplayInEDTracking(form.ctn1().lyr1().tabLocSite().chkDisplayInEDTrackingLocSite().getValue());
	}
	else
	{
		value.setDisplayInEDTracking(null);
	}
	
	/*WDEV-11885
	PrinterVoCollection printers = value.getPrinters();
	if(printers == null) {			
		printers = new PrinterVoCollection();
	}
	*/
	
	//If Printers were deleted clear printers collection and delete default, newResult and OCS defaults printers
	if (form.getGlobalContext().getPrintersSelected() == null || 
			(form.getGlobalContext().getPrintersSelectedIsNotNull() && form.getGlobalContext().getPrintersSelected().size() == 0))
	{
		value.setPrinters(null);	//WDEV-11885
		value.setDefaultPrinter(null);
		value.setDesignatedPrinterForNewResults(null);
		value.setDesignatedPrinterForOCSOrder(null);
		
		return;
	}
	
	/*WDEV-11885
	for (int i = 0; i < form.getGlobalContext().getPrintersSelected().size(); i++)
	{
		printers.add(form.getGlobalContext().getPrintersSelected().get(i));
	}
	*/
	
	value.setPrinters(form.getGlobalContext().getPrintersSelected());	//WDEV-11885
			
	value.setDefaultPrinter(form.getGlobalContext().getDefaultPrinterIsNotNull() ? domain.getPrinter(form.getGlobalContext().getDefaultPrinter()) : null);									
	value.setDesignatedPrinterForNewResults(form.getGlobalContext().getDesignatedPrinterForNewResultsIsNotNull() ? domain.getPrinter(form.getGlobalContext().getDesignatedPrinterForNewResults()) : null);									
	value.setDesignatedPrinterForOCSOrder(form.getGlobalContext().getDesignatedPrinterForOCSOrderIsNotNull() ? domain.getPrinter(form.getGlobalContext().getDesignatedPrinterForOCSOrder()) : null);
	
	
}
 
Example 20
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 4 votes
private void populateDataFromScreen(LocMostVo value)
{
	PersonAddress voAddress = new PersonAddress();
	voAddress.setLine1(form.ctn1().lyr1().tabLoc().txtLocAdd1().getValue());
	voAddress.setLine2(form.ctn1().lyr1().tabLoc().txtLocAdd2().getValue());
	voAddress.setLine3(form.ctn1().lyr1().tabLoc().txtLocAdd3().getValue());
	voAddress.setLine4(form.ctn1().lyr1().tabLoc().txtLocAdd4().getValue());
	voAddress.setLine5(form.ctn1().lyr1().tabLoc().txtLocAdd5().getValue());
	voAddress.setPhone(form.ctn1().lyr1().tabLoc().txtLocPhone().getValue());
	voAddress.setFax(form.ctn1().lyr1().tabLoc().txtLocFaxNo().getValue());
	voAddress.setPostCode(form.ctn1().lyr1().tabLoc().txtLocPostCode().getValue());
	voAddress.setCounty(form.ctn1().lyr1().tabLoc().cmbLocCounty().getValue());
	voAddress.setAddressType(AddressType.LOCATION);

	value.setAddress(voAddress.countFieldsWithValue() > 0 ? voAddress : null);

	value.setIsVirtual(new Boolean(form.ctn1().lyr1().tabLoc().chkVirtualLocation().getValue()));//wdev-2730

	if(value.getID_Location() == null)
		value.setIsActive(Boolean.TRUE);

	value.setCodeMappings(getCodeMappings(form.ctn1().lyr1().tabLoc().grdLocMappings()));

	value.setName(form.ctn1().lyr1().tabLoc().txtLocName().getValue());
	value.setType(form.ctn1().lyr1().tabLoc().cmbLocType().getValue());
	value.setReferringHospital(new Boolean(form.ctn1().lyr1().tabLoc().chkReferringHosp().getValue()));
	value.setTreatingHosp(new Boolean(form.ctn1().lyr1().tabLoc().chkTreatingHosp().getValue()));
	
	//wdev-17000
	if( LocationType.WARD.equals(form.ctn1().lyr1().tabLoc().cmbLocType().getValue()) )
	{
		value.setDisplayInEDTracking(form.ctn1().lyr1().tabLoc().chkDisplayInEDTrackingLoc().getValue());
	}
	else
		value.setDisplayInEDTracking(null);
			
	/*WDEV-11885
	PrinterVoCollection printers = value.getPrinters();
	if(printers == null) {			
		printers = new PrinterVoCollection();
	}*/
	
	//If Printers were deleted clear printers collection and delete default, newResult and OCS defaults printers
	if (form.getGlobalContext().getPrintersSelected() == null || 
			(form.getGlobalContext().getPrintersSelectedIsNotNull() && form.getGlobalContext().getPrintersSelected().size() == 0))
	{
		value.setPrinters(null); //WDEV-11885
		value.setDefaultPrinter(null);
		value.setDesignatedPrinterForNewResults(null);
		value.setDesignatedPrinterForOCSOrder(null);
		
		return;
	}
	
	/*WDEV-11885
	for (int i = 0; i < form.getGlobalContext().getPrintersSelected().size(); i++)
	{
		printers.add(form.getGlobalContext().getPrintersSelected().get(i));
	}
	*/
	
	value.setPrinters(form.getGlobalContext().getPrintersSelected());	//WDEV-11885
			
	value.setDefaultPrinter(form.getGlobalContext().getDefaultPrinterIsNotNull() ? domain.getPrinter(form.getGlobalContext().getDefaultPrinter()) : null);									
	value.setDesignatedPrinterForNewResults(form.getGlobalContext().getDesignatedPrinterForNewResultsIsNotNull() ? domain.getPrinter(form.getGlobalContext().getDesignatedPrinterForNewResults()) : null);									
	value.setDesignatedPrinterForOCSOrder(form.getGlobalContext().getDesignatedPrinterForOCSOrderIsNotNull() ? domain.getPrinter(form.getGlobalContext().getDesignatedPrinterForOCSOrder()) : null);
	
	
}
 
Example 21
Project: openmaxims-linux   File: Logic.java   View Source Code Vote up 4 votes
private void populateDataFromScreen(LocSiteVo value)
{
	
	PersonAddress voAddress = new PersonAddress();			//wdev-16387
	
	voAddress.setLine1(form.ctn1().lyr1().tabLocSite().txtLocSiteAdd1().getValue());
	voAddress.setLine2(form.ctn1().lyr1().tabLocSite().txtLocSiteAdd2().getValue());
	voAddress.setLine3(form.ctn1().lyr1().tabLocSite().txtLocSiteAdd3().getValue());
	voAddress.setLine4(form.ctn1().lyr1().tabLocSite().txtLocSiteAdd4().getValue());
	voAddress.setLine5(form.ctn1().lyr1().tabLocSite().txtLocSiteAdd5().getValue());
	voAddress.setPhone(form.ctn1().lyr1().tabLocSite().txtLocSitePhone().getValue());
	voAddress.setFax(form.ctn1().lyr1().tabLocSite().txtLocSiteFaxNo().getValue());
	voAddress.setPostCode(form.ctn1().lyr1().tabLocSite().txtLocSitePostCode().getValue());
	voAddress.setCounty(form.ctn1().lyr1().tabLocSite().cmbLocSiteCounty().getValue());
	voAddress.setAddressType(AddressType.LOC_SITE);
	value.setAddress(voAddress.countFieldsWithValue() > 0 ? voAddress : null);

	value.setIsVirtual(new Boolean(form.ctn1().lyr1().tabLocSite().chkVirtualLocationSite().getValue()));//wdev-2730
	if(value.getID_Location() == null)
		value.setIsActive(Boolean.TRUE);
	
	value.setCodeMappings(getCodeMappings(form.ctn1().lyr1().tabLocSite().grdSiteMappings()));
	
	value.setName(form.ctn1().lyr1().tabLocSite().txtLocSiteName().getValue());
	value.setType(form.ctn1().lyr1().tabLocSite().cmbLocSiteType().getValue());
	value.setSecureAccommodation(new Boolean(form.ctn1().lyr1().tabLocSite().chkLocSiteSecure().getValue()));
	value.setAllSecureAccommodation(new Boolean(form.ctn1().lyr1().tabLocSite().chkLocSiteAllSecure().getValue()));
	value.setReferringHospital(new Boolean(form.ctn1().lyr1().tabLocSite().chkLocSiteReferringHos().getValue()));
	value.setTreatingHosp(new Boolean(form.ctn1().lyr1().tabLocSite().chkLocSiteTreatingHos().getValue()));
	
	//wdev-17000
	if( LocationType.WARD.equals(form.ctn1().lyr1().tabLocSite().cmbLocSiteType().getValue()) )
	{
		value.setDisplayInEDTracking(form.ctn1().lyr1().tabLocSite().chkDisplayInEDTrackingLocSite().getValue());
	}
	else
	{
		value.setDisplayInEDTracking(null);
	}
	
	/*WDEV-11885
	PrinterVoCollection printers = value.getPrinters();
	if(printers == null) {			
		printers = new PrinterVoCollection();
	}
	*/
	
	//If Printers were deleted clear printers collection and delete default, newResult and OCS defaults printers
	if (form.getGlobalContext().getPrintersSelected() == null || 
			(form.getGlobalContext().getPrintersSelectedIsNotNull() && form.getGlobalContext().getPrintersSelected().size() == 0))
	{
		value.setPrinters(null);	//WDEV-11885
		value.setDefaultPrinter(null);
		value.setDesignatedPrinterForNewResults(null);
		value.setDesignatedPrinterForOCSOrder(null);
		
		return;
	}
	
	/*WDEV-11885
	for (int i = 0; i < form.getGlobalContext().getPrintersSelected().size(); i++)
	{
		printers.add(form.getGlobalContext().getPrintersSelected().get(i));
	}
	*/
	
	value.setPrinters(form.getGlobalContext().getPrintersSelected());	//WDEV-11885
			
	value.setDefaultPrinter(form.getGlobalContext().getDefaultPrinterIsNotNull() ? domain.getPrinter(form.getGlobalContext().getDefaultPrinter()) : null);									
	value.setDesignatedPrinterForNewResults(form.getGlobalContext().getDesignatedPrinterForNewResultsIsNotNull() ? domain.getPrinter(form.getGlobalContext().getDesignatedPrinterForNewResults()) : null);									
	value.setDesignatedPrinterForOCSOrder(form.getGlobalContext().getDesignatedPrinterForOCSOrderIsNotNull() ? domain.getPrinter(form.getGlobalContext().getDesignatedPrinterForOCSOrder()) : null);
	
	
}
 
Example 22
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 4 votes
private void populateDataFromScreen(LocSiteVo value)
{
	
	PersonAddress voAddress = new PersonAddress();			//wdev-16387
	
	voAddress.setLine1(form.ctn1().lyr1().tabLocSite().txtLocSiteAdd1().getValue());
	voAddress.setLine2(form.ctn1().lyr1().tabLocSite().txtLocSiteAdd2().getValue());
	voAddress.setLine3(form.ctn1().lyr1().tabLocSite().txtLocSiteAdd3().getValue());
	voAddress.setLine4(form.ctn1().lyr1().tabLocSite().txtLocSiteAdd4().getValue());
	voAddress.setLine5(form.ctn1().lyr1().tabLocSite().txtLocSiteAdd5().getValue());
	voAddress.setPhone(form.ctn1().lyr1().tabLocSite().txtLocSitePhone().getValue());
	voAddress.setFax(form.ctn1().lyr1().tabLocSite().txtLocSiteFaxNo().getValue());
	voAddress.setPostCode(form.ctn1().lyr1().tabLocSite().txtLocSitePostCode().getValue());
	voAddress.setCounty(form.ctn1().lyr1().tabLocSite().cmbLocSiteCounty().getValue());
	voAddress.setAddressType(AddressType.LOC_SITE);
	value.setAddress(voAddress.countFieldsWithValue() > 0 ? voAddress : null);

	value.setIsVirtual(new Boolean(form.ctn1().lyr1().tabLocSite().chkVirtualLocationSite().getValue()));//wdev-2730
	if(value.getID_Location() == null)
		value.setIsActive(Boolean.TRUE);
	
	value.setCodeMappings(getCodeMappings(form.ctn1().lyr1().tabLocSite().grdSiteMappings()));
	
	value.setName(form.ctn1().lyr1().tabLocSite().txtLocSiteName().getValue());
	value.setType(form.ctn1().lyr1().tabLocSite().cmbLocSiteType().getValue());
	value.setSecureAccommodation(new Boolean(form.ctn1().lyr1().tabLocSite().chkLocSiteSecure().getValue()));
	value.setAllSecureAccommodation(new Boolean(form.ctn1().lyr1().tabLocSite().chkLocSiteAllSecure().getValue()));
	value.setReferringHospital(new Boolean(form.ctn1().lyr1().tabLocSite().chkLocSiteReferringHos().getValue()));
	value.setTreatingHosp(new Boolean(form.ctn1().lyr1().tabLocSite().chkLocSiteTreatingHos().getValue()));
	value.setCaseNoteFolderLocation(form.ctn1().lyr1().tabLocSite().chkCaseNotesLocSite().getValue());
	
	//wdev-17000
	if( LocationType.WARD.equals(form.ctn1().lyr1().tabLocSite().cmbLocSiteType().getValue()) )
	{
		value.setDisplayInEDTracking(form.ctn1().lyr1().tabLocSite().chkDisplayInEDTrackingLocSite().getValue());
	}
	else
	{
		value.setDisplayInEDTracking(null);
	}
	
	/*WDEV-11885
	PrinterVoCollection printers = value.getPrinters();
	if(printers == null) {			
		printers = new PrinterVoCollection();
	}
	*/
	
	//If Printers were deleted clear printers collection and delete default, newResult and OCS defaults printers
	if (form.getGlobalContext().getPrintersSelected() == null || 
			(form.getGlobalContext().getPrintersSelectedIsNotNull() && form.getGlobalContext().getPrintersSelected().size() == 0))
	{
		value.setPrinters(null);	//WDEV-11885
		value.setDefaultPrinter(null);
		value.setDesignatedPrinterForNewResults(null);
		value.setDesignatedPrinterForOCSOrder(null);
		
		return;
	}
	
	/*WDEV-11885
	for (int i = 0; i < form.getGlobalContext().getPrintersSelected().size(); i++)
	{
		printers.add(form.getGlobalContext().getPrintersSelected().get(i));
	}
	*/
	
	value.setPrinters(form.getGlobalContext().getPrintersSelected());	//WDEV-11885
			
	value.setDefaultPrinter(form.getGlobalContext().getDefaultPrinterIsNotNull() ? domain.getPrinter(form.getGlobalContext().getDefaultPrinter()) : null);									
	value.setDesignatedPrinterForNewResults(form.getGlobalContext().getDesignatedPrinterForNewResultsIsNotNull() ? domain.getPrinter(form.getGlobalContext().getDesignatedPrinterForNewResults()) : null);									
	value.setDesignatedPrinterForOCSOrder(form.getGlobalContext().getDesignatedPrinterForOCSOrderIsNotNull() ? domain.getPrinter(form.getGlobalContext().getDesignatedPrinterForOCSOrder()) : null);
	
	
}
 
Example 23
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 4 votes
private void populateDataFromScreen(LocMostVo value)
{
	PersonAddress voAddress = new PersonAddress();
	voAddress.setLine1(form.ctn1().lyr1().tabLoc().txtLocAdd1().getValue());
	voAddress.setLine2(form.ctn1().lyr1().tabLoc().txtLocAdd2().getValue());
	voAddress.setLine3(form.ctn1().lyr1().tabLoc().txtLocAdd3().getValue());
	voAddress.setLine4(form.ctn1().lyr1().tabLoc().txtLocAdd4().getValue());
	voAddress.setLine5(form.ctn1().lyr1().tabLoc().txtLocAdd5().getValue());
	voAddress.setPhone(form.ctn1().lyr1().tabLoc().txtLocPhone().getValue());
	voAddress.setFax(form.ctn1().lyr1().tabLoc().txtLocFaxNo().getValue());
	voAddress.setPostCode(form.ctn1().lyr1().tabLoc().txtLocPostCode().getValue());
	voAddress.setCounty(form.ctn1().lyr1().tabLoc().cmbLocCounty().getValue());
	voAddress.setAddressType(AddressType.LOCATION);

	value.setAddress(voAddress.countFieldsWithValue() > 0 ? voAddress : null);

	value.setIsVirtual(new Boolean(form.ctn1().lyr1().tabLoc().chkVirtualLocation().getValue()));//wdev-2730

	if(value.getID_Location() == null)
		value.setIsActive(Boolean.TRUE);

	value.setCodeMappings(getCodeMappings(form.ctn1().lyr1().tabLoc().grdLocMappings()));

	value.setName(form.ctn1().lyr1().tabLoc().txtLocName().getValue());
	value.setType(form.ctn1().lyr1().tabLoc().cmbLocType().getValue());
	value.setReferringHospital(new Boolean(form.ctn1().lyr1().tabLoc().chkReferringHosp().getValue()));
	value.setTreatingHosp(new Boolean(form.ctn1().lyr1().tabLoc().chkTreatingHosp().getValue()));
	value.setCaseNoteFolderLocation(form.ctn1().lyr1().tabLoc().chkCaseNoteLocation().getValue());
	
	//wdev-17000
	if( LocationType.WARD.equals(form.ctn1().lyr1().tabLoc().cmbLocType().getValue()) )
	{
		value.setDisplayInEDTracking(form.ctn1().lyr1().tabLoc().chkDisplayInEDTrackingLoc().getValue());
	}
	else
		value.setDisplayInEDTracking(null);
			
	/*WDEV-11885
	PrinterVoCollection printers = value.getPrinters();
	if(printers == null) {			
		printers = new PrinterVoCollection();
	}*/
	
	//If Printers were deleted clear printers collection and delete default, newResult and OCS defaults printers
	if (form.getGlobalContext().getPrintersSelected() == null || 
			(form.getGlobalContext().getPrintersSelectedIsNotNull() && form.getGlobalContext().getPrintersSelected().size() == 0))
	{
		value.setPrinters(null); //WDEV-11885
		value.setDefaultPrinter(null);
		value.setDesignatedPrinterForNewResults(null);
		value.setDesignatedPrinterForOCSOrder(null);
		
		return;
	}
	
	/*WDEV-11885
	for (int i = 0; i < form.getGlobalContext().getPrintersSelected().size(); i++)
	{
		printers.add(form.getGlobalContext().getPrintersSelected().get(i));
	}
	*/
	
	value.setPrinters(form.getGlobalContext().getPrintersSelected());	//WDEV-11885
			
	value.setDefaultPrinter(form.getGlobalContext().getDefaultPrinterIsNotNull() ? domain.getPrinter(form.getGlobalContext().getDefaultPrinter()) : null);									
	value.setDesignatedPrinterForNewResults(form.getGlobalContext().getDesignatedPrinterForNewResultsIsNotNull() ? domain.getPrinter(form.getGlobalContext().getDesignatedPrinterForNewResults()) : null);									
	value.setDesignatedPrinterForOCSOrder(form.getGlobalContext().getDesignatedPrinterForOCSOrderIsNotNull() ? domain.getPrinter(form.getGlobalContext().getDesignatedPrinterForOCSOrder()) : null);
	
	
}
 
Example 24
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 4 votes
private ClientAddressVo populateDataFromScreen() 
{
	ClientAddressVo clientAddress = new ClientAddressVo();
	
	PciAddressHistoryVoCollection personAddressHistoryCollection;
	
	if(form.getLocalContext().getAddressHistoryIsNotNull())
	{
		personAddressHistoryCollection = (PciAddressHistoryVoCollection) form.getLocalContext().getAddressHistory().clone();
	}
	else
	{
		personAddressHistoryCollection = new PciAddressHistoryVoCollection();
	}
	
	PersonAddress personAddress = new PersonAddress();
	personAddress.setLine1(form.txtAddressLine1().getValue());
	personAddress.setLine2(form.txtAddressLine2().getValue());
	personAddress.setLine3(form.txtAddressLine3().getValue());
	personAddress.setLine4(form.txtAddressLine4().getValue());
	personAddress.setPostCode(form.txtPostCode().getValue());
	personAddress.setCounty(form.cmbCounty().getValue());
	
	CommunityCareVo communityCare = form.getLocalContext().getCommunityCare();
	
	if(communityCare == null)
		communityCare = new CommunityCareVo();
	
	communityCare.setCca(form.cmbCCA().getValue());
	communityCare.setLho(form.cmbLHO().getValue());
	communityCare.setSector(form.cmbSector().getValue());
	communityCare.setPhnDistrict(form.cmbPHN().getValue());
	communityCare.setDED(form.qmbDED().getValue());
	
	PciAddressHistoryVo newAddressHistoty = createAddressHistoryVo(personAddress, communityCare);
	
	if(personAddressHistoryCollection.size() > 0)
	{
		//verify if only date notified changed
		if(hasAddressChanged(newAddressHistoty, personAddressHistoryCollection.get(0)))
		{
			personAddressHistoryCollection.add(0, newAddressHistoty);
		}
	}
	else 
	{
		personAddressHistoryCollection.add(0, newAddressHistoty);
	}
		
	clientAddress.setPersonAddress(personAddress);
	
	communityCare.setAddressHistory(personAddressHistoryCollection);
	clientAddress.setCommunityCare(communityCare);
	
	return clientAddress;
}
 
Example 25
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 4 votes
private void populateDataFromScreen(LocSiteVo value)
{
	
	PersonAddress voAddress = new PersonAddress();			//wdev-16387
	
	voAddress.setLine1(form.ctn1().lyr1().tabLocSite().txtLocSiteAdd1().getValue());
	voAddress.setLine2(form.ctn1().lyr1().tabLocSite().txtLocSiteAdd2().getValue());
	voAddress.setLine3(form.ctn1().lyr1().tabLocSite().txtLocSiteAdd3().getValue());
	voAddress.setLine4(form.ctn1().lyr1().tabLocSite().txtLocSiteAdd4().getValue());
	voAddress.setLine5(form.ctn1().lyr1().tabLocSite().txtLocSiteAdd5().getValue());
	voAddress.setPhone(form.ctn1().lyr1().tabLocSite().txtLocSitePhone().getValue());
	voAddress.setFax(form.ctn1().lyr1().tabLocSite().txtLocSiteFaxNo().getValue());
	voAddress.setPostCode(form.ctn1().lyr1().tabLocSite().txtLocSitePostCode().getValue());
	voAddress.setCounty(form.ctn1().lyr1().tabLocSite().cmbLocSiteCounty().getValue());
	voAddress.setAddressType(AddressType.LOC_SITE);
	value.setAddress(voAddress.countFieldsWithValue() > 0 ? voAddress : null);

	value.setIsVirtual(new Boolean(form.ctn1().lyr1().tabLocSite().chkVirtualLocationSite().getValue()));//wdev-2730
	if(value.getID_Location() == null)
		value.setIsActive(Boolean.TRUE);
	
	value.setCodeMappings(getCodeMappings(form.ctn1().lyr1().tabLocSite().grdSiteMappings()));
	
	value.setName(form.ctn1().lyr1().tabLocSite().txtLocSiteName().getValue());
	value.setType(form.ctn1().lyr1().tabLocSite().cmbLocSiteType().getValue());
	value.setSecureAccommodation(new Boolean(form.ctn1().lyr1().tabLocSite().chkLocSiteSecure().getValue()));
	value.setAllSecureAccommodation(new Boolean(form.ctn1().lyr1().tabLocSite().chkLocSiteAllSecure().getValue()));
	value.setReferringHospital(new Boolean(form.ctn1().lyr1().tabLocSite().chkLocSiteReferringHos().getValue()));
	value.setTreatingHosp(new Boolean(form.ctn1().lyr1().tabLocSite().chkLocSiteTreatingHos().getValue()));
	
	//wdev-17000
	if( LocationType.WARD.equals(form.ctn1().lyr1().tabLocSite().cmbLocSiteType().getValue()) )
	{
		value.setDisplayInEDTracking(form.ctn1().lyr1().tabLocSite().chkDisplayInEDTrackingLocSite().getValue());
	}
	else
	{
		value.setDisplayInEDTracking(null);
	}
	
	/*WDEV-11885
	PrinterVoCollection printers = value.getPrinters();
	if(printers == null) {			
		printers = new PrinterVoCollection();
	}
	*/
	
	//If Printers were deleted clear printers collection and delete default, newResult and OCS defaults printers
	if (form.getGlobalContext().getPrintersSelected() == null || 
			(form.getGlobalContext().getPrintersSelectedIsNotNull() && form.getGlobalContext().getPrintersSelected().size() == 0))
	{
		value.setPrinters(null);	//WDEV-11885
		value.setDefaultPrinter(null);
		value.setDesignatedPrinterForNewResults(null);
		value.setDesignatedPrinterForOCSOrder(null);
		
		return;
	}
	
	/*WDEV-11885
	for (int i = 0; i < form.getGlobalContext().getPrintersSelected().size(); i++)
	{
		printers.add(form.getGlobalContext().getPrintersSelected().get(i));
	}
	*/
	
	value.setPrinters(form.getGlobalContext().getPrintersSelected());	//WDEV-11885
			
	value.setDefaultPrinter(form.getGlobalContext().getDefaultPrinterIsNotNull() ? domain.getPrinter(form.getGlobalContext().getDefaultPrinter()) : null);									
	value.setDesignatedPrinterForNewResults(form.getGlobalContext().getDesignatedPrinterForNewResultsIsNotNull() ? domain.getPrinter(form.getGlobalContext().getDesignatedPrinterForNewResults()) : null);									
	value.setDesignatedPrinterForOCSOrder(form.getGlobalContext().getDesignatedPrinterForOCSOrderIsNotNull() ? domain.getPrinter(form.getGlobalContext().getDesignatedPrinterForOCSOrder()) : null);
	
	
}
 
Example 26
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 4 votes
private void populateDataFromScreen(LocMostVo value)
{
	PersonAddress voAddress = new PersonAddress();
	voAddress.setLine1(form.ctn1().lyr1().tabLoc().txtLocAdd1().getValue());
	voAddress.setLine2(form.ctn1().lyr1().tabLoc().txtLocAdd2().getValue());
	voAddress.setLine3(form.ctn1().lyr1().tabLoc().txtLocAdd3().getValue());
	voAddress.setLine4(form.ctn1().lyr1().tabLoc().txtLocAdd4().getValue());
	voAddress.setLine5(form.ctn1().lyr1().tabLoc().txtLocAdd5().getValue());
	voAddress.setPhone(form.ctn1().lyr1().tabLoc().txtLocPhone().getValue());
	voAddress.setFax(form.ctn1().lyr1().tabLoc().txtLocFaxNo().getValue());
	voAddress.setPostCode(form.ctn1().lyr1().tabLoc().txtLocPostCode().getValue());
	voAddress.setCounty(form.ctn1().lyr1().tabLoc().cmbLocCounty().getValue());
	voAddress.setAddressType(AddressType.LOCATION);

	value.setAddress(voAddress.countFieldsWithValue() > 0 ? voAddress : null);

	value.setIsVirtual(new Boolean(form.ctn1().lyr1().tabLoc().chkVirtualLocation().getValue()));//wdev-2730

	if(value.getID_Location() == null)
		value.setIsActive(Boolean.TRUE);

	value.setCodeMappings(getCodeMappings(form.ctn1().lyr1().tabLoc().grdLocMappings()));

	value.setName(form.ctn1().lyr1().tabLoc().txtLocName().getValue());
	value.setType(form.ctn1().lyr1().tabLoc().cmbLocType().getValue());
	value.setReferringHospital(new Boolean(form.ctn1().lyr1().tabLoc().chkReferringHosp().getValue()));
	value.setTreatingHosp(new Boolean(form.ctn1().lyr1().tabLoc().chkTreatingHosp().getValue()));
	
	//wdev-17000
	if( LocationType.WARD.equals(form.ctn1().lyr1().tabLoc().cmbLocType().getValue()) )
	{
		value.setDisplayInEDTracking(form.ctn1().lyr1().tabLoc().chkDisplayInEDTrackingLoc().getValue());
	}
	else
		value.setDisplayInEDTracking(null);
			
	/*WDEV-11885
	PrinterVoCollection printers = value.getPrinters();
	if(printers == null) {			
		printers = new PrinterVoCollection();
	}*/
	
	//If Printers were deleted clear printers collection and delete default, newResult and OCS defaults printers
	if (form.getGlobalContext().getPrintersSelected() == null || 
			(form.getGlobalContext().getPrintersSelectedIsNotNull() && form.getGlobalContext().getPrintersSelected().size() == 0))
	{
		value.setPrinters(null); //WDEV-11885
		value.setDefaultPrinter(null);
		value.setDesignatedPrinterForNewResults(null);
		value.setDesignatedPrinterForOCSOrder(null);
		
		return;
	}
	
	/*WDEV-11885
	for (int i = 0; i < form.getGlobalContext().getPrintersSelected().size(); i++)
	{
		printers.add(form.getGlobalContext().getPrintersSelected().get(i));
	}
	*/
	
	value.setPrinters(form.getGlobalContext().getPrintersSelected());	//WDEV-11885
			
	value.setDefaultPrinter(form.getGlobalContext().getDefaultPrinterIsNotNull() ? domain.getPrinter(form.getGlobalContext().getDefaultPrinter()) : null);									
	value.setDesignatedPrinterForNewResults(form.getGlobalContext().getDesignatedPrinterForNewResultsIsNotNull() ? domain.getPrinter(form.getGlobalContext().getDesignatedPrinterForNewResults()) : null);									
	value.setDesignatedPrinterForOCSOrder(form.getGlobalContext().getDesignatedPrinterForOCSOrderIsNotNull() ? domain.getPrinter(form.getGlobalContext().getDesignatedPrinterForOCSOrder()) : null);
	
	
}
 
Example 27
Project: openmaxims-linux   File: Logic.java   View Source Code Vote up 4 votes
private void populateDataFromScreen(LocMostVo value)
{
	PersonAddress voAddress = new PersonAddress();
	voAddress.setLine1(form.ctn1().lyr1().tabLoc().txtLocAdd1().getValue());
	voAddress.setLine2(form.ctn1().lyr1().tabLoc().txtLocAdd2().getValue());
	voAddress.setLine3(form.ctn1().lyr1().tabLoc().txtLocAdd3().getValue());
	voAddress.setLine4(form.ctn1().lyr1().tabLoc().txtLocAdd4().getValue());
	voAddress.setLine5(form.ctn1().lyr1().tabLoc().txtLocAdd5().getValue());
	voAddress.setPhone(form.ctn1().lyr1().tabLoc().txtLocPhone().getValue());
	voAddress.setFax(form.ctn1().lyr1().tabLoc().txtLocFaxNo().getValue());
	voAddress.setPostCode(form.ctn1().lyr1().tabLoc().txtLocPostCode().getValue());
	voAddress.setCounty(form.ctn1().lyr1().tabLoc().cmbLocCounty().getValue());
	voAddress.setAddressType(AddressType.LOCATION);

	value.setAddress(voAddress.countFieldsWithValue() > 0 ? voAddress : null);

	value.setIsVirtual(new Boolean(form.ctn1().lyr1().tabLoc().chkVirtualLocation().getValue()));//wdev-2730

	if(value.getID_Location() == null)
		value.setIsActive(Boolean.TRUE);

	value.setCodeMappings(getCodeMappings(form.ctn1().lyr1().tabLoc().grdLocMappings()));

	value.setName(form.ctn1().lyr1().tabLoc().txtLocName().getValue());
	value.setType(form.ctn1().lyr1().tabLoc().cmbLocType().getValue());
	value.setReferringHospital(new Boolean(form.ctn1().lyr1().tabLoc().chkReferringHosp().getValue()));
	value.setTreatingHosp(new Boolean(form.ctn1().lyr1().tabLoc().chkTreatingHosp().getValue()));
	
	//wdev-17000
	if( LocationType.WARD.equals(form.ctn1().lyr1().tabLoc().cmbLocType().getValue()) )
	{
		value.setDisplayInEDTracking(form.ctn1().lyr1().tabLoc().chkDisplayInEDTrackingLoc().getValue());
	}
	else
		value.setDisplayInEDTracking(null);
			
	/*WDEV-11885
	PrinterVoCollection printers = value.getPrinters();
	if(printers == null) {			
		printers = new PrinterVoCollection();
	}*/
	
	//If Printers were deleted clear printers collection and delete default, newResult and OCS defaults printers
	if (form.getGlobalContext().getPrintersSelected() == null || 
			(form.getGlobalContext().getPrintersSelectedIsNotNull() && form.getGlobalContext().getPrintersSelected().size() == 0))
	{
		value.setPrinters(null); //WDEV-11885
		value.setDefaultPrinter(null);
		value.setDesignatedPrinterForNewResults(null);
		value.setDesignatedPrinterForOCSOrder(null);
		
		return;
	}
	
	/*WDEV-11885
	for (int i = 0; i < form.getGlobalContext().getPrintersSelected().size(); i++)
	{
		printers.add(form.getGlobalContext().getPrintersSelected().get(i));
	}
	*/
	
	value.setPrinters(form.getGlobalContext().getPrintersSelected());	//WDEV-11885
			
	value.setDefaultPrinter(form.getGlobalContext().getDefaultPrinterIsNotNull() ? domain.getPrinter(form.getGlobalContext().getDefaultPrinter()) : null);									
	value.setDesignatedPrinterForNewResults(form.getGlobalContext().getDesignatedPrinterForNewResultsIsNotNull() ? domain.getPrinter(form.getGlobalContext().getDesignatedPrinterForNewResults()) : null);									
	value.setDesignatedPrinterForOCSOrder(form.getGlobalContext().getDesignatedPrinterForOCSOrderIsNotNull() ? domain.getPrinter(form.getGlobalContext().getDesignatedPrinterForOCSOrder()) : null);
	
	
}