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

The following are Jave code examples for showing how to use getLine2IsNotNull() 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.
Example 1
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 6 votes
private String getRefferingGPAddress(PersonAddress voAddress)
{
	if (voAddress == null)
		return "";
	
	StringBuffer address = new StringBuffer();
	
	if (voAddress.getLine1IsNotNull()) 
		address.append(voAddress.getLine1().toString());
	if (voAddress.getLine2IsNotNull()) 
		address.append("\r\n" + voAddress.getLine2().toString());
	if (voAddress.getLine3IsNotNull()) 
		address.append("\r\n" + voAddress.getLine3().toString());
	if (voAddress.getLine4IsNotNull()) 
		address.append("\r\n" + voAddress.getLine4().toString());
	if (voAddress.getLine5IsNotNull()) 
		address.append("\r\n" + voAddress.getLine5().toString());
	
	return address.toString();
}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 6 votes
private void populateAddress(PersonAddress voAddress) 
{
	if (voAddress != null)
	{
		if (voAddress.getLine1IsNotNull())
			form.ctnDetails().txtDetailsAddress1().setValue(voAddress.getLine1());
		if (voAddress.getLine2IsNotNull())
			form.ctnDetails().txtDetailsAddress2().setValue(voAddress.getLine2());
		if (voAddress.getLine3IsNotNull())
			form.ctnDetails().txtDetailsAddress3().setValue(voAddress.getLine3());
		if (voAddress.getLine4IsNotNull())
			form.ctnDetails().txtDetailsAddress4().setValue(voAddress.getLine4());
		if (voAddress.getLine5IsNotNull())
			form.ctnDetails().txtDetailsAddress5().setValue(voAddress.getLine5());

		form.ctnDetails().txtDetailsPostCode().setValue(voAddress.getPostCode());
		form.ctnDetails().cmbCounty().setValue(voAddress.getCounty());
	}
}
 
Example 3
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 6 votes
private String getRefferingGPAddress(PersonAddress voAddress)
{
	if (voAddress == null)
		return "";
	
	StringBuffer address = new StringBuffer();
	
	if (voAddress.getLine1IsNotNull()) 
		address.append(voAddress.getLine1().toString());
	if (voAddress.getLine2IsNotNull()) 
		address.append("\r\n" + voAddress.getLine2().toString());
	if (voAddress.getLine3IsNotNull()) 
		address.append("\r\n" + voAddress.getLine3().toString());
	if (voAddress.getLine4IsNotNull()) 
		address.append("\r\n" + voAddress.getLine4().toString());
	if (voAddress.getLine5IsNotNull()) 
		address.append("\r\n" + voAddress.getLine5().toString());
	
	return address.toString();
}
 
Example 4
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 6 votes
private void populateAddress(PersonAddress voAddress) 
{
	if (voAddress != null)
	{
		if (voAddress.getLine1IsNotNull())
			form.ctnDetails().txtDetailsAddress1().setValue(voAddress.getLine1());
		if (voAddress.getLine2IsNotNull())
			form.ctnDetails().txtDetailsAddress2().setValue(voAddress.getLine2());
		if (voAddress.getLine3IsNotNull())
			form.ctnDetails().txtDetailsAddress3().setValue(voAddress.getLine3());
		if (voAddress.getLine4IsNotNull())
			form.ctnDetails().txtDetailsAddress4().setValue(voAddress.getLine4());
		if (voAddress.getLine5IsNotNull())
			form.ctnDetails().txtDetailsAddress5().setValue(voAddress.getLine5());

		form.ctnDetails().txtDetailsPostCode().setValue(voAddress.getPostCode());
		form.ctnDetails().cmbCounty().setValue(voAddress.getCounty());
	}
}
 
Example 5
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 6 votes
private String getRefferingGPAddress(PersonAddress voAddress)
{
	if (voAddress == null)
		return "";
	
	StringBuffer address = new StringBuffer();
	
	if (voAddress.getLine1IsNotNull()) 
		address.append(voAddress.getLine1().toString());
	if (voAddress.getLine2IsNotNull()) 
		address.append("\r\n" + voAddress.getLine2().toString());
	if (voAddress.getLine3IsNotNull()) 
		address.append("\r\n" + voAddress.getLine3().toString());
	if (voAddress.getLine4IsNotNull()) 
		address.append("\r\n" + voAddress.getLine4().toString());
	if (voAddress.getLine5IsNotNull()) 
		address.append("\r\n" + voAddress.getLine5().toString());
	
	return address.toString();
}
 
Example 6
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 6 votes
private void populateAddress(PersonAddress voAddress) 
{
	if (voAddress != null)
	{
		if (voAddress.getLine1IsNotNull())
			form.ctnDetails().txtDetailsAddress1().setValue(voAddress.getLine1());
		if (voAddress.getLine2IsNotNull())
			form.ctnDetails().txtDetailsAddress2().setValue(voAddress.getLine2());
		if (voAddress.getLine3IsNotNull())
			form.ctnDetails().txtDetailsAddress3().setValue(voAddress.getLine3());
		if (voAddress.getLine4IsNotNull())
			form.ctnDetails().txtDetailsAddress4().setValue(voAddress.getLine4());
		if (voAddress.getLine5IsNotNull())
			form.ctnDetails().txtDetailsAddress5().setValue(voAddress.getLine5());

		form.ctnDetails().txtDetailsPostCode().setValue(voAddress.getPostCode());
		form.ctnDetails().cmbCounty().setValue(voAddress.getCounty());
	}
}
 
Example 7
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
private boolean isAddressRecorded() 
{
	PersonAddress address = form.ccAddressSearch().getValue();
	
	if((address!=null && (address.getLine1IsNotNull() || address.getLine2IsNotNull()
			|| address.getLine3IsNotNull() || address.getLine4IsNotNull() || address.getPhoneIsNotNull() || address.getPostCodeIsNotNull() || address.getPCTIsNotNull()))
			|| form.txtPhoneWork().getValue()!=null)
		return true;
	
	return false;
}
 
Example 8
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
private boolean fieldsCleared() 
{

	PersonAddress address = form.ccAddressSearch().getValue();
	
	if(form.txtNOKSName().getValue()!= null || form.txtNOKMiddlename().getValue() != null || form.txtNOKForename().getValue() != null || form.cmbTitle().getValue()!=null || (address!=null && (address.getLine1IsNotNull() || address.getLine2IsNotNull()
			|| address.getLine3IsNotNull() || address.getLine4IsNotNull() || address.getPhoneIsNotNull() || address.getPhoneIsNotNull()))
			|| form.txtPhoneWork().getValue()!=null || form.cmbRelationship().getValue()!=null)
		return false;
	
	return true;
}
 
Example 9
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
/**
 * WDEV-13432
 * Function used to test an address if it is empty.
 * A null address is also considered empty
 */
private boolean isEmptyAddress(PersonAddress previousAddress)
{
	// Test address for null value
	if (previousAddress == null)
		return true;
	
	// Test relevant fields if are not empty
	
	if (previousAddress.getLine1IsNotNull() && previousAddress.getLine1().trim().length() != 0)
		return false;
	
	if (previousAddress.getLine2IsNotNull() && previousAddress.getLine2().trim().length() != 0)
		return false;
	
	if (previousAddress.getLine3IsNotNull() && previousAddress.getLine3().trim().length() != 0)
		return false;
	
	if (previousAddress.getLine4IsNotNull() && previousAddress.getLine4().trim().length() != 0)
		return false;
	
	if (previousAddress.getLine5IsNotNull() && previousAddress.getLine5().trim().length() != 0)
		return false;
	
	if (previousAddress.getPostCodeIsNotNull() && previousAddress.getPostCode().trim().length() != 0)
		return false;
	
	if (previousAddress.getPhoneIsNotNull() && previousAddress.getPhone().trim().length() != 0)
		return false;
	
	if (previousAddress.getCountyIsNotNull())
		return false;
	
	return true;
}
 
Example 10
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 5 votes
private boolean isAddressDetailsNotNull(PersonAddress address)
{
	if (address.getLine1IsNotNull() ||
		address.getLine2IsNotNull() ||
		address.getLine3IsNotNull() ||
		address.getLine4IsNotNull() ||
		address.getLine5IsNotNull() ||
		address.getPostCodeIsNotNull() ||
		address.getCountyIsNotNull())
			return true;
	return false;
}
 
Example 11
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 5 votes
/**
 * WDEV-13432
 * Function used to test an address if it is empty.
 * A null address is also considered empty
 */
private boolean isEmptyAddress(PersonAddress previousAddress)
{
	// Test address for null value
	if (previousAddress == null)
		return true;
	
	// Test relevant fields if are not empty
	
	if (previousAddress.getLine1IsNotNull() && previousAddress.getLine1().length() != 0)
		return false;
	
	if (previousAddress.getLine2IsNotNull() && previousAddress.getLine2().length() != 0)
		return false;
	
	if (previousAddress.getLine3IsNotNull() && previousAddress.getLine3().length() != 0)
		return false;
	
	if (previousAddress.getLine4IsNotNull() && previousAddress.getLine4().length() != 0)
		return false;
	
	if (previousAddress.getLine5IsNotNull() && previousAddress.getLine5().length() != 0)
		return false;
	
	if (previousAddress.getPostCodeIsNotNull() && previousAddress.getPostCode().length() != 0)
		return false;
	
	if (previousAddress.getPhoneIsNotNull() && previousAddress.getPhone().length() != 0)
		return false;
	
	if (previousAddress.getCountyIsNotNull())
		return false;
	
	if (previousAddress.getAreaOfResidenceIsNotNull()) //WDEV-19597
		return false;
	
	return true;
}
 
Example 12
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 5 votes
private boolean isAddressRecorded() 
{
	PersonAddress address = form.ccAddressSearch().getValue();
	
	if((address!=null && (address.getLine1IsNotNull() || address.getLine2IsNotNull()
			|| address.getLine3IsNotNull() || address.getLine4IsNotNull() || address.getPhoneIsNotNull() || address.getPostCodeIsNotNull() || address.getPCTIsNotNull()))
			|| form.txtPhoneWork().getValue()!=null || form.txtMobilePhone().getValue()!=null)
		return true;
	
	return false;
}
 
Example 13
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 5 votes
private boolean fieldsCleared() 
{

	PersonAddress address = form.ccAddressSearch().getValue();
	
	if(form.txtNOKSName().getValue()!= null || form.txtNOKMiddlename().getValue() != null || form.txtNOKForename().getValue() != null || form.cmbTitle().getValue()!=null || (address!=null && (address.getLine1IsNotNull() || address.getLine2IsNotNull()
			|| address.getLine3IsNotNull() || address.getLine4IsNotNull() || address.getPhoneIsNotNull() || address.getPhoneIsNotNull()))
			|| form.txtPhoneWork().getValue()!=null || form.cmbRelationship().getValue()!=null || form.txtMobilePhone().getValue()!=null)
		return false;
	
	return true;
}
 
Example 14
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 5 votes
private boolean isAddressDetailsNotNullOrEmpty(PersonAddress address)
{
	if ((address.getLine1IsNotNull() && address.getLine1().length() > 0) ||
		(address.getLine2IsNotNull() && address.getLine2().length() > 0) ||
		(address.getLine3IsNotNull() && address.getLine3().length() > 0) ||
		(address.getLine4IsNotNull() && address.getLine4().length() > 0) ||
		(address.getLine5IsNotNull() && address.getLine5().length() > 0) ||
		(address.getPostCodeIsNotNull() && address.getPostCode().length() > 0) ||
		address.getAreaOfResidenceIsNotNull() ||
		address.getCountyIsNotNull())
			return true;
	return false;
}
 
Example 15
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 5 votes
private boolean isAddressDetailsNotNullOrEmpty(PersonAddress address)
{
	if ((address.getLine1IsNotNull() && address.getLine1().length() > 0) ||
		(address.getLine2IsNotNull() && address.getLine2().length() > 0) ||
		(address.getLine3IsNotNull() && address.getLine3().length() > 0) ||
		(address.getLine4IsNotNull() && address.getLine4().length() > 0) ||
		(address.getLine5IsNotNull() && address.getLine5().length() > 0) ||
		(address.getPostCodeIsNotNull() && address.getPostCode().length() > 0) ||
		address.getAreaOfResidenceIsNotNull() ||
		address.getCountyIsNotNull())
			return true;
	return false;
}
 
Example 16
Project: openmaxims-linux   File: Logic.java   Source Code and License Vote up 5 votes
private boolean isAddressRecorded() 
{
	PersonAddress address = form.ccAddressSearch().getValue();
	
	if((address!=null && (address.getLine1IsNotNull() || address.getLine2IsNotNull()
			|| address.getLine3IsNotNull() || address.getLine4IsNotNull() || address.getPhoneIsNotNull() || address.getPostCodeIsNotNull() || address.getPCTIsNotNull()))
			|| form.txtPhoneWork().getValue()!=null)
		return true;
	
	return false;
}
 
Example 17
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 5 votes
/**
 * WDEV-13432
 * Function used to test an address if it is empty.
 * A null address is also considered empty
 */
private boolean isEmptyAddress(PersonAddress previousAddress)
{
	// Test address for null value
	if (previousAddress == null)
		return true;
	
	// Test relevant fields if are not empty
	
	if (previousAddress.getLine1IsNotNull() && previousAddress.getLine1().length() != 0)
		return false;
	
	if (previousAddress.getLine2IsNotNull() && previousAddress.getLine2().length() != 0)
		return false;
	
	if (previousAddress.getLine3IsNotNull() && previousAddress.getLine3().length() != 0)
		return false;
	
	if (previousAddress.getLine4IsNotNull() && previousAddress.getLine4().length() != 0)
		return false;
	
	if (previousAddress.getLine5IsNotNull() && previousAddress.getLine5().length() != 0)
		return false;
	
	if (previousAddress.getPostCodeIsNotNull() && previousAddress.getPostCode().length() != 0)
		return false;
	
	if (previousAddress.getPhoneIsNotNull() && previousAddress.getPhone().length() != 0)
		return false;
	
	if (previousAddress.getCountyIsNotNull())
		return false;
	
	if (previousAddress.getAreaOfResidenceIsNotNull()) //WDEV-19597
		return false;
	
	return true;
}
 
Example 18
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 5 votes
private boolean isAddressRecorded() 
{
	PersonAddress address = form.ccAddressSearch().getValue();
	
	if((address!=null && (address.getLine1IsNotNull() || address.getLine2IsNotNull()
			|| address.getLine3IsNotNull() || address.getLine4IsNotNull() || address.getPhoneIsNotNull() || address.getPostCodeIsNotNull() || address.getPCTIsNotNull()))
			|| form.txtPhoneWork().getValue()!=null)
		return true;
	
	return false;
}
 
Example 19
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 5 votes
private boolean fieldsCleared() 
{

	PersonAddress address = form.ccAddressSearch().getValue();
	
	if(form.txtNOKSName().getValue()!= null || form.txtNOKMiddlename().getValue() != null || form.txtNOKForename().getValue() != null || form.cmbTitle().getValue()!=null || (address!=null && (address.getLine1IsNotNull() || address.getLine2IsNotNull()
			|| address.getLine3IsNotNull() || address.getLine4IsNotNull() || address.getPhoneIsNotNull() || address.getPhoneIsNotNull()))
			|| form.txtPhoneWork().getValue()!=null || form.cmbRelationship().getValue()!=null)
		return false;
	
	return true;
}
 
Example 20
Project: openmaxims-linux   File: Logic.java   Source Code and License Vote up 5 votes
/**
 * WDEV-13432
 * Function used to test an address if it is empty.
 * A null address is also considered empty
 */
private boolean isEmptyAddress(PersonAddress previousAddress)
{
	// Test address for null value
	if (previousAddress == null)
		return true;
	
	// Test relevant fields if are not empty
	
	if (previousAddress.getLine1IsNotNull() && previousAddress.getLine1().trim().length() != 0)
		return false;
	
	if (previousAddress.getLine2IsNotNull() && previousAddress.getLine2().trim().length() != 0)
		return false;
	
	if (previousAddress.getLine3IsNotNull() && previousAddress.getLine3().trim().length() != 0)
		return false;
	
	if (previousAddress.getLine4IsNotNull() && previousAddress.getLine4().trim().length() != 0)
		return false;
	
	if (previousAddress.getLine5IsNotNull() && previousAddress.getLine5().trim().length() != 0)
		return false;
	
	if (previousAddress.getPostCodeIsNotNull() && previousAddress.getPostCode().trim().length() != 0)
		return false;
	
	if (previousAddress.getPhoneIsNotNull() && previousAddress.getPhone().trim().length() != 0)
		return false;
	
	if (previousAddress.getCountyIsNotNull())
		return false;
	
	return true;
}
 
Example 21
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 5 votes
/**
 * WDEV-13432
 * Function used to test an address if it is empty.
 * A null address is also considered empty
 */
private boolean isEmptyAddress(PersonAddress previousAddress)
{
	// Test address for null value
	if (previousAddress == null)
		return true;
	
	// Test relevant fields if are not empty
	
	if (previousAddress.getLine1IsNotNull() && previousAddress.getLine1().trim().length() != 0)
		return false;
	
	if (previousAddress.getLine2IsNotNull() && previousAddress.getLine2().trim().length() != 0)
		return false;
	
	if (previousAddress.getLine3IsNotNull() && previousAddress.getLine3().trim().length() != 0)
		return false;
	
	if (previousAddress.getLine4IsNotNull() && previousAddress.getLine4().trim().length() != 0)
		return false;
	
	if (previousAddress.getLine5IsNotNull() && previousAddress.getLine5().trim().length() != 0)
		return false;
	
	if (previousAddress.getPostCodeIsNotNull() && previousAddress.getPostCode().trim().length() != 0)
		return false;
	
	if (previousAddress.getPhoneIsNotNull() && previousAddress.getPhone().trim().length() != 0)
		return false;
	
	if (previousAddress.getCountyIsNotNull())
		return false;
	
	return true;
}
 
Example 22
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 4 votes
private String displayPracticeAddress(PersonAddress address) 
{
	if(address == null)
		return "";
	
	String practiceAddress = "";
	
	if(address.getLine1IsNotNull() && address.getLine1().length() > 0)
	{
		practiceAddress += " - " + address.getLine1();
	}
	if(address.getLine2IsNotNull() && address.getLine2().length() > 0)
	{
		if(practiceAddress.length() > 0)
		{
			practiceAddress += " " + address.getLine2();
		}
		else
		{
			practiceAddress += " - " + address.getLine2();
		}
	}
	if(address.getLine3IsNotNull() && address.getLine3().length() > 0)
	{
		if(practiceAddress.length() > 0)
		{
			practiceAddress += " " + address.getLine3();
		}
		else
		{
			practiceAddress += " - " + address.getLine3();
		}
	}
	if(address.getLine4IsNotNull() && address.getLine4().length() > 0)
	{
		if(practiceAddress.length() > 0)
		{
			practiceAddress += " " + address.getLine4();
		}
		else
		{
			practiceAddress += " - " + address.getLine4();
		}
	}
	if(address.getLine5IsNotNull() && address.getLine5().length() > 0)
	{
		if(practiceAddress.length() > 0)
		{
			practiceAddress += " " + address.getLine5();
		}
		else
		{
			practiceAddress += " - " + address.getLine5();
		}
	}
	if(address.getCountyIsNotNull() && address.getCounty().getText() != null && address.getCounty().getText().length() > 0)
	{
		if(practiceAddress.length() > 0)
		{
			practiceAddress += ", " + address.getCounty().getText();
		}
		else
		{
			practiceAddress += " - " + address.getCounty().getText();
		}
	}
	
	return practiceAddress;
}
 
Example 23
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 4 votes
private void DisplayPatientRecord(PatientShort patient)
{
	if(patient == null)
		return;
	 
	form.PatientHospitalNumber().setValue(patient.getHospnum() != null ? patient.getHospnum().getValue() : "");
	form.PatientName().setValue(patient.getNameIsNotNull() ? patient.getName().getForename() + " " + patient.getName().getSurname() : "");
	form.PatientDOB().setValue(patient.getDobIsNotNull() ? patient.getDob().toString() : "");

	//WDEV-14479
	PersonAddress tempAddress = patient.getAddress();
	
	if (tempAddress != null)
	{
		StringBuffer address = new StringBuffer(200);

		if (tempAddress.getLine1IsNotNull())
		{
			address.append(tempAddress.getLine1());
			address.append(new_line);
		}
		
		if (tempAddress.getLine2IsNotNull())
		{
			address.append(tempAddress.getLine2());
			address.append(new_line);
		}
		
		if (tempAddress.getLine3IsNotNull())
		{
			address.append(tempAddress.getLine3());
			address.append(new_line);
		}
		
		if (tempAddress.getLine4IsNotNull())
		{
			address.append(tempAddress.getLine4());
			address.append(new_line);
		}

		form.PatientAddress().setValue(address.toString());
	}

	form.PatientCategory().setValue("");
	form.PatientHCP().setValue("");			
}
 
Example 24
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 4 votes
protected void onFormOpen() throws ims.framework.exceptions.PresentationLogicException
{
	// WDEV-14333
	PatientShort patient = form.getGlobalContext().Core.getPatientShort();
	
	if (patient==null)
		return;
	
	PatientTempAddressesVo patientTempAddresses = domain.getPatientwithTempAddresses(patient);
	
	if (patientTempAddresses.getAddresses()==null || patientTempAddresses.getAddresses().size()==0)
		return;
	
	PersonAddress tempAddress = patientTempAddresses.getAddresses().get(0);

	if(tempAddress != null)
	{
		StringBuffer address = new StringBuffer(150);
		
		if (tempAddress.getLine1IsNotNull())
		{
			address.append(tempAddress.getLine1());
			address.append(newLine);
		}
		
		if (tempAddress.getLine2IsNotNull())
		{
			address.append(tempAddress.getLine2());
			address.append(newLine);
		}
		
		if (tempAddress.getLine3IsNotNull())
		{
			address.append(tempAddress.getLine3());
			address.append(newLine);
		}
		
		if (tempAddress.getLine4IsNotNull())
		{
			address.append(tempAddress.getLine4());
			address.append(newLine);
		}
		
		form.Address().setValue(address.toString());
		
		form.PostCode().setValue(tempAddress.getPostCode());
		
		form.DayPhone().setValue(tempAddress.getOtherphone());
		
		form.NightPhone().setValue(tempAddress.getPhone());
	}
}
 
Example 25
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 4 votes
protected void onFormOpen()
{
	// load actions
	Lkup actions = (Lkup)domain.getDTOInstance(Lkup.class);
	actions.Filter.clear();
	actions.Filter.Lkup_typ = "3485";
	Result result = actions.list();
	if (result != null)
	{
		engine.showMessage(result.getMessage());
		return;
	}
	for (int i = 0; i < actions.DataCollection.count(); ++i)
		if (actions.DataCollection.get(i).Lkup_stat.equalsIgnoreCase("Y") || actions.DataCollection.get(i).Lkup_stat.equals("1"))
			form.Action().newRow(actions.DataCollection.get(i).Lkup_id, actions.DataCollection.get(i).Lkup_nm);

	// load patient information
	PatientShort patient = form.getGlobalContext().Core.getPatientShort();
	form.PatientHospitalNumber().setValue(patient.getHospnum() != null ? patient.getHospnum().getValue() : "");
	form.PatientName().setValue(patient.getNameIsNotNull() ? patient.getName().getForename() + " " + patient.getName().getSurname() : "");
	form.PatientDOB().setValue(patient.getDobIsNotNull() ? patient.getDob().toString() : "");

	if (patient.getAddressIsNotNull()) //WDEV-14471
	{
		PersonAddress tempAddress = patient.getAddress();
		
		if (tempAddress != null)
		{
		StringBuffer address = new StringBuffer(200);

		if (tempAddress.getLine1IsNotNull())
		{
		address.append(tempAddress.getLine1());
		address.append(NewLine);
		}

		if (tempAddress.getLine2IsNotNull())
		{
		address.append(tempAddress.getLine2());
		address.append(NewLine);
		}

		if (tempAddress.getLine3IsNotNull())
		{
		address.append(tempAddress.getLine3());
		address.append(NewLine);
		}

		if (tempAddress.getLine4IsNotNull())
		{
		address.append(tempAddress.getLine4());
		address.append(NewLine);
		}

		form.PatientAddress().setValue(address.toString());
		}
	}
	

	form.PatientCategory().setValue(form.getGlobalContext().CcoSched.ClinicView.getCategory() != null ? form.getGlobalContext().CcoSched.ClinicView.getCategory() : "");
	form.Comment().setValue(form.getGlobalContext().CcoSched.ClinicView.getBookingComment());

	EnableArrivalControls(false);

	OpenAppointments();

}
 
Example 26
Project: openmaxims-linux   File: Logic.java   Source Code and License Vote up 4 votes
private String displayPracticeAddress(PersonAddress address) 
{
	if(address == null)
		return "";
	
	String practiceAddress = "";
	
	if(address.getLine1IsNotNull() && address.getLine1().length() > 0)
	{
		practiceAddress += " - " + address.getLine1();
	}
	if(address.getLine2IsNotNull() && address.getLine2().length() > 0)
	{
		if(practiceAddress.length() > 0)
		{
			practiceAddress += " " + address.getLine2();
		}
		else
		{
			practiceAddress += " - " + address.getLine2();
		}
	}
	if(address.getLine3IsNotNull() && address.getLine3().length() > 0)
	{
		if(practiceAddress.length() > 0)
		{
			practiceAddress += " " + address.getLine3();
		}
		else
		{
			practiceAddress += " - " + address.getLine3();
		}
	}
	if(address.getLine4IsNotNull() && address.getLine4().length() > 0)
	{
		if(practiceAddress.length() > 0)
		{
			practiceAddress += " " + address.getLine4();
		}
		else
		{
			practiceAddress += " - " + address.getLine4();
		}
	}
	if(address.getLine5IsNotNull() && address.getLine5().length() > 0)
	{
		if(practiceAddress.length() > 0)
		{
			practiceAddress += " " + address.getLine5();
		}
		else
		{
			practiceAddress += " - " + address.getLine5();
		}
	}
	if(address.getCountyIsNotNull() && address.getCounty().getText() != null && address.getCounty().getText().length() > 0)
	{
		if(practiceAddress.length() > 0)
		{
			practiceAddress += ", " + address.getCounty().getText();
		}
		else
		{
			practiceAddress += " - " + address.getCounty().getText();
		}
	}
	
	return practiceAddress;
}