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

The following are Jave code examples for showing how to use getHcpIsNotNull() 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
private void updateControlsState() 
{
	form.getContextMenus().getFluidBalanceNEW_FLUIDItem().setVisible(true);
	form.getContextMenus().getFluidBalanceUPDATE_FLUIDItem().setVisible(form.grdDetails().getValue() instanceof FluidBalanceInstanceVo);
	form.getContextMenus().getFluidBalanceCONFIRMItem().setVisible(form.grdDetails().getValue() instanceof SignatoryShiftDetailsVo);

	//Cant be a student nurse
	MemberOfStaffShortVo mos = (MemberOfStaffShortVo)domain.getMosUser();
	if (mos != null && mos.getHcpIsNotNull())
	{
		if (mos.getHcp() instanceof NurseVo)
		{
			if (HcpDisType.STUDENTNURSE.equals(((NurseVo) mos.getHcp()).getNurseType()))
				form.getContextMenus().getFluidBalanceCONFIRMItem().setVisible(false);
		}
	}
	
	//Check is already confirmed
	if (form.grdDetails().getValue() instanceof SignatoryShiftDetailsVo && ((SignatoryShiftDetailsVo)form.grdDetails().getValue()).getDateTimeSignedIsNotNull())
		form.getContextMenus().getFluidBalanceCONFIRMItem().setVisible(false);
}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 6 votes
private void addMosNode(MemberOfStaffShortVo mosVo)
{
	TreeNode newNode = form.lyrLHS().tabMos().treMemberOfStaff().getNodes().add(mosVo, mosVo.toString());
	if (mosVo.getHcpIsNotNull() && mosVo.getHcp().getHcpTypeIsNotNull())
	{
		if (mosVo.getHcp().getHcpType().getParent() == null)
		{
			newNode.setCollapsedImage(mosVo.getHcp().getHcpType().getImage() == null ? form.getImages().Admin.StaffBlack : mosVo.getHcp().getHcpType().getImage());
			newNode.setExpandedImage(mosVo.getHcp().getHcpType().getImage() == null ? form.getImages().Admin.StaffBlack : mosVo.getHcp().getHcpType().getImage());
		}
		else
		{
			newNode.setCollapsedImage(mosVo.getHcp().getHcpType().getParent().getImage() == null ? form.getImages().Admin.StaffBlack : mosVo.getHcp().getHcpType().getParent().getImage());
			newNode.setExpandedImage(mosVo.getHcp().getHcpType().getParent().getImage() == null ? form.getImages().Admin.StaffBlack : mosVo.getHcp().getHcpType().getParent().getImage());

		}
	}
	else
	{
		newNode.setCollapsedImage(form.getImages().Admin.StaffBlack);
		newNode.setExpandedImage(form.getImages().Admin.StaffBlack);
	}
	if ((mosVo.getIsActiveIsNotNull()) && (mosVo.getIsActive().booleanValue() == false))
		newNode.setTextColor(Color.Gray);
}
 
Example 3
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
private void populateMosForLocation(LocMostVo voLoc, TreeNode node)
{
	clearMosNodes(node);
	MemberOfStaffShortVoCollection voCollMos = domain.listMosForLocation(voLoc);

	TreeNode newNode;
	for (int i = 0; i < voCollMos.size(); i++)
	{
		MemberOfStaffShortVo mosVo = voCollMos.get(i);
		newNode = node.getNodes().add(mosVo, mosVo.getName().toString());

		if (mosVo.getHcpIsNotNull() && mosVo.getHcp().getHcpTypeIsNotNull())
		{
			if (mosVo.getHcp().getHcpType().getParent() == null)
			{
				newNode.setCollapsedImage(mosVo.getHcp().getHcpType().getImage() == null ? form.getImages().Admin.StaffBlack : mosVo.getHcp().getHcpType().getImage());
				newNode.setExpandedImage(mosVo.getHcp().getHcpType().getImage() == null ? form.getImages().Admin.StaffBlack : mosVo.getHcp().getHcpType().getImage());
			}
			else
			{
				newNode.setCollapsedImage(mosVo.getHcp().getHcpType().getParent().getImage() == null ? form.getImages().Admin.StaffBlack : mosVo.getHcp().getHcpType().getParent().getImage());
				newNode.setExpandedImage(mosVo.getHcp().getHcpType().getParent().getImage() == null ? form.getImages().Admin.StaffBlack : mosVo.getHcp().getHcpType().getParent().getImage());
			}
		}
		else
		{
			newNode.setCollapsedImage(form.getImages().Admin.StaffBlack);
			newNode.setExpandedImage(form.getImages().Admin.StaffBlack);
		}
	}
}
 
Example 4
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
private boolean canUpdatePasId(MemberOfStaffShortVo voMos)
{
	if (!ConfigFlag.GEN.ALLOW_CONS_PAS_ID_UPDATE.getValue() && voMos.getHcpIsNotNull() && voMos.getHcp() instanceof MedicVo && ((MedicVo) voMos.getHcp()).getGradeIsNotNull() && ((MedicVo) voMos.getHcp()).getGrade().equals(MedicGrade.CONS))
	{
		return false;
	}
	return true;
}
 
Example 5
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
private void populateScreenFromMosVo(MemberOfStaffShortVo mosVo)
{
	clearDetailControls();
	if (mosVo.getNameIsNotNull())
	{
		form.txtSurname().setValue(mosVo.getName().getSurname());
		form.txtForeName().setValue(mosVo.getName().getForename());
		form.txtMiddleName().setValue(mosVo.getName().getMiddleName());
		form.cmbTitle().setValue(mosVo.getName().getTitle());
	}
	form.txtInitials().setValue(mosVo.getInitials());
	form.txtSignatureBlock().setValue(mosVo.getSignatureBlock());
	form.cmbType().setValue(mosVo.getStaffType());
	form.txtSDSRole().setValue(mosVo.getSdsRoleId());
	//wdev-16588
	if( mosVo != null)
	{
		MemberOfStaffWithAppUserLiteVo tempVo = domain.getMemberOffStaffWithAppUserById(mosVo);
		form.txtUserName().setValue(tempVo != null && tempVo.getAppUserIsNotNull() ? tempVo.getAppUser().getUsername():"");
	}
	//------------
	if (mosVo.getHcpIsNotNull())
	{
		if (mosVo.getHcp().getHcpTypeIsNotNull())
		{
			form.getGlobalContext().setHcp(mosVo.getHcp());
			if (mosVo.getHcp().getHcpType().getParent() == null)
				form.cmbHcpDiciplineDetails().setValue(mosVo.getHcp().getHcpType());
			else
				form.cmbHcpDiciplineDetails().setValue(mosVo.getHcp().getHcpType().getParent());
		}
		displayHCPDetails();
	}
	
	populateMappingsGrid(mosVo.getCodeMappings());
	populateContactsGrid(mosVo.getCommChannels());
}
 
Example 6
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
protected void onTreOrganisationSelectionChanged(TreeNode node) throws PresentationLogicException
{
	clearDetailControls();
	clearContextVariables();

	form.getContextMenus().getMosOrganisationEDITItem().setVisible(node.getValue() instanceof MemberOfStaffShortVo);

	if (node.getValue() instanceof LocSiteVo || node.getValue() instanceof LocMostVo)
	{
		populateMosForLocation((LocMostVo) node.getValue(), node);
	}

	else if (node.getValue() instanceof MemberOfStaffShortVo)
	{
		MemberOfStaffShortVo voMos = (MemberOfStaffShortVo) node.getValue();

		populateScreenFromMosVo(setContextVariables(voMos)); //WDEV-13921
		
		if (voMos.getHcpIsNotNull())
		{
			form.imbHCPDlg().setEnabledImage(form.cmbHcpDiciplineDetails().getValue().getCollapsedImage());
			form.imbHCPDlg().setDisabledImage(form.cmbHcpDiciplineDetails().getValue().getCollapsedImage());
			form.imbHCPDlg().setVisible(true);
		}
		else
		{
			form.imbHCPDlg().setVisible(false);
		}

	}
	else
	{
		form.getContextMenus().getMosOrganisationADDItem().setVisible(false);
	}

}
 
Example 7
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);
}
 
Example 8
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 4 votes
private void checkForDiscipline()
{
	MemberOfStaffShortVo mos = null;
	if (getDisciplineForLoggedInUser(form.getGlobalContext().Clinical.getCurrentClinicalNote()) != null)
		mos = getDisciplineForLoggedInUser(form.getGlobalContext().Clinical.getCurrentClinicalNote());
	else
	{
		engine.showMessage("No Discipline is available. Please choose an authoring user.");
		return;
	}

	if (form.getGlobalContext().Clinical.getCurrentClinicalNoteIsNotNull() && form.getGlobalContext().Clinical.getCurrentClinicalNote().getIsTranscribedIsNotNull())
	{
		if (form.getGlobalContext().Clinical.getCurrentClinicalNote().getCurrentStatusIsNotNull() && form.getGlobalContext().Clinical.getCurrentClinicalNote().getDisciplineIsNotNull() && mos.getHcpIsNotNull())
		{
			//if (!form.getGlobalContext().Clinical.getCurrentClinicalNote().getAuthoringInfo().getAuthoringHcp().getHcpType().equals(mos.getHcp().getHcpType()) && (form.getGlobalContext().Clinical.getReturnToFormModeIsNotNull() && !form.getGlobalContext().Clinical.getReturnToFormMode().equals(FormMode.EDIT) || form.getGlobalContext().Clinical.getReturnToFormMode() == null))
			if(form.getGlobalContext().Clinical.getCurrentClinicalNote().getAuthoringInfoIsNotNull() && form.getGlobalContext().Clinical.getCurrentClinicalNote().getAuthoringInfo().getAuthoringHcpIsNotNull() && form.getGlobalContext().Clinical.getCurrentClinicalNote().getAuthoringInfo().getAuthoringHcp().getHcpTypeIsNotNull())
				  if (!form.getGlobalContext().Clinical.getCurrentClinicalNote().getAuthoringInfo().getAuthoringHcp().getHcpType().equals(mos.getHcp().getHcpType()) && (form.getGlobalContext().Clinical.getReturnToFormModeIsNotNull() && !FormMode.EDIT.equals(form.getGlobalContext().Clinical.getReturnToFormMode()) || form.getGlobalContext().Clinical.getReturnToFormMode() == null))

			{
				if (form.lyrTabs().tabClinicalNotes().isHeaderVisible())
				{
					form.lyrTabs().tabClinicalNotes().btnNewSOAP().setVisible(false);
					form.lyrTabs().tabClinicalNotes().btnUpdateSOAP().setVisible(false);
				}
				if (form.lyrTabs().tabOPDNote().isHeaderVisible())
				{
					form.lyrTabs().tabOPDNote().btnNewOPClinicalNote().setVisible(false);
					form.lyrTabs().tabOPDNote().btnUpdateOPNotes().setVisible(false);
				}
			}
		}
		// Non HCP
		else
		{
			if (form.getMode().equals(FormMode.VIEW) && domain.getHcpLiteUser() == null)
			{

				if (form.lyrTabs().tabClinicalNotes().isHeaderVisible())
				{
					form.lyrTabs().tabClinicalNotes().btnNewSOAP().setVisible(false);
					form.lyrTabs().tabClinicalNotes().btnUpdateSOAP().setVisible(false);
				}
				if (form.lyrTabs().tabOPDNote().isHeaderVisible())
				{
					form.lyrTabs().tabOPDNote().btnNewOPClinicalNote().setVisible(false);
					form.lyrTabs().tabOPDNote().btnUpdateOPNotes().setVisible(false);
				}

				if (form.getGlobalContext().Clinical.getCurrentClinicalNote().getCurrentStatusIsNotNull() && form.getGlobalContext().Clinical.getCurrentClinicalNote().getCurrentStatus().getStatusIsNotNull() && !(form.getGlobalContext().Clinical.getCurrentClinicalNote().getCurrentStatus().getStatus().equals(ClinicalNotesStatus.ACTIVE) || form.getGlobalContext().Clinical.getCurrentClinicalNote().getCurrentStatus().getStatus().equals(ClinicalNotesStatus.CORRECTED)))
				{
					if (form.lyrTabs().tabClinicalNotes().isHeaderVisible())
					{
						form.lyrTabs().tabClinicalNotes().btnUpdateSOAP().setVisible(true);
					}
					if (form.lyrTabs().tabOPDNote().isHeaderVisible())
					{
						form.lyrTabs().tabOPDNote().btnUpdateOPNotes().setVisible(true);
					}
				}
			}
		}
	}
}
 
Example 9
Project: AvoinApotti   File: SupportNetworkProfessionalServicesImpl.java   Source Code and License Vote up 4 votes
private List listNurse(MemberOfStaffShortVo filter,HcpDisType hcpSUbtype)
{
	if (filter == null)
		throw new CodingRuntimeException("Member Of Staff was not supplied. Mandatory argument");
	
	DomainFactory factory = getDomainFactory();
	String hql = " select n1_1.mos from Nurse as n1_1";
	StringBuffer condStr = new StringBuffer();
	String andStr = " ";
	ArrayList markers = new ArrayList();
	ArrayList values = new ArrayList();
	if (filter.getNameIsNotNull() && filter.getName().getSurname() != null && filter.getName().getSurname().length() > 0)
	{
		String surnameSearch = filter.getName().getSurname().toUpperCase();
		surnameSearch = surnameSearch.substring(0, Math.min(10, filter.getName().getSurname().length()));
		condStr.append(andStr + " n1_1.mos.name.upperSurname like :mosSname");
		markers.add("mosSname");
		values.add(surnameSearch + "%");
		andStr = " and ";
	}

	if (filter.getStaffTypeIsNotNull())
	{
		condStr.append(andStr + " n1_1.mos.staffType = :staffType");
		markers.add("staffType");
		values.add(getDomLookup(filter.getStaffType()));
		andStr = " and ";
	}
	if (filter.getHcpIsNotNull() && filter.getHcp().getHcpTypeIsNotNull())
	{
		
		condStr.append(andStr + " n1_1.hcpType = :hcpType");
		markers.add("hcpType");
		values.add(getDomLookup(filter.getHcp().getHcpType()));
		andStr = " and ";
		
	}
	if(hcpSUbtype != null)
	{
		condStr.append(andStr + " n1_1.nurseType = :hcpNurseType");
		markers.add("hcpNurseType");
		values.add(getDomLookup(hcpSUbtype));
		andStr = " and ";
	}
	if (filter.getIsAppUserIsNotNull() && filter.getIsAppUser().booleanValue())
	{
		condStr.append(andStr + " n1_1.mos.appUser is not null ");
		andStr = " and ";
	}

	if (filter.getIsActiveIsNotNull() && filter.getIsActive().booleanValue())
	{
		condStr.append(andStr + " n1_1.mos.isActive = :isActive");
		markers.add("isActive");
		values.add(filter.getIsActive());
		andStr = " and ";
	}

	if (andStr.equals(" and "))
		hql += " where ";

	hql += condStr.toString();
	hql += " order by n1_1.mos.name.upperSurname,n1_1.mos.name.upperForename";
	
	return factory.find(hql, markers, values);
	
	
	
}
 
Example 10
Project: AvoinApotti   File: SupportNetworkProfessionalServicesImpl.java   Source Code and License Vote up 4 votes
private List listTherapist(MemberOfStaffShortVo filter,HcpDisType hcpSUbtype)
{
	if (filter == null)
		throw new CodingRuntimeException("Member Of Staff was not supplied. Mandatory argument");
	
	DomainFactory factory = getDomainFactory();
	String hql = " select t1_1.mos from Therapist as t1_1";
	StringBuffer condStr = new StringBuffer();
	String andStr = " ";
	ArrayList markers = new ArrayList();
	ArrayList values = new ArrayList();
	if (filter.getNameIsNotNull() && filter.getName().getSurname() != null && filter.getName().getSurname().length() > 0)
	{
		String surnameSearch = filter.getName().getSurname().toUpperCase();
		surnameSearch = surnameSearch.substring(0, Math.min(10, filter.getName().getSurname().length()));
		condStr.append(andStr + " t1_1.mos.name.upperSurname like :mosSname");
		markers.add("mosSname");
		values.add(surnameSearch + "%");
		andStr = " and ";
	}

	if (filter.getStaffTypeIsNotNull())
	{
		condStr.append(andStr + " t1_1.mos.staffType = :staffType");
		markers.add("staffType");
		values.add(getDomLookup(filter.getStaffType()));
		andStr = " and ";
	}
	if (filter.getHcpIsNotNull() && filter.getHcp().getHcpTypeIsNotNull())
	{
		
		condStr.append(andStr + " t1_1.hcpType = :hcpType");
		markers.add("hcpType");
		values.add(getDomLookup(filter.getHcp().getHcpType()));
		andStr = " and ";
		
	}
	if(hcpSUbtype != null)
	{
		condStr.append(andStr + " t1_1.therapistType = :hcpTherapistType");
		markers.add("hcpTherapistType");
		values.add(getDomLookup(hcpSUbtype));
		andStr = " and ";
	}
	if (filter.getIsAppUserIsNotNull() && filter.getIsAppUser().booleanValue())
	{
		condStr.append(andStr + " t1_1.mos.appUser is not null ");
		andStr = " and ";
	}

	if (filter.getIsActiveIsNotNull() && filter.getIsActive().booleanValue())
	{
		condStr.append(andStr + " t1_1.mos.isActive = :isActive");
		markers.add("isActive");
		values.add(filter.getIsActive());
		andStr = " and ";
	}

	if (andStr.equals(" and "))
		hql += " where ";

	hql += condStr.toString();
	hql += " order by t1_1.mos.name.upperSurname,t1_1.mos.name.upperForename";
	
	return factory.find(hql, markers, values);
	
	
	
}
 
Example 11
Project: AvoinApotti   File: SupportNetworkProfessionalServicesImpl.java   Source Code and License Vote up 4 votes
private List listDomMos(MemberOfStaffShortVo filter)
{
	if (filter == null)
		throw new CodingRuntimeException("Member Of Staff was not supplied. Mandatory argument");
	
	DomainFactory factory = getDomainFactory();
	String hql = " from MemberOfStaff mos";
	StringBuffer condStr = new StringBuffer();
	String andStr = " ";
	ArrayList markers = new ArrayList();
	ArrayList values = new ArrayList();

	if (filter.getID_MemberOfStaffIsNotNull())
	{
		hql += (" where mos.id = " + filter.getID_MemberOfStaff());
		return factory.find(hql, markers, values);
	}
	if (filter.getNameIsNotNull() && filter.getName().getSurname() != null && filter.getName().getSurname().length() > 0)
	{
		String surnameSearch = filter.getName().getSurname().toUpperCase();
		surnameSearch = surnameSearch.substring(0, Math.min(10, filter.getName().getSurname().length()));
		condStr.append(andStr + " mos.name.upperSurname like :mosSname");
		markers.add("mosSname");
		values.add(surnameSearch + "%");
		andStr = " and ";
	}

	if (filter.getStaffTypeIsNotNull())
	{
		condStr.append(andStr + " mos.staffType = :staffType");
		markers.add("staffType");
		values.add(getDomLookup(filter.getStaffType()));
		andStr = " and ";
	}

	if (filter.getHcpIsNotNull() && filter.getHcp().getHcpTypeIsNotNull())
	{
		if (filter.getHcp().getHcpType().equals(HcpDisType.OTHER))
		{
			condStr.append(andStr + " mos.hcp.hcpType not in (:hcpType1 , :hcpType2, :hcpType3)");
			markers.add("hcpType1");
			values.add(getDomLookup(HcpDisType.MEDICAL));
			markers.add("hcpType2");
			values.add(getDomLookup(HcpDisType.NURSING));
			markers.add("hcpType3");
			values.add(getDomLookup(HcpDisType.THERAPY));
			andStr = " and ";
		}
		else
		{
			condStr.append(andStr + " mos.hcp.hcpType = :hcpType");
			markers.add("hcpType");
			values.add(getDomLookup(filter.getHcp().getHcpType()));
			andStr = " and ";
		}
	}

	if (filter.getIsAppUserIsNotNull() && filter.getIsAppUser().booleanValue())
	{
		condStr.append(andStr + " mos.appUser is not null ");
		andStr = " and ";
	}

	if (filter.getIsActiveIsNotNull() && filter.getIsActive().booleanValue())
	{
		condStr.append(andStr + " mos.isActive = :isActive");
		markers.add("isActive");
		values.add(filter.getIsActive());
		andStr = " and ";
	}

	if (andStr.equals(" and "))
		hql += " where ";

	hql += condStr.toString();
	hql += " order by mos.name.upperSurname,mos.name.upperForename";
	
	return factory.find(hql, markers, values);
}
 
Example 12
Project: AvoinApotti   File: SupportServicesImpl.java   Source Code and License Vote up 4 votes
private List listDomMos(MemberOfStaffShortVo filter)
{
	if (filter == null)
		throw new CodingRuntimeException("Member Of Staff was not supplied. Mandatory argument");
	
	DomainFactory factory = getDomainFactory();
	String hql = " from MemberOfStaff mos";
	StringBuffer condStr = new StringBuffer();
	String andStr = " ";
	ArrayList markers = new ArrayList();
	ArrayList values = new ArrayList();

	if (filter.getID_MemberOfStaffIsNotNull())
	{
		hql += (" where mos.id = " + filter.getID_MemberOfStaff());
		return factory.find(hql, markers, values);
	}
	if (filter.getNameIsNotNull() && filter.getName().getSurname() != null && filter.getName().getSurname().length() > 0)
	{
		String surnameSearch = filter.getName().getSurname().toUpperCase();
		surnameSearch = surnameSearch.substring(0, Math.min(10, filter.getName().getSurname().length()));
		condStr.append(andStr + " mos.name.upperSurname like :mosSname");
		markers.add("mosSname");
		values.add(surnameSearch + "%");
		andStr = " and ";
	}

	if (filter.getStaffTypeIsNotNull())
	{
		condStr.append(andStr + " mos.staffType = :staffType");
		markers.add("staffType");
		values.add(getDomLookup(filter.getStaffType()));
		andStr = " and ";
	}

	if (filter.getHcpIsNotNull() && filter.getHcp().getHcpTypeIsNotNull())
	{
		if (filter.getHcp().getHcpType().equals(HcpDisType.OTHER))
		{
			condStr.append(andStr + " mos.hcp.hcpType not in (:hcpType1 , :hcpType2, :hcpType3)");
			markers.add("hcpType1");
			values.add(getDomLookup(HcpDisType.MEDICAL));
			markers.add("hcpType2");
			values.add(getDomLookup(HcpDisType.NURSING));
			markers.add("hcpType3");
			values.add(getDomLookup(HcpDisType.THERAPY));
			andStr = " and ";
		}
		else
		{
			condStr.append(andStr + " mos.hcp.hcpType = :hcpType");
			markers.add("hcpType");
			values.add(getDomLookup(filter.getHcp().getHcpType()));
			andStr = " and ";
		}
	}

	if (filter.getIsAppUserIsNotNull() && filter.getIsAppUser().booleanValue())
	{
		condStr.append(andStr + " mos.appUser is not null ");
		andStr = " and ";
	}

	if (filter.getIsActiveIsNotNull() && filter.getIsActive().booleanValue())
	{
		condStr.append(andStr + " mos.isActive = :isActive");
		markers.add("isActive");
		values.add(filter.getIsActive());
		andStr = " and ";
	}

	if (andStr.equals(" and "))
		hql += " where ";

	hql += condStr.toString();
	hql += " order by mos.name.upperSurname,mos.name.upperForename";
	
	return factory.find(hql, markers, values);
}
 
Example 13
Project: AvoinApotti   File: SupportServicesImpl.java   Source Code and License Vote up 4 votes
private List listMedic(MemberOfStaffShortVo filter,HcpDisType hcpSUbtype)
{
	if (filter == null)
		throw new CodingRuntimeException("Member Of Staff was not supplied. Mandatory argument");
	
	DomainFactory factory = getDomainFactory();
	String hql = " select m1_1.mos from Medic as m1_1";
	StringBuffer condStr = new StringBuffer();
	String andStr = " ";
	ArrayList markers = new ArrayList();
	ArrayList values = new ArrayList();
	if (filter.getNameIsNotNull() && filter.getName().getSurname() != null && filter.getName().getSurname().length() > 0)
	{
		String surnameSearch = filter.getName().getSurname().toUpperCase();
		surnameSearch = surnameSearch.substring(0, Math.min(10, filter.getName().getSurname().length()));
		condStr.append(andStr + " m1_1.mos.name.upperSurname like :mosSname");
		markers.add("mosSname");
		values.add(surnameSearch + "%");
		andStr = " and ";
	}

	if (filter.getStaffTypeIsNotNull())
	{
		condStr.append(andStr + " m1_1.mos.staffType = :staffType");
		markers.add("staffType");
		values.add(getDomLookup(filter.getStaffType()));
		andStr = " and ";
	}
	if (filter.getHcpIsNotNull() && filter.getHcp().getHcpTypeIsNotNull())
	{
		
		condStr.append(andStr + " m1_1.hcpType = :hcpType");
		markers.add("hcpType");
		values.add(getDomLookup(filter.getHcp().getHcpType()));
		andStr = " and ";
		
	}
	if(hcpSUbtype != null)
	{
		condStr.append(andStr + " m1_1.medicType = :hcpMedicType");
		markers.add("hcpMedicType");
		values.add(getDomLookup(hcpSUbtype));
		andStr = " and ";
	}
	if (filter.getIsAppUserIsNotNull() && filter.getIsAppUser().booleanValue())
	{
		condStr.append(andStr + " m1_1.mos.appUser is not null ");
		andStr = " and ";
	}

	if (filter.getIsActiveIsNotNull() && filter.getIsActive().booleanValue())
	{
		condStr.append(andStr + " m1_1.mos.isActive = :isActive");
		markers.add("isActive");
		values.add(filter.getIsActive());
		andStr = " and ";
	}

	if (andStr.equals(" and "))
		hql += " where ";

	hql += condStr.toString();
	hql += " order by m1_1.mos.name.upperSurname,m1_1.mos.name.upperForename";
	
	return factory.find(hql, markers, values);
	
	
	
}
 
Example 14
Project: AvoinApotti   File: SupportServicesImpl.java   Source Code and License Vote up 4 votes
private List listNurse(MemberOfStaffShortVo filter,HcpDisType hcpSUbtype)
{
	if (filter == null)
		throw new CodingRuntimeException("Member Of Staff was not supplied. Mandatory argument");
	
	DomainFactory factory = getDomainFactory();
	String hql = " select n1_1.mos from Nurse as n1_1";
	StringBuffer condStr = new StringBuffer();
	String andStr = " ";
	ArrayList markers = new ArrayList();
	ArrayList values = new ArrayList();
	if (filter.getNameIsNotNull() && filter.getName().getSurname() != null && filter.getName().getSurname().length() > 0)
	{
		String surnameSearch = filter.getName().getSurname().toUpperCase();
		surnameSearch = surnameSearch.substring(0, Math.min(10, filter.getName().getSurname().length()));
		condStr.append(andStr + " n1_1.mos.name.upperSurname like :mosSname");
		markers.add("mosSname");
		values.add(surnameSearch + "%");
		andStr = " and ";
	}

	if (filter.getStaffTypeIsNotNull())
	{
		condStr.append(andStr + " n1_1.mos.staffType = :staffType");
		markers.add("staffType");
		values.add(getDomLookup(filter.getStaffType()));
		andStr = " and ";
	}
	if (filter.getHcpIsNotNull() && filter.getHcp().getHcpTypeIsNotNull())
	{
		
		condStr.append(andStr + " n1_1.hcpType = :hcpType");
		markers.add("hcpType");
		values.add(getDomLookup(filter.getHcp().getHcpType()));
		andStr = " and ";
		
	}
	if(hcpSUbtype != null)
	{
		condStr.append(andStr + " n1_1.nurseType = :hcpNurseType");
		markers.add("hcpNurseType");
		values.add(getDomLookup(hcpSUbtype));
		andStr = " and ";
	}
	if (filter.getIsAppUserIsNotNull() && filter.getIsAppUser().booleanValue())
	{
		condStr.append(andStr + " n1_1.mos.appUser is not null ");
		andStr = " and ";
	}

	if (filter.getIsActiveIsNotNull() && filter.getIsActive().booleanValue())
	{
		condStr.append(andStr + " n1_1.mos.isActive = :isActive");
		markers.add("isActive");
		values.add(filter.getIsActive());
		andStr = " and ";
	}

	if (andStr.equals(" and "))
		hql += " where ";

	hql += condStr.toString();
	hql += " order by n1_1.mos.name.upperSurname,n1_1.mos.name.upperForename";
	
	return factory.find(hql, markers, values);
	
	
	
}
 
Example 15
Project: AvoinApotti   File: SupportServicesImpl.java   Source Code and License Vote up 4 votes
private List listTherapist(MemberOfStaffShortVo filter,HcpDisType hcpSUbtype)
{
	if (filter == null)
		throw new CodingRuntimeException("Member Of Staff was not supplied. Mandatory argument");
	
	DomainFactory factory = getDomainFactory();
	String hql = " select t1_1.mos from Therapist as t1_1";
	StringBuffer condStr = new StringBuffer();
	String andStr = " ";
	ArrayList markers = new ArrayList();
	ArrayList values = new ArrayList();
	if (filter.getNameIsNotNull() && filter.getName().getSurname() != null && filter.getName().getSurname().length() > 0)
	{
		String surnameSearch = filter.getName().getSurname().toUpperCase();
		surnameSearch = surnameSearch.substring(0, Math.min(10, filter.getName().getSurname().length()));
		condStr.append(andStr + " t1_1.mos.name.upperSurname like :mosSname");
		markers.add("mosSname");
		values.add(surnameSearch + "%");
		andStr = " and ";
	}

	if (filter.getStaffTypeIsNotNull())
	{
		condStr.append(andStr + " t1_1.mos.staffType = :staffType");
		markers.add("staffType");
		values.add(getDomLookup(filter.getStaffType()));
		andStr = " and ";
	}
	if (filter.getHcpIsNotNull() && filter.getHcp().getHcpTypeIsNotNull())
	{
		
		condStr.append(andStr + " t1_1.hcpType = :hcpType");
		markers.add("hcpType");
		values.add(getDomLookup(filter.getHcp().getHcpType()));
		andStr = " and ";
		
	}
	if(hcpSUbtype != null)
	{
		condStr.append(andStr + " t1_1.therapistType = :hcpTherapistType");
		markers.add("hcpTherapistType");
		values.add(getDomLookup(hcpSUbtype));
		andStr = " and ";
	}
	if (filter.getIsAppUserIsNotNull() && filter.getIsAppUser().booleanValue())
	{
		condStr.append(andStr + " t1_1.mos.appUser is not null ");
		andStr = " and ";
	}

	if (filter.getIsActiveIsNotNull() && filter.getIsActive().booleanValue())
	{
		condStr.append(andStr + " t1_1.mos.isActive = :isActive");
		markers.add("isActive");
		values.add(filter.getIsActive());
		andStr = " and ";
	}

	if (andStr.equals(" and "))
		hql += " where ";

	hql += condStr.toString();
	hql += " order by t1_1.mos.name.upperSurname,t1_1.mos.name.upperForename";
	
	return factory.find(hql, markers, values);
	
	
	
}
 
Example 16
Project: AvoinApotti   File: MosSearchImpl.java   Source Code and License Vote up 4 votes
private List listDomMos(MemberOfStaffShortVo filter)
{
	DomainFactory factory = getDomainFactory();
	String hql = " from MemberOfStaff mos";
	StringBuffer condStr = new StringBuffer();
	String andStr = " ";
	ArrayList markers = new ArrayList();
	ArrayList values = new ArrayList();

	if (filter.getID_MemberOfStaffIsNotNull())
	{
		hql += (" where mos.id = " + filter.getID_MemberOfStaff());
		return factory.find(hql, markers, values);
	}
	if (filter.getNameIsNotNull() && filter.getName().getSurname() != null && filter.getName().getSurname().length() > 0)
	{
		String surnameSearch = filter.getName().getSurname().toUpperCase();
		surnameSearch = surnameSearch.substring(0, Math.min(10, filter.getName().getSurname().length()));
		condStr.append(andStr + " mos.name.upperSurname like :mosSname");
		markers.add("mosSname");
		values.add(surnameSearch + "%");
		andStr = " and ";
	}

	if (filter.getStaffTypeIsNotNull())
	{
		condStr.append(andStr + " mos.staffType = :staffType");
		markers.add("staffType");
		values.add(getDomLookup(filter.getStaffType()));
		andStr = " and ";
	}

	if (filter.getHcpIsNotNull() && filter.getHcp().getHcpTypeIsNotNull())
	{
		if (filter.getHcp().getHcpType().equals(HcpDisType.OTHER))
		{
			condStr.append(andStr + " mos.hcp.hcpType not in (:hcpType1 , :hcpType2, :hcpType3)");
			markers.add("hcpType1");
			values.add(getDomLookup(HcpDisType.MEDICAL));
			markers.add("hcpType2");
			values.add(getDomLookup(HcpDisType.NURSING));
			markers.add("hcpType3");
			values.add(getDomLookup(HcpDisType.THERAPY));
			andStr = " and ";
		}
		else
		{
			condStr.append(andStr + " mos.hcp.hcpType = :hcpType");
			markers.add("hcpType");
			values.add(getDomLookup(filter.getHcp().getHcpType()));
			andStr = " and ";
		}
	}

	if (filter.getIsAppUserIsNotNull() && filter.getIsAppUser().booleanValue())
	{
		condStr.append(andStr + " mos.appUser is not null ");
		andStr = " and ";
	}

	if (filter.getIsActiveIsNotNull() && filter.getIsActive().booleanValue())
	{
		condStr.append(andStr + " mos.isActive = :isActive");
		markers.add("isActive");
		values.add(filter.getIsActive());
		andStr = " and ";
	}

	if (andStr.equals(" and "))
		hql += " where ";

	hql += condStr.toString();
	hql += " order by mos.name.upperSurname,mos.name.upperForename";
	
	return factory.find(hql, markers, values);
}
 
Example 17
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 4 votes
private void checkForDiscipline()
{
	if (form.getGlobalContext().Clinical.getCurrentClinicalNoteIsNotNull())
	{
		MemberOfStaffShortVo mos = null;
		if (getDisciplineForLoggedInUser(form.getGlobalContext().Clinical.getCurrentClinicalNote()) != null)
			mos = getDisciplineForLoggedInUser(form.getGlobalContext().Clinical.getCurrentClinicalNote());
		else
		{
			engine.showMessage("No Discipline is available. Please choose an authoring user.");
			return;
		}
				
		if (form.getGlobalContext().Clinical.getCurrentClinicalNoteIsNotNull())
		{
			if (form.getGlobalContext().Clinical.getCurrentClinicalNote().getCurrentStatusIsNotNull() 
				&& form.getGlobalContext().Clinical.getCurrentClinicalNote().getDisciplineIsNotNull() 
				&& mos.getHcpIsNotNull()
				&& form.getGlobalContext().Clinical.getCurrentClinicalNote().getAuthoringInfoIsNotNull()
				&& form.getGlobalContext().Clinical.getCurrentClinicalNote().getAuthoringInfo().getAuthoringHcpIsNotNull()
				&& form.getGlobalContext().Clinical.getCurrentClinicalNote().getAuthoringInfo().getAuthoringHcp().getHcpTypeIsNotNull())
			{
				if ( ! form.getGlobalContext().Clinical.getCurrentClinicalNote().getAuthoringInfo().getAuthoringHcp().getHcpType().equals(mos.getHcp().getHcpType()) 
					&& (form.getGlobalContext().Clinical.getReturnToFormModeIsNotNull() 
						&& ! form.getGlobalContext().Clinical.getReturnToFormMode().equals(FormMode.EDIT) 
						|| form.getGlobalContext().Clinical.getReturnToFormMode() == null))
				{
					form.btnNew().setVisible(false);			
				}
			}
			//Non HCP
			else 
			{
				if (form.getMode().equals(FormMode.VIEW) &&
						domain.getHcpLiteUser() == null)
				{
					form.btnNew().setVisible(false);								
				}
			}
		}
	}
}
 
Example 18
Project: AvoinApotti   File: MosAdminImpl.java   Source Code and License Vote up 4 votes
public HcpLiteVoCollection listHcpsLite(MemberOfStaffShortVo voFilter)
{
	DomainFactory factory = getDomainFactory();
	String hql = " from Hcp h";
	StringBuffer condStr = new StringBuffer();
	String andStr = " ";
	ArrayList markers = new ArrayList();
	ArrayList values = new ArrayList();

	if (voFilter.getNameIsNotNull() && voFilter.getName().getSurname() != null && voFilter.getName().getSurname().length() > 0)
	{
		condStr.append(andStr + " h.mos.name.upperSurname like :mosSname");
		markers.add("mosSname");
		values.add(voFilter.getName().getSurname().toUpperCase() + "%");
		andStr = " and ";
	}
	if (voFilter.getStaffTypeIsNotNull())
	{
		condStr.append(andStr + " h.mos.staffType = :staffType");
		markers.add("staffType");
		values.add(getDomLookup(StaffType.HCP));
		andStr = " and ";
	}

	if (voFilter.getIsActiveIsNotNull() && voFilter.getIsActive().booleanValue())
	{
		condStr.append(andStr + " h.isActive = :isActive");
		markers.add("isActive");
		values.add(voFilter.getIsActive());
		andStr = " and ";
	}

	if (voFilter.getHcpIsNotNull() && voFilter.getHcp().getHcpTypeIsNotNull())
	{
		if (voFilter.getHcp().getHcpType().equals(HcpDisType.OTHER))
		{
			condStr.append(andStr + " h.hcpType not in (:hcpType1 , :hcpType2, :hcpType3)");
			markers.add("hcpType1");
			values.add(getDomLookup(HcpDisType.MEDICAL));
			markers.add("hcpType2");
			values.add(getDomLookup(HcpDisType.NURSING));
			markers.add("hcpType3");
			values.add(getDomLookup(HcpDisType.THERAPY));
			andStr = " and ";
		}
		else
		{
			condStr.append(andStr + " h.hcpType = :hcpType");
			markers.add("hcpType");
			values.add(getDomLookup(voFilter.getHcp().getHcpType()));
			andStr = " and ";
		}
	}

	if (andStr.equals(" and "))
		hql += " where ";

	hql += condStr.toString();
	List lstHCPs = factory.find(hql, markers, values);
	
	return HcpLiteVoAssembler.createHcpLiteVoCollectionFromHcp(lstHCPs);
}
 
Example 19
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 4 votes
private void checkForDiscipline()
{
	if (form.getGlobalContext().Clinical.getCurrentClinicalNoteIsNotNull())
	{
		MemberOfStaffShortVo mos = null;
		if (getDisciplineForLoggedInUser(form.getGlobalContext().Clinical.getCurrentClinicalNote()) != null)
			mos = getDisciplineForLoggedInUser(form.getGlobalContext().Clinical.getCurrentClinicalNote());
		else
		{
			engine.showMessage("No Discipline is available. Please choose an authoring user.");
			return;
		}
				
		/*if (form.getGlobalContext().Clinical.getCurrentClinicalNoteIsNotNull())
			{
			if (form.getGlobalContext().Clinical.getCurrentClinicalNote().getCurrentStatusIsNotNull() &&
					form.getGlobalContext().Clinical.getCurrentClinicalNote().getDisciplineIsNotNull() &&
					( ( mos.getHcpIsNotNull() &&
						!form.getGlobalContext().Clinical.getCurrentClinicalNote().getAuthoringInfo().getAuthoringHcp().getHcpType().equals(mos.getHcp().getHcpType()) &&
							form.getGlobalContext().Clinical.getReturnToFormModeIsNotNull() &&
								!form.getGlobalContext().Clinical.getReturnToFormMode().equals(FormMode.EDIT) ) ||
									mos.getHcpIsNotNull() ))	
							{
								form.btnNew().setVisible(false);
								form.btnUpdate().setVisible(false);
							}
			}*/
		if (form.getGlobalContext().Clinical.getCurrentClinicalNoteIsNotNull())// &&
			//	form.getGlobalContext().Clinical.getCurrentClinicalNote().getIsTranscribedIsNotNull() )
				{
					if (form.getGlobalContext().Clinical.getCurrentClinicalNote().getCurrentStatusIsNotNull() &&
							form.getGlobalContext().Clinical.getCurrentClinicalNote().getDisciplineIsNotNull() &&
								mos.getHcpIsNotNull())
					{
								if (form.getGlobalContext().Clinical.getCurrentClinicalNote().getAuthoringInfo() != null
										&& form.getGlobalContext().Clinical.getCurrentClinicalNote().getAuthoringInfo().getAuthoringHcp()!=null
										&& form.getGlobalContext().Clinical.getCurrentClinicalNote().getAuthoringInfo().getAuthoringHcp().getHcpType()!=null
										&& !form.getGlobalContext().Clinical.getCurrentClinicalNote().getAuthoringInfo().getAuthoringHcp().getHcpType().equals(mos.getHcp().getHcpType()) &&
									(form.getGlobalContext().Clinical.getReturnToFormModeIsNotNull() &&
										!form.getGlobalContext().Clinical.getReturnToFormMode().equals(FormMode.EDIT) ||
										form.getGlobalContext().Clinical.getReturnToFormMode() == null))
		
								{
									form.btnNew().setVisible(false);
									form.btnUpdate().setVisible(false);
								}
					}
					//Non HCP
					else 
					{
						if (form.getMode().equals(FormMode.VIEW) &&
								domain.getHcpLiteUser() == null)
						{
							form.btnNew().setVisible(false);
							form.btnUpdate().setVisible(false);
							
							if (form.getGlobalContext().Clinical.getCurrentClinicalNote().getCurrentStatusIsNotNull() &&
									form.getGlobalContext().Clinical.getCurrentClinicalNote().getCurrentStatus().getStatusIsNotNull() &&
										!(form.getGlobalContext().Clinical.getCurrentClinicalNote().getCurrentStatus().getStatus().equals(ClinicalNotesStatus.ACTIVE) ||
											form.getGlobalContext().Clinical.getCurrentClinicalNote().getCurrentStatus().getStatus().equals(ClinicalNotesStatus.CORRECTED)))
							{
								form.btnUpdate().setVisible(true);
							}
						}
					}
			}
	}
}
 
Example 20
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 4 votes
private void checkForDiscipline()
{
	if (form.getGlobalContext().Clinical.getCurrentClinicalNoteIsNotNull())
	{
		MemberOfStaffShortVo mos = null;
		if (getDisciplineForLoggedInUser(form.getGlobalContext().Clinical.getCurrentClinicalNote()) != null)
			mos = getDisciplineForLoggedInUser(form.getGlobalContext().Clinical.getCurrentClinicalNote());
		else
		{
			//engine.showMessage("No Discipline is available. Please choose an authoring user."); WDEV-14967
			return;
		}
				
		/*if (form.getGlobalContext().Clinical.getCurrentClinicalNoteIsNotNull())
			{
			if (form.getGlobalContext().Clinical.getCurrentClinicalNote().getCurrentStatusIsNotNull() &&
					form.getGlobalContext().Clinical.getCurrentClinicalNote().getDisciplineIsNotNull() &&
					( ( mos.getHcpIsNotNull() &&
						!form.getGlobalContext().Clinical.getCurrentClinicalNote().getAuthoringInfo().getAuthoringHcp().getHcpType().equals(mos.getHcp().getHcpType()) &&
							form.getGlobalContext().Clinical.getReturnToFormModeIsNotNull() &&
								!form.getGlobalContext().Clinical.getReturnToFormMode().equals(FormMode.EDIT) ) ||
									mos.getHcpIsNotNull() ))
							{
								form.btnNew().setVisible(false);
								form.btnUpdate().setVisible(false);
							}
			}*/
		
		if (form.getGlobalContext().Clinical.getCurrentClinicalNoteIsNotNull())// &&
			//	form.getGlobalContext().Clinical.getCurrentClinicalNote().getIsTranscribedIsNotNull() )
				{
					if (form.getGlobalContext().Clinical.getCurrentClinicalNote().getCurrentStatusIsNotNull() &&
							form.getGlobalContext().Clinical.getCurrentClinicalNote().getDisciplineIsNotNull() &&
								mos.getHcpIsNotNull())
					{
								if (form.getGlobalContext().Clinical.getCurrentClinicalNote().getAuthoringInfoIsNotNull() &&
										form.getGlobalContext().Clinical.getCurrentClinicalNote().getAuthoringInfo().getAuthoringHcpIsNotNull() &&
										!form.getGlobalContext().Clinical.getCurrentClinicalNote().getAuthoringInfo().getAuthoringHcp().getHcpType().equals(mos.getHcp().getHcpType()) &&
									(form.getGlobalContext().Clinical.getReturnToFormModeIsNotNull() &&
										!form.getGlobalContext().Clinical.getReturnToFormMode().equals(FormMode.EDIT) ||
										form.getGlobalContext().Clinical.getReturnToFormMode() == null))
		
								{
									form.btnNew().setVisible(false);
									form.btnUpdate().setVisible(false);
								}
					}
					//Non HCP
					else 
					{
						if (form.getMode().equals(FormMode.VIEW) &&
								domain.getHcpLiteUser() == null)
						{
							form.btnNew().setVisible(false);
							form.btnUpdate().setVisible(false);
							
							if (form.getGlobalContext().Clinical.getCurrentClinicalNote().getCurrentStatusIsNotNull() &&
									form.getGlobalContext().Clinical.getCurrentClinicalNote().getCurrentStatus().getStatusIsNotNull() &&
										!(form.getGlobalContext().Clinical.getCurrentClinicalNote().getCurrentStatus().getStatus().equals(ClinicalNotesStatus.ACTIVE) ||
											form.getGlobalContext().Clinical.getCurrentClinicalNote().getCurrentStatus().getStatus().equals(ClinicalNotesStatus.CORRECTED)))
							{
								form.btnUpdate().setVisible(true);
							}
						}
					}
			}
	}
}