Java Code Examples for ims.assessment.vo.GraphicAssessmentShortVoCollection

The following are top voted examples for showing how to use ims.assessment.vo.GraphicAssessmentShortVoCollection. 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 PatientAssessmentFolderVo getAssessmentFolder(UserPatientAssessmentFavouritesVo favoritesVo, String rootFolder)
{
	if (favoritesVo == null || favoritesVo.getFolder() == null)
		return null;

	for (int i = 0; i < favoritesVo.getFolder().size(); i++)
	{
		if (favoritesVo.getFolder().get(i).equals(rootFolder))
			return favoritesVo.getFolder().get(i);
	}

	PatientAssessmentFolderVo voPatAssessFolder = new PatientAssessmentFolderVo();
	voPatAssessFolder.setFolderName(rootFolder);
	voPatAssessFolder.setPatientAssessments(new UserAssessmentShortVoCollection());
	voPatAssessFolder.setGraphicAssessments(new GraphicAssessmentShortVoCollection());

	return voPatAssessFolder;
}
 
Example 2
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void populateGrid(ValueObjectCollection voColl)
{
	if (voColl != null)
	{
		if (voColl instanceof UserAssessmentShortVoCollection)
		{
			UserAssessmentShortVoCollection voUserAssColl = (UserAssessmentShortVoCollection) voColl;
			for (int i = 0; i < voUserAssColl.size(); i++)
			{
				addGriRow(voUserAssColl.get(i), voUserAssColl.get(i).getName());
			}
		}
		if (voColl instanceof GraphicAssessmentShortVoCollection)
		{

			GraphicAssessmentShortVoCollection voGraphicAssColl = (GraphicAssessmentShortVoCollection) voColl;
			for (int i = 0; i < voGraphicAssColl.size(); i++)
			{
				addGriRow(voGraphicAssColl.get(i), voGraphicAssColl.get(i).getName());
			}
		}
	}
}
 
Example 3
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
@Override
protected void onQmbDiagramTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException
{
	GraphicAssessmentShortVoCollection lisResults = domain.listDiagrams(value);
	form.qmbDiagram().clear();
	if (lisResults == null || lisResults.size() == 0)
		return;
	for (int i = 0; i < lisResults.size(); i++)
	{
		form.qmbDiagram().newRow(lisResults.get(i), lisResults.get(i).getName());
	}
	if (lisResults.size() == 1)
	{
		form.qmbDiagram().setValue(lisResults.get(0));
	}
	else
	{
		form.qmbDiagram().showOpened();
	}
}
 
Example 4
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
@Override
protected void onImbSearchClick() throws PresentationLogicException 
{
	
	String filter = form.txtAssessmentName().getValue();
	if (filter ==null || filter.length() <3)
	{
		engine.showErrors(new String[]{"Please enter at least 3 character to search upon"});
		return;
	}
	
	boolean speciality = GroupSpecialityEnumeration.rdoMySpeciality.equals(form.GroupSpeciality().getValue());
	GraphicAssessmentShortVoCollection graphicAssessments = domain.listGraphicAssessments(filter,speciality);
	if (graphicAssessments == null || graphicAssessments.size() == 0)
	{
		engine.showMessage( "No Records were found !","No Records", MessageButtons.OK, MessageIcon.INFORMATION);
		return;
	}
	populateGridFromData(graphicAssessments);
}
 
Example 5
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void populateGridFromData(GraphicAssessmentShortVoCollection graphicAssessments)
{
	form.grdGraphicAssessments().getRows().clear();
	if (graphicAssessments == null)
		return;
	for (int i=0 ; i<graphicAssessments.size() ; i++)
	{
		GraphicAssessmentShortVo graphicAssessmentVo = graphicAssessments.get(i);
		if (graphicAssessmentVo != null)
		{
		grdGraphicAssessmentsRow newRow = form.grdGraphicAssessments().getRows().newRow();
		newRow.setcolName(graphicAssessmentVo.getName());
		newRow.setValue(graphicAssessmentVo);
		}
		
	}
}
 
Example 6
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private PatientAssessmentFolderVo getAssessmentFolder(UserPatientAssessmentFavouritesVo favoritesVo, String rootFolder)
{
	if (favoritesVo == null || favoritesVo.getFolder() == null)
		return null;

	for (int i = 0; i < favoritesVo.getFolder().size(); i++)
	{
		if (favoritesVo.getFolder().get(i).equals(rootFolder))
			return favoritesVo.getFolder().get(i);
	}

	PatientAssessmentFolderVo voPatAssessFolder = new PatientAssessmentFolderVo();
	voPatAssessFolder.setFolderName(rootFolder);
	voPatAssessFolder.setPatientAssessments(new UserAssessmentShortVoCollection());
	voPatAssessFolder.setGraphicAssessments(new GraphicAssessmentShortVoCollection());

	return voPatAssessFolder;
}
 
Example 7
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateGrid(ValueObjectCollection voColl)
{
	if (voColl != null)
	{
		if (voColl instanceof UserAssessmentShortVoCollection)
		{
			UserAssessmentShortVoCollection voUserAssColl = (UserAssessmentShortVoCollection) voColl;
			for (int i = 0; i < voUserAssColl.size(); i++)
			{
				addGriRow(voUserAssColl.get(i), voUserAssColl.get(i).getName());
			}
		}
		if (voColl instanceof GraphicAssessmentShortVoCollection)
		{

			GraphicAssessmentShortVoCollection voGraphicAssColl = (GraphicAssessmentShortVoCollection) voColl;
			for (int i = 0; i < voGraphicAssColl.size(); i++)
			{
				addGriRow(voGraphicAssColl.get(i), voGraphicAssColl.get(i).getName());
			}
		}
	}
}
 
Example 8
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
@Override
protected void onQmbDiagramTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException
{
	GraphicAssessmentShortVoCollection lisResults = domain.listDiagrams(value);
	form.qmbDiagram().clear();
	if (lisResults == null || lisResults.size() == 0)
		return;
	for (int i = 0; i < lisResults.size(); i++)
	{
		form.qmbDiagram().newRow(lisResults.get(i), lisResults.get(i).getName());
	}
	if (lisResults.size() == 1)
	{
		form.qmbDiagram().setValue(lisResults.get(0));
	}
	else
	{
		form.qmbDiagram().showOpened();
	}
}
 
Example 9
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
@Override
protected void onImbSearchClick() throws PresentationLogicException 
{
	
	String filter = form.txtAssessmentName().getValue();
	if (filter ==null || filter.length() <3)
	{
		engine.showErrors(new String[]{"Please enter at least 3 character to search upon"});
		return;
	}
	
	boolean speciality = GroupSpecialityEnumeration.rdoMySpeciality.equals(form.GroupSpeciality().getValue());
	GraphicAssessmentShortVoCollection graphicAssessments = domain.listGraphicAssessments(filter,speciality);
	if (graphicAssessments == null || graphicAssessments.size() == 0)
	{
		engine.showMessage( "No Records were found !","No Records", MessageButtons.OK, MessageIcon.INFORMATION);
		return;
	}
	populateGridFromData(graphicAssessments);
}
 
Example 10
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateGridFromData(GraphicAssessmentShortVoCollection graphicAssessments)
{
	form.grdGraphicAssessments().getRows().clear();
	if (graphicAssessments == null)
		return;
	for (int i=0 ; i<graphicAssessments.size() ; i++)
	{
		GraphicAssessmentShortVo graphicAssessmentVo = graphicAssessments.get(i);
		if (graphicAssessmentVo != null)
		{
		grdGraphicAssessmentsRow newRow = form.grdGraphicAssessments().getRows().newRow();
		newRow.setcolName(graphicAssessmentVo.getName());
		newRow.setValue(graphicAssessmentVo);
		}
		
	}
}
 
Example 11
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private PatientAssessmentFolderVo getAssessmentFolder(UserPatientAssessmentFavouritesVo favoritesVo, String rootFolder)
{
	if (favoritesVo == null || favoritesVo.getFolder() == null)
		return null;

	for (int i = 0; i < favoritesVo.getFolder().size(); i++)
	{
		if (favoritesVo.getFolder().get(i).equals(rootFolder))
			return favoritesVo.getFolder().get(i);
	}

	PatientAssessmentFolderVo voPatAssessFolder = new PatientAssessmentFolderVo();
	voPatAssessFolder.setFolderName(rootFolder);
	voPatAssessFolder.setPatientAssessments(new UserAssessmentShortVoCollection());
	voPatAssessFolder.setGraphicAssessments(new GraphicAssessmentShortVoCollection());

	return voPatAssessFolder;
}
 
Example 12
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateGrid(ValueObjectCollection voColl)
{
	if (voColl != null)
	{
		if (voColl instanceof UserAssessmentShortVoCollection)
		{
			UserAssessmentShortVoCollection voUserAssColl = (UserAssessmentShortVoCollection) voColl;
			for (int i = 0; i < voUserAssColl.size(); i++)
			{
				addGriRow(voUserAssColl.get(i), voUserAssColl.get(i).getName());
			}
		}
		if (voColl instanceof GraphicAssessmentShortVoCollection)
		{

			GraphicAssessmentShortVoCollection voGraphicAssColl = (GraphicAssessmentShortVoCollection) voColl;
			for (int i = 0; i < voGraphicAssColl.size(); i++)
			{
				addGriRow(voGraphicAssColl.get(i), voGraphicAssColl.get(i).getName());
			}
		}
	}
}
 
Example 13
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
@Override
protected void onQmbDiagramTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException
{
	GraphicAssessmentShortVoCollection lisResults = domain.listDiagrams(value);
	form.qmbDiagram().clear();
	if (lisResults == null || lisResults.size() == 0)
		return;
	for (int i = 0; i < lisResults.size(); i++)
	{
		form.qmbDiagram().newRow(lisResults.get(i), lisResults.get(i).getName());
	}
	if (lisResults.size() == 1)
	{
		form.qmbDiagram().setValue(lisResults.get(0));
	}
	else
	{
		form.qmbDiagram().showOpened();
	}
}
 
Example 14
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
@Override
protected void onImbSearchClick() throws PresentationLogicException 
{
	
	String filter = form.txtAssessmentName().getValue();
	if (filter ==null || filter.length() <3)
	{
		engine.showErrors(new String[]{"Please enter at least 3 character to search upon"});
		return;
	}
	
	boolean speciality = GroupSpecialityEnumeration.rdoMySpeciality.equals(form.GroupSpeciality().getValue());
	GraphicAssessmentShortVoCollection graphicAssessments = domain.listGraphicAssessments(filter,speciality);
	if (graphicAssessments == null || graphicAssessments.size() == 0)
	{
		engine.showMessage( "No Records were found !","No Records", MessageButtons.OK, MessageIcon.INFORMATION);
		return;
	}
	populateGridFromData(graphicAssessments);
}
 
Example 15
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateGridFromData(GraphicAssessmentShortVoCollection graphicAssessments)
{
	form.grdGraphicAssessments().getRows().clear();
	if (graphicAssessments == null)
		return;
	for (int i=0 ; i<graphicAssessments.size() ; i++)
	{
		GraphicAssessmentShortVo graphicAssessmentVo = graphicAssessments.get(i);
		if (graphicAssessmentVo != null)
		{
		grdGraphicAssessmentsRow newRow = form.grdGraphicAssessments().getRows().newRow();
		newRow.setcolName(graphicAssessmentVo.getName());
		newRow.setValue(graphicAssessmentVo);
		}
		
	}
}
 
Example 16
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
private PatientAssessmentFolderVo getAssessmentFolder(UserPatientAssessmentFavouritesVo favoritesVo, String rootFolder)
{
	if (favoritesVo == null || favoritesVo.getFolder() == null)
		return null;

	for (int i = 0; i < favoritesVo.getFolder().size(); i++)
	{
		if (favoritesVo.getFolder().get(i).equals(rootFolder))
			return favoritesVo.getFolder().get(i);
	}

	PatientAssessmentFolderVo voPatAssessFolder = new PatientAssessmentFolderVo();
	voPatAssessFolder.setFolderName(rootFolder);
	voPatAssessFolder.setPatientAssessments(new UserAssessmentShortVoCollection());
	voPatAssessFolder.setGraphicAssessments(new GraphicAssessmentShortVoCollection());

	return voPatAssessFolder;
}
 
Example 17
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
private void populateGrid(ValueObjectCollection voColl)
{
	if (voColl != null)
	{
		if (voColl instanceof UserAssessmentShortVoCollection)
		{
			UserAssessmentShortVoCollection voUserAssColl = (UserAssessmentShortVoCollection) voColl;
			for (int i = 0; i < voUserAssColl.size(); i++)
			{
				addGriRow(voUserAssColl.get(i), voUserAssColl.get(i).getName());
			}
		}
		if (voColl instanceof GraphicAssessmentShortVoCollection)
		{

			GraphicAssessmentShortVoCollection voGraphicAssColl = (GraphicAssessmentShortVoCollection) voColl;
			for (int i = 0; i < voGraphicAssColl.size(); i++)
			{
				addGriRow(voGraphicAssColl.get(i), voGraphicAssColl.get(i).getName());
			}
		}
	}
}
 
Example 18
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
@Override
protected void onQmbDiagramTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException
{
	GraphicAssessmentShortVoCollection lisResults = domain.listDiagrams(value);
	form.qmbDiagram().clear();
	if (lisResults == null || lisResults.size() == 0)
		return;
	for (int i = 0; i < lisResults.size(); i++)
	{
		form.qmbDiagram().newRow(lisResults.get(i), lisResults.get(i).getName());
	}
	if (lisResults.size() == 1)
	{
		form.qmbDiagram().setValue(lisResults.get(0));
	}
	else
	{
		form.qmbDiagram().showOpened();
	}
}
 
Example 19
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
@Override
protected void onImbSearchClick() throws PresentationLogicException 
{
	
	String filter = form.txtAssessmentName().getValue();
	if (filter ==null || filter.length() <3)
	{
		engine.showErrors(new String[]{"Please enter at least 3 character to search upon"});
		return;
	}
	
	boolean speciality = GroupSpecialityEnumeration.rdoMySpeciality.equals(form.GroupSpeciality().getValue());
	GraphicAssessmentShortVoCollection graphicAssessments = domain.listGraphicAssessments(filter,speciality);
	if (graphicAssessments == null || graphicAssessments.size() == 0)
	{
		engine.showMessage( "No Records were found !","No Records", MessageButtons.OK, MessageIcon.INFORMATION);
		return;
	}
	populateGridFromData(graphicAssessments);
}
 
Example 20
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
private void populateGridFromData(GraphicAssessmentShortVoCollection graphicAssessments)
{
	form.grdGraphicAssessments().getRows().clear();
	if (graphicAssessments == null)
		return;
	for (int i=0 ; i<graphicAssessments.size() ; i++)
	{
		GraphicAssessmentShortVo graphicAssessmentVo = graphicAssessments.get(i);
		if (graphicAssessmentVo != null)
		{
		grdGraphicAssessmentsRow newRow = form.grdGraphicAssessments().getRows().newRow();
		newRow.setcolName(graphicAssessmentVo.getName());
		newRow.setValue(graphicAssessmentVo);
		}
		
	}
}
 
Example 21
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
@Override
protected void onImbSearchClick() throws ims.framework.exceptions.PresentationLogicException
{
	
	form.btnSelect().setEnabled(Boolean.FALSE);//WDEV-17478
	
	if (form.txtName().getValue()==null)
	{
		engine.showMessage("Please enter a search criteria", "Message", MessageButtons.OK);
		return;
	}
	form.grdGraphicAssessments().getRows().clear();
	GraphicAssessmentShortVoCollection assessments=null;
	if (form.txtName()!=null)
		assessments = domain.listAssessments(form.txtName().getValue());

	if (assessments!=null)
		for (GraphicAssessmentShortVo item : assessments)
		{
			grdGraphicAssessmentsRow aRow = form.grdGraphicAssessments().getRows().newRow();
			aRow.setValue(item);
			aRow.setcolName(item.getName());
			aRow.setcolSelect(false);
		}
	else
		engine.showMessage("No results found", "Message", MessageButtons.OK);
}
 
Example 22
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private GraphicAssessmentShortVoCollection listGraphical()
{
	GraphicAssessmentShortVoCollection voColl = domain.listGraphicAssessment(getSearchString());

	if (voColl == null || voColl.size() == 0)
	{
		engine.showMessage("No Graphical Assessments found for the Search Criteria Provided");
		return null;
	}

	return voColl;
}
 
Example 23
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void populateGridGraphical(GraphicAssessmentShortVoCollection voColl)
{
	GraphicAssessmentShortVo voGraphical = null;

	for (int i = 0; voColl != null && i < voColl.size(); i++)
	{
		voGraphical = voColl.get(i);
		if (voGraphical.getActiveStatusIsNotNull() && voGraphical.getActiveStatus().equals(PreActiveActiveInactiveStatus.ACTIVE))
		{
			grdAssessmentRow rowSelect = form.lyr1().tabSearch().grdAssessment().getRows().newRow();
			rowSelect.setcolName(voGraphical.getName());
			rowSelect.setValue(voGraphical);
		}
	}
}
 
Example 24
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void initialiseScreen()
{
	if(form.getGlobalContext().Core.getGraphicAssessmentSearchFilterIsNotNull())
	{
		GraphicAssessmentFilterVo voGraphicAssessmentFilter = form.getGlobalContext().Core.getGraphicAssessmentSearchFilter();
		if(voGraphicAssessmentFilter != null)
		{
			form.txtName().setValue(voGraphicAssessmentFilter.getName());
			form.cmbStatus().setValue(voGraphicAssessmentFilter.getStatus());
			form.cmbType().setValue(voGraphicAssessmentFilter.getType());
			form.GroupCriteria().setValue(getGroupCriteria(voGraphicAssessmentFilter));
			search();
		}
	}
	else
	{
		GraphicAssessmentShortVo voGraphicAssessmentShort = form.getGlobalContext().Core.getGraphicAssessmentShortVo();
		if(voGraphicAssessmentShort != null && voGraphicAssessmentShort.getID_GraphicAssessmentIsNotNull())
		{
			clearGrid();
			GraphicAssessmentShortVoCollection voColl = new GraphicAssessmentShortVoCollection();
			voColl.add(voGraphicAssessmentShort);
			displayCollection(voColl);
		}
		setDefaultData();
	}
}
 
Example 25
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void doSearch(boolean checkMandatory)
{
	String name = form.txtName().getValue();
	PreActiveActiveInactiveStatus status = form.cmbStatus().getValue();
	
	if (name != null)
		name = name.trim();
	if(checkMandatory)
	{
		if ((name == null || name.length() == 0) && status == null)
		{
			engine.showMessage("Please enter a name");
			form.txtName().setFocus();
			return;
		}
	}

	GroupCriteriaEnumeration groupCriteria = form.GroupCriteria().getValue();
	if (name != null && groupCriteria != null)
	{
		if (groupCriteria.equals(GroupCriteriaEnumeration.rdoBegins))
		{
			name = name + "%";
		}
		if (groupCriteria.equals(GroupCriteriaEnumeration.rdoContains))
		{
			name = "%" + name + "%";
		}
	}
	
	GraphicAssessmentShortVoCollection voColl = domain.listAssessments(name, status, getUserDefinedTypes(form.cmbType().getValue()));
	if(voColl == null || voColl.size() == 0)
	{
		engine.showMessage("No Graphic Assessments found for the Search Criteria Provided");
		return;
	}
	displayCollection(voColl);
}
 
Example 26
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void displayCollection(GraphicAssessmentShortVoCollection voColl)
{
	if (voColl != null)
	{
		GraphicAssessmentShortVo voGraphicAssessmentShort = null;
		for (int i = 0; i < voColl.size(); i++)
		{
			voGraphicAssessmentShort = voColl.get(i);
			displayRow(form.grdDetails().getRows().newRow(), voGraphicAssessmentShort);
		}
	}
}
 
Example 27
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
protected void onBtnEditClick() throws PresentationLogicException
{
	
	GraphicAssessmentShortVoCollection tempColVo = domain.getGraphicAssessmentByImage(form.grdImages().getValue());
	if (tempColVo != null && tempColVo.size() > 0)
	{
		String strAssess = new String();
		for (int i = 0; i < tempColVo.size(); i++)
		{
			strAssess += tempColVo.get(i).getName();
			// it is hardcoded because we will display maxim 4 assessment on dialog confirmation
			if (i == 4)
			{
				if (tempColVo.size() > 4)
					strAssess += "...";

				break;
			}
			else if (i < tempColVo.size() - 1)
				strAssess += ",";
		}
		engine.showMessage("This image is used in  " + tempColVo.size() + " Assessments. - " + strAssess + ".\n Please confirm if you want to edit this image ", "Confirmation", MessageButtons.CONFIRMCANCEL, MessageIcon.QUESTION);
		return;
	}

	form.setMode(FormMode.EDIT);
	clearDetails();
	form.getLocalContext().setEditdRecord(Boolean.TRUE);
	form.getLocalContext().setCurrentImage(form.grdImages().getValue());

}
 
Example 28
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void searchAssesment(Object hcp)
{
	//wdev-16116
	Specialty spec = null;
	if( hcp instanceof MedicVo)
		spec = ((MedicVo)hcp).getSpecialty();
	else if (hcp instanceof NurseVo)
		spec = ((NurseVo)hcp).getSpecialty();
	else if ( hcp instanceof TherapistVo)
		spec = ((TherapistVo)hcp).getSpecialty();
	
	GraphicAssessmentShortVoCollection assessments = domain.listGraphicalAssesments(spec, form.txtName().getValue());	//wdev-16116
	if (assessments == null || assessments.size()==0)
	{
		engine.showMessage( "No results found","No Results", MessageButtons.OK, MessageIcon.INFORMATION);
		return;
	}
	if (assessments.size()==1)
	{
		
		populateScreenFromData(assessments.get(0));
		form.setMode(FormMode.EDIT);
		return;
	}
	Object[] args = new Object[3];
	args[0] = assessments;
	args[1] = form.txtName().getValue();
	args[2] = Boolean.FALSE;
	engine.open(form.getForms().Clinical.SearchGraphicalAssessment,args);
	
}
 
Example 29
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void open(Object[] args)
{
	if (validateArgs(args))
	{
		populateSearchFilterFromData((String) args[1]);
		populateGridFromData((GraphicAssessmentShortVoCollection) args[0]);
		form.getLocalContext().setAllowSearch((Boolean) args[2]);
	}
	form.setMode(FormMode.EDIT);
	updateControlState();
}
 
Example 30
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private boolean validateArgs(Object[] args)
{
	if (!(args[0] instanceof GraphicAssessmentShortVoCollection && ((GraphicAssessmentShortVoCollection)args[0]).size()>0))
	{
		return false;
	}
	if (!(args[1] instanceof String && ((String)args[1]).length()>2))
	{
		return false;
	}
	if (!(args[2] instanceof Boolean))
		return false;
	
	return true;
}
 
Example 31
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
@Override
protected void onImbSearchClick() throws ims.framework.exceptions.PresentationLogicException
{
	
	form.btnSelect().setEnabled(Boolean.FALSE);//WDEV-17478
	
	if (form.txtName().getValue()==null)
	{
		engine.showMessage("Please enter a search criteria", "Message", MessageButtons.OK);
		return;
	}
	form.grdGraphicAssessments().getRows().clear();
	GraphicAssessmentShortVoCollection assessments=null;
	if (form.txtName()!=null)
		assessments = domain.listAssessments(form.txtName().getValue());

	if (assessments!=null)
		for (GraphicAssessmentShortVo item : assessments)
		{
			grdGraphicAssessmentsRow aRow = form.grdGraphicAssessments().getRows().newRow();
			aRow.setValue(item);
			aRow.setcolName(item.getName());
			aRow.setcolSelect(false);
		}
	else
		engine.showMessage("No results found", "Message", MessageButtons.OK);
}
 
Example 32
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private GraphicAssessmentShortVoCollection listGraphical()
{
	GraphicAssessmentShortVoCollection voColl = domain.listGraphicAssessment(getSearchString());

	if (voColl == null || voColl.size() == 0)
	{
		engine.showMessage("No Graphical Assessments found for the Search Criteria Provided");
		return null;
	}

	return voColl;
}
 
Example 33
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private void populateGridGraphical(GraphicAssessmentShortVoCollection voColl)
{
	GraphicAssessmentShortVo voGraphical = null;

	for (int i = 0; voColl != null && i < voColl.size(); i++)
	{
		voGraphical = voColl.get(i);
		if (voGraphical.getActiveStatusIsNotNull() && voGraphical.getActiveStatus().equals(PreActiveActiveInactiveStatus.ACTIVE))
		{
			grdAssessmentRow rowSelect = form.lyr1().tabSearch().grdAssessment().getRows().newRow();
			rowSelect.setcolName(voGraphical.getName());
			rowSelect.setValue(voGraphical);
		}
	}
}
 
Example 34
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private void initialiseScreen()
{
	if(form.getGlobalContext().Core.getGraphicAssessmentSearchFilterIsNotNull())
	{
		GraphicAssessmentFilterVo voGraphicAssessmentFilter = form.getGlobalContext().Core.getGraphicAssessmentSearchFilter();
		if(voGraphicAssessmentFilter != null)
		{
			form.txtName().setValue(voGraphicAssessmentFilter.getName());
			form.cmbStatus().setValue(voGraphicAssessmentFilter.getStatus());
			form.cmbType().setValue(voGraphicAssessmentFilter.getType());
			form.GroupCriteria().setValue(getGroupCriteria(voGraphicAssessmentFilter));
			search();
		}
	}
	else
	{
		GraphicAssessmentShortVo voGraphicAssessmentShort = form.getGlobalContext().Core.getGraphicAssessmentShortVo();
		if(voGraphicAssessmentShort != null && voGraphicAssessmentShort.getID_GraphicAssessmentIsNotNull())
		{
			clearGrid();
			GraphicAssessmentShortVoCollection voColl = new GraphicAssessmentShortVoCollection();
			voColl.add(voGraphicAssessmentShort);
			displayCollection(voColl);
		}
		setDefaultData();
	}
}
 
Example 35
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private void doSearch(boolean checkMandatory)
{
	String name = form.txtName().getValue();
	PreActiveActiveInactiveStatus status = form.cmbStatus().getValue();
	
	if (name != null)
		name = name.trim();
	if(checkMandatory)
	{
		if ((name == null || name.length() == 0) && status == null)
		{
			engine.showMessage("Please enter a name");
			form.txtName().setFocus();
			return;
		}
	}

	GroupCriteriaEnumeration groupCriteria = form.GroupCriteria().getValue();
	if (name != null && groupCriteria != null)
	{
		if (groupCriteria.equals(GroupCriteriaEnumeration.rdoBegins))
		{
			name = name + "%";
		}
		if (groupCriteria.equals(GroupCriteriaEnumeration.rdoContains))
		{
			name = "%" + name + "%";
		}
	}
	
	GraphicAssessmentShortVoCollection voColl = domain.listAssessments(name, status, getUserDefinedTypes(form.cmbType().getValue()));
	if(voColl == null || voColl.size() == 0)
	{
		engine.showMessage("No Graphic Assessments found for the Search Criteria Provided");
		return;
	}
	displayCollection(voColl);
}
 
Example 36
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private void displayCollection(GraphicAssessmentShortVoCollection voColl)
{
	if (voColl != null)
	{
		GraphicAssessmentShortVo voGraphicAssessmentShort = null;
		for (int i = 0; i < voColl.size(); i++)
		{
			voGraphicAssessmentShort = voColl.get(i);
			displayRow(form.grdDetails().getRows().newRow(), voGraphicAssessmentShort);
		}
	}
}
 
Example 37
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
protected void onBtnEditClick() throws PresentationLogicException
{
	
	GraphicAssessmentShortVoCollection tempColVo = domain.getGraphicAssessmentByImage(form.grdImages().getValue());
	if (tempColVo != null && tempColVo.size() > 0)
	{
		String strAssess = new String();
		for (int i = 0; i < tempColVo.size(); i++)
		{
			strAssess += tempColVo.get(i).getName();
			// it is hardcoded because we will display maxim 4 assessment on dialog confirmation
			if (i == 4)
			{
				if (tempColVo.size() > 4)
					strAssess += "...";

				break;
			}
			else if (i < tempColVo.size() - 1)
				strAssess += ",";
		}
		engine.showMessage("This image is used in  " + tempColVo.size() + " Assessments. - " + strAssess + ".\n Please confirm if you want to edit this image ", "Confirmation", MessageButtons.CONFIRMCANCEL, MessageIcon.QUESTION);
		return;
	}

	form.setMode(FormMode.EDIT);
	clearDetails();
	form.getLocalContext().setEditdRecord(Boolean.TRUE);
	form.getLocalContext().setCurrentImage(form.grdImages().getValue());

}
 
Example 38
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private void searchAssesment(Object hcp)
{
	//wdev-16116
	Specialty spec = null;
	if( hcp instanceof MedicVo)
		spec = ((MedicVo)hcp).getSpecialty();
	else if (hcp instanceof NurseVo)
		spec = ((NurseVo)hcp).getSpecialty();
	else if ( hcp instanceof TherapistVo)
		spec = ((TherapistVo)hcp).getSpecialty();
	
	GraphicAssessmentShortVoCollection assessments = domain.listGraphicalAssesments(spec, form.txtName().getValue());	//wdev-16116
	if (assessments == null || assessments.size()==0)
	{
		engine.showMessage( "No results found","No Results", MessageButtons.OK, MessageIcon.INFORMATION);
		return;
	}
	if (assessments.size()==1)
	{
		
		populateScreenFromData(assessments.get(0));
		form.setMode(FormMode.EDIT);
		return;
	}
	Object[] args = new Object[3];
	args[0] = assessments;
	args[1] = form.txtName().getValue();
	args[2] = Boolean.FALSE;
	engine.open(form.getForms().Clinical.SearchGraphicalAssessment,args);
	
}
 
Example 39
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private void open(Object[] args)
{
	if (validateArgs(args))
	{
		populateSearchFilterFromData((String) args[1]);
		populateGridFromData((GraphicAssessmentShortVoCollection) args[0]);
		form.getLocalContext().setAllowSearch((Boolean) args[2]);
	}
	form.setMode(FormMode.EDIT);
	updateControlState();
}
 
Example 40
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private boolean validateArgs(Object[] args)
{
	if (!(args[0] instanceof GraphicAssessmentShortVoCollection && ((GraphicAssessmentShortVoCollection)args[0]).size()>0))
	{
		return false;
	}
	if (!(args[1] instanceof String && ((String)args[1]).length()>2))
	{
		return false;
	}
	if (!(args[2] instanceof Boolean))
		return false;
	
	return true;
}