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

The following are Jave code examples for showing how to use setPhone() 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
public void populateScreenFromData(PersonAddress pa)
{
	if (pa != null)
	{
		pa.setPhone(pa.getPhone());

		if (form.getGlobalContext().Core.getPatientShortIsNotNull()
			&& form.getGlobalContext().Core.getPatientShort().getCommChannelsIsNotNull()
			&& form.getGlobalContext().Core.getPatientShort().getCommChannels().getCommunicationChannel(ChannelType.GEN_PHONE) != null)
			pa.setPhone(form.getGlobalContext().Core.getPatientShort().getCommChannels().getCommunicationChannel(ChannelType.GEN_PHONE).getCommValue());
		
		form.ccAddress().setValue(pa);
		form.txtOtherPhone().setValue(pa.getOtherphone());
		form.cmbAddressType().setValue(pa.getAddressTypeIsNotNull()?pa.getAddressType():null);
		form.getLocalContext().setpersonAddress(pa);
	}
	form.getLocalContext().setaddressIndex(form.recbrAddress().getSelectedIndex());
}
 
Example 2
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 6 votes
private void doCopy()
{
	clearAddressControls();
	if (form.getGlobalContext().Core.getNOKPersonAddressIsNotNull())
	{
		PersonAddress personAddress = (PersonAddress) form.getGlobalContext().Core.getNOKPersonAddress().clone();
		
		//start WDEV-14370
		if (ConfigFlag.UI.DEMOGRAPHICS_TYPE.getValue().equals("UK"))
		{
			personAddress.setPhone(form.getGlobalContext().Core.getCommChannels().getCommunicationChannel(ChannelType.HOME_PHONE) !=null ? form.getGlobalContext().Core.getCommChannels().getCommunicationChannel(ChannelType.HOME_PHONE).getCommValue() : null);
		}
		//end
		
		form.ccAddressSearch().setComponentEnabled(false);//WDEV-17432
		
		populateScreenFromData(personAddress);
		displayPhoneNumbers();
		
		form.ccAddressSearch().setComponentEnabled(true);//WDEV-17432
	}
}
 
Example 3
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 4
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 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
public void populateScreenFromData(PersonAddress pa)
{
	if (pa != null)
	{
		pa.setPhone(pa.getPhone());

		if (form.getGlobalContext().Core.getPatientShortIsNotNull()
			&& form.getGlobalContext().Core.getPatientShort().getCommChannelsIsNotNull()
			&& form.getGlobalContext().Core.getPatientShort().getCommChannels().getCommunicationChannel(ChannelType.GEN_PHONE) != null)
			pa.setPhone(form.getGlobalContext().Core.getPatientShort().getCommChannels().getCommunicationChannel(ChannelType.GEN_PHONE).getCommValue());
		
		form.ccAddress().setValue(pa);
		form.txtOtherPhone().setValue(pa.getOtherphone());
		form.cmbAddressType().setValue(pa.getAddressTypeIsNotNull()?pa.getAddressType():null);
		form.getLocalContext().setpersonAddress(pa);
		
		form.ccEffectiveDates().setEffectiveDates(pa.getBeffdate(), pa.getBetdate());
	}
	form.getLocalContext().setaddressIndex(form.recbrAddress().getSelectedIndex());
}
 
Example 7
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 6 votes
private void doCopy()
{
	clearAddressControls();
	if (form.getGlobalContext().Core.getNOKPersonAddressIsNotNull())
	{
		PersonAddress personAddress = (PersonAddress) form.getGlobalContext().Core.getNOKPersonAddress().clone();
		
		//start WDEV-14370
		//if (ConfigFlag.UI.DEMOGRAPHICS_TYPE.getValue().equals("UK"))
		{
			personAddress.setPhone(form.getGlobalContext().Core.getCommChannels().getCommunicationChannel(ChannelType.HOME_PHONE) !=null ? form.getGlobalContext().Core.getCommChannels().getCommunicationChannel(ChannelType.HOME_PHONE).getCommValue() : null);
		}
		//end
		
		form.ccAddressSearch().setComponentEnabled(false);//WDEV-17432
		
		populateScreenFromData(personAddress);
		//displayPhoneNumbers();
		
		form.ccAddressSearch().setComponentEnabled(true);//WDEV-17432
	}
}
 
Example 8
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 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-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 11
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 12
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 6 votes
public void populateScreenFromData(PersonAddress pa)
{
	if (pa != null)
	{
		pa.setPhone(pa.getPhone());

		if (form.getGlobalContext().Core.getPatientShortIsNotNull()
			&& form.getGlobalContext().Core.getPatientShort().getCommChannelsIsNotNull()
			&& form.getGlobalContext().Core.getPatientShort().getCommChannels().getCommunicationChannel(ChannelType.GEN_PHONE) != null)
			pa.setPhone(form.getGlobalContext().Core.getPatientShort().getCommChannels().getCommunicationChannel(ChannelType.GEN_PHONE).getCommValue());
		
		form.ccAddress().setValue(pa);
		form.txtOtherPhone().setValue(pa.getOtherphone());
		form.cmbAddressType().setValue(pa.getAddressTypeIsNotNull()?pa.getAddressType():null);
		form.getLocalContext().setpersonAddress(pa);
	}
	form.getLocalContext().setaddressIndex(form.recbrAddress().getSelectedIndex());
}
 
Example 13
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 6 votes
private void doCopy()
{
	clearAddressControls();
	if (form.getGlobalContext().Core.getNOKPersonAddressIsNotNull())
	{
		PersonAddress personAddress = (PersonAddress) form.getGlobalContext().Core.getNOKPersonAddress().clone();
		
		//start WDEV-14370
		if (ConfigFlag.UI.DEMOGRAPHICS_TYPE.getValue().equals("UK"))
		{
			personAddress.setPhone(form.getGlobalContext().Core.getCommChannels().getCommunicationChannel(ChannelType.HOME_PHONE) !=null ? form.getGlobalContext().Core.getCommChannels().getCommunicationChannel(ChannelType.HOME_PHONE).getCommValue() : null);
		}
		//end
		
		form.ccAddressSearch().setComponentEnabled(false);//WDEV-17432
		
		populateScreenFromData(personAddress);
		displayPhoneNumbers();
		
		form.ccAddressSearch().setComponentEnabled(true);//WDEV-17432
	}
}
 
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
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 16
Project: openmaxims-linux   File: Logic.java   View Source Code Vote up 6 votes
public void populateScreenFromData(PersonAddress pa)
{
	if (pa != null)
	{
		pa.setPhone(pa.getPhone());

		if (form.getGlobalContext().Core.getPatientShortIsNotNull()
			&& form.getGlobalContext().Core.getPatientShort().getCommChannelsIsNotNull()
			&& form.getGlobalContext().Core.getPatientShort().getCommChannels().getCommunicationChannel(ChannelType.GEN_PHONE) != null)
			pa.setPhone(form.getGlobalContext().Core.getPatientShort().getCommChannels().getCommunicationChannel(ChannelType.GEN_PHONE).getCommValue());
		
		form.ccAddress().setValue(pa);
		form.txtOtherPhone().setValue(pa.getOtherphone());
		form.cmbAddressType().setValue(pa.getAddressTypeIsNotNull()?pa.getAddressType():null);
		form.getLocalContext().setpersonAddress(pa);
	}
	form.getLocalContext().setaddressIndex(form.recbrAddress().getSelectedIndex());
}
 
Example 17
Project: openmaxims-linux   File: Logic.java   View Source Code Vote up 6 votes
private void doCopy()
{
	clearAddressControls();
	if (form.getGlobalContext().Core.getNOKPersonAddressIsNotNull())
	{
		PersonAddress personAddress = (PersonAddress) form.getGlobalContext().Core.getNOKPersonAddress().clone();
		
		//start WDEV-14370
		if (ConfigFlag.UI.DEMOGRAPHICS_TYPE.getValue().equals("UK"))
		{
			personAddress.setPhone(form.getGlobalContext().Core.getCommChannels().getCommunicationChannel(ChannelType.HOME_PHONE) !=null ? form.getGlobalContext().Core.getCommChannels().getCommunicationChannel(ChannelType.HOME_PHONE).getCommValue() : null);
		}
		//end
		
		form.ccAddressSearch().setComponentEnabled(false);//WDEV-17432
		
		populateScreenFromData(personAddress);
		displayPhoneNumbers();
		
		form.ccAddressSearch().setComponentEnabled(true);//WDEV-17432
	}
}
 
Example 18
Project: openmaxims-linux   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 19
Project: openmaxims-linux   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 20
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 5 votes
private void doCopy()
{
	if (form.getGlobalContext().Core.getNOKPersonAddressIsNotNull())
	{
		PersonAddress personAddress = (PersonAddress) form.getGlobalContext().Core.getNOKPersonAddress().clone();
	
   		personAddress.setPhone(form.getGlobalContext().Core.getCommChannels().getCommunicationChannel(ChannelType.HOME_PHONE) !=null ? form.getGlobalContext().Core.getCommChannels().getCommunicationChannel(ChannelType.HOME_PHONE).getCommValue() : null);
   		form.ccAddress().setComponentEnabled(false);
   		form.ccAddress().setValue(personAddress);
   		form.ccAddress().setComponentEnabled(true);
	}
}
 
Example 21
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 22
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 23
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 24
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 25
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 26
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 27
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);
	
	
}