Java Code Examples for ims.framework.MessageIcon

The following are top voted examples for showing how to use ims.framework.MessageIcon. 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
private boolean validateReportConfigFlags() 
{
	String queryServerUrl = ConfigFlag.GEN.QUERY_SERVER_URL.getValue();
	String reportServerUrl = ConfigFlag.GEN.REPORT_SERVER_URL.getValue();
	
	ArrayList<String> errors = new ArrayList<String>();
	
	if(queryServerUrl == null || queryServerUrl.length() == 0 || queryServerUrl.equals(ConfigFlag.GEN.QUERY_SERVER_URL.getDefaultValue()))
	{
		errors.add("The config flag QUERY_SERVER_URL is not set!");
	}
	
	if(reportServerUrl == null || reportServerUrl.length() == 0 || reportServerUrl.equals(ConfigFlag.GEN.REPORT_SERVER_URL.getDefaultValue()))
	{
		errors.add("The config flag REPORT_SERVER_URL is not set !");
	}
	
	if(errors.size() == 0)
		return true;
	
	engine.showMessage(getErrors(errors.toArray(new String[errors.size()])), "Errors", MessageButtons.OK, MessageIcon.ERROR);
	
	return false;
}
 
Example 2
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void populateReports(TemplateForPatientDocumentVoCollection templates, DynamicGrid dynamicGrid, boolean showCheck,boolean showErrors)
{
	if (templates == null || templates.size() == 0)
	{
		if (showErrors)
		{
			engine.showMessage("No records to match your criteria found", "No records", MessageButtons.OK, MessageIcon.INFORMATION);
		}
		return;
	}

	for (int i = 0; i < templates.size(); i++)
	{

		addTemplate(templates.get(i), getReportRow(templates.get(i).getReport(), dynamicGrid), dynamicGrid, showCheck);
	}
}
 
Example 3
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void search(boolean showErrors)
{
	String[] errors = validateSearchCriteria();
	clear();
	if (errors != null && errors.length >0)
	{
		if (showErrors)
			engine.showErrors(errors);
		return;
	}
	
	//WDEV-11654 If selected record has time greater than dateTo change dateTo
	if(form.getLocalContext().getSelectedInstanceIsNotNull() && form.getLocalContext().getSelectedInstance().getAuthoringInformationIsNotNull()
			&& form.getLocalContext().getSelectedInstance().getAuthoringInformation().getAuthoringDateTimeIsNotNull()
			&& form.getLocalContext().getSelectedInstance().getAuthoringInformation().getAuthoringDateTime().isGreaterThan(form.dtimTo().getValue()))
		form.dtimTo().setValue(form.getLocalContext().getSelectedInstance().getAuthoringInformation().getAuthoringDateTime());
			
	VSMetricsCollection metrics = domain.listPatientMetrics(form.getGlobalContext().Core.getPatientShort(),form.dtimFrom().getValue(),form.dtimTo().getValue());
	populateListFromData(metrics);
	if (showErrors && (metrics == null || metrics.size() == 0))
		engine.showMessage("No records found to match your criteria", "No records", MessageButtons.OK, MessageIcon.INFORMATION);
	form.grdMetrics().setValue(form.getLocalContext().getSelectedInstance());
	selectInstance();
}
 
Example 4
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
protected void onBtnUndoDischargeClick() throws ims.framework.exceptions.PresentationLogicException
{
	//wdev-16428
	PatientShort tempVo = domain.getPatientShort(form.getLocalContext().getPatientShort());
	if( tempVo != null && tempVo.getWardIsNotNull() )
	{
		engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
		form.getLocalContext().setSelectedEvent(ADTAdmissionDetailEvent.CANCEL);
		form.fireCustomControlValueChanged();
		return;
	}
	
	String patientName = form.getLocalContext().getPatientShortIsNotNull() && form.getLocalContext().getPatientShort().getNameIsNotNull() ? form.getLocalContext().getPatientShort().getName().toString():"";
	//String wardName = form.getLocalContext().getDischargedEpisodeIsNotNull() && form.getLocalContext().getDischargedEpisode().getPasEventIsNotNull() && form.getLocalContext().getDischargedEpisode().getPasEvent().getLocationIsNotNull() && form.getLocalContext().getDischargedEpisode().getPasEvent().getLocation().getNameIsNotNull() ? form.getLocalContext().getDischargedEpisode().getPasEvent().getLocation().getName():"" ; 
	String wardName = form.getLocalContext().getCareContextShortVoIsNotNull() && form.getLocalContext().getCareContextShortVo().getPasEventIsNotNull() && form.getLocalContext().getCareContextShortVo().getPasEvent().getLocationIsNotNull() && form.getLocalContext().getCareContextShortVo().getPasEvent().getLocation().getNameIsNotNull() ? form.getLocalContext().getCareContextShortVo().getPasEvent().getLocation().getName():"" ;
	form.getLocalContext().setConfimUndoDischargeMsgBoxId(engine.showMessage( "Confirm " + patientName + " is to be re-instated into " + wardName,"Please Confirm", MessageButtons.YESNO, MessageIcon.QUESTION));

	
}
 
Example 5
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private PatientDocumentSearchListVoCollection listPatientDocumentsAndDisplayNoResultError()
{
	PatientDocumentSearchListVoCollection patDocs = domain.listPatientDocuments(
				form.getGlobalContext().Core.getPatientShort(),form.cmbEpisodes().getValue(), 
				form.cmbSpecialty().getValue(),  form.ccMos().getValue() == null ? null : (MemberOfStaffRefVo) form.ccMos().getValue(), 
				form.dteFrom().getValue(), form.dteTo().getValue(), 
				form.cmbDocType().getValue(), form.cmbDocStatus().getValue());
	
	form.getLocalContext().setDocumentsCollection(patDocs);
	
	if (patDocs == null || patDocs.size() == 0)
	{
		engine.showMessage("No documents matching your search criteria were found !", "No results",MessageButtons.OK, MessageIcon.INFORMATION);
		return null;
	}
	
	return patDocs;
}
 
Example 6
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private PatientDocumentSearchListVoCollection listPatientDocumentsAndDisplayNoResultError()
{
	PatientDocumentSearchListVoCollection patDocs = domain.listPatientDocuments(
				form.getGlobalContext().Core.getPatientShort(),form.cmbEpisodes().getValue(), 
				form.cmbSpecialty().getValue(),  form.ccMos().getValue() instanceof HcpRefVo ? (HcpRefVo) form.ccMos().getValue() : null, 
				form.dteFrom().getValue(), form.dteTo().getValue(), 
				form.cmbDocType().getValue(), form.ccResponsibleHcp().getValue() instanceof HcpRefVo ? (HcpRefVo) form.ccResponsibleHcp().getValue() : null,GroupDateEnumeration.rdoGenerated.equals(form.GroupDate().getValue())?true:null);

	if (patDocs == null || patDocs.size() == 0)
	{
		engine.showMessage("No documents matching your search criteria were found !", "No results",MessageButtons.OK, MessageIcon.INFORMATION);
		return null;
	}
	
	return patDocs;
}
 
Example 7
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
@Override
protected void onGrdLayoutsGridCheckBoxClicked(int column, grdLayoutsRow row, boolean isChecked) throws PresentationLogicException
{
	if (Boolean.FALSE.equals(isChecked) && row.getValue().getFloorBedSpaceLayout() != null && row.getValue().getID_BayConfig() != null)
	{
		if (row.getValue().getID_BayConfig() != null)
		{
			BedSpaceVoCollection getBedSpaces = domain.getBedSpacesForLayout(row.getValue().getFloorBedSpaceLayout());
			
			if (areOccupiedBeds(getBedSpaces))
			{
				row.setActive(Boolean.TRUE);
				engine.showMessage("Bay cannot be Inactivated as there are occupied beds on the Ward.", "Warning", MessageButtons.OK, MessageIcon.WARNING);
			}
		}
	}
	
}
 
Example 8
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private boolean isSearchCriteriaValid()
{
	Date dateFrom = form.dteFrom().getValue();
	Date dateTo = form.dteTo().getValue();

	if (dateFrom != null && dateTo != null && dateTo.isLessThan(dateFrom))
	{
		engine.showMessage("Admission Date From cannot be greater than Admission Date To", "Validation error", MessageButtons.OK, MessageIcon.ERROR);
		return false;
	}

	if (isAtLeastOneSearchFieldCompleted())
		return true;

	engine.showMessage("Complete at least one search field.", "Validation error", MessageButtons.OK, MessageIcon.ERROR);

	return false;
}
 
Example 9
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void searchandList()
{

	String[] errors = validateUIRules();
	if (errors != null && errors.length>0)
	{
		engine.showErrors(errors);
		return;
	}
	
	ProcedureLiteVoCollection results = domain.listProcedures(form.cmbCategory().getValue(), 
		form.txtProcedureName().getValue(),form.getLocalContext().getHcpFilter()); //WDEV-14740
	//TODO up
	
	
	if (results == null)
	{
		form.grdItems().getRows().clear();
		engine.showMessage("No results", "No Procedures were found", MessageButtons.OK, MessageIcon.INFORMATION);
		return;
	}
	populateGrid(results);
		
}
 
Example 10
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void doSave()
{
	
	if (!validateAndPopulate())
	{
		return;
	}
	
	
	if (isStatusInactive() && !form.getLocalContext().getIsInactive())
	{
		engine.showMessage("Are you sure you want to inactivate this assessment ?", "Inactive Assessment", MessageButtons.YESNO, MessageIcon.QUESTION);
		return;
	}
	
	performSave();
}
 
Example 11
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
@Override
protected void onBtnTransferClick() throws PresentationLogicException
{
	//wdev-16867
	TrackingWithPartialAdmissionVo trackingWithDNW = domain.getTrackingWithEDPartialAdmission((TrackingVo) form.dyngrdTrack().getValue());
	if( trackingWithDNW != null )
		form.getGlobalContext().Emergency.setEDTransferVo(trackingWithDNW.getCurrentTransferRecord());
	
	if( trackingWithDNW.getCurrentPartialAdmissionIsNotNull() && !AllocationStatus.CANCELLED_ADMISSION.equals(trackingWithDNW.getCurrentPartialAdmission().getAllocatedStatus()))
	{
		form.getLocalContext().setPartialAdmissionForTrackingVo(trackingWithDNW.getCurrentPartialAdmission());
		form.getLocalContext().setDTAWithTransferMessageId(engine.showMessage("A decision to admit record exists for this patient. If you proceed to Transfer the patient, the record will be cancelled on the ED system and the PAS system. Are you sure you want to continue?","Confirm Transfer" ,MessageButtons.YESNO, MessageIcon.QUESTION));
	}
	else
		engine.open(form.getForms().Emergency.TransferDialog);
	//------------
	
}
 
Example 12
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private boolean checkForValidEndDate(DynamicGridCell cell, DynamicGridRow row)
{
	DynamicGridCell end_dateCell = row.getCells().get(form.dyngrdOrganisationLocation().getColumns().getByIdentifier(COL_ACCREDITATION_END_DATE));
	 
	if (wasPreviousAccreditationACCREDITED(row.getValue())
 			&& getColByIdentifier(COL_ACCREDITATION_END_DATE) != null
 			&& end_dateCell != null && end_dateCell.getValue() == null)
	{
		engine.showMessage("An Accreditation End date is required for " + ((HcpLocationVo)row.getValue()).getLocation().getName() + ". Please enter one and save.", "Missing End Date", MessageButtons.OK, MessageIcon.ERROR);
				
		if (getColByIdentifier(COL_ACCREDITATION) != null)
		{
			cell = row.getCells().get(form.dyngrdOrganisationLocation().getColumns().getByIdentifier(COL_ACCREDITATION));
			if (cell != null && cell.getType().equals(DynamicCellType.ENUMERATION))
			{
				cell.setValue(AccreditationLocationStatus.ACCREDITED);
				cell.setIdentifier(AccreditationLocationStatus.ACCREDITED);
				cell.setWidth(200);
				cell.setTooltip(createAccreditationHistoryTooltip(((HcpLocationVo)row.getValue()).getAccreditationHistory(), ((HcpLocationVo)row.getValue()).getCaseTypes()));
			}
		}
		return false; 
	}
	return true;
}
 
Example 13
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void undoProviderCancellation()
{
	//wdev-10367
	if (form.dyngrdReferrals().getSelectedRow() != null)
	{
		CatsReferralListVo voCatsRef = null;
		if (form.dyngrdReferrals().getValue() instanceof CatsReferralListManualAssemblyVo)
			voCatsRef = domain.getCatsReferral(new CatsReferralRefVo(((CatsReferralListManualAssemblyVo)form.dyngrdReferrals().getValue()).getCatsReferralId(), 0));
		else	
			voCatsRef = domain.getCatsReferral((CatsReferralListVo)form.dyngrdReferrals().getSelectedRow().getValue());
		
		if(voCatsRef.getCurrentStatusIsNotNull() && !ReferralApptStatus.REFERRAL_CANCELLED_BY_PROVIDER.equals(voCatsRef.getCurrentStatus().getReferralStatus()))
		{
			engine.showMessage("UNDO of this Provider Cancellation was made by another User.");
			search(Boolean.FALSE, form.dyngrdReferrals().getSelectedRow() != null ? (CatsReferralListManualAssemblyVo)form.dyngrdReferrals().getSelectedRow().getValue() : null);
			return;
		}
	}
	//--------------
	form.getLocalContext().setIdUndoCancelProviderMessageBox(engine.showMessage("Please confirm if you wish to proceed with the UNDO of this Provider Cancellation","Please confirm",MessageButtons.YESNO,MessageIcon.QUESTION));
}
 
Example 14
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private boolean isSearchCriteriaValid()
{
	Date dateFrom = form.dteDateFrom().getValue();
	Date dateTo = form.dteDateTo().getValue();

	if (dateFrom != null && dateTo != null && dateTo.isLessThan(dateFrom))
	{
		engine.showMessage("Date From cannot be greater than Date To", "Validation error", MessageButtons.OK, MessageIcon.ERROR);
		return false;
	}

	if( isAtLeastOneSearchFieldCompleted() == false)
	{
		engine.showMessage("Complete at least one search field.", "Validation error", MessageButtons.OK, MessageIcon.ERROR);
		return false;
	}

	return true;
}
 
Example 15
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
@Override
protected void onContextMenuItemClick(int menuItemID, ims.framework.Control sender) throws ims.framework.exceptions.PresentationLogicException
{
	switch (menuItemID)
	{
		case GenForm.ContextMenus.AdminNamespace.OrganisationAndPCTCode.AddOrganisationCode:
			newOrganisationCode();
			break;
		case GenForm.ContextMenus.AdminNamespace.OrganisationAndPCTCode.EditOrganisationCode:
			updateOrganisationCode();
			break;
		case GenForm.ContextMenus.AdminNamespace.OrganisationAndPCTCode.RemoveOrganisationCode:
			engine.showMessage("Do you really want to remove \"Organisation and PCT Code\"", "Remove Organisation Code", MessageButtons.YESNO, MessageIcon.WARNING, MessageDefaultButton.BUTTON2);
			break;
		case GenForm.ContextMenus.AdminNamespace.OrganisationAndPCTCode.AddPCTCode:
			newPCTCode();
			break;
		case GenForm.ContextMenus.AdminNamespace.OrganisationAndPCTCode.EditPCTCode:
			updatePCTCode();
			break;
		case GenForm.ContextMenus.AdminNamespace.OrganisationAndPCTCode.RemovePCTCode:	
			engine.showMessage("Do you really want to remove \"PCT Code\"", "Remove PCT Code", MessageButtons.YESNO, MessageIcon.WARNING, MessageDefaultButton.BUTTON2);
			break;
	}
}
 
Example 16
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
@Override
protected void onBtnPrintGPClick() throws PresentationLogicException 
{
	if (form.chkGP().getValue() || form.chkPatient().getValue())
		form.getGlobalContext().RefMan.setPrintRejectionLetters(Boolean.TRUE);
	
	if (form.cmbReason().getValue() == null)
	{
		engine.showMessage("A Rejection Reason is Mandatory", "Error", MessageButtons.OK, MessageIcon.ERROR);
		return;
	}
	
	save();

	engine.close(DialogResult.OK);
}
 
Example 17
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
/**
 * Retrieve the clinics from via the domain based on the search criteria and populate the tree with any results
 */
private void search()
{
	ClinicVoCollection clinics = domain.listClinicsByNameCodeLocation(form.cmbSearchLoc().getValue(), form.cmbSearchOutpatient().getValue(), form.txtSearchName().getValue(), form.txtSearchCode().getValue(), form.chkSearchAciveOnly().getValue());
	//wdev-12851
	clearrec();
	updateControlsState();
	//---------
	if (clinics == null || clinics.size() == 0)
	{
		
		engine.showMessage("No records were found that match your search criteria.", "No results", MessageButtons.OK, MessageIcon.INFORMATION);
	}
	populateClinicTree(clinics);
	
}
 
Example 18
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void doSearchAndShowInGrid() throws PresentationLogicException
{
	form.grdProcedures().getRows().clear();
	ProcedureLiteVoCollection procs = null;
	try
	{
		procs = domain.listProcedures(form.cmbSpeciality().getValue(), form.txtProcName().getValue());
	}
	catch (DomainInterfaceException e)
	{
		throw new PresentationLogicException(e);
	}
	if (procs == null || procs.size() == 0)
	{
		engine.showMessage( "No Procedures were found. Please modify your search criteria","No results", MessageButtons.OK, MessageIcon.INFORMATION);
		return;
	}
	populateGridProceduresFromData(procs);

}
 
Example 19
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
@Override
protected void onGrdVMPSelectionChanged() throws ims.framework.exceptions.PresentationLogicException
{
	form.grdVTM().getRows().clear();
	form.grdAMP().getRows().clear();
	
	try 
	{
		IDMDValue vmp = form.grdVMP().getValue();
		VTMRefVo vtmRef = ((VMPVo)vmp).getVTM();
		if(vtmRef != null)
		{
			addVTMItem(domain.getVTM(vtmRef));
		}
		
		populateAMPValues(domain.searchAMP(form.grdVMP().getValue()));
	} 
	catch (DomainInterfaceException e) 
	{
		engine.showMessage(e.getMessage(), "Error", MessageButtons.OK, MessageIcon.ERROR);
	}
	
	form.fireCustomControlValueChanged();
}
 
Example 20
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void search() 
{
	//WDEV-13361 
	form.getContextMenus().Clinical.hideAllPatientICPListMenuItems();

	PatientICPMediumVoCollection list = domain.listPatientICPs(form.getGlobalContext().Core.getPatientShort());
	if (list == null || list.size() == 0)
	{
		engine.showMessage("No records match your search criteria.", "No data found", MessageButtons.OK, MessageIcon.WARNING);
		return;
	}

	form.getLocalContext().setPatientICPsCol(list);
	form.getLocalContext().setSortOrder(SortOrder.DESCENDING);
	populateICPGrid(sortListByStartDate(form.getLocalContext().getSortOrder()));
}
 
Example 21
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
protected void onChkAddOnValueChanged() throws PresentationLogicException
{
	if (form.lyrInvestigations().tabGeneralDet().chkAddOn().getValue() == true)
	{
		form.getLocalContext().setDeletePathologyDetailsConfirmationId(engine.showMessage("Do you really want to remove Pathology Details ", "Confirm Pathology Details  Delete", MessageButtons.YESNO, MessageIcon.INFORMATION)); //wdev-14252
		return;				//wdev-14252
		//form.lyrInvestigations().tabGeneralDet().chkTestSeperateOrder().setValue(false);
	}
	else
	{
		setDetailTabsVisible(true);
		//setDetailTabsVisible(form.lyrInvestigations().tabGeneralDet().cmbProvider().getValue() != null && form.lyrInvestigations().tabGeneralDet().cmbProviderService().getValue() != null);
	}

	if (form.lyrInvestigations().tabHelpTexts().isHeaderVisible())
	{
		form.lyrInvestigations().tabPathologyDetails().setHeaderVisible(!form.lyrInvestigations().tabGeneralDet().chkAddOn().getValue());
		form.lyrInvestigations().tabLinkedInvestigations().setHeaderVisible(!form.lyrInvestigations().tabGeneralDet().chkAddOn().getValue());
	}
	
	updateControlsState();
}
 
Example 22
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void doSearchAndShowInGrid() throws PresentationLogicException
{
	form.grdDiscipline().getRows().clear();
	
	ServiceLiteVoCollection disciplines = null;
	
	try 
	{
		disciplines = domain.listDiscipline();
	} 
	catch (DomainInterfaceException e) 
	{
		e.printStackTrace();
		throw new PresentationLogicException(e);
	}
	
	if (disciplines == null || disciplines.size() == 0)
	{
		engine.showMessage( "No Disciplines were found.","No results", MessageButtons.OK, MessageIcon.INFORMATION);
		return;
	}
	
	populateGridDisciplineFromData(disciplines);
}
 
Example 23
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private boolean isSearchCriteriaValid() 
{
	DateTime dateFrom = form.dtimFrom().getValue();
	DateTime dateTo = form.dtimTo().getValue();
	
	if (dateFrom != null && dateTo != null && dateTo.isLessThan(dateFrom))
	{
		engine.showMessage("Admission Date From cannot be greater than Admission Date To", "Validation error", MessageButtons.OK, MessageIcon.ERROR);
		return false;
	}
	
	if(isAtLeastOneSearchFieldCompleted())
		return true;
	
	engine.showMessage("Complete at least one search field.", "Validation error", MessageButtons.OK, MessageIcon.ERROR);
	
	return false;
}
 
Example 24
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
protected void onCmbChartingViewValueChanged() throws PresentationLogicException
{
	if (form.lyrMain().tabCharting().cmbChartingView().getValue() == null)
		form.lyrMain().tabCharting().cmbChartingView().setValue(VIEW_GRAPHICAL);

	if (form.lyrMain().tabCharting().cmbChartingView().getValue().equals(VIEW_TABULAR))
		form.lyrMain().tabCharting().chartingControl().switchToTabularView();
	else
		form.lyrMain().tabCharting().chartingControl().switchToGraphicalView();
	
	form.lyrMain().tabCharting().chartingControl().setOrder(SortOrder.DESCENDING);//WDEV-12614
	
	//WDEV-16883
	if (!selectedPatientSexIsKnown() && VIEW_GRAPHICAL.equals(form.lyrMain().tabCharting().cmbChartingView().getValue())) //WDEV-16883
	{
		engine.showMessage("Patient sex is unknown", "Search Error", MessageButtons.OK, MessageIcon.ERROR);
		return;
	}
	
	populateChartingControl();
	
	form.lyrMain().tabCharting().imbConfigureChart().setVisible(form.lyrMain().tabCharting().cmbChartingView().getValue() == null || form.lyrMain().tabCharting().cmbChartingView().getValue().equals(VIEW_GRAPHICAL));
}
 
Example 25
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
@Override
protected void onCmbStatusValueChanged() throws PresentationLogicException 
{
	//updateContextMenuState();
	/*if (form.lyrTargets().tabExternalMappings().isVisible())
	{  /* WDEV-7027 - doesn't matter what is visible, should prompt anyway! */
		if (form.lyrTargets().tabExternalMappings().grdExternalEventMappings().getRows().size() > 0)
		{
			if (form.cmbStatus().getValue() != null && form.cmbStatus().getValue().equals(PreActiveActiveInactiveStatus.INACTIVE))
			{
				engine.showMessage("If you wish to inactivate the Event, All Events Mappingss must be inactivated also\nSet all Events Mappings  to 'Inactive' now","Confirmation", MessageButtons.YESNO, MessageIcon.QUESTION);
			}
		}
		
	/*}
	if (form.lyrTargets().tabRTT().isVisible())
	{*/
		if (form.lyrTargets().tabRTT().grdRTT().getRows().size() > 0)
		{
			if (form.cmbStatus().getValue() != null && form.cmbStatus().getValue().equals(PreActiveActiveInactiveStatus.INACTIVE))
			{
				engine.showMessage("If you wish to inactivate the Event, All RTT Events must be inactivated also\nSet all RTT Events  to 'Inactive' now","Confirmation", MessageButtons.YESNO, MessageIcon.QUESTION);
			}
		}
	/*}*/
}
 
Example 26
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void initialize()
{
	form.ccClinicDoctor().initialize(MosType.MEDIC);
	form.ccClinicDoctor().isRequired(true);
	form.ccCardiologist().initialize(MosType.MEDIC);
	form.ccCardiologist().isRequired(true);

	if (!form.getGlobalContext().Core.getCurrentCareContext().getPasEventIsNotNull())
		engine.showMessage("There is no PAS Event linked to the current care context","Warning",MessageButtons.OK,MessageIcon.WARNING);
}
 
Example 27
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private boolean initializeCustomControl() 
{
	UserAssessmentLiteVoCollection list = null;
	form.ccOutpatientAssessment().clearComponent();
	if (form.getGlobalContext().Core.getEpisodeofCareShortIsNotNull())
		list  = domain.listAssessments(form.getGlobalContext().Core.getEpisodeofCareShort().getSpecialty());
	
	if (list != null && list.size() == 1)
	{
		form.getLocalContext().setChosenAssessment(domain.getUserAssessment(list.get(0)));
		loadAssessment();
	}
	else if (list != null && list.size() > 1)
	{
		if (form.getMode().equals(FormMode.EDIT))
		{
			form.getGlobalContext().Assessment.setAssessmentsForSpecialtyCollection(list);
			//engine.open(form..getForms().Assessment.AssessmentsForSpecialty);
		}
	}
		
	if (list.size() == 0)
	{
		if (form.getGlobalContext().Core.getEpisodeofCareShortIsNotNull()
			&& form.getGlobalContext().Core.getEpisodeofCareShort().getSpecialtyIsNotNull())
			engine.showMessage("No configured assessment for Specialty - " + form.getGlobalContext().Core.getEpisodeofCareShort().getSpecialty().toString() + ", was found.", "No Configured Assessment", MessageButtons.OK, MessageIcon.WARNING);
		else
			engine.showMessage("No configured assessment for the current Specialty was found.", "No Configured Assessment", MessageButtons.OK, MessageIcon.WARNING);
		
		form.setMode(FormMode.VIEW);
		manageReadOnly();
		return false;
	}
	form.getLocalContext().setisReadonly(false);
	
	return true;
}
 
Example 28
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
@Override
protected void onBtnSaveClick() throws ims.framework.exceptions.PresentationLogicException
{
	//check for stale
	if((form.getLocalContext().getRACPCSummary() == null || form.getLocalContext().getRACPCSummary().getID_RACPCSummary() == null) && domain.getRACPCSummary(form.getGlobalContext().Core.getCurrentCareContext()) != null)
	{
		form.htmReport().setHTML("");//WDEV-13664 
		form.getLocalContext().setStaleMessageID(engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue(), "Errors", MessageButtons.OK, MessageIcon.ERROR));//WDEV-13664 
		return;
	}
	
	if(save(false))
		open();
}
 
Example 29
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private boolean getDataFromControls(MskSpineExamFindingVo findingVO)
{
	findingVO.setSpineFindInterpretation(form.txtInterpretation().getValue());
	findingVO.setIsProblem(new Boolean(form.chkSaveAsProblem().getValue()));
	//Set the Findings value back to the context
	form.getGlobalContext().SpinalInjuries.Back.setMskSpineExamFindingVo(findingVO);
	
	if (form.chkSaveAsProblem().getValue())
	{
		String patientProblem = form.txtSiteName().getValue() + " - " + form.cmbFindingType().getValue().toString() + ((form.txtInterpretation().getValue() != null && form.txtInterpretation().getValue().length() > 0) ? " - " + form.txtInterpretation().getValue() : "");
		MedicalProbOnAdmisVo voMedicalProblem = new MedicalProbOnAdmisVo();
		voMedicalProblem.setPatientProblem(patientProblem);//wdev-15280
		voMedicalProblem.setIsActive(Boolean.TRUE);
		voMedicalProblem.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());
		voMedicalProblem.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
		voMedicalProblem.setProblemContext("Spine Examination");

		form.getGlobalContext().SpinalInjuries.setMedicalProbToSave(voMedicalProblem);
		
		if (patientProblem.length() > 255)
		{
			engine.showMessage("The Problem description exceeds 255 characters. Do you agree to save only the first 255 characters?", "Warning", MessageButtons.YESNO, MessageIcon.WARNING);
			return false;
		}
	}
	else
		form.getGlobalContext().SpinalInjuries.setMedicalProbToSave(null);
		
	return true;
}
 
Example 30
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void searchAndPopulate() 
{
	ContractConfigShortVoCollection contracts = domain.listContracts(form.txtSName().getValue(), form.cmbSOrganisation().getValue(), form.cmbSType().getValue(), form.txtSId().getValue(), form.cmbSStatus().getValue(),form.chkDiagnosticCriteria().getValue(),form.chkNonDiagnosticCriteria().getValue());
	populateListControls(contracts);
	if (form.getLocalContext().getSelectedRecordIsNotNull())
	{
		form.grdDetails().setValue(form.getLocalContext().getSelectedRecord());
		selectInstance();
	}
	updateControlsState();
	if (contracts == null || contracts.size() == 0)
		engine.showMessage("No records that match your search criteria found.", "No results", MessageButtons.OK,MessageIcon.INFORMATION);
	
}
 
Example 31
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
@Override
protected void onBtnSaveClick() throws ims.framework.exceptions.PresentationLogicException
{
	DiagnosisBasisofDiagnosis[] selectedValues = form.chklistBasis().getValues();

	if (selectedValues == null || selectedValues.length == 0)
	{
		engine.showMessage("Please either choose a Basis of Diagnosis or Cancel.", "Warning", MessageButtons.OK, MessageIcon.WARNING);
		return;
	}
	
	form.getGlobalContext().Oncology.setSelectedBasisOfDiagnosis(selectedValues[0]);
	engine.close(DialogResult.OK);
}
 
Example 32
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private ImagingEventsVo populateDataFromScreen(ImagingEventsVo voImagingEvent) 
{
	voImagingEvent.setHospitalSiteOfImage(form.ctn1().cmbHospitalPerformed().getValue());
	voImagingEvent.setImageDate(form.ctn1().dteImaging().getValue());
	IClinicalCodingValue voResult = form.ctn1().customControlCodingItem().getValue();

	if (voResult != null)
	{

		if (voResult.getIClinicalCodingValue() instanceof CancerImagingEventLiteVo)
		{
			voImagingEvent.setImagingEvent((CancerImagingEventLiteVo) voResult.getIClinicalCodingValue());
			voImagingEvent.setImagingEventDescription(voResult.getIClinicalCodingValueDescription());						
		}
		else
		{
			throw new CodingRuntimeException("CancerImagingEventLiteVo expected from component");
		}
	}
	else if (voImagingEvent.getID_ImagingeventsIsNotNull() 
			&& voImagingEvent.getImagingEventDescriptionIsNotNull()) 
	{
		engine.showMessage("A coding Value and Description are mandatory. Please enter one.", "Missing Coding Data", MessageButtons.OK,MessageIcon.WARNING);
		return null;
	}
	voImagingEvent.setAnatomicalSite(form.ctn1().cmbAnatomicalSite().getValue());
	voImagingEvent.setReportDate(form.ctn1().dteReport().getValue());
	voImagingEvent.setLesionSize(form.ctn1().intLesionSize().getValue());
	voImagingEvent.setAuthoringInformation(form.ctn1().customControlAuthoringInfo().getValue());
	voImagingEvent.setRequestedDate(form.ctn1().dteRequest().getValue());
	if (form.ctn1().cmbResult()!=null)
		voImagingEvent.setInvestigationResult(form.ctn1().cmbResult().getValue());
	return voImagingEvent;
}
 
Example 33
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void showErrorsAndPrint(PatientDocumentVoCollection docs)
{
	if (docs == null)
		throw new CodingRuntimeException("Trying to show null errors ");
	StringBuilder errorMessage = new StringBuilder("Following documents could not be locked and will not be available for print:\n\n");
	for (int i = 0; i < docs.size(); i++)
	{
		errorMessage.append("" + (i + 1) + ")" + docs.get(i).getName() + " created at: " + docs.get(i).getRecordingDateTime().toString() + "\n");
	}
	engine.showMessage(errorMessage.toString(), "Errors locking documents", MessageButtons.OK, MessageIcon.ERROR);

}
 
Example 34
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
@Override
protected void onContextMenuItemClick(int menuItemID, ims.framework.Control sender) throws ims.framework.exceptions.PresentationLogicException
{
	switch (menuItemID)
	{
	case GenForm.ContextMenus.CoreNamespace.RCHTCustomListMenu.REMOVE:
		engine.showMessage("Are you sure you want to remove this patient from the list?", "Remove Patient", MessageButtons.YESNO, MessageIcon.QUESTION);
		form.getLocalContext().setLastMessageBox(1);
		break;
	case GenForm.ContextMenus.CoreNamespace.RCHTCustomListMenu.SELECT:
		selectPatient();
		break;
	}	
}
 
Example 35
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
@Override
protected void onImbNewCustomListClick() throws PresentationLogicException 
{
	if(ConfigFlag.UI.CUSTOM_PATIENT_LIST_ACCESS_TYPE.getValue().equals("HCP"))//WDEV-14238 
	{
		if(domain.getHcpLiteUser()==null) //WDEV-9696 
		{
			form.getLocalContext().setErrorMessage(engine.showMessage("Operation not allowed. User is not HCP.", "", MessageButtons.OK, MessageIcon.INFORMATION));
			return;
		}
	}
		engine.open(form.getForms().Core.NewCustomListDialog);
	}
 
Example 36
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void search() 
{
	//WDEV-13354
	form.imbAutoRefresh().setEnabled(false);
	
	if ( ! validateSearch())
		return;
	
	IPandOPSearchCriteriaVo filterVo = new IPandOPSearchCriteriaVo();
	
	filterVo = populateSearchFilter(filterVo);
	if (filterVo ==null)
		return;
	
	form.getLocalContext().setbDNACalled(false);

	form.getGlobalContext().setUKSHOutPatientWardViewSearchCriteria(filterVo);
	form.grdResults().getRows().clear();
	form.getContextMenus().Clinical.hideAllOPClinicViewListMenuItems();

	OutpatientEpisodeWithICPInfoVoCollection list = domain.listOPEpisodes(filterVo);
	if (list == null || list.size() == 0)
	{
		engine.showMessage("No records match your search criteria.", "No data found", MessageButtons.OK, MessageIcon.WARNING);
		return;
	}

	//WDEV-11771 - starts here
	list.sort(OutpatientEpisodeWithICPInfoVo.getTimeComparator(SortOrder.ASCENDING));
	form.getLocalContext().setSortOrderTime(SortOrder.DESCENDING);
	//WDEV-11771 - ends here
	
	populateGrid(list);
			
	//WDEV-13354
	form.imbAutoRefresh().setEnabled(true);
}
 
Example 37
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void search() 
{
	AvailableBedsVo beds = populateDataFromScreen();
	
	form.getGlobalContext().STHK.setAvailableBedsListFilter(beds);
	form.getContextMenus().hideAllGenericGridMenuItems();

	form.grdAvailableBeds().getRows().clear();
	form.lbl6().setValue("Total : 0"); // WDEV-18099 
	BedSpaceStateLiteVoCollection availableBeds = null;
	
	if (beds.countFieldsWithValue() > 0)
	{
		availableBeds  = domain.listAvailableBeds(beds);
	}
	else
	{
		engine.showMessage("Please enter some valid search criteria.", "Invalid search criteria", MessageButtons.OK, MessageIcon.ERROR);
		return;
	}
	
	if (availableBeds == null || availableBeds.size() == 0)
	{
		engine.showMessage("No Bed records match your search criteria.", "No data found", MessageButtons.OK, MessageIcon.WARNING);
		return;
	}
	if (availableBeds != null)
		form.lbl6().setValue("Total : " + String.valueOf(availableBeds.size()));

	populateGrid(availableBeds);	
}
 
Example 38
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
protected void onBtnSaveClick() throws ims.framework.exceptions.PresentationLogicException
{		
	String[] errors = getUIErrors();				
	if (errors != null && errors.length > 0) {			
		return;
	}
	
	form.htmPreview().setHTML("");									
	engine.showMessage("Please confirm if this document is to be associated with patient " + form.getGlobalContext().Core.getPatientShort().getName(), "Confirmation", MessageButtons.CONFIRMCANCEL, MessageIcon.QUESTION);
}
 
Example 39
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private boolean validateDates()
{
	if (form.dteAppoinmentFrom().getValue() != null && form.dteAppoinmentTo().getValue() != null && form.dteAppoinmentFrom().getValue().isGreaterThan(form.dteAppoinmentTo().getValue()))
	{
		engine.showMessage(" Date To should be greater than Date From .", "Warning", MessageButtons.OK, MessageIcon.WARNING);
		return false;
	}
	
	return true;
}
 
Example 40
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void search(Boolean timerCalled)
{
	PendingEmergencyAdmissionLiteVoCollection voColl = null;

	PendingEmergencyAdmissionsDataVo voFilter = populateDataFromScreen();
	form.grdAdmissions().getRows().clear();
	form.lblTotal().setValue("Total : 0"); //WDEV-18099 
	form.getGlobalContext().STHK.setPendingEmergencyAdmissionsFilter(voFilter);

	if (voFilter.countFieldsWithValue() == 1 && voFilter.getIDTypeIsNotNull())
	{
		engine.showMessage("Please enter some valid search criteria.", "Invalid search cirteria", MessageButtons.OK, MessageIcon.ERROR);
		enableAutoRefeshStart(false);
		return;
	}

	if ((voFilter.countFieldsWithValue() == 1 && voFilter.getIDType() == null) || voFilter.countFieldsWithValue() > 1)
	{
		voColl = domain.listPendingEmergencyAdmissions(voFilter);
	}
	else
	{
		engine.showErrors(new String[]{"Please enter some search criteria."});
		return;
	}

	if (voColl == null || voColl.size() == 0)
	{
		if(!timerCalled)
			engine.showMessage("No matching records found");
		return;
	}
	if (voColl != null)
		form.lblTotal().setValue("Total : " + String.valueOf(voColl.size()));

	if (voColl != null)
		populateGrid(voColl);
}