Java Code Examples for ims.framework.enumerations.FormMode

The following are top voted examples for showing how to use ims.framework.enumerations.FormMode. 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   View source code 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 2
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void enableDetailsControls(boolean bEnable)
{
	form.ctnDetails().cmbCategory().setEnabled(bEnable);
	form.ctnDetails().cmbAlerts().setEnabled(bEnable);
	form.ctnDetails().cmbAlerts().setEnabled(bEnable);
	form.ctnDetails().txtComment().setEnabled(bEnable);

	if (form.getMode().equals(FormMode.EDIT) && form.ctnDetails().chkNoKnownAlerts().getValue())
	{
		form.ctnDetails().cmbSource().setRequired(false);
		bEnable = true;
	}
	else
		form.ctnDetails().cmbSource().setRequired(true);
	
	form.ctnDetails().cmbSource().setEnabled(bEnable);
	form.ctnDetails().pdtIdentified().setEnabled(bEnable);
	form.ctnDetails().setcustomControlAuthoringInfoEnabled(bEnable);
	form.ctnDetails().setCollapsed(false);
	
}
 
Example 3
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void updateInstance()
{
	// get selected row and disable all the others
	gridRoomsRow row = form.gridRooms().getSelectedRow();
	for (int i = 0; i < form.gridRooms().getRows().size(); i++)
		form.gridRooms().getRows().get(i).setSelectable(false);

	row.setSelectable(true);

	RoomDetailsVo voCachedChild = form.gridRooms().getValue();
	if (voCachedChild.getID_RoomDetails() == null)
	{
		populateChildInstanceControls(voCachedChild);
	}
	form.getLocalContext().setRoomDetail(voCachedChild);
	form.setMode(FormMode.EDIT);
	form.ctnDetails().setCollapsed(false);
}
 
Example 4
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
protected void populateScreenFromData(PatientAlert voPatAlert)
{
	super.populateScreenFromData(voPatAlert);
	
	
	if(voPatAlert.getAuthoringInformationIsNotNull())
		form.ctnDetails().customControlAuthoringInfo().setValue(voPatAlert.getAuthoringInformation());
	if(voPatAlert.getAlertType() != null && voPatAlert.getAlertType().getParent() != null && voPatAlert.getAlertType().getParent().getText()!= null)
	{
		form.ctnDetails().cmbCategory().newRow(voPatAlert.getAlertType().getParent(), voPatAlert.getAlertType().getParent().getText());
		form.ctnDetails().cmbCategory().setValue(voPatAlert.getAlertType().getParent());
	}
	try 
	{ 	onCmbCategoryValueChanged();} 
	catch (PresentationLogicException e) {} 
	
	form.ctnDetails().cmbAlerts().newRow(voPatAlert.getAlertType(), voPatAlert.getAlertType().getText());
	form.ctnDetails().cmbAlerts().setValue(voPatAlert.getAlertType());
	if (form.getMode().equals(FormMode.EDIT))
			alertsValueChanged();
	
	if(voPatAlert.getIsCurrentlyActiveAlert().booleanValue() == true)
		form.btnInactivate().setVisible(true);
}
 
Example 5
Project: AvoinApotti   File: Logic.java   View source code 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 6
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
public void newInstance() throws ims.framework.exceptions.PresentationLogicException
{
	form.setMode(FormMode.EDIT);
	clearInstanceControls();
	form.getLocalContext().setCurrentRecord(new ImagingEventsVo());
	form.ctn1().customControlAuthoringInfo().initializeComponent();
	
	form.ctn1().GroupSelection().setEnabled(true);
	form.ctn1().GroupSelection().setValue(GroupSelectionEnumeration.rdoSpecialty);
	
	form.ctn1().customControlCodingItem().clear();
	form.ctn1().customControlCodingItem().setSearchAllSelected(Boolean.FALSE);
	form.ctn1().customControlCodingItem().setHotlist(Boolean.TRUE);
	// WDEV-3126 correcting the tab order. 
	form.ctn1().customControlCodingItem().setFocus();
	
	form.ctn1().setcustomControlCodingItemEnabled(true);
	form.ctn1().customControlCodingItem().setParentEditing(new Boolean(form.getMode().equals(FormMode.EDIT)));

}
 
Example 7
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
protected void onFormDialogClosed(FormName formName, DialogResult result) throws PresentationLogicException 
{
	if(form.getForms().Clinical.ClinicalTask.equals(formName))
	{
		if(DialogResult.OK.equals(result))
		{
			populateClinicalTasksGrid(form.getGlobalContext().Clinical.getClinicalTasks());
		}
	}
	else if(form.getForms().Clinical.Notes.equals(formName))
	{
		if(DialogResult.OK.equals(result))
		{
			addNotesGrid(form.getGlobalContext().Clinical.getHospitalAtNightNotes(), form.grdUpdatedNotes().getSelectedRow());
			
			populateNotesGrid(form.grdUpdatedNotes().getValues().sort(new HospitalAtNightNotesDateComparator(SortOrder.DESCENDING)));
			
			if(FormMode.VIEW.equals(form.getMode()))
			{
				if(save(Boolean.TRUE.equals(form.getGlobalContext().Clinical.getRemoveFromHospitalAtNight()) ? HospitalAtNightPatientStatus.REMOVE_FROM_LIST : null))
					open();
			}
		}
	}
}
 
Example 8
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
/**
 *	Function used to refresh the screen
 * 		- clear screen
 * 		- list admission episodes from database
 *		-
 */
public void open() throws ims.framework.exceptions.PresentationLogicException
{
	// Clear screen
	clear();
	
	// List admission episodes by patient
	AdmissionDetailLiteVoCollection admissionEpisodes = domain.listAdmissionEpisodes(form.getGlobalContext().Core.getPatientShort());
	// Populate admission episodes to record browser
	populateRecordBrowser(admissionEpisodes);
	// Populate selected admission record to instance controls
	populateInstanceControls(form.getLocalContext().getSelectedAdmission());
	
	// Set form to VIEW mode
	form.setMode(FormMode.VIEW);
}
 
Example 9
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
@Override
protected void onCcPresentationValueChanged()
		throws PresentationLogicException 
{
	if (form.getGlobalContext().RefMan.getIsComponentInEditModeIsNotNull())
	{
		if (form.getGlobalContext().RefMan.getIsComponentInEditMode().equals(FormMode.EDIT))
		{
			disableTabs();				
		}
		if (form.getGlobalContext().RefMan.getIsComponentInEditMode().equals(FormMode.VIEW))
		{
			enableTabs();				
		}
	}		
}
 
Example 10
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void selectionChanged()
{
	TreeNode node = form.treConfig().getSelectedNode();
	Object value = node.getValue();
	if (form.getMode().equals(FormMode.VIEW))
	{
		if (value instanceof PresProblemChecklistConfigShortVo) // Top node
		{
			getPresProblemChecklistConfig((PresProblemChecklistConfigShortVo) value);
		}

		else if (node.getParent().getValue() instanceof PresProblemChecklistConfigShortVo)
		{
			getPresProblemChecklistConfig((PresProblemChecklistConfigShortVo) node.getParent().getValue());
		}

		updateControlsState();
	}

}
 
Example 11
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void open() 
{
	if(form.getGlobalContext().RefMan.getIsProviderCancellationIsNotNull()
		&& 	form.getGlobalContext().RefMan.getIsProviderCancellation())
	{
		form.setMode(FormMode.VIEW);
	}
	
	if(domain.isThereFurtherManagementOfTypeTLT(form.getGlobalContext().RefMan.getCatsReferral()))
	{
		form.getGlobalContext().RefMan.setShowTLTTabs(true);
		form.lyr1().tabTLT().setHeaderVisible(true);
	}
	
	form.lyr1().tabTLT().setHeaderVisible(form.getGlobalContext().RefMan.getShowTLTTabs());
}
 
Example 12
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void copySelectedNav()
{
	AppNavigationVo navVo = form.getLocalContext().getSelectedNav();
	AppNavigationVo newNavVo = new AppNavigationVo();
	newNavVo.setComment(navVo.getComment());
	newNavVo.setIsActive(Boolean.TRUE);
	newNavVo.setIsRIE(Boolean.FALSE);
	newNavVo.setNavigationName("Copy of " + navVo.getNavigationName());
	newNavVo.setPatientSearchForm(navVo.getPatientSearchForm());
	newNavVo.setStartForm(navVo.getStartForm());
	newNavVo.setRootGroups(copyRootGroupColl(navVo.getRootGroups()));
	
	form.getLocalContext().setSelectedNav(newNavVo);
	populateNavigation(form.getLocalContext().getSelectedNav());
	setFormMode(FormMode.EDIT);		
}
 
Example 13
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void newInstance()
{
	if (form.getLocalContext().getPatientIsNotNull() && form.getLocalContext().getPatient().getDodIsNotNull())
	{
		engine.showMessage("Deceased patient cannot be admitted" );
		return;
	}
	
	form.getLocalContext().setCurrentAdmissionDetail(null);
	form.getLocalContext().setCareContext(null);
	form.getGlobalContext().Core.setCurrentCareContext(null);
	clearInstanceControls();

	form.setMode(FormMode.EDIT);

}
 
Example 14
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
protected void onBtnCancelClick() throws PresentationLogicException 
{
	if (form.getGlobalContext().Nursing.getAssessmentComponent() != null)
	{
		if(form.getGlobalContext().Nursing.getAssessmentComponent() instanceof AssessmentSkin)
		{
			engine.open(form.getForms().COE.AssessSkin);
			return;
		}
		else if(form.getGlobalContext().Nursing.getAssessmentComponent() instanceof NurAssessmentSkinVo)
		{
			if(isSkinBodyChartDialog())
			{
				engine.close(DialogResult.CANCEL);
				return;
			}
			
			engine.open(form.getForms().SpinalInjuries.NurAssessmentSkin);
			return;
		}
	}
	open();
	form.setMode(FormMode.VIEW);
}
 
Example 15
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void updateControlsState()
{
	PatientAssessmentVo voPatientAssessment = form.getLocalContext().getCurrentPatientAssessment();
	boolean isCompleted = voPatientAssessment != null && voPatientAssessment.getStatusIsNotNull() && voPatientAssessment.getStatus().equals(PatientAssessmentStatusReason.COMPLETED);
	if (form.getMode().equals(FormMode.EDIT))
	{
		if (isCompleted)
		{
			setControlsReadOnly(true);
		}
		else
		{
			setControlsReadOnly(false);
			setStatusToInProgress(voPatientAssessment);
		}
	}
	else
	{
		form.btnUpdate().setVisible(isCompleted == false);
	}
}
 
Example 16
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
@Override
protected void onBtnSaveClick() throws ims.framework.exceptions.PresentationLogicException
{
	if (save())
	{
		if (form.dyngrdSpecialInterest().getValue()!=null)
		{
			updateRowToSpecialInterestDyngrd(form.getLocalContext().getSelectedSpecialInterest());
			form.dyngrdSpecialInterest().setValue(null);
			form.dyngrdSpecialInterest().setValue(form.getLocalContext().getSelectedSpecialInterest());
		}
		else
		{
			addRowToSpecialInterestDyngrd(form.getLocalContext().getSelectedSpecialInterest());
			//form.dyngrdSpecialInterest().setValue(null);
			form.dyngrdSpecialInterest().setValue(form.getLocalContext().getSelectedSpecialInterest());
		}
		
		form.setMode(FormMode.VIEW);
	}
}
 
Example 17
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
protected void onBtnCancelClick() throws ims.framework.exceptions.PresentationLogicException
{
	displayRecord(form.getLocalContext().getvitalSign());
	form.setMode(FormMode.VIEW);
	
	dateIntervalStatus();
	updatePrevNextButtons();
}
 
Example 18
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
public void updateControlsState()
{
	if (form.getMode().equals(FormMode.VIEW))
	{
		form.btnEdit().setVisible(true);
		form.btnEdit().setEnabled(form.grdHistopathologicalGrade().getValue() instanceof HistopathologicGradeVo);
	}
	
	updateContextMenus();
}
 
Example 19
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
protected void onBNewClick() throws ims.framework.exceptions.PresentationLogicException
{
	setDefaultValues();
	form.setMode(FormMode.EDIT);
	form.qmbAuthoringHCP().setEnabled(true);
	form.dtimAuthoring().setEnabled(true);
	form.getContextMenus().hideAllGenericGridMenuItems();
	form.getContextMenus().getGenericGridAddItem().setVisible(true);
	form.getContextMenus().getGenericGridRemoveItem().setVisible(false);
}
 
Example 20
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
/**
 * called from context menus and update button for initiating an update
 * @return void 
 */	
public void updateInstance() 
{
	if (allowUpdate())
	{
		loadAdaptationCategories();
		populateInstanceControl(form.grdList().getValue());
		loadChildAdaptations();
		form.setMode(FormMode.EDIT);
	}
}
 
Example 21
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void newInstance()
{
	form.getLocalContext().setGPVo(null);
	clearScreen();
	form.setMode(FormMode.EDIT);
	
	form.ctnGPDetails().lyrGPDetails().showtabGPDetails();
	
	if ((!form.getGlobalContext().NTPF.getTargetObjectIdIsNotNull()) && (engine.getFormName().equals(form.getForms().Admin.GPAdminDialog)))
		form.ctnGPDetails().lyrGPDetails().tabGPDetails().cmbGPStatus().setValue(GPStatus.TOBECODED);
	form.ctnGPDetails().lyrGPDetails().tabGPDetails().cmbTitle().setFocus();
}
 
Example 22
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void showHideCCOControls(FormMode mode) 
{
	form.lyrDetails().tabDetails().lblCourseenddate().setVisible(false);
	form.lyrDetails().tabDetails().lblLABELNumCylces().setVisible(false);
	form.lyrDetails().tabDetails().lblLABELPerf2().setVisible(false);
	//form.lyrDetails().tabDetails().lblPerfStatusDTT().setVisible(false);	//wdev-12819
	form.lyrDetails().tabDetails().lblLABELDelay1().setVisible(false);
	form.lyrDetails().tabDetails().lblLABELDelay2().setVisible(false);
	form.lyrDetails().tabDetails().dteCourseEndDate().setVisible(false);
	form.lyrDetails().tabDetails().cmbPrefornmanceStat().setVisible(false);
	form.lyrDetails().tabDetails().lblNumberOfCycles().setVisible(false);
	form.lyrDetails().tabDetails().cmbDelay1().setVisible(false);
	form.lyrDetails().tabDetails().cmbDelay2().setVisible(false);
	
	
	if ( ! ConfigFlag.UI.USE_GENERIC_CHEMOTHERAPY_CYCLE_AND_DRUG_DETAILS.getValue() )
	{
		form.lyrDetails().tabDetails().lblCourseenddate().setVisible(true);
		form.lyrDetails().tabDetails().dteCourseEndDate().setVisible(true);
		form.lyrDetails().tabDetails().lblLABELNumCylces().setVisible(true);
		form.lyrDetails().tabDetails().lblNumberOfCycles().setVisible(true);
		form.lyrDetails().tabDetails().lblLABELPerf2().setVisible(true);
		//form.lyrDetails().tabDetails().lblPerfStatusDTT().setVisible(false);	//wdev-12819
		form.lyrDetails().tabDetails().lblLABELDelay1().setVisible(true);
		form.lyrDetails().tabDetails().lblLABELDelay2().setVisible(true);
		form.lyrDetails().tabDetails().cmbPrefornmanceStat().setVisible(true);
		form.lyrDetails().tabDetails().cmbDelay1().setVisible(true);
		form.lyrDetails().tabDetails().cmbDelay2().setVisible(true);
		
		form.lyrDetails().tabDetails().dteCourseEndDate().setEnabled(mode.equals(FormMode.EDIT) ? true : false);
		form.lyrDetails().tabDetails().cmbPrefornmanceStat().setEnabled(mode.equals(FormMode.EDIT) ? true : false);
		form.lyrDetails().tabDetails().cmbDelay1().setEnabled(mode.equals(FormMode.EDIT) ? true : false);
		form.lyrDetails().tabDetails().cmbDelay2().setEnabled(mode.equals(FormMode.EDIT) ? true : false);
		form.lyrDetails().tabDetails().cmbDrugTherapyType().setEnabled((mode.equals(FormMode.EDIT) ? true : false)); //WDEV-14175
	}
}
 
Example 23
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private boolean saveDiagnosisRecord(PatientDiagnosisEDischargeVo voPatientDiagnosis) throws PresentationLogicException
{
	String[] errors = voPatientDiagnosis.validate();
	if (errors != null)
	{
		engine.showErrors(errors);
		return false;
	}

	try
	{
		voPatientDiagnosis = domain.saveDiagnosisVo(voPatientDiagnosis, null);
	}
	catch (StaleObjectException sox)
	{
		engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
		form.getLocalContext().setSelectedPatientDiagnosisVo(null);
		form.setMode(FormMode.VIEW);
		enableDisableDiagnosisInstanceControls(false);
		open();
		return false;
	}
	catch (UniqueKeyViolationException ue)
	{
		engine.showMessage(ue.getMessage());
		return false;
	}
	catch (DomainInterfaceException e)
	{
		engine.showErrors(new String[] { e.getMessage() });
		return false;
	}
	form.getLocalContext().setSelectedPatientDiagnosisVo(voPatientDiagnosis);

	form.getLocalContext().setLastEvent(EDischargeLastEvent.EDISCHARGE_SAVE);

	return true;
}
 
Example 24
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
@Override
protected void onFormOpen(Object[] args) throws ims.framework.exceptions.PresentationLogicException
{
	form.setMode(FormMode.VIEW);	
	form.getGlobalContext().Clinical.PatientSummary.setEpisodeOfCare(null);
	form.getLocalContext().setShowRemove(Boolean.FALSE);
	form.chkRemove().setVisible(Boolean.FALSE);
}
 
Example 25
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void viewQuestion(QuestionInformationShortVo voQInfoShort)
{
	QuestionInformationVo voQInfo = null;
	if (voQInfoShort != null && voQInfoShort.getID_QuestionInformationIsNotNull())
	{
		voQInfo = domain.getQuestion(voQInfoShort.getID_QuestionInformation());
		form.getLocalContext().setVoQuestionInformation(voQInfo);
	}

	clearQuestionControls();
	populateControlsFromData(voQInfo);

	setIsNewQuestion(new Boolean(false));
	enableTabNewQuestion(true);
	boolean isPrimaryQuestion = voQInfo != null && voQInfo .getQuestionTypeIsNotNull() && voQInfo .getQuestionType().equals(QuestionType.PRIMARY)?true:false;
	if(isDialog())
		enableTabSearchQuestion(false);
	else
	{
		enableTabListQuestion(false);
		showClassificationTree(isPrimaryQuestion);
	}
	
	showTabNewQuestion();
	form.setMode(FormMode.VIEW);
	
	if(isPrimaryQuestion)
		form.lyrTabs().tabNewQuestion().lyrDetails().tabClasification().treClassification().setEnabled(false);
	
	form.lyrTabs().tabNewQuestion().setCaption(VIEW_QUESTION);
}
 
Example 26
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void updateControlState()
{
	boolean bEnabled = form.getMode().equals(FormMode.EDIT);
	boolean noSample = form.chkNoSample().getValue();
	boolean noAbnormality = form.chkNoAbnormality().getValue();

	form.customControlAuthoringInfo().setEnabledAuthoringHCP(bEnabled && form.getLocalContext().getSelectedUrinalysis() == null);
	form.customControlAuthoringInfo().setEnabledDateTime(bEnabled && form.getLocalContext().getSelectedUrinalysis() == null);

	form.chkNoSample().setEnabled(bEnabled);

	form.grpLeucocytes().setEnabled(bEnabled && !noSample && !noAbnormality);
	form.grpProtein().setEnabled(bEnabled && !noSample && !noAbnormality);
	form.grpBlood().setEnabled(bEnabled && !noSample && !noAbnormality);
	form.grpKetones().setEnabled(bEnabled && !noSample && !noAbnormality);
	form.grpGlu().setEnabled(bEnabled && !noSample && !noAbnormality);
	form.grpAscorbic().setEnabled(bEnabled && !noSample && !noAbnormality);
	form.grpBil().setEnabled(bEnabled && !noSample && !noAbnormality);
	form.grpUbg().setEnabled(bEnabled && !noSample && !noAbnormality);
	form.grpNitrate().setEnabled(bEnabled && !noSample && !noAbnormality);

	form.cmbPH().setEnabled(bEnabled && !noSample);
	form.decSpecificGravity().setEnabled(bEnabled && !noSample);
	form.chkInactive().setEnabled(bEnabled && !noSample);
	form.chkNoAbnormality().setEnabled(bEnabled && !noSample);

	form.btnNew().setVisible(!bEnabled);
	form.btnNew().setEnabled(!bEnabled && Boolean.TRUE.equals(form.getLocalContext().getisEnabled()));

	form.btnEdit().setVisible(!bEnabled && form.recbrAllRecords().getValue() != null);
	form.btnEdit().setEnabled(!bEnabled && form.recbrAllRecords().getValue() != null && Boolean.TRUE.equals(form.getLocalContext().getisEnabled()));
}
 
Example 27
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
protected void onBNewClick() throws ims.framework.exceptions.PresentationLogicException
{
	form.getLocalContext().setRoomDetail(null);
	form.setMode(FormMode.EDIT);
	form.ctnDetails().setCollapsed(false);
	form.gridRooms().setValue(null);
	clearInstanceControls();
}
 
Example 28
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void viewPreceedingReferral() 
{
	form.getGlobalContext().Clinical.setPreceedingReferralDialogMode(FormMode.VIEW);
	
	form.getGlobalContext().Clinical.setSelectedPreceedingReferralVo(form.grdPreceedingReferrals().getSelectedRow().getValue());
	
	engine.open(form.getForms().Clinical.PreceedingReferral);
}
 
Example 29
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void open()
{
	clearScreen();
	PacsConfigurationVo tempVo = domain.getPACSConfigVo();
	form.getLocalContext().setPACSConfigVo(tempVo);
	populateScreenFromData(tempVo);
	showURL();
	form.setMode(FormMode.VIEW);
}
 
Example 30
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
protected void onBtnCancelClick() throws ims.framework.exceptions.PresentationLogicException
{
	displayRecord(form.getLocalContext().getVitalSign());
	form.setMode(FormMode.VIEW);
	
	dateIntervalStatus();
	updatePrevNextButtons();
}
 
Example 31
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
protected void updateContextMenus()
{
	form.getContextMenus().hideAllGenericGridMenuItems();
	form.getContextMenus().getGenericGridAddItem().setVisible(form.getMode().equals(FormMode.EDIT));
	form.getContextMenus().getGenericGridUpdateItem().setVisible(false/*form.getMode().equals(FormMode.EDIT) && form.grdFollowUp().getSelectedRow() != null)*/);
	if(form.getLocalContext().getcurentSurgicalOpNotes() != null)
		if(form.getLocalContext().getcurentSurgicalOpNotes().getSignOffHCP() != null && form.getLocalContext().getcurentSurgicalOpNotes().getSignOffDateTime() != null && Boolean.FALSE.equals(engine.hasRight(AppRight.CAN_UNDO_SURGICAL_OPERATION_NOTES_COMPLETE)))  //wdev-14074
		{
			
			form.getContextMenus().getGenericGridAddItem().setVisible(false);
			form.getContextMenus().getGenericGridUpdateItem().setVisible(false);
		}
}
 
Example 32
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
@Override
protected void onBtnEditClick() throws ims.framework.exceptions.PresentationLogicException
{
	if (form.grdPaymentHosp().getSelectedRow() != null
		&& form.grdPaymentHosp().getSelectedRow().getValue() != null
		&& form.grdPaymentHosp().getSelectedRow().getValue() instanceof LocationLiteVo)
	{
		PaymentTreatmentHospitalLinkVo voConfig = domain.getPaymentHospitalConfig((LocationLiteVo)form.grdPaymentHosp().getSelectedRow().getValue());
		if (voConfig != null)
			form.grdPaymentHosp().getSelectedRow().setValue(voConfig);
	}
	
	displayConfiguredAndUnconfiguredTreatmentItems();
	form.setMode(FormMode.EDIT);
}
 
Example 33
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
protected void onBtnSaveClick() throws ims.framework.exceptions.PresentationLogicException
{
	if(save())
	{
		form.setMode(FormMode.VIEW);
		open();
	}
}
 
Example 34
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void updateControlsState()
{
	form.btnUpdate().setVisible(form.getMode().equals(FormMode.VIEW)&& form.grdResults().getValue() != null);
	form.ctnDetails().setCollapsed( !(FormMode.EDIT.equals(form.getMode()) || form.grdResults().getValue() != null));
	form.getContextMenus().Pathways.getRTTSTatusEventMapConfigNEWItem().setVisible(FormMode.VIEW.equals(form.getMode()));
	form.getContextMenus().Pathways.getRTTSTatusEventMapConfigEDITItem().setVisible(form.getMode().equals(FormMode.VIEW)&& form.grdResults().getValue() != null);
	form.ctnDetails().cmbEncounterInstance().setRequired(FormMode.EDIT.equals(form.getMode()) && form.ctnDetails().cmbCurrentRTTStat().getValue() == null);
	form.ctnDetails().cmbCurrentRTTStat().setRequired(FormMode.EDIT.equals(form.getMode()) && form.ctnDetails().cmbEncounterInstance().getValue() == null);
	//WDEV-18434
	form.ctnDetails().cmbTargetRTTStat().setRequired(FormMode.EDIT.equals(form.getMode()) && form.ctnDetails().cmbEncounterInstance().getValue() != null);
}
 
Example 35
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void editDrawingConfiguration()
{
	setCurrentRecordInContext();
	clearGraphicAssessmentSearchFilter();
	setDrawingConfigMode(FormMode.EDIT);
	openEditDrawingConfig();
}
 
Example 36
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
@Override
protected void onFormModeChanged()
{
	if (form.getMode().equals(FormMode.VIEW)) {
		updateContextMenuState();
		form.getGlobalContext().RefMan.setIsComponentInEditMode(FormMode.VIEW);
	}
	else {
		form.getContextMenus().RefMan.hideAllReportNotesMenuItems();
		form.getGlobalContext().RefMan.setIsComponentInEditMode(FormMode.EDIT);
	}
	form.fireCustomControlValueChanged();
}
 
Example 37
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
@Override
protected void onFormOpen(Object[] args) throws ims.framework.exceptions.PresentationLogicException
{
	if (args!=null && args.length>0 && args[0]!=null && args[0] instanceof FormMode && FormMode.VIEW.equals((FormMode)args[0]))
	{
		form.getLocalContext().setFormIsReadOnly(true);
	}
	
	createdDynamicGridSpecialInterest();
	open();
	
}
 
Example 38
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private boolean isEditMode()
{
	if (form.getLocalContext().getComponentModeIsNotNull())
	{
		if (form.getLocalContext().getComponentMode().equals(FormMode.EDIT))
			return true;
	}
	
	return false;
}
 
Example 39
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void enablePowerChairGrid()
{
	WheelchairType wheelChairType = form.cmbChairType().getValue();
	if (wheelChairType != null)
	{
		if (wheelChairType.equals(WheelchairType.POWER))
		{
			if (form.getMode().equals(FormMode.EDIT))
			{
				form.grdPowechair().setEnabled(true);
				form.grdPowechair().setReadOnly(false);
			}
			else
			{
				form.grdPowechair().setReadOnly(true);
			}
		}
		else
		{
			form.grdPowechair().setReadOnly(true);
		}
	}
	else
	{
		form.grdPowechair().setReadOnly(true);
	}
}
 
Example 40
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void newDisciplineAndContactType() 
{
	form.setMode(FormMode.EDIT);
	form.ctnDetails().setCollapsed(false);

	form.ctnDetails().Group1().setValue(Group1Enumeration.rdoActive);
	ContactTypesByDisciplineVo voContact = new ContactTypesByDisciplineVo();
	form.getLocalContext().setSelectedRecord(voContact);
	form.getLocalContext().setSelectedItem(null);
	form.getLocalContext().setParentNode(null);
	clearInstanceControls();
	form.ctnDetails().Group1().setValue(Group1Enumeration.rdoActive);
	loadHcpDisciplines();
}