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

The following are Jave code examples for showing how to use getCounty() 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 5 votes
private void displayPracticeAddress(OrganisationWithSitesVo practice)
{
	if (practice!=null) //WDEV-16051
	{
		form.txtViewingAddress().setValue(practice.getName());
	
		PersonAddress address = practice.getAddress();
		
		if (address != null)
		{
			form.txtAddr1().setValue(address.getLine1());
			form.txtAddr2().setValue(address.getLine2());
			form.txtAddr3().setValue(address.getLine3());
			form.txtAddr4().setValue(address.getLine4());
			form.txtAddr5().setValue(address.getLine5());
			
			if (ConfigFlag.UI.DEMOGRAPHICS_TYPE.getValue().equals("IRISH") && address.getCounty() != null)
			{
				form.txtCounty().setValue(address.getCounty().getText());
			}
			else
			{
				form.txtCounty().setValue(address.getPostCode());
			}
		}
		
		//WDEV-16041
		setPracticePhoneAndFax(practice);
	}
}
 
Example 2
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
/**
 * 
 */
private void displaySurgeryAddress()
{
	if (form.getGlobalContext().Core.getGPSurgeryIsNotNull() && form.getGlobalContext().Core.getGPSurgery().getNameIsNotNull())
	{
		
		form.txtViewingAddress().setValue(form.getGlobalContext().Core.getGPSurgery().getName().toString());
			
		PersonAddress address = form.getGlobalContext().Core.getGPSurgery().getAddress();
		if (address != null)
		{
			form.txtAddr1().setValue(address.getLine1());
			form.txtAddr2().setValue(address.getLine2());
			form.txtAddr3().setValue(address.getLine3());
			form.txtAddr4().setValue(address.getLine4());
			form.txtAddr5().setValue(address.getLine5());
			
			if (ConfigFlag.UI.DEMOGRAPHICS_TYPE.getValue().equals("IRISH") && address.getCounty() != null)
			{
				form.txtCounty().setValue(address.getCounty().getText());
			}
			else
			{
				form.txtCounty().setValue(address.getPostCode());
			}
		}
		
		//WDEV-16041
		setSurgeryPhoneAndFax();
	}
}
 
Example 3
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 5 votes
private void displayPracticeAddress(OrganisationWithSitesVo practice)
{
	if (practice!=null) //WDEV-16051
	{
		form.txtViewingAddress().setValue(practice.getName());
	
		PersonAddress address = practice.getAddress();
		
		if (address != null)
		{
			form.txtAddr1().setValue(address.getLine1());
			form.txtAddr2().setValue(address.getLine2());
			form.txtAddr3().setValue(address.getLine3());
			form.txtAddr4().setValue(address.getLine4());
			form.txtAddr5().setValue(address.getLine5());
			
			if (ConfigFlag.UI.DEMOGRAPHICS_TYPE.getValue().equals("IRISH") && address.getCounty() != null)
			{
				form.txtCounty().setValue(address.getCounty().getText());
			}
			else
			{
				form.txtCounty().setValue(address.getPostCode());
			}
		}
		
		//WDEV-16041
		setPracticePhoneAndFax(practice);
	}
}
 
Example 4
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 5 votes
/**
 * 
 */
private void displaySurgeryAddress()
{
	if (form.getGlobalContext().Core.getGPSurgeryIsNotNull() && form.getGlobalContext().Core.getGPSurgery().getNameIsNotNull())
	{
		
		form.txtViewingAddress().setValue(form.getGlobalContext().Core.getGPSurgery().getName().toString());
			
		PersonAddress address = form.getGlobalContext().Core.getGPSurgery().getAddress();
		if (address != null)
		{
			form.txtAddr1().setValue(address.getLine1());
			form.txtAddr2().setValue(address.getLine2());
			form.txtAddr3().setValue(address.getLine3());
			form.txtAddr4().setValue(address.getLine4());
			form.txtAddr5().setValue(address.getLine5());
			
			if (ConfigFlag.UI.DEMOGRAPHICS_TYPE.getValue().equals("IRISH") && address.getCounty() != null)
			{
				form.txtCounty().setValue(address.getCounty().getText());
			}
			else
			{
				form.txtCounty().setValue(address.getPostCode());
			}
		}
		
		//WDEV-16041
		setSurgeryPhoneAndFax();
	}
}
 
Example 5
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 5 votes
private void displayPracticeAddress(OrganisationWithSitesVo practice)
{
	if (practice!=null) //WDEV-16051
	{
		form.txtViewingAddress().setValue(practice.getName());
	
		PersonAddress address = practice.getAddress();
		
		if (address != null)
		{
			form.txtAddr1().setValue(address.getLine1());
			form.txtAddr2().setValue(address.getLine2());
			form.txtAddr3().setValue(address.getLine3());
			form.txtAddr4().setValue(address.getLine4());
			form.txtAddr5().setValue(address.getLine5());
			
			if (ConfigFlag.UI.DEMOGRAPHICS_TYPE.getValue().equals("IRISH") && address.getCounty() != null)
			{
				form.txtCounty().setValue(address.getCounty().getText());
			}
			else
			{
				form.txtCounty().setValue(address.getPostCode());
			}
		}
		
		//WDEV-16041
		setPracticePhoneAndFax(practice);
	}
}
 
Example 6
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 5 votes
/**
 * 
 */
private void displaySurgeryAddress()
{
	if (form.getGlobalContext().Core.getGPSurgeryIsNotNull() && form.getGlobalContext().Core.getGPSurgery().getNameIsNotNull())
	{
		
		form.txtViewingAddress().setValue(form.getGlobalContext().Core.getGPSurgery().getName().toString());
			
		PersonAddress address = form.getGlobalContext().Core.getGPSurgery().getAddress();
		if (address != null)
		{
			form.txtAddr1().setValue(address.getLine1());
			form.txtAddr2().setValue(address.getLine2());
			form.txtAddr3().setValue(address.getLine3());
			form.txtAddr4().setValue(address.getLine4());
			form.txtAddr5().setValue(address.getLine5());
			
			if (ConfigFlag.UI.DEMOGRAPHICS_TYPE.getValue().equals("IRISH") && address.getCounty() != null)
			{
				form.txtCounty().setValue(address.getCounty().getText());
			}
			else
			{
				form.txtCounty().setValue(address.getPostCode());
			}
		}
		
		//WDEV-16041
		setSurgeryPhoneAndFax();
	}
}
 
Example 7
Project: openmaxims-linux   File: Logic.java   View Source Code Vote up 5 votes
private void displayPracticeAddress(OrganisationWithSitesVo practice)
{
	if (practice!=null) //WDEV-16051
	{
		form.txtViewingAddress().setValue(practice.getName());
	
		PersonAddress address = practice.getAddress();
		
		if (address != null)
		{
			form.txtAddr1().setValue(address.getLine1());
			form.txtAddr2().setValue(address.getLine2());
			form.txtAddr3().setValue(address.getLine3());
			form.txtAddr4().setValue(address.getLine4());
			form.txtAddr5().setValue(address.getLine5());
			
			if (ConfigFlag.UI.DEMOGRAPHICS_TYPE.getValue().equals("IRISH") && address.getCounty() != null)
			{
				form.txtCounty().setValue(address.getCounty().getText());
			}
			else
			{
				form.txtCounty().setValue(address.getPostCode());
			}
		}
		
		//WDEV-16041
		setPracticePhoneAndFax(practice);
	}
}
 
Example 8
Project: openmaxims-linux   File: Logic.java   View Source Code Vote up 5 votes
/**
 * 
 */
private void displaySurgeryAddress()
{
	if (form.getGlobalContext().Core.getGPSurgeryIsNotNull() && form.getGlobalContext().Core.getGPSurgery().getNameIsNotNull())
	{
		
		form.txtViewingAddress().setValue(form.getGlobalContext().Core.getGPSurgery().getName().toString());
			
		PersonAddress address = form.getGlobalContext().Core.getGPSurgery().getAddress();
		if (address != null)
		{
			form.txtAddr1().setValue(address.getLine1());
			form.txtAddr2().setValue(address.getLine2());
			form.txtAddr3().setValue(address.getLine3());
			form.txtAddr4().setValue(address.getLine4());
			form.txtAddr5().setValue(address.getLine5());
			
			if (ConfigFlag.UI.DEMOGRAPHICS_TYPE.getValue().equals("IRISH") && address.getCounty() != null)
			{
				form.txtCounty().setValue(address.getCounty().getText());
			}
			else
			{
				form.txtCounty().setValue(address.getPostCode());
			}
		}
		
		//WDEV-16041
		setSurgeryPhoneAndFax();
	}
}
 
Example 9
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 4 votes
private boolean hasAddressChanged(PersonAddress newAddress, PersonAddress previousAddress) 
{
	
	if (previousAddress == null || isEmptyAddress(previousAddress))
		return false;
	else if(newAddress == null)
		return true;
	
	if (previousAddress.getLine1() == null && newAddress.getLine1() == null)
						;
	else if ((previousAddress.getLine1() != null && newAddress.getLine1() == null)	|| (previousAddress.getLine1() == null && newAddress.getLine1() != null))
					return true;
	else if (!previousAddress.getLine1().equals(newAddress.getLine1()))
					return true;
	
	if (previousAddress.getLine2() == null && newAddress.getLine2() == null)
						;
	else if ((previousAddress.getLine2() != null && newAddress.getLine2() == null) || (previousAddress.getLine2() == null && newAddress.getLine2() != null))
					return true;
	else if (!previousAddress.getLine2().equals(newAddress.getLine2()))
					return true;
	
	if(previousAddress.getLine3() == null && newAddress.getLine3() == null)
						;
	else if ((previousAddress.getLine3() != null && newAddress.getLine3() == null) || (previousAddress.getLine3() == null && newAddress.getLine3() != null))
					return true;
	else if (!previousAddress.getLine3().equals(newAddress.getLine3()))
					return true;
	
	if(previousAddress.getLine4() == null && newAddress.getLine4() == null)
						;
	else if ((previousAddress.getLine4() != null && newAddress.getLine4() == null) || (previousAddress.getLine4() == null && newAddress.getLine4()!= null))
					return true;
	else if (!previousAddress.getLine4().equals(newAddress.getLine4()))
					return true;
	////WDEV-19137 ----------------------------------------------
	if(previousAddress.getLine5() == null && (newAddress.getLine5() == null || newAddress.getLine5().equals("")))		//wdev-19228
						;
	else if ((previousAddress.getLine5() != null && newAddress.getLine5() == null) || (previousAddress.getLine5() == null && newAddress.getLine5() != null))
					return true;
	else if (!previousAddress.getLine5().equals(newAddress.getLine5()))
					return true;
	
	if(previousAddress.getCounty() == null && newAddress.getCounty() == null)
						;
	else if ((previousAddress.getCounty() != null && newAddress.getCounty() == null) || (previousAddress.getCounty() == null && newAddress.getCounty() != null))
					return true;
	else if (!previousAddress.getCounty().equals(newAddress.getCounty()))
					return true;
	////WDEV-19137 ----------------------------------------------
	
	//WDEV-19597 -- Area Of Residence added
	if(previousAddress.getAreaOfResidence() == null && newAddress.getAreaOfResidence() == null)
						;
	else if ((previousAddress.getAreaOfResidence() != null && newAddress.getAreaOfResidence() == null) || (previousAddress.getAreaOfResidence() == null && newAddress.getAreaOfResidence() != null))
					return true;
	else if (!previousAddress.getAreaOfResidence().equals(newAddress.getAreaOfResidence()))
					return true;
	
	if (previousAddress.getPostCode() == null && newAddress.getPostCode() == null)
						;
	else if((previousAddress.getPostCode()!= null && newAddress.getPostCode() == null) || (previousAddress.getPostCode() == null && newAddress.getPostCode() != null))
					return true;
	else if (!previousAddress.getPostCode().replaceAll("[^a-zA-Z0-9]", "").equals(newAddress.getPostCode().replaceAll("[^a-zA-Z0-9]", "")))
					return true;
	
	//WDEV-22763		
	if(previousAddress.getCountry() == null && newAddress.getCountry() == null)
						;
	else if ((previousAddress.getCountry() != null && newAddress.getCountry() == null) || (previousAddress.getCountry() == null && newAddress.getCountry() != null))
					return true;
	else if (!previousAddress.getCountry().equals(newAddress.getCountry()))
					return true;
	//---------------------------
	return false;
}
 
Example 10
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 4 votes
private void displaySurgeryAddress()
{
	if (form.getGlobalContext().Core.getGPSurgeryIsNotNull() && form.getGlobalContext().Core.getGPSurgery().getNameIsNotNull())
	{
		
		//form.txtViewingAddress().setValue(form.getGlobalContext().Core.getGPSurgery().getName().toString());
			
		PersonAddress address = form.getGlobalContext().Core.getGPSurgery().getAddress();
		if (address != null)
		{
			form.txtAddr1().setValue(address.getLine1());
			form.txtAddr1().setTooltip(address.getLine1());
			form.txtAddr2().setValue(address.getLine2());
			form.txtAddr2().setTooltip(address.getLine2());
			form.txtAddr3().setValue(address.getLine3());
			form.txtAddr3().setTooltip(address.getLine3());
			form.txtAddr4().setValue(address.getLine4());
			form.txtAddr4().setTooltip(address.getLine4());
			form.txtAddr5().setValue(address.getLine5());
			form.txtAddr5().setTooltip(address.getLine5());
			
			if (ConfigFlag.UI.DEMOGRAPHICS_TYPE.getValue().equals("IRISH") && address.getCounty() != null)
			{
				form.txtCounty().setValue(address.getCounty().getText());
				form.txtCounty().setTooltip(address.getCounty().getText());
				form.txtPostCode().setValue(address.getPostCode());		//wdev-19176
				form.txtPostCode().setTooltip(address.getPostCode());	//wdev-19176
			}
			else
			{
				//form.txtCounty().setValue(address.getPostCode());
				//form.txtCounty().setTooltip(address.getPostCode());
				form.txtPostCode().setValue(address.getPostCode());		//wdev-19176
				form.txtPostCode().setTooltip(address.getPostCode());	//wdev-19176
			}
		}
		
		//WDEV-16041
		setSurgeryPhoneAndFax();
	}
}
 
Example 11
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 4 votes
private void displayPracticeAddress(OrganisationWithSitesVo practice)
{
	if (practice!=null) //WDEV-16051
	{
		//form.txtViewingAddress().setValue(practice.getName());
	
		PersonAddress address = practice.getAddress();
		
		if (address != null)
		{
			form.txtAddr1().setValue(address.getLine1());
			form.txtAddr1().setTooltip(address.getLine1());
			form.txtAddr2().setValue(address.getLine2());
			form.txtAddr2().setTooltip(address.getLine2());
			form.txtAddr3().setValue(address.getLine3());
			form.txtAddr3().setTooltip(address.getLine3());
			form.txtAddr4().setValue(address.getLine4());
			form.txtAddr4().setTooltip(address.getLine4());
			form.txtAddr5().setValue(address.getLine5());
			form.txtAddr5().setTooltip(address.getLine5());
			
			if (ConfigFlag.UI.DEMOGRAPHICS_TYPE.getValue().equals("IRISH") && address.getCounty() != null)
			{
				form.txtCounty().setValue(address.getCounty().getText());
				form.txtCounty().setTooltip(address.getCounty().getText());
				form.txtPostCode().setValue(address.getPostCode());		//wdev-19176
				form.txtPostCode().setTooltip(address.getPostCode());	//wdev-19176
			}
			else
			{
				//form.txtCounty().setValue(address.getPostCode());
				//form.txtCounty().setTooltip(address.getPostCode());
				form.txtPostCode().setValue(address.getPostCode());		//wdev-19176
				form.txtPostCode().setTooltip(address.getPostCode());	//wdev-19176
			}
		}
		
		//WDEV-16041
		setPracticePhoneAndFax(practice);
	}
}
 
Example 12
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 4 votes
private boolean hasAddressChanged(PersonAddress previousAddress) //WDEV-19137 Now includes check for County && Address Line 5 
{
	
	PersonAddress newAddress = form.ccAddressSearch().getValue();
	
	if (previousAddress == null || isEmptyAddress(previousAddress))
		return false;
	else if(newAddress == null)
		return true;
	
	if (previousAddress.getLine1() == null && newAddress.getLine1() == null)
						;
	else if ((previousAddress.getLine1() != null && newAddress.getLine1() == null)	|| (previousAddress.getLine1() == null && newAddress.getLine1() != null))
					return true;
	else if (!previousAddress.getLine1().equals(newAddress.getLine1()))
					return true;
	
	if (previousAddress.getLine2() == null && newAddress.getLine2() == null)
						;
	else if ((previousAddress.getLine2() != null && newAddress.getLine2() == null) || (previousAddress.getLine2() == null && newAddress.getLine2() != null))
					return true;
	else if (!previousAddress.getLine2().equals(newAddress.getLine2()))
					return true;
	
	if(previousAddress.getLine3() == null && newAddress.getLine3() == null)
						;
	else if ((previousAddress.getLine3() != null && newAddress.getLine3() == null) || (previousAddress.getLine3() == null && newAddress.getLine3() != null))
					return true;
	else if (!previousAddress.getLine3().equals(newAddress.getLine3()))
					return true;
	
	if(previousAddress.getLine4() == null && newAddress.getLine4() == null)
						;
	else if ((previousAddress.getLine4() != null && newAddress.getLine4() == null) || (previousAddress.getLine4() == null && newAddress.getLine4()!= null))
					return true;
	else if (!previousAddress.getLine4().equals(newAddress.getLine4()))
					return true;
	////WDEV-19137 ----------------------------------------------
	if(previousAddress.getLine5() == null && (newAddress.getLine5() == null || newAddress.getLine5().equals("")))		//wdev-19228
						;
	else if ((previousAddress.getLine5() != null && newAddress.getLine5() == null) || (previousAddress.getLine5() == null && newAddress.getLine5() != null))
					return true;
	else if (!previousAddress.getLine5().equals(newAddress.getLine5()))
					return true;
	
	if(previousAddress.getCounty() == null && newAddress.getCounty() == null)
						;
	else if ((previousAddress.getCounty() != null && newAddress.getCounty() == null) || (previousAddress.getCounty() == null && newAddress.getCounty() != null))
					return true;
	else if (!previousAddress.getCounty().equals(newAddress.getCounty()))
					return true;
	////WDEV-19137 ----------------------------------------------
	
	//WDEV-19597 -- Area Of Residence added
	if(previousAddress.getAreaOfResidence() == null && newAddress.getAreaOfResidence() == null)
						;
	else if ((previousAddress.getAreaOfResidence() != null && newAddress.getAreaOfResidence() == null) || (previousAddress.getAreaOfResidence() == null && newAddress.getAreaOfResidence() != null))
					return true;
	else if (!previousAddress.getAreaOfResidence().equals(newAddress.getAreaOfResidence()))
					return true;
	
	if (previousAddress.getPostCode() == null && newAddress.getPostCode() == null)
						;
	else if((previousAddress.getPostCode()!= null && newAddress.getPostCode() == null) || (previousAddress.getPostCode() == null && newAddress.getPostCode() != null))
					return true;
	else if (!previousAddress.getPostCode().replaceAll("[^a-zA-Z0-9]", "").equals(newAddress.getPostCode().replaceAll("[^a-zA-Z0-9]", "")))
					return true;
	//---------------------------	
	return false;
}
 
Example 13
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 4 votes
private String displayGP(GpShortVo gp)
{
	if (gp == null)
		return null;
	
	if (gp.getName() == null)
		return null;
	
	String value = gp.getName().toString();
	
	if (gp.getPracticesIsNotNull())
	{
		GpToPracticesVoCollection practices = gp.getPractices();
		
		for (int i = 0; i < practices.size(); i++)
		{
			if (practices.get(i) == null)
				continue;
			
			if (!Boolean.TRUE.equals(practices.get(i).getIsPrimaryPractice()))
				continue;
			
			OrganisationWithSitesVo practice = practices.get(i).getPractice();
			
			if (practice == null)
				continue;
			
			if (practice.getName() == null)
				continue;
			
			value += ", " + practice.getName();
			
			PersonAddress address = practice.getAddress();
			if (address == null)
				continue;
			
			String addressString = ((address.getLine1() == null || PersonAddress.getLine1MaxLength() == 0)? "" : (address.getLine1()))
								 + ((address.getLine2() == null || PersonAddress.getLine2MaxLength() == 0)? "" : (" " + address.getLine2()))
								 + ((address.getLine3() == null || PersonAddress.getLine3MaxLength() == 0)? "" : (" " + address.getLine3()))
								 + ((address.getLine4() == null || PersonAddress.getLine4MaxLength() == 0)? "" : (" " + address.getLine4()))
								 + ((address.getLine5() == null || PersonAddress.getLine5MaxLength() == 0)? "" : (" " + address.getLine5()))
								 + ((address.getCounty() == null)? "" : (", " + address.getCounty().toString())); 
			
			value += ", " + addressString;
		}
	}
			
	return value;
}