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

The following are Jave code examples for showing how to use getPasCode() 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 5 votes
protected void onQmbMosTextSubmited(String value) throws PresentationLogicException
{
	if (value != null)
	{
		MemberOfStaffShortVoCollection mosColl = domain.listMos(value.toString(), form.txtForename().getValue());
		form.qmbMos().setValue(null);
		form.qmbMos().clear();
		form.txtForename().setValue(null);
		String strName = null;
		if (mosColl != null)
		{
			for (int i = 0; i < mosColl.size(); i++)
			{
				strName = "";
				if ((mosColl.get(i).getName() != null) && (mosColl.get(i).getID_MemberOfStaff() != null))
				{
					MemberOfStaffShortVo mos = mosColl.get(i);
					strName = mos.getName().toShortForm();
					if (mos.getPasCode() != null)
					{
						strName += (" (" + mos.getPasCode() + ")");
					}
					form.qmbMos().newRow(mosColl.get(i), strName);
				}
			}
			if (mosColl.size() == 1)
			{
				form.qmbMos().setValue(mosColl.get(0));
			}
			else if (mosColl.size() > 1)
			{
				form.qmbMos().showOpened();
			}
		}
	}
	updateControlsState();
}
 
Example 2
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());
}