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

The following are Jave code examples for showing how to use setAddressType() 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
@Override
protected void onBtnOkClick() throws ims.framework.exceptions.PresentationLogicException
{
	if(form.getMode().equals(FormMode.EDIT)){
		
		if(form.dteDate().getValue()==null){
			engine.showMessage("Date is mandatory.");
			return;
		}
		else if(form.dteDate().getValue().isGreaterThan(new Date())){
			engine.showMessage("Date cannot be in the future.");
			return;
		}
		PersonAddress voPersonAddress = (PersonAddress) form.getLocalContext().getPersonAddress().clone();
		voPersonAddress.setNotificationDate(form.dteDate().getValue());
		voPersonAddress.setAddressType(AddressType.HISTORICAL);
		
		form.getGlobalContext().Core.setPersonAddress(voPersonAddress);
		
		engine.close(DialogResult.OK);
		return;
	}
	
	engine.close(DialogResult.CANCEL);
}
 
Example 2
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 3
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 6 votes
@Override
protected void onBtnOkClick() throws ims.framework.exceptions.PresentationLogicException
{
	if(form.getMode().equals(FormMode.EDIT)){
		
		if(form.dteDate().getValue()==null){
			engine.showMessage("Date is mandatory.");
			return;
		}
		else if(form.dteDate().getValue().isGreaterThan(new Date())){
			engine.showMessage("Date cannot be in the future.");
			return;
		}
		PersonAddress voPersonAddress = (PersonAddress) form.getLocalContext().getPersonAddress().clone();
		voPersonAddress.setNotificationDate(form.dteDate().getValue());
		voPersonAddress.setAddressType(AddressType.HISTORICAL);
		
		form.getGlobalContext().Core.setPersonAddress(voPersonAddress);
		
		engine.close(DialogResult.OK);
		return;
	}
	
	engine.close(DialogResult.CANCEL);
}
 
Example 4
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 5
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 6 votes
@Override
protected void onBtnOkClick() throws ims.framework.exceptions.PresentationLogicException
{
	if(form.getMode().equals(FormMode.EDIT)){
		
		if(form.dteDate().getValue()==null){
			engine.showMessage("Date is mandatory.");
			return;
		}
		else if(form.dteDate().getValue().isGreaterThan(new Date())){
			engine.showMessage("Date cannot be in the future.");
			return;
		}
		PersonAddress voPersonAddress = (PersonAddress) form.getLocalContext().getPersonAddress().clone();
		voPersonAddress.setNotificationDate(form.dteDate().getValue());
		voPersonAddress.setAddressType(AddressType.HISTORICAL);
		
		form.getGlobalContext().Core.setPersonAddress(voPersonAddress);
		
		engine.close(DialogResult.OK);
		return;
	}
	
	engine.close(DialogResult.CANCEL);
}
 
Example 6
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 7
Project: openmaxims-linux   File: Logic.java   View Source Code Vote up 6 votes
@Override
protected void onBtnOkClick() throws ims.framework.exceptions.PresentationLogicException
{
	if(form.getMode().equals(FormMode.EDIT)){
		
		if(form.dteDate().getValue()==null){
			engine.showMessage("Date is mandatory.");
			return;
		}
		else if(form.dteDate().getValue().isGreaterThan(new Date())){
			engine.showMessage("Date cannot be in the future.");
			return;
		}
		PersonAddress voPersonAddress = (PersonAddress) form.getLocalContext().getPersonAddress().clone();
		voPersonAddress.setNotificationDate(form.dteDate().getValue());
		voPersonAddress.setAddressType(AddressType.HISTORICAL);
		
		form.getGlobalContext().Core.setPersonAddress(voPersonAddress);
		
		engine.close(DialogResult.OK);
		return;
	}
	
	engine.close(DialogResult.CANCEL);
}
 
Example 8
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 9
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 10
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 11
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 12
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 13
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 14
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 15
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 16
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);
	
	
}