Java Code Examples for ims.configuration.AppRight

The following are top voted examples for showing how to use ims.configuration.AppRight. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void updateContextMenuActionsState()
{
	boolean editMode = FormMode.EDIT.equals(form.getMode());
	
	boolean isCcoSpecific =  ConfigFlag.GEN.CARE_PLAN_FUNCTIONALITY_TYPE.getValue().equals("CCO");
	boolean isRowSelected = form.dyngrdActions().getSelectedRow() != null;
	boolean isCurrentActionActive = false;
	if (isRowSelected)
		isCurrentActionActive = ((CarePlanInterventions)form.dyngrdActions().getValue()).getActive();
	
	boolean currentActionRemoved = false;
	if (isRowSelected)
		currentActionRemoved = Boolean.TRUE.equals(((CarePlanInterventions)form.dyngrdActions().getValue()).getIsRemoved());
		
	form.getContextMenus().Nursing.getCarePlanEvaluateActionADDItem().setVisible(editMode);
	form.getContextMenus().Nursing.getCarePlanEvaluateActionMARKACTIONCOMPLETEItem().setVisible(editMode && isRowSelected && isCcoSpecific && isCurrentActionActive && !currentActionRemoved);
	form.getContextMenus().Nursing.getCarePlanEvaluateActionREACTIVATEACTIONItem().setVisible(editMode && isRowSelected && isCcoSpecific && !isCurrentActionActive && engine.hasRight(AppRight.NURSING_ADMIN_ROLE) && !currentActionRemoved);
	
	form.getContextMenus().Nursing.getCarePlanEvaluateActionREMOVE_ACTIONItem().setVisible(editMode && isRowSelected && isCcoSpecific && !currentActionRemoved);
	form.getContextMenus().Nursing.getCarePlanEvaluateActionREINSTATE_ACTIONItem().setVisible(editMode && isRowSelected && isCcoSpecific && currentActionRemoved);
}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void updateControlsState() 
{
	//WDEV-14080
	form.btnEdit().setVisible(form.getMode().equals(FormMode.VIEW) && form.grdPatClericalTask().getValue()!=null && form.getLocalContext().getlocalContextClericalTaskIsNotNull() && form.getLocalContext().getlocalContextClericalTask().getStatus().equals(PatientClericalTaskStatus.OUTSTANDING));
	form.btnTaskComplete().setVisible(form.getMode().equals(FormMode.VIEW) && form.grdPatClericalTask().getValue()!=null && form.getLocalContext().getlocalContextClericalTaskIsNotNull() &&form.getLocalContext().getlocalContextClericalTask().getStatus().equals(PatientClericalTaskStatus.OUTSTANDING));
	
	form.btnNew().setEnabled(form.getMode().equals(FormMode.VIEW) && engine.hasRight(AppRight.CAN_ALLOCATE_PATIENT_CLERICAL_TASKS));
	form.btnNew().setVisible(form.getMode().equals(FormMode.VIEW));
			
	form.ccRequestor().setEnabled(form.getMode().equals(FormMode.EDIT));
	form.ccAllocate().setEnabled(form.getMode().equals(FormMode.EDIT));
	
	form.lblCompletedBy().setVisible(form.getLocalContext().getlocalContextClericalTaskIsNotNull() && form.getLocalContext().getlocalContextClericalTask().getStatus().equals(PatientClericalTaskStatus.COMPLETED));
	form.ccCompleted().setVisible(form.getLocalContext().getlocalContextClericalTaskIsNotNull() && form.getLocalContext().getlocalContextClericalTask().getStatus().equals(PatientClericalTaskStatus.COMPLETED));
	form.lblCompletedOn().setVisible(form.getLocalContext().getlocalContextClericalTaskIsNotNull() && form.getLocalContext().getlocalContextClericalTask().getStatus().equals(PatientClericalTaskStatus.COMPLETED));
	form.dtimCompleted().setVisible(form.getLocalContext().getlocalContextClericalTaskIsNotNull() && form.getLocalContext().getlocalContextClericalTask().getStatus().equals(PatientClericalTaskStatus.COMPLETED));
	
	//FB latest changes for WDEV-13879 - 12.01.2012
	form.ccCompleted().setEnabled(false);
	form.dtimCompleted().setEnabled(false);
	
}
 
Example 3
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onGrdWardsSelectionChanged() throws ims.framework.exceptions.PresentationLogicException
{					
	form.getGlobalContext().Core.setPatientShort(null);
	

	if (ConfigFlag.UI.INPAT_CREATE_CORRESPONDENCE_DETAILS.getValue())
	{
		selectionChanged();
	}
	else if (engine.hasRight(AppRight.CAN_DISCHARGE_INPATIENT_IN_RCHT))
	{
		selectionChanged();
	}
	else if (ConfigFlag.UI.MAXIMS_ADT_NO_INTERFACE.getValue())
	{
		selectionChanged();
	}
	else
	{
		showDemographics();
	}

}
 
Example 4
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
/**
 * Function used to set an action to MET status
 */
private void doActionMet()
{
	try
	{
		MemberOfStaffLiteVo mos = form.getLocalContext().getLoggedInUserIsNotNull() ? form.getLocalContext().getLoggedInUser().getMos() : null;

		// Set action status to Action MET
		domain.setActionStatus(form.getGlobalContext().ICP.getPatientICPRecord(), (PatientICPActionRefVo) form.dyngrdICP().getValue(), ICPActionStatus.MET, engine.hasRight(AppRight.CAN_COUNTERSIGN), mos);

		// Refresh screen
		refresh();
	}
	catch (StaleObjectException exception)
	{
		// Display SOE message
		engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
		// Refresh screen
		refresh();
	}
}
 
Example 5
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
/**
 * Function used to set an action to NOT MET status
 */
private void doActionNotMet()
{
	try
	{
		MemberOfStaffLiteVo mos = form.getLocalContext().getLoggedInUserIsNotNull() ? form.getLocalContext().getLoggedInUser().getMos() : null;
		
		// Set action status to Action NOT MET
		PatientICPAction_PresentationVo icpAction = domain.setActionStatus(form.getGlobalContext().ICP.getPatientICPRecord(), (PatientICPActionRefVo) form.dyngrdICP().getValue(), ICPActionStatus.NOT_MET, engine.hasRight(AppRight.CAN_COUNTERSIGN), mos);

		// Display dialog for recording action variance
		form.getGlobalContext().ICP.setActionStatus(icpAction.getCurrentStatus());
		engine.open(form.getForms().ICP.RecordICPActionVariance);
	}
	catch (StaleObjectException exception)
	{
		// Display SOE message
		engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
		// Refresh screen
		refresh();
	}
}
 
Example 6
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private SessionTheatreVoCollection listSessions()
{
	SessionTheatreVoCollection voCollSessions = null;
	
	MoveAppointmentDataVo voData = form.getGlobalContext().Scheduling.getMoveAppointmentDialogData();
	if(voData.getFromSlotIsNotNull() && voData.getFromSlot().getAppointmentIsNotNull())
	{
		SessionSearchCriteriaVo voCriteria = domain.getSessionSearchCriteriaByAppointment(voData.getFromSlot().getAppointment());
		if(voCriteria != null)
		{
			voCollSessions = domain.listSession(form.dteSession().getValue(), form.dteSession().getValue(), voCriteria.getSessionService(), voCriteria.getSessionLocation(), voCriteria.getSessionConsultant(), voCriteria.getSessionProcedure(), voCriteria.getSessionTheatreType(), 0, engine.hasRight(AppRight.CAN_OVERBOOK_THEATRE_APPTS), voCriteria.getSessionAnaestheticType());
		}
	}

	return voCollSessions;
}
 
Example 7
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateAppRightsCombo(boolean bOnUpdate)
{
	form.lyrRights().tabRightsGranted().cmbRights().clear();
	AppRight[] rights = AppRight.getAllRights();
	AppRightVo[] voRights = AppRightVo.domArrayToVo(rights);
	
	Arrays.sort(voRights, new  AppRightComparator());
			
	for (int i = 0; i < voRights.length; i++)
	{
		AppRightVo voRight = voRights[i];	
		if(bOnUpdate && isAlreadySelected(voRight))
			continue;
		form.lyrRights().tabRightsGranted().cmbRights().newRow(voRight, voRight.getName());
	}		
}
 
Example 8
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void editInstance()
{
	if (form.treTypes().getSelectedNode() == null)
		return;
	if (ConfigFlag.GEN.ALLOW_LOOKUP_TEXT_EDIT.getValue() || engine.hasRight(AppRight.LOOKUP_TEXT_MODIFY))
	{
		setFormMode(FormMode.EDIT);
		populateParentCombo(true);
		form.lyr1().Instance().txtInstText().setEnabled(true);			
	}
	else
	{
		form.getGlobalContext().Core.setYesNoDialogMessage("Editing the text of a lookup should only be done to correct a typing error. It should in no way change the meaning of the lookup.");
		engine.open(form.getForms().Core.YesNoDialog);			
	}
}
 
Example 9
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void switchToSearchView()
{
	if (engine.hasRight(AppRight.OCS_ALLOW_INV_SEARCH))
	{
		populateSearch();

		form.lyrTemplates().showtabSearch();
		form.lyrTemplates().tabTemplate().setHeaderVisible(false);
		form.lyrTemplates().tabSearch().setHeaderVisible(true);
		form.lyrTemplates().tabPreview().setHeaderVisible(false);
		form.lyrTemplates().tabSearch().txtTextName().setFocus();
	}
	else
	{
		form.lyrTemplates().tabSearch().setHeaderVisible(false);
	}
	//WDEV-17035
	updateControlsState();
}
 
Example 10
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void open()
{
	loadActiveOrderEntryTemplates();

	if (engine.hasRight(AppRight.OCS_ALLOW_INV_SEARCH))
	{
		TreeNode searchNode = form.treDetails().getNodes().add(searchNodeValue, "Search");
		searchNode.setCollapsedImage(form.getImages().Core.FindEnabled16);
		searchNode.setExpandedImage(form.getImages().Core.FindEnabled16);
	}

	TreeNode previewNode = form.treDetails().getNodes().add(previewNodeValue, "My Order Preview");
	previewNode.setCollapsedImage(form.getImages().OCRR.MyOrderPreview);
	previewNode.setExpandedImage(form.getImages().OCRR.MyOrderPreview);

	form.treDetails().setValue(searchNodeValue);
}
 
Example 11
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
/**
 * WDEV-13999
 * Function used to update state of controls
 */
private void updateControlsState()
{
	boolean userHasAuthorizeRoles = engine.hasRight(AppRight.CAN_AUTHORIZE_PATHOLOGY_ORDERS) && engine.hasRight(AppRight.CAN_AUTHORIZE_CLINICAL_IMAGING_ORDERS);
	boolean canOrderBeAuthorized = canOrderBeAuthorized();
	
	
	form.btnCancel().setVisible(engine.hasRight(AppRight.ALLOW_CANCEL_ORDERINVESTIGATION));
	
	form.btnAmend().setVisible(canOrderBeAmmended() && ConfigFlag.UI.ORDER_ENTRY_UI_TYPE.getValue().equals("CARE_UK") && engine.hasRight(AppRight.ALLOW_ORDERINVESTIGATIONS_CAREUK));
	
	form.btnAuthorise().setVisible(canOrderBeAuthorized);
	form.btnAuthorise().setEnabled(!isCancelled(form.getLocalContext().getOrderSummary()));
	form.btnUpdate().setVisible(canOrderBeAuthorized);
	form.btnUpdate().setEnabled(!isCancelled(form.getLocalContext().getOrderSummary()) && userHasAuthorizeRoles);
}
 
Example 12
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onGrdOrdersSelectionChanged() throws ims.framework.exceptions.PresentationLogicException
{
	//WDEV-2526
	form.getGlobalContext().Core.setPatientShort(form.grdOrders().getValue().getPatient());

	//WDEV-13401
	if (engine.hasRight(AppRight.CAN_AUTHORIZE_CLINICAL_IMAGING_ORDERS) || engine.hasRight(AppRight.CAN_AUTHORIZE_PATHOLOGY_ORDERS))
	{
		form.getGlobalContext().OCRR.setOrderAwaitingAuthorisation(form.grdOrders().getValue());
		form.getGlobalContext().OCRR.PathologyResults.setOrder(form.grdOrders().getValue());
		engine.open(form.getForms().OCRR.OrderSummaryDialog);			
	}
	else
	{
		engine.showMessage("Your login role has not been assigned the right to authorise orders.");
	}
}
 
Example 13
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private ORDERSTATE getOcsOrderAuthorisingState()
{
	if (doesOrderContainInvType(Category.CLINICALIMAGING))
	{
		boolean canAuthoriseClinImaging = engine.hasRight(AppRight.CAN_AUTHORIZE_CLINICAL_IMAGING_ORDERS);
		if (!canAuthoriseClinImaging)
			return ORDERSTATE.REQUESTING_AUTHORISATION;

	}
	if (doesOrderContainInvType(Category.PATHOLOGY))
	{
		boolean canAuthorisePathology = engine.hasRight(AppRight.CAN_AUTHORIZE_PATHOLOGY_ORDERS);
		if (!canAuthorisePathology)
			return ORDERSTATE.REQUESTING_AUTHORISATION;
	}

	return ORDERSTATE.AUTHORISING;
}
 
Example 14
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void updateContextMenuState()
{
	SessionParentChildSlotVo voSlot = form.grdSelected().getValue();
	boolean slotAvailable = voSlot != null && voSlot.getAppointment() == null && voSlot.getStatusIsNotNull() && voSlot.getStatus().equals(Status_Reason.SLOTOPENED); 

	//WDEV-13313
	if(engine.getFormName().equals(form.getForms().RefMan.TheatreAvailability))
		form.getContextMenus().Scheduling.getBookTheatreSlotBOOKItem().setVisible(false);
	else
		form.getContextMenus().Scheduling.getBookTheatreSlotBOOKItem().setVisible(slotAvailable);
	
	form.getContextMenus().Scheduling.getBookTheatreSlotSUSPENDItem().setVisible(slotAvailable);
	
	form.getContextMenus().Scheduling.getBookTheatreSlotRELEASEItem().setVisible(voSlot != null && voSlot.getStatusIsNotNull() && voSlot.getStatus().equals(Status_Reason.SUSPENDED));
	
	form.getContextMenus().Scheduling.getBookTheatreSlotADDItem().setVisible(form.grdTheatreSession().getValue() != null && engine.hasRight(AppRight.CAN_OVERBOOK_THEATRE_APPTS));
	
	form.getContextMenus().Scheduling.getBookTheatreSlotMOVEItem().setVisible(voSlot != null && voSlot.getAppointmentIsNotNull() && voSlot.getAppointment().getApptStatusIsNotNull() && voSlot.getAppointment().getApptStatus().equals(Status_Reason.BOOKED));
}
 
Example 15
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
public Boolean initialize()
{
	if (form.getMode().equals(FormMode.EDIT))
		return false;

	clearScreen();
	form.setMode(FormMode.VIEW);

	form.customControlAuthoring().setIsRequiredPropertyToControls(true);

	//form.getLocalContext().setDefaultMedication();
	
	open();
	
	if (domain.getHcpLiteUser() == null && !engine.hasRight(AppRight.ALLOW_EDIT_CONSULTATION_DIAGNOSIS))
	{
		engine.showMessage("Logged in user is not a HCP.");
		form.btnEdit().setVisible(false);
		form.setMode(FormMode.VIEW);
		return false;
	}

	manageMenus();
	
	return true;
}
 
Example 16
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void listSessions()
{		
	Date currentDate = domain.getCurrentMonth(form.cmbService().getValue(), form.cmbLocation().getValue(), form.ccConsultant().getValue(), form.qmbProcedure().getValue(), form.cmbTheatreType().getValue());
	if (currentDate != null)	
	{
		if (!form.getLocalContext().getCurrentDateIsNotNull())
		{
			form.bookingCalendar().setCurrentMonth(currentDate);
			form.getLocalContext().setCurrentDate(currentDate);
		}
	}
	
	Date dateStart = new Date(form.bookingCalendar().getCurrentMonth().getYear(), form.bookingCalendar().getCurrentMonth().getMonth(), 1);
	Date dateEnd = new Date(form.bookingCalendar().getCurrentMonth().getYear(), form.bookingCalendar().getCurrentMonth().getMonth(), form.bookingCalendar().getCurrentMonth().getNumberOfDaysInTheMonth());
	
	SessionTheatreVoCollection voCollSessionShort = domain.listSession(dateStart, dateEnd, form.cmbService().getValue(), form.cmbLocation().getValue(), form.ccConsultant().getValue(), form.qmbProcedure().getValue(), form.cmbTheatreType().getValue(), form.intRequiredProcTime().getValue(), engine.hasRight(AppRight.CAN_OVERBOOK_THEATRE_APPTS));
	form.getLocalContext().setSessions(voCollSessionShort);
}
 
Example 17
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void showHideActiveMonitoringAuthoringInfo()
{
	if ( form.getMode().equals(FormMode.EDIT) //WDEV-15475  
		&& ( ! form.GrpDischPatient().getValue().equals(GrpDischPatientEnumeration.rdoDischPatYES))
		&&( (engine.hasRight(AppRight.AUTHORISED_DATA_CORRECTOR)
				&& form.getLocalContext().getcurrentOutcomeVoIsNotNull()
				&& form.getLocalContext().getcurrentOutcomeVo().getActiveMonitoringIsNotNull()
				&& form.getLocalContext().getcurrentOutcomeVo().getActiveMonitoring().getID_ActiveMonitoringIsNotNull())
			|| form.getLocalContext().getcurrentOutcomeVo() == null
			|| form.getLocalContext().getcurrentOutcomeVo().getActiveMonitoring() == null
			|| (form.getLocalContext().getcurrentOutcomeVo().getActiveMonitoringIsNotNull()
					&& form.getLocalContext().getcurrentOutcomeVo().getActiveMonitoring().getID_ActiveMonitoring() == null)) ) 
		{
			form.lyr1().tabActiveMonitoring().ccAMAuthoring().setEnabledAuthoringHCP(isReferralDischarged() ? false : true);
			form.lyr1().tabActiveMonitoring().ccAMAuthoring().setEnabledDateTime(isReferralDischarged() ? false : true);
			form.lyr1().tabActiveMonitoring().ccAMAuthoring().setIsRequiredPropertyToControls(true);
		}
		else
		{
			form.lyr1().tabActiveMonitoring().ccAMAuthoring().setEnabledAuthoringHCP(false);
			form.lyr1().tabActiveMonitoring().ccAMAuthoring().setEnabledDateTime(false);
			form.lyr1().tabActiveMonitoring().ccAMAuthoring().setIsRequiredPropertyToControls(false);
		}
}
 
Example 18
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private String allowBooking(SessionTheatreVo session, ProcedureLiteVo voProcedure)
{
	//if we have an overbooking right we disregard all the checks
	if(engine.hasRight(AppRight.CAN_OVERBOOK_THEATRE_APPTS))
		return null;
	
	if(session != null && voProcedure != null)
	{
		if(session.getTheatreProceduresRemainingIsNotNull())
		{
			//if the procedure is limited and the number of procedures left is 0
			for(TheatreProcedureLiteVo voTheatreProc : session.getTheatreProceduresRemaining().getProcedureDetails())
			{
				if(voTheatreProc.getProcedure().equals(voProcedure))
				{
					if(voTheatreProc.getIsLimitedIsNotNull() && voTheatreProc.getIsLimited() && voTheatreProc.getNumberOfProceduresLeftIsNotNull() && voTheatreProc.getNumberOfProceduresLeft() == 0)
						return "Limit has been reached for this procedure.";
				}
			}
		}
	}
	return null;
}
 
Example 19
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onBtnClearClick() throws ims.framework.exceptions.PresentationLogicException
{
	
	form.btnCancel().setEnabled(false);
	form.btnCancelSlot().setEnabled(false);
	form.grdSlots().getRows().clear();
	form.grdSlots().setValue(null);
	form.dteSessionDate().setValue(null);
	form.cmbContract().setValue(null);
	
	if(engine.hasRight(AppRight.CAN_VIEW_CLINICS_ACROSS_ALL_CONTRACTS))
		form.cmbSite().clear();
	else
		form.cmbSite().setValue(null);
	
	form.cmbProfile().clear();
	form.cmbSessions().clear();
	form.cmbStatus().setValue(null);
	form.getContextMenus().RefMan.hideAllClinicListRefManMenuItems();
	form.getGlobalContext().RefMan.setIsProviderCancellation(false);//wdev-6163

	form.getGlobalContext().RefMan.setClinicListFilter(null);
	updateContextMenus();
}
 
Example 20
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void initialize() 
{
	Boolean canViewClinics = engine.hasRight(AppRight.CAN_VIEW_CLINICS_ACROSS_ALL_CONTRACTS);
	
	// WDEV-12682
	// WDEV-12875  - Check if the current location has diagnostic ContractConfiguration records on the branch of the organisation 
	if (form.getGlobalContext().RefMan.getDiagnosticReferralForApplication() == null)
		form.getGlobalContext().RefMan.setDiagnosticReferralForApplication(domain.hasLocationDiagnosticContract((LocationRefVo) engine.getCurrentLocation()));

	form.cmbContract().setEnabled(canViewClinics);
	form.dteSessionDate().setValue(new Date());
	
	if(canViewClinics)
	{
		loadOrganisation();
	}
	else
	{
		listLocationForLoggedUser();
	}
	form.getGlobalContext().Scheduling.setBookingAppointment(null); //wdev-12623
	
	form.getLocalContext().setWasTimerOn(false);//WDEV-13622
	form.getTimers().getTimerSearch().setInterval(ConfigFlag.UI.CLINICLIST_TIMER_INTERVAL.getValue());//WDEV-13622
}
 
Example 21
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void checkForNurse() 
{
	Object hcp = domain.getHcpUser();
	
	if(hcp instanceof NurseVo && engine.hasRight(AppRight.CAN_CONFIRM_NURSING_DOCUMENTATION))
	{
		form.qmbConfirmedBy().newRow((Hcp) hcp, ((Hcp) hcp).toString());
		form.qmbConfirmedBy().setValue((Hcp) hcp);
		form.dteConfirmed().setValue(new Date());
		form.timConfirmed().setValue(new Time());
	}
}
 
Example 22
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private UserAssessmentInstHelper getHelper(DynamicGrid dynGrid, boolean showSelect)
{
	boolean isDpp = true;
	boolean displayOnlyAsnwered = false;
	boolean showConfirmation = engine.hasRight(AppRight.CAN_CONFIRM_NURSING_DOCUMENTATION);
	UserAssessmentInstHelper helper = new UserAssessmentInstHelper(dynGrid, form.getImages().Core.QuestionSmall, form.getImages().Core.TextBox, form.getImages().Core.SmallNew, form.getImages().Core.SmallCancel, form.getImages().Core.MandatoryQuestion, isDpp, displayOnlyAsnwered, showConfirmation, showSelect);
	return helper;
}
 
Example 23
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void updateControlsState()
{
	if( form.getMode().equals(FormMode.VIEW))
	{
		form.btnNew().setVisible(!form.getLocalContext().getDischargedEpisodeIsNotNull() && form.getLocalContext().getAdmissionDetailIsNotNull() && engine.hasRight(AppRight.MAXIMS_ADT_CAN_DISCHARGE));	
		//form.btnEdit().setVisible(form.getLocalContext().getDischargedEpisodeIsNotNull() && engine.hasRight(AppRight.MAXIMS_ADT_CAN_DISCHARGE));
		PatientShort tempVo = domain.getPatientShort(form.getLocalContext().getPatientShort());
		form.btnUndoDischarge().setVisible(form.getLocalContext().getShowUndoDischargeButton() && form.getLocalContext().getDischargedEpisodeIsNotNull()&& tempVo != null && !tempVo.getWardIsNotNull() && engine.hasRight(AppRight.CAN_UNDO_DISCHARGE) && Boolean.TRUE.equals(ConfigFlag.UI.MAXIMS_ADT_NO_INTERFACE.getValue())); //wdev-16428
	}
}
 
Example 24
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void updateControlsState() 
{
	if(engine.hasRight(AppRight.CAN_UNLINK_REFERRAL_FROM_EPISODE) && form.grdReferrals().getSelectedRow() != null && form.grdReferrals().getSelectedRow().getColLink())
	{
		ReferralLiteVoCollection linkedReferrals = form.getLocalContext().getLinkedReferrals();
		ReferralLiteVo voReferralLite = form.grdReferrals().getSelectedRow().getValue();
		boolean alreadyLinked = alreadyLinked(linkedReferrals, voReferralLite);
		form.getContextMenus().Core.getReferralsUnlinkReferralItem().setVisible(alreadyLinked);
		form.getContextMenus().Core.getReferralsUnlinkReferralItem().setEnabled(alreadyLinked);
	}
	else
		form.getContextMenus().Core.getReferralsUnlinkReferralItem().setVisible(false);
}
 
Example 25
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
@Override
protected void onContextMenuItemClick(int menuItemID, Control sender) throws PresentationLogicException
{
	if ((ConfigFlag.UI.INPAT_CREATE_CORRESPONDENCE_DETAILS.getValue()
			|| engine.hasRight(AppRight.CAN_DISCHARGE_INPATIENT_IN_RCHT) 
			|| ConfigFlag.UI.MAXIMS_ADT_NO_INTERFACE.getValue() 
		)
		&& form.getGlobalContext().Core.getPatientShortIsNotNull()
		)
	{
		switch(menuItemID)
		{	
			case GenForm.ContextMenus.ADTMenu.Add:
				addDocumentDetails();
				break;
			case GenForm.ContextMenus.ADTMenu.View:
				viewDocumentDetails();
				break;
			case GenForm.ContextMenus.ADTMenu.Demographics:
				showDemographics();
				break;
			case GenForm.ContextMenus.ADTMenu.Discharge:
				if( !engine.hasRight(AppRight.CAN_DISCHARGE_INPATIENT_IN_RCHT) && ConfigFlag.UI.MAXIMS_ADT_NO_INTERFACE.getValue() && engine.hasRight(AppRight.MAXIMS_ADT_CAN_DISCHARGE))  //wdev-16427
					dischargeInpatientForLeopardstown();
				else
					dischargeInpatientForRCHT();
				break;
			case GenForm.ContextMenus.ADTMenu.Transfer:
				transferPatient();
				break;
			case GenForm.ContextMenus.ADTMenu.CancelAdmission:
				cancelAdmission();
				break;
		}	
	}
}
 
Example 26
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void updateMenuOptions()
{
	form.getContextMenus().Core.hideAllPendingEmergencyMenuItems();
	boolean isCancelled = form.grdAdmissions().getValue() != null && form.grdAdmissions().getValue().getAdmissionStatusIsNotNull() && form.grdAdmissions().getValue().getAdmissionStatus().equals(EmergencyAdmissionStatus.CANCELLED); //wdev-17355
	form.getContextMenus().Core.getPendingEmergencyASSIGNItem().setVisible(form.grdAdmissions().getValue() != null && !isCancelled);	//wdev-17355
	
	if(engine.hasRight(AppRight.ALLOW_ADT_PENDINGEMERGENCY_REMOVAL))
		form.getContextMenus().Core.getPendingEmergencyREMOVEPATIENTFROMPENDINGEMERGENCYItem().setVisible(form.grdAdmissions().getValue() != null);
}
 
Example 27
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void updateControlsState() 
{
	form.btnNew().setVisible(true);
	form.btnNew().setEnabled(form.getLocalContext().getCareContextIsNotNull() && Boolean.TRUE.equals(form.getLocalContext().getIsEnabled()));
	form.btnEdit().setEnabled(form.getLocalContext().getCareContextIsNotNull() && Boolean.TRUE.equals(form.getLocalContext().getIsEnabled()) && form.grdNotes().getValue() != null && (form.grdNotes().getValue().getAuthoringInformation().getAuthoringHcp().equals(form.getLocalContext().getLoggedHCP()) || engine.hasRight(AppRight.ED_ALLOW_CORRECTION_OF_ANY_MEDIC_NOTE)));
	form.btnRIE().setEnabled(form.getLocalContext().getCareContextIsNotNull() && Boolean.TRUE.equals(form.getLocalContext().getIsEnabled()) && form.grdNotes().getValue() != null);
	
	form.getContextMenus().Emergency.getMedicNoteMenuNEWItem().setVisible(form.getLocalContext().getCareContextIsNotNull() && Boolean.TRUE.equals(form.getLocalContext().getIsEnabled()));
	form.getContextMenus().Emergency.getMedicNoteMenuEDITItem().setVisible(form.getLocalContext().getCareContextIsNotNull() && Boolean.TRUE.equals(form.getLocalContext().getIsEnabled()) && form.grdNotes().getValue() != null && (form.grdNotes().getValue().getAuthoringInformation().getAuthoringHcp().equals(form.getLocalContext().getLoggedHCP()) || engine.hasRight(AppRight.ED_ALLOW_CORRECTION_OF_ANY_MEDIC_NOTE)));
	form.getContextMenus().Emergency.getMedicNoteMenuRIEItem().setVisible(form.getLocalContext().getCareContextIsNotNull() && Boolean.TRUE.equals(form.getLocalContext().getIsEnabled()) && form.grdNotes().getValue() != null);
}
 
Example 28
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void updateControlsState() 
{
	form.btnNote().setVisible(true);
	form.btnNote().setEnabled(form.getLocalContext().getCareContextIsNotNull() && Boolean.TRUE.equals(form.getLocalContext().getIsEnabled()));
	form.btnEdit().setEnabled(form.getLocalContext().getCareContextIsNotNull() && Boolean.TRUE.equals(form.getLocalContext().getIsEnabled()) && form.grdNotes().getValue() != null && (form.grdNotes().getValue().getAuthoringInformation().getAuthoringHcp().equals(form.getLocalContext().getLoggedHCP()) || engine.hasRight(AppRight.ED_ALLOW_CORRECTION_OF_ANY_TRIAGE_NOTE)));
	form.btnRIE().setEnabled(form.getLocalContext().getCareContextIsNotNull() && Boolean.TRUE.equals(form.getLocalContext().getIsEnabled()) && form.grdNotes().getValue() != null);
	
	form.getContextMenus().Emergency.getTriageNoteMenuNEWItem().setVisible(form.getLocalContext().getCareContextIsNotNull() && Boolean.TRUE.equals(form.getLocalContext().getIsEnabled()));
	form.getContextMenus().Emergency.getTriageNoteMenuEDITItem().setVisible(form.getLocalContext().getCareContextIsNotNull() && Boolean.TRUE.equals(form.getLocalContext().getIsEnabled()) && form.grdNotes().getValue() != null && (form.grdNotes().getValue().getAuthoringInformation().getAuthoringHcp().equals(form.getLocalContext().getLoggedHCP()) || engine.hasRight(AppRight.ED_ALLOW_CORRECTION_OF_ANY_TRIAGE_NOTE)));
	form.getContextMenus().Emergency.getTriageNoteMenuRIEItem().setVisible(form.getLocalContext().getCareContextIsNotNull() && Boolean.TRUE.equals(form.getLocalContext().getIsEnabled()) && form.grdNotes().getValue() != null);
}
 
Example 29
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean userHasRightToCorrect(AttendanceClinicalNotesVo attendanceClinicalNotesVo)
{	
	if (form.getForms().Emergency.EDTriageWorklistToAssessmentForm.equals(form.getLocalContext().getparentFormName()))
	{
		return AttendanceClinicalNoteType.TRIAGE.equals(attendanceClinicalNotesVo.getNoteType()) && engine.hasRight(AppRight.ED_ALLOW_CORRECTION_OF_ANY_TRIAGE_NOTE); //WDEV-17304
	}
	else if (form.getForms().Emergency.EDClinicianWorklistToAssessmentForm.equals(form.getLocalContext().getparentFormName()))
	{
		return AttendanceClinicalNoteType.MEDIC.equals(attendanceClinicalNotesVo.getNoteType()) && engine.hasRight(AppRight.ED_ALLOW_CORRECTION_OF_ANY_MEDIC_NOTE);//WDEV-17304
	}
	
	return false;
}
 
Example 30
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void bookingCalendar1DateSelected(ims.framework.utils.Date date)
{
	// go through sessions getting ones for the selected date
	SessionShortVoCollection voCollSessionShort = form.getLocalContext().getSessions();
	if (voCollSessionShort == null)
		return;

	SessionShortVoCollection voCollSelectedSessions = new SessionShortVoCollection();
	for (int i = 0; i < voCollSessionShort.size(); i++)
	{
		if (voCollSessionShort.get(i).getSessionDate().equals(date))
		{
			//WDEV-12209 - starts here
			boolean performingOverBook = (engine.hasRight(AppRight.CAN_OVERBOOK_FLEXIBLE_APPT) && form.chkOverBook().getValue() == true);
			
			if(!Boolean.TRUE.equals(voCollSessionShort.get(i).getIsFixed()) && !performingOverBook && voCollSessionShort.get(i).getRemainingTimeIsNotNull() && voCollSessionShort.get(i).getRemainingTime() <= 0)
				continue;
			
			//WDEV-12209 - ends here
			
			voCollSelectedSessions.add(voCollSessionShort.get(i));
		}
	}

	form.getLocalContext().setSelectedSessions(voCollSelectedSessions);
	form.getLocalContext().setSelectedSessionIndex(new Integer(0));
	loadSessionSlots();
}
 
Example 31
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private String[] getUIValidationRules(Sch_BookingVo voBooking)
{
	if (voBooking == null)
		throw new CodingRuntimeException("voBooking parameter is null in method getUIValidationRules");

	ArrayList<String> errors = new ArrayList<String>();
	for (Booking_AppointmentVo voAppt : voBooking.getAppointments())
	{
		if (ConfigFlag.DOM.SCHEDULING_LINKED_TO_PATHWAYS.getValue())
		{
			if ((voAppt.getEventIsNotNull() && voAppt.getJourney() == null) || (voAppt.getJourneyIsNotNull() && voAppt.getEvent() == null))
				errors.add("Event and Pathway must both be selected or neither one at all");
		}
		else
		{	
			//TODO check here overbook validation
			boolean performingOverBook = (engine.hasRight(AppRight.CAN_OVERBOOK_FLEXIBLE_APPT) && form.chkOverBook().getValue() == true);
			// if session is flexible validate appt selected against exclusion and appts made within session
			if (voAppt.getSession().getIsFixedIsNotNull() && !voAppt.getSession().getIsFixed() && (voAppt.getID_Booking_Appointment() == null || form.getLocalContext().getIsRebookApptSelectedIsNotNull()))
			{
				BookingAppointmentLiteVoCollection voCollAppts = domain.listNonCancelledAppointmentsForSession(voAppt.getSession());
				errors.addAll(validateFlexibleAppt(voAppt, voCollAppts, performingOverBook));
			}
		}
	}

	return (String[]) (errors.size() > 0 ? errors.toArray(new String[0]) : null);
}
 
Example 32
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void managePricingMenuOptions(Boolean isTreating)
{
	boolean hasRight = engine.hasRight(AppRight.CAN_ACCESS_PRICE_ADJUSTMENT);

	if (ConfigFlag.GEN.SHOW_PROCEDURE_PRICING.getValue() && isTreating && hasRight)
	{
		form.getContextMenus().getGenericGridReplaceItem().setVisible(false);
		if (form.treHeader().getSelectedNode() != null && form.treHeader().getSelectedNode().getNodes().size() > 0)
		{
			form.getContextMenus().getGenericGridReplaceItem().setVisible(true);
			form.getContextMenus().getGenericGridReplaceItem().setText("Input Price Adjs");
			form.getContextMenus().getGenericGridReplaceItem().setIcon(form.getImages().Admin.PricingEuro);
		}

		form.getContextMenus().getGenericGridConfirmItem().setVisible(false);
		if (domain.countBatches(form.getGlobalContext().Admin.getSelectedLocShortVo()) > 0)
		{
			form.getContextMenus().getGenericGridConfirmItem().setVisible(true);
			form.getContextMenus().getGenericGridConfirmItem().setText("Confirm Price Adjs");
			form.getContextMenus().getGenericGridConfirmItem().setIcon(form.getImages().Admin.PricingEuro);
		}
	}
	else
	{
		form.getContextMenus().getGenericGridReplaceItem().setVisible(false);
		form.getContextMenus().getGenericGridConfirmItem().setVisible(false);
	}
}
 
Example 33
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
/**
 * WDEV-13186
 * Update the state (Hidden/Visible, Enabled/Disabled)  for controls
 */
private void updateControlsState()
{
	if (FormMode.VIEW.equals(form.getMode()))
	{
		// - 'Edit' button - visible only in VIEW mode if the user has right to edit images & image record selected; set as hidden from DevEnv for EDIT mode
		form.btnEdit().setVisible(form.grdImages().getValue() != null && engine.hasRight(AppRight.ALLOW_EDIT_IMAGES));
	}

	// Update the context menu after controls were updated
	updateContextMenuState();
}
 
Example 34
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
/**
 * Function used to determine if the oder can be authorised
 * This works of analysing the local context value for the order
 */
private boolean canOrderBeAuthorized()
{
	OcsOrderSummaryVo orderSummary = form.getLocalContext().getOrderSummary();

	if (orderSummary == null || orderSummary.getInvestigations() == null)
		return false;
	
	// Check order status - not to be cancelled
	int ordersAwaitingAuthorization = 0;
	
	for (OrderInvestigationListVo investigation : orderSummary.getInvestigations())
	{
		if (investigation.getOrdInvCurrentStatus() != null && OrderInvStatus.AWAITING_AUTHORISATION.equals(investigation.getOrdInvCurrentStatus().getOrdInvStatus()))
			ordersAwaitingAuthorization++;
		
		if (Category.PATHOLOGY.equals(investigation.getInvestigation().getInvestigationIndex().getCategory())
				&& !engine.hasRight(AppRight.CAN_AUTHORIZE_PATHOLOGY_ORDERS)
				&& investigation.getOrdInvCurrentStatus() != null
				&& OrderInvStatus.AWAITING_AUTHORISATION.equals(investigation.getOrdInvCurrentStatus().getOrdInvStatus()))
			return false;
		
		if (Category.CLINICALIMAGING.equals(investigation.getInvestigation().getInvestigationIndex().getCategory())
				&& !engine.hasRight(AppRight.CAN_AUTHORIZE_CLINICAL_IMAGING_ORDERS)
				&& investigation.getOrdInvCurrentStatus() != null
				&& OrderInvStatus.AWAITING_AUTHORISATION.equals(investigation.getOrdInvCurrentStatus().getOrdInvStatus()))
			return false;
	}
	
	if (ordersAwaitingAuthorization == 0)
		return false;
	
	if (engine.hasRight(AppRight.CAN_AUTHORIZE_CLINICAL_IMAGING_ORDERS) && engine.hasRight(AppRight.CAN_AUTHORIZE_PATHOLOGY_ORDERS))
		return true;

	return false;
}
 
Example 35
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void showResultStatusOptions(boolean bVisible)
{
	form.chkEnableExit().setVisible(bVisible);
	
	form.chkMarkAsSeen().setVisible(bVisible && engine.hasRight(AppRight.CAN_UPDATE_RESULT_STATUS) && !engine.hasRight(AppRight.MARK_RESULT_AS_CHECKED));
	form.chkMarkAsChecked().setVisible(bVisible && engine.hasRight(AppRight.CAN_UPDATE_RESULT_STATUS) && engine.hasRight(AppRight.MARK_RESULT_AS_CHECKED));
	
	form.chkMarkForReview().setVisible(bVisible && engine.hasRight(AppRight.CAN_UPDATE_RESULT_STATUS));
}
 
Example 36
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
/**
 * Function used to update the state of the context menu options
 */
private void updateContextMenuState()
{
	boolean viewMode = FormMode.VIEW.equals(form.getMode());

	// VIEW Mode
	form.getContextMenus().OCRR.getResultsCommentsMenuNEWItem().setVisible(viewMode && engine.hasRight(AppRight.CAN_ADD_RESULT_ANNOTATIONS));
	// EDIT Mode
	form.getContextMenus().OCRR.getResultsCommentsMenuCORRECTItem().setVisible(viewMode && engine.hasRight(AppRight.CAN_CORRECT_RESULT_ANNOTATIONS) && form.grdComments().getSelectedRow() != null);
}
 
Example 37
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void initialise()
{
	form.setMode(FormMode.VIEW);	
			 
	form.lyr1().tabSearch().ccConsultant().initialize(MosType.HCP);

	//WDEV-13313
	if(!engine.getFormName().equals(form.getForms().RefMan.TheatreAvailability))
	{
		FitForSurgeryAssessmentLiteVo fitForSurgery = domain.getLatestFitForSurgeryAssessment(form.getGlobalContext().RefMan.getCatsReferral());
		form.getLocalContext().setAnaestheticType(fitForSurgery != null ? fitForSurgery.getAnaestheticType() : null);
	}

	form.lyr1().tabSearch().cmbAnaesType().setValue(form.getLocalContext().getAnaestheticType());
	if(form.getLocalContext().getAnaestheticTypeIsNotNull())
	{
		if(!engine.hasRight(AppRight.ALLOW_ANAESTHETIC_TYPE_CHANGE))
		{
			form.lyr1().tabSearch().cmbAnaesType().setVisible(false); //hide the combo
			
			if(form.getLocalContext().getAnaestheticTypeIsNotNull())
				form.lyr1().tabSearch().lblAnaestheticTypeText().setValue(form.getLocalContext().getAnaestheticType().getText());
		}
	}

	loadServices();
	loadLocations();
	
	//WDEV-18396
	form.chkElective().setValue(ConfigFlag.GEN.USE_ELECTIVE_LIST_FUNCTIONALITY.getValue());
	
}
 
Example 38
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void listSessions()
{				
	Date dateStart = form.lyr1().tabSearch().dteFrom().getValue(); 
	Date dateEnd = form.lyr1().tabSearch().dteTo().getValue(); 
	
	SessionTheatreVoCollection voCollSessionShort = domain.listSession(dateStart, dateEnd, form.lyr1().tabSearch().cmbService().getValue(), form.lyr1().tabSearch().cmbLocation().getValue(), form.lyr1().tabSearch().ccConsultant().getValue(), form.lyr1().tabSearch().qmbProcedure().getValue(), form.lyr1().tabSearch().cmbTheatreType().getValue(), form.lyr1().tabSearch().intRequiredProcTime().getValue(), engine.hasRight(AppRight.CAN_OVERBOOK_THEATRE_APPTS), form.lyr1().tabSearch().cmbAnaesType().getValue());
	form.getLocalContext().setSessions(voCollSessionShort);
}
 
Example 39
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
@Override
protected void onFormDialogClosed(FormName formName, DialogResult result) throws PresentationLogicException 
{
	if (formName.equals(form.getForms().RefMan.ReferralReviewDetails))
	{
		/*if( Boolean.TRUE.equals((form.lyr1().tabDischarge().isVisible())))				//wdev-15685
		{
			form.lyr1().tabDischarge().htmPreview().setVisible(true);					//wdev-15685
		}*/
		updateReviewButton();		
	}		
	else if (formName.equals(form.getForms().OCRR.SelectAndOrderDialog) && result.equals(DialogResult.OK))
	{
		if(form.lyr1().tabReferralAppts().isVisible())
		{
			CatsReferralDetailsVo voContainer = domain.getReferralDetail(form.getGlobalContext().RefMan.getCatsReferral());		
			form.lyr1().tabReferralAppts().ccAppts().setValue(voContainer.getAppointmentDetail());		
		}
		else if (form.lyr1().tabInvestigations().isVisible())
		{
			form.lyr1().tabInvestigations().ccInvestigations().initialise(engine.hasRight(AppRight.CAN_VIEW_CONFIDENTIAL_INVESTIGATION_RESULTS), engine.hasRight(AppRight.CAN_VIEW_CONFIDENTIAL_INVESTIGATIONS_ORDERED), Boolean.TRUE);	
		}
		
		/*if( Boolean.TRUE.equals((form.lyr1().tabDischarge().isVisible())))				//wdev-15685
		{
			form.lyr1().tabDischarge().htmPreview().setVisible(true);					//wdev-15685
		}*/
	}	
	if( Boolean.TRUE.equals((form.lyr1().tabDischarge().isVisible())))				//wdev-15685
	{
		form.lyr1().tabDischarge().htmPreview().setVisible(true);					//wdev-15685
	}
	form.lyr1().tabReferralLetter().customControlUploadDoc().showHtmlControl();
	form.lyr1().tabSpecimenCollection().ccSpecimenCollection().initialize();//wdev-14020
}
 
Example 40
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean save()
{
	form.getLocalContext().setshouldRemoveLC(false);
	if (engine.hasRight(AppRight.CAN_EDIT_ALL_CLINICAL_NOTES)
		&& form.cmbNoteType().getValue() != null 
		&& !form.cmbNoteType().getValue().equals(ClinicalNoteTypeForAnAppointment.CORRESPONDENCE_NOTES)
		&& form.getGlobalContext().RefMan.getAppointmentClinicalNote().getClinicalNoteTypeIsNotNull()
		&& form.getGlobalContext().RefMan.getAppointmentClinicalNote().getClinicalNoteType().equals(ClinicalNoteTypeForAnAppointment.CORRESPONDENCE_NOTES))
	{
		//If the note is not null and Status equals draft
		if (form.getGlobalContext().RefMan.getAppointmentClinicalNote().getID_AppointmentClinicalNotesIsNotNull())
		{
			AppointmentClinicalNotesVoCollection currentNotes = domain.listClinicalNotes(form.getGlobalContext().RefMan.getCatsReferral());		

			form.getLocalContext().setshouldRemoveLC(!isOtherNoteOfThisTypeActive(form.getGlobalContext().RefMan.getAppointmentClinicalNote(), currentNotes));
			
			//Type of note has change, and no other active note with this type
			if (form.getGlobalContext().RefMan.getAppointmentClinicalNoteIsNotNull()
				&& !isOtherNoteOfThisTypeActive(form.getGlobalContext().RefMan.getAppointmentClinicalNote(), currentNotes))
			{
				form.getLocalContext().setremoveTypeLC(form.getGlobalContext().RefMan.getAppointmentClinicalNote().getNoteType());
			}
		}

	}
	
	AppointmentClinicalNotesVo clinicalNote = populateDataFromScreen();
	
	if(clinicalNote.getID_AppointmentClinicalNotes() == null)
	{
		return addNote(clinicalNote);
	}
	else
	{
		return editNote(clinicalNote);
	}
}