Java Code Examples for ims.core.vo.MemberOfStaffShortVo.setName()

The following are Jave code examples for showing how to use setName() of the ims.core.vo.MemberOfStaffShortVo 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
@Override
protected void onQmbReferredToTextSubmited(String value) throws PresentationLogicException 
{
	form.qmbReferredTo().clear();
	
	MemberOfStaffShortVo voMOS = new MemberOfStaffShortVo();
	PersonName personName = new PersonName();
	personName.setSurname(value);
	voMOS.setName(personName);
	voMOS.setIsActive(Boolean.TRUE);
	
	MemberOfStaffShortVoCollection coll = domain.listMembersOfStaff(voMOS);
	if(coll != null)
	{
		for (int i = 0; i < coll.size(); i++)
			form.qmbReferredTo().newRow(coll.get(i), coll.get(i).toString());			

		if (coll.size() == 1)
			form.qmbReferredTo().setValue(coll.get(0));
		else if (coll.size() > 1)
			form.qmbReferredTo().showOpened();		
	}		
}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 6 votes
private MemberOfStaffShortVo populateFilterFromScreen()
{
	MemberOfStaffShortVo voMosFilter = new MemberOfStaffShortVo();
	PersonName name = new PersonName();
	name.setSurname(form.txtSurName().getValue());
	voMosFilter.setName(name);
	voMosFilter.setStaffType(form.cmbStaffType().getValue());
	if (form.cmbHcpDiscipline().getValue() != null)
	{
		Hcp voHcp = new Hcp();
		voHcp.setHcpType(form.cmbHcpDiscipline().getValue());
		voMosFilter.setHcp(voHcp);
	}
	voMosFilter.setIsActive(new Boolean(form.chkActiveOnly().getValue()));
	
	return voMosFilter;
}
 
Example 3
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 6 votes
protected void onQmbMemberOfStaffTextSubmited(String value) throws PresentationLogicException
{
	if (value != null)
	{
		MemberOfStaffShortVo voMemberOfStaffFilter = new MemberOfStaffShortVo();
		PersonName name = new PersonName();
		name.setSurname(value);
		voMemberOfStaffFilter.setName(name);
		voMemberOfStaffFilter.setIsAppUser(new Boolean(true));

		MemberOfStaffShortVoCollection voCollMemberOfStaff = domain.listStaff(voMemberOfStaffFilter);

		voCollMemberOfStaff.sort();
		form.lyrActivity().tabNtpf().qmbMemberOfStaff().clear();
		for (int i = 0; i < voCollMemberOfStaff.size(); i++)
		{
			form.lyrActivity().tabNtpf().qmbMemberOfStaff().newRow(voCollMemberOfStaff.get(i), voCollMemberOfStaff.get(i).getName().getForename() + " " + voCollMemberOfStaff.get(i).getName().getSurname());
		}
		if (voCollMemberOfStaff.size() == 1)
			form.lyrActivity().tabNtpf().qmbMemberOfStaff().setValue(voCollMemberOfStaff.get(0));
		else if (voCollMemberOfStaff.size() > 1)
			form.lyrActivity().tabNtpf().qmbMemberOfStaff().showOpened();
	}

}
 
Example 4
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 6 votes
protected void onDyngrdCollectCellTextSubmited(DynamicGridCell cell)
{
	if (cell.getColumn().equals(getColumn(QUERY_COL)))
	{
		cell.getItems().clear();
		String value = cell.getTypedText();
		PersonName name = new PersonName();
		MemberOfStaffShortVo filter = new MemberOfStaffShortVo();
		name.setSurname(value);
		filter.setIsActive(Boolean.TRUE);
		filter.setName(name);
		MemberOfStaffShortVoCollection voColl = domain.listMembersOfStaff(filter);
		for (int i = 0; i < voColl.size(); i++)
		{
			cell.getItems().newItem(voColl.get(i));
		}
		int cellItemSize = cell.getItems().size();
		if (cellItemSize > 0)
		{
			if (cellItemSize == 1)
				cell.setValue(cell.getItems().get(0));
			cell.showOpened();
		}
	}
}
 
Example 5
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 6 votes
protected void onDyngrdCollectCellTextSubmited(DynamicGridCell cell)
{
	if (cell.getColumn().equals(getColumn(QUERY_COL)))
	{
		cell.getItems().clear();
		String value = cell.getTypedText();
		PersonName name = new PersonName();
		MemberOfStaffShortVo filter = new MemberOfStaffShortVo();
		name.setSurname(value);
		filter.setIsActive(Boolean.TRUE);
		filter.setName(name);
		MemberOfStaffShortVoCollection voColl = domain.listMembersOfStaff(filter);
		for (int i = 0; i < voColl.size(); i++)
		{
			cell.getItems().newItem(voColl.get(i));
		}
		int cellItemSize = cell.getItems().size();
		if (cellItemSize > 0)
		{
			if (cellItemSize == 1)
				cell.setValue(cell.getItems().get(0));
			cell.showOpened();
		}
	}
}
 
Example 6
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 6 votes
protected void onDyngrdCollectCellTextSubmited(DynamicGridCell cell)
{
	if (cell.getColumn().equals(getColumn(QUERY_COL)))
	{
		cell.getItems().clear();
		String value = cell.getTypedText();
		PersonName name = new PersonName();
		MemberOfStaffShortVo filter = new MemberOfStaffShortVo();
		name.setSurname(value);
		filter.setIsActive(Boolean.TRUE);
		filter.setName(name);
		MemberOfStaffShortVoCollection voColl = domain.listMembersOfStaff(filter);
		for (int i = 0; i < voColl.size(); i++)
		{
			cell.getItems().newItem(voColl.get(i));
		}
		int cellItemSize = cell.getItems().size();
		if (cellItemSize > 0)
		{
			if (cellItemSize == 1)
				cell.setValue(cell.getItems().get(0));
			cell.showOpened();
		}
	}
}
 
Example 7
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 6 votes
@Override
protected void onQmbReferredToTextSubmited(String value) throws PresentationLogicException 
{
	form.qmbReferredTo().clear();
	
	MemberOfStaffShortVo voMOS = new MemberOfStaffShortVo();
	PersonName personName = new PersonName();
	personName.setSurname(value);
	voMOS.setName(personName);
	voMOS.setIsActive(Boolean.TRUE);
	
	MemberOfStaffShortVoCollection coll = domain.listMembersOfStaff(voMOS);
	if(coll != null)
	{
		for (int i = 0; i < coll.size(); i++)
			form.qmbReferredTo().newRow(coll.get(i), coll.get(i).toString());			

		if (coll.size() == 1)
			form.qmbReferredTo().setValue(coll.get(0));
		else if (coll.size() > 1)
			form.qmbReferredTo().showOpened();		
	}		
}
 
Example 8
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
@Override
protected void onQmbDictatedByTextSubmited(String value) throws PresentationLogicException {
	form.qmbDictatedBy().clear();
	
	if (value != null)
	{
		MemberOfStaffShortVo  mos = null;
		MemberOfStaffShortVo filter = new MemberOfStaffShortVo();
		PersonName personName = new PersonName();
		personName.setSurname(value);
		filter.setName(personName);
		filter.setIsActive(Boolean.TRUE);
		MemberOfStaffShortVoCollection voMemberOfStaffShortColl = domain.listMembersOfStaff(filter);
		if (voMemberOfStaffShortColl != null)
		{
			for (int i = 0; i < voMemberOfStaffShortColl.size(); i++)
			{
				mos = voMemberOfStaffShortColl.get(i);
				form.qmbDictatedBy().newRow(mos, mos.toString());			
			}
		}
		if (voMemberOfStaffShortColl != null &&
				voMemberOfStaffShortColl.size() == 1)
						form.qmbDictatedBy().setValue(voMemberOfStaffShortColl.get(0));
		else if (voMemberOfStaffShortColl != null &&
				voMemberOfStaffShortColl.size() > 1)
						form.qmbDictatedBy().showOpened();
		
		Integer id = engine.getLoggedInUser().getMosId();
		if (mos != null && id != null &&id.equals(mos.getID_MemberOfStaff()))
			form.qmbDictatedBy().setValue(mos);
	}
}
 
Example 9
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
@Override
protected void onQmbDictatedByTextSubmited(String value) throws PresentationLogicException
{
	form.qmbDictatedBy().clear();

	if (value != null)
	{
		MemberOfStaffShortVo mos = null;
		MemberOfStaffShortVo filter = new MemberOfStaffShortVo();
		PersonName personName = new PersonName();
		personName.setSurname(value);
		filter.setName(personName);
		filter.setIsActive(Boolean.TRUE);
		MemberOfStaffShortVoCollection voMemberOfStaffShortColl = domain.listMembersOfStaff(filter);
		if (voMemberOfStaffShortColl != null)
		{
			for (int i = 0; i < voMemberOfStaffShortColl.size(); i++)
			{
				mos = voMemberOfStaffShortColl.get(i);
				form.qmbDictatedBy().newRow(mos, mos.toString());
			}
		}
		if (voMemberOfStaffShortColl != null && voMemberOfStaffShortColl.size() == 1)
			form.qmbDictatedBy().setValue(voMemberOfStaffShortColl.get(0));
		else if (voMemberOfStaffShortColl != null && voMemberOfStaffShortColl.size() > 1)
			form.qmbDictatedBy().showOpened();

		Integer id = engine.getLoggedInUser().getMosId();
		if (mos != null && id != null && id.equals(mos.getID_MemberOfStaff()))
			form.qmbDictatedBy().setValue(mos);
	}

}
 
Example 10
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
private void listHCPs(String value) 
{
	form.ctnDetails().lyrDetails().tabDetailsTeam().qmbTeamLead().clear();

	MemberOfStaffShortVo voFilter = new MemberOfStaffShortVo();
	if (value != null)
	{
		PersonName voName = new PersonName();
		voName.setSurname(value);
		voFilter.setName(voName);
	}

	HcpLiteVoCollection voCollHCPLites = new HcpLiteVoCollection();		
	if (form.ctnDetails().lyrDetails().tabDetailsTeam().cmbTeamType().getValue() != null && form.ctnDetails().lyrDetails().tabDetailsTeam().cmbTeamType().getValue().equals(ClinicalTeamType.CONSULTANTTEAM))		    
	{
		Hcp voHcp = new Hcp();		
		voHcp.setHcpType(HcpDisType.MEDICAL);
		voFilter.setHcp(voHcp);
	}

	voCollHCPLites = domain.listHcpLites(voFilter);
	for (int i = 0; i < voCollHCPLites.size(); i++)
		form.ctnDetails().lyrDetails().tabDetailsTeam().qmbTeamLead().newRow(voCollHCPLites.get(i), voCollHCPLites.get(i).getMos().getName().toString());			
			
	if (voCollHCPLites.size() == 1)
	{
		form.ctnDetails().lyrDetails().tabDetailsTeam().qmbTeamLead().setValue(voCollHCPLites.get(0));
	}
	else if (voCollHCPLites.size() > 1)
		form.ctnDetails().lyrDetails().tabDetailsTeam().qmbTeamLead().showOpened();
}
 
Example 11
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
private void listMOS(DynamicGridCell cell)
{
	MemberOfStaffShortVo filter = new MemberOfStaffShortVo();
	PersonName personName = new PersonName();
	personName.setSurname(cell.getTypedText());
	filter.setName(personName);
	filter.setIsActive(Boolean.TRUE);

	populateCellItems(cell, domain.listMembersOfStaff(filter));
}
 
Example 12
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
private void listMOS(DynamicGridCell cell)
{
	MemberOfStaffShortVo filter = new MemberOfStaffShortVo();
	PersonName personName = new PersonName();
	personName.setSurname(cell.getTypedText());
	filter.setName(personName);
	filter.setIsActive(Boolean.TRUE);

	populateCellItems(cell, domain.listMembersOfStaff(filter));
}
 
Example 13
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
private void listMOS(DynamicGridCell cell)
{
	MemberOfStaffShortVo filter = new MemberOfStaffShortVo();
	PersonName personName = new PersonName();
	personName.setSurname(cell.getTypedText());
	filter.setName(personName);
	filter.setIsActive(Boolean.TRUE);

	populateCellItems(cell, domain.listMembersOfStaff(filter));
}
 
Example 14
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
private void populateFilterFromScreen(MemberOfStaffShortVo filterVo)
{
	PersonName name = new PersonName();
	filterVo.setName(name);
	name.setSurname(form.txtSName().getValue());
	filterVo.setStaffType(form.cmbStaffType().getValue());
	if (form.cmbHcpTypeFilter().getValue() != null)
	{
		filterVo.setHcp(new Hcp());
		filterVo.getHcp().setHcpType(form.cmbHcpTypeFilter().getValue());
	}
	filterVo.setIsActive(new Boolean(form.chkActiveOnly().getValue()));
}
 
Example 15
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
private void populateMosVoFromScreen(MemberOfStaffShortVo voMos)
{
	if (voMos == null)
		return;

	voMos.setName(getMosNameFromScreen());
	voMos.getName().setUppers();
	voMos.setInitials(form.txtInitials().getValue());
	voMos.setSignatureBlock(form.txtSignatureBlock().getValue());
	voMos.setHcp(form.getGlobalContext().getHcp());
	voMos.setStaffType(form.cmbType().getValue());
	voMos.setSdsRoleId(form.txtSDSRole().getValue());
	String pasCode = voMos.getPasCode();
	voMos.setCodeMappings(getCodeMappings(voMos));
	if (!canUpdatePasId(voMos) && pasCode != null && !pasCode.equals(voMos.getPasCode()))
	{
		voMos.setPasCode(pasCode);
		engine.showMessage("The PAS Identifier for this Consultant cannot be updated as it has been got from the PAS. It will revert to the previous value.");
	}
	voMos.setCommChannels(getCommChannels());
	
	//WDEV-12587
	if(voMos.getID_MemberOfStaff() == null)
		voMos.setCanReferPatient(form.getGlobalContext().Admin.getCanReferPatient());
	else if(form.getGlobalContext().getHcp() != null && form.getGlobalContext().getHcp().getMosIsNotNull())
		voMos.setCanReferPatient(form.getGlobalContext().getHcp().getMos().getCanReferPatient());
}
 
Example 16
Project: AvoinApotti   File: MosSearchImpl.java   Source Code and License Vote up 5 votes
public MemberOfStaffLiteVoCollection listActiveMosByName(String name)
{
	if(name == null)
		throw new CodingRuntimeException("name parameter null in method listActiveMosByName");
	
	MemberOfStaffShortVo voFilter = new MemberOfStaffShortVo();
	voFilter.setName(new PersonName());
	voFilter.getName().setSurname(name);
	voFilter.setIsActive(Boolean.TRUE);

	return MemberOfStaffLiteVoAssembler.createMemberOfStaffLiteVoCollectionFromMemberOfStaff(listDomMos(voFilter));
}
 
Example 17
Project: AvoinApotti   File: MyOrderImpl.java   Source Code and License Vote up 5 votes
public MemberOfStaffShortVoCollection listMos(String text)
{
	if (text == null || text.length() == 0)
		throw new DomainRuntimeException("Filter not supplied");

	MemberOfStaffShortVo filter = new MemberOfStaffShortVo();
	filter.setName(new PersonName());
	filter.getName().setSurname(text);
	filter.setIsActive(true);

	MosAdmin impl = (MosAdmin) getDomainImpl(MosAdminImpl.class);
	return impl.listMembersOfStaffWithPrimaryLocations(filter);
}
 
Example 18
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
@Override
protected void onQmbChangingUserTextSubmited(String value) throws PresentationLogicException
{
	form.qmbChangingUser().clear();
	MemberOfStaffShortVo voMemberOfStaffFilter = new MemberOfStaffShortVo();
	PersonName name = new PersonName();
	name.setSurname(value);
	voMemberOfStaffFilter.setName(name);
	voMemberOfStaffFilter.setIsAppUser(new Boolean(true));
	voMemberOfStaffFilter.setIsActive(Boolean.TRUE);
	MemberOfStaffShortVoCollection voColl = null;
	try 
	{
		voColl = domain.listMembersOfStaff(voMemberOfStaffFilter);
	} 
	catch (DomainInterfaceException e) 
	{
		engine.showMessage(e.getMessage());
		return;
	}

	for (int i = 0 ; voColl != null && i < voColl.size() ;i++)
		form.qmbChangingUser().newRow(voColl.get(i),  voColl.get(i).getNameIsNotNull() ? voColl.get(i).getName().toString() : "");

	if (voColl == null || voColl.size() == 0)
	{
		engine.showMessage("No Members of Staff found for you search criteria.", "No Data Found", MessageButtons.OK, MessageIcon.INFORMATION);
		return;
	}
	
	if (voColl.size() == 1)
		form.qmbChangingUser().setValue(voColl.get(0));
	else if (voColl.size() > 1)
		form.qmbChangingUser().showOpened();
}
 
Example 19
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
protected void onQmbUserRecTextSubmited(String value) throws PresentationLogicException 
{
	form.lyrSearcFilter().tabRecordingUser().qmbUserRec().clear();
	
	MemberOfStaffShortVo filter = new MemberOfStaffShortVo();
	filter.setName(new PersonName());
	filter.getName().setSurname(value);

	MemberOfStaffShortVoCollection collMOS = domain.listMemberOfStaffShort(filter);
	if(collMOS == null || collMOS.size() == 0)
	{
		engine.showMessage("No MOS found matching the search criteria");
		return;
	}
	
	for(int i=0;i<collMOS.size();i++)
	{
		form.lyrSearcFilter().tabRecordingUser().qmbUserRec().newRow(collMOS.get(i), collMOS.get(i).toString());
	}
	
	if(collMOS.size() == 1)
	{
		form.lyrSearcFilter().tabRecordingUser().qmbUserRec().setValue(collMOS.get(0));
	}
	else
		form.lyrSearcFilter().tabRecordingUser().qmbUserRec().showOpened();
	
}
 
Example 20
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 4 votes
private void populateProfessionalDataFromScreen()
{
	SupportNetworkProfessionalVo voProf = form.getLocalContext().getsupportNetworkProfessional();

	if(voProf.getIsCurrActiveProfSupp()==null)
		voProf.setIsCurrActiveProfSupp(Boolean.TRUE);

	// Professional details
	if (form.lyrProServices().tabProfessional().chkSupplyHcp().getValue())
	{
		if (voProf.getSuppliedProfessional() == null)
		{
			voProf.setProfession(form.lyrProServices().tabProfessional().cmbProfessional().getValue());
			voProf.setHcpSubType(form.lyrProServices().tabProfessional().cmbHcpSubType().getValue());
			voProf.setAuthorngInfo(form.lyrProServices().tabProfessional().customControlAuth().getValue());

			SuppNetworkServiceProfessionDetailVo voNetProfDetail = new SuppNetworkServiceProfessionDetailVo();
			voNetProfDetail.setAddress(form.lyrProServices().tabProfessional().txtAddressPro().getValue());
			voNetProfDetail.setEmailAddress(form.lyrProServices().tabProfessional().txtEmailPro().getValue());
			voNetProfDetail.setMobilePhone(form.lyrProServices().tabProfessional().txtMobilePhPro().getValue());
			voNetProfDetail.setName(form.lyrProServices().tabProfessional().txtHcpName().getValue());
			voNetProfDetail.setServiceLocation(form.lyrProServices().tabProfessional().txtLocation().getValue());
			voNetProfDetail.setWorkPhone(form.lyrProServices().tabProfessional().txtWorkPh().getValue());
			voProf.setSuppliedProfessional(voNetProfDetail);
			voProf.setMOS(null);
			voProf.setCurrentLocation(null);
		}
		else
		{
			// update location & details
			voProf.getSuppliedProfessional().setServiceLocation(form.lyrProServices().tabProfessional().txtLocation().getValue());
			voProf.getSuppliedProfessional().setAddress(form.lyrProServices().tabProfessional().txtAddressPro().getValue());
			voProf.getSuppliedProfessional().setMobilePhone(form.lyrProServices().tabProfessional().txtMobilePhPro().getValue());
			voProf.getSuppliedProfessional().setWorkPhone(form.lyrProServices().tabProfessional().txtWorkPh().getValue());
			voProf.getSuppliedProfessional().setEmailAddress(form.lyrProServices().tabProfessional().txtEmailPro().getValue());
			voProf.getSuppliedProfessional().setName(form.lyrProServices().tabProfessional().txtHcpName().getValue()); //WDEV-17560
		}
	}
	else
	{
		if (voProf.getMOS() == null)
		{
			voProf.setProfession(form.lyrProServices().tabProfessional().cmbProfessional().getValue());
			voProf.setHcpSubType(form.lyrProServices().tabProfessional().cmbHcpSubType().getValue());
			voProf.setAuthorngInfo(form.lyrProServices().tabProfessional().customControlAuth().getValue());

			MemberOfStaffShortVo voMOSShort = new MemberOfStaffShortVo();

			if (form.getLocalContext().getvoMemberOfStaffShort() != null)
				voMOSShort = form.getLocalContext().getvoMemberOfStaffShort();
			else
			{
				voMOSShort.setHcp(form.lyrProServices().tabProfessional().qmbHcpName().getValue());
				if (voMOSShort.getHcpIsNotNull())
				{
					voMOSShort.setName(voMOSShort.getHcp().getName());
					if (voMOSShort.getHcp().getMosIsNotNull())
					{
						voMOSShort.setPasCode(voMOSShort.getHcp().getMos().getPasCode());
						voMOSShort.setEmailAddress(voMOSShort.getHcp().getMos().getEmailAddress());
						voMOSShort.setBleep(voMOSShort.getHcp().getMos().getBleep());
					}
				}
			}
			voProf.setMOS(voMOSShort.countFieldsWithValue() > 0 ? voMOSShort : null);
			voProf.setSuppliedProfessional(null);
			voProf.setCurrentLocation(form.lyrProServices().tabProfessional().cmbLocationHcp().getValue());
		}
		else
		{
			// update location only
			voProf.setCurrentLocation(form.lyrProServices().tabProfessional().cmbLocationHcp().getValue());
		}
	}

	form.getLocalContext().setsupportNetworkProfessional(voProf);
}