Java Code Examples for ims.assessment.vo.UserAssessmentLiteVo

The following are top voted examples for showing how to use ims.assessment.vo.UserAssessmentLiteVo. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateAssessments(UserAssessmentLiteVoCollection assessments)
{
	// Clear assessments
	form.lyrConfig().tabTGroup().lyrGroupDetails().tabPageGroupDetails().qmbLinkedAssessment().clear();
	
	if (assessments == null)
		return;
	
	for (UserAssessmentLiteVo userAssessment : assessments)
	{
		form.lyrConfig().tabTGroup().lyrGroupDetails().tabPageGroupDetails().qmbLinkedAssessment().newRow(userAssessment, userAssessment.getName());
	}
	
	if (assessments.size() == 1)
	{
		form.lyrConfig().tabTGroup().lyrGroupDetails().tabPageGroupDetails().qmbLinkedAssessment().setValue(assessments.get(0));
	}
	else
	{
		form.lyrConfig().tabTGroup().lyrGroupDetails().tabPageGroupDetails().qmbLinkedAssessment().showOpened();
	}
}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onImbSearchClick() throws ims.framework.exceptions.PresentationLogicException
{
	form.grdDetails().getRows().clear();
	
	if(form.txtCriteria().getValue() == null)
	{
		engine.showMessage("Please enter some search criteria");
		return;
	}
	
	UserAssessmentLiteVoCollection voCollUserAssessments = domain.listActiveUserAssessmentsByName(form.txtCriteria().getValue().toUpperCase());
	if(voCollUserAssessments != null && voCollUserAssessments.size() > 0)		//wdev-10815
	{
		for (UserAssessmentLiteVo voUserassementLite : voCollUserAssessments)
		{
			grdDetailsRow row = form.grdDetails().getRows().newRow();
			row.setColumn1(voUserassementLite.getName());
			row.setValue(voUserassementLite);
		}
	}
	else
	{
		engine.showMessage("No Assessments Found");
	}
}
 
Example 3
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private AppNavFormVo createFormForAssessment(ValueObjectRef refVo, AppFormVo assesmentForm)
{
	AppNavFormVo newForm = new AppNavFormVo();
	newForm.setForm(assesmentForm);
	GenericIdentifierVoCollection coll = new GenericIdentifierVoCollection();

	GenericIdentifierVo genVo = new GenericIdentifierVo();
	genVo.setInstanceId(refVo.getBoId());
	genVo.setClassName(refVo.getClass().getName());
	coll.add(genVo);
	newForm.setLinkedClasses(coll);

	newForm.setAccessForEpisEnd(FormReadWrite.WRITE);
	newForm.setAccessForRip(FormReadWrite.WRITE);
	newForm.setIsReadOnly(false);
	newForm.setNodeText((refVo instanceof GraphicAssessmentShortVo) ? ((GraphicAssessmentShortVo) refVo).getName() : (refVo instanceof UserAssessmentLiteVo) ? ((UserAssessmentLiteVo) refVo).getName() : null);
	return newForm;
}
 
Example 4
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateAssessments(UserAssessmentLiteVoCollection assessments)
{
	// Clear assessments
	form.lyrConfig().tabTGroup().lyrGroupDetails().tabPageGroupDetails().qmbLinkedAssessment().clear();
	
	if (assessments == null)
		return;
	
	for (UserAssessmentLiteVo userAssessment : assessments)
	{
		form.lyrConfig().tabTGroup().lyrGroupDetails().tabPageGroupDetails().qmbLinkedAssessment().newRow(userAssessment, userAssessment.getName());
	}
	
	if (assessments.size() == 1)
	{
		form.lyrConfig().tabTGroup().lyrGroupDetails().tabPageGroupDetails().qmbLinkedAssessment().setValue(assessments.get(0));
	}
	else
	{
		form.lyrConfig().tabTGroup().lyrGroupDetails().tabPageGroupDetails().qmbLinkedAssessment().showOpened();
	}
}
 
Example 5
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onImbSearchClick() throws ims.framework.exceptions.PresentationLogicException
{
	form.grdDetails().getRows().clear();
	
	if(form.txtCriteria().getValue() == null)
	{
		engine.showMessage("Please enter some search criteria");
		return;
	}
	
	UserAssessmentLiteVoCollection voCollUserAssessments = domain.listActiveUserAssessmentsByName(form.txtCriteria().getValue().toUpperCase());
	if(voCollUserAssessments != null && voCollUserAssessments.size() > 0)		//wdev-10815
	{
		for (UserAssessmentLiteVo voUserassementLite : voCollUserAssessments)
		{
			grdDetailsRow row = form.grdDetails().getRows().newRow();
			row.setColumn1(voUserassementLite.getName());
			row.setValue(voUserassementLite);
		}
	}
	else
	{
		engine.showMessage("No Assessments Found");
	}
}
 
Example 6
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private AppNavFormVo createFormForAssessment(ValueObjectRef refVo, AppFormVo assesmentForm)
{
	AppNavFormVo newForm = new AppNavFormVo();
	newForm.setForm(assesmentForm);
	GenericIdentifierVoCollection coll = new GenericIdentifierVoCollection();

	GenericIdentifierVo genVo = new GenericIdentifierVo();
	genVo.setInstanceId(refVo.getBoId());
	genVo.setClassName(refVo.getClass().getName());
	coll.add(genVo);
	newForm.setLinkedClasses(coll);

	newForm.setAccessForEpisEnd(FormReadWrite.WRITE);
	newForm.setAccessForRip(FormReadWrite.WRITE);
	newForm.setIsReadOnly(false);
	newForm.setNodeText((refVo instanceof GraphicAssessmentShortVo) ? ((GraphicAssessmentShortVo) refVo).getName() : (refVo instanceof UserAssessmentLiteVo) ? ((UserAssessmentLiteVo) refVo).getName() : null);
	return newForm;
}
 
Example 7
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateAssessments(UserAssessmentLiteVoCollection assessments)
{
	// Clear assessments
	form.lyrConfig().tabTGroup().lyrGroupDetails().tabPageGroupDetails().qmbLinkedAssessment().clear();
	
	if (assessments == null)
		return;
	
	for (UserAssessmentLiteVo userAssessment : assessments)
	{
		form.lyrConfig().tabTGroup().lyrGroupDetails().tabPageGroupDetails().qmbLinkedAssessment().newRow(userAssessment, userAssessment.getName());
	}
	
	if (assessments.size() == 1)
	{
		form.lyrConfig().tabTGroup().lyrGroupDetails().tabPageGroupDetails().qmbLinkedAssessment().setValue(assessments.get(0));
	}
	else
	{
		form.lyrConfig().tabTGroup().lyrGroupDetails().tabPageGroupDetails().qmbLinkedAssessment().showOpened();
	}
}
 
Example 8
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onImbSearchClick() throws ims.framework.exceptions.PresentationLogicException
{
	form.grdDetails().getRows().clear();
	
	if(form.txtCriteria().getValue() == null)
	{
		engine.showMessage("Please enter some search criteria");
		return;
	}
	
	UserAssessmentLiteVoCollection voCollUserAssessments = domain.listActiveUserAssessmentsByName(form.txtCriteria().getValue().toUpperCase());
	if(voCollUserAssessments != null && voCollUserAssessments.size() > 0)		//wdev-10815
	{
		for (UserAssessmentLiteVo voUserassementLite : voCollUserAssessments)
		{
			grdDetailsRow row = form.grdDetails().getRows().newRow();
			row.setColumn1(voUserassementLite.getName());
			row.setValue(voUserassementLite);
		}
	}
	else
	{
		engine.showMessage("No Assessments Found");
	}
}
 
Example 9
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private AppNavFormVo createFormForAssessment(ValueObjectRef refVo, AppFormVo assesmentForm)
{
	AppNavFormVo newForm = new AppNavFormVo();
	newForm.setForm(assesmentForm);
	GenericIdentifierVoCollection coll = new GenericIdentifierVoCollection();

	GenericIdentifierVo genVo = new GenericIdentifierVo();
	genVo.setInstanceId(refVo.getBoId());
	genVo.setClassName(refVo.getClass().getName());
	coll.add(genVo);
	newForm.setLinkedClasses(coll);

	newForm.setAccessForEpisEnd(FormReadWrite.WRITE);
	newForm.setAccessForRip(FormReadWrite.WRITE);
	newForm.setIsReadOnly(false);
	newForm.setNodeText((refVo instanceof GraphicAssessmentShortVo) ? ((GraphicAssessmentShortVo) refVo).getName() : (refVo instanceof UserAssessmentLiteVo) ? ((UserAssessmentLiteVo) refVo).getName() : null);
	return newForm;
}
 
Example 10
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateAssessments(UserAssessmentLiteVoCollection assessments)
{
	// Clear assessments
	form.lyrConfig().tabTGroup().lyrGroupDetails().tabPageGroupDetails().qmbLinkedAssessment().clear();
	
	if (assessments == null)
		return;
	
	for (UserAssessmentLiteVo userAssessment : assessments)
	{
		form.lyrConfig().tabTGroup().lyrGroupDetails().tabPageGroupDetails().qmbLinkedAssessment().newRow(userAssessment, userAssessment.getName());
	}
	
	if (assessments.size() == 1)
	{
		form.lyrConfig().tabTGroup().lyrGroupDetails().tabPageGroupDetails().qmbLinkedAssessment().setValue(assessments.get(0));
	}
	else
	{
		form.lyrConfig().tabTGroup().lyrGroupDetails().tabPageGroupDetails().qmbLinkedAssessment().showOpened();
	}
}
 
Example 11
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onImbSearchClick() throws ims.framework.exceptions.PresentationLogicException
{
	form.grdDetails().getRows().clear();
	
	if(form.txtCriteria().getValue() == null)
	{
		engine.showMessage("Please enter some search criteria");
		return;
	}
	
	UserAssessmentLiteVoCollection voCollUserAssessments = domain.listActiveUserAssessmentsByName(form.txtCriteria().getValue().toUpperCase());
	if(voCollUserAssessments != null && voCollUserAssessments.size() > 0)		//wdev-10815
	{
		for (UserAssessmentLiteVo voUserassementLite : voCollUserAssessments)
		{
			grdDetailsRow row = form.grdDetails().getRows().newRow();
			row.setColumn1(voUserassementLite.getName());
			row.setValue(voUserassementLite);
		}
	}
	else
	{
		engine.showMessage("No Assessments Found");
	}
}
 
Example 12
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private AppNavFormVo createFormForAssessment(ValueObjectRef refVo, AppFormVo assesmentForm)
{
	AppNavFormVo newForm = new AppNavFormVo();
	newForm.setForm(assesmentForm);
	GenericIdentifierVoCollection coll = new GenericIdentifierVoCollection();

	GenericIdentifierVo genVo = new GenericIdentifierVo();
	genVo.setInstanceId(refVo.getBoId());
	genVo.setClassName(refVo.getClass().getName());
	coll.add(genVo);
	newForm.setLinkedClasses(coll);

	newForm.setAccessForEpisEnd(FormReadWrite.WRITE);
	newForm.setAccessForRip(FormReadWrite.WRITE);
	newForm.setIsReadOnly(false);
	newForm.setNodeText((refVo instanceof GraphicAssessmentShortVo) ? ((GraphicAssessmentShortVo) refVo).getName() : (refVo instanceof UserAssessmentLiteVo) ? ((UserAssessmentLiteVo) refVo).getName() : null);
	return newForm;
}
 
Example 13
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private String getChildText(PatientAssessmentDataListVo voPatientAssessmentData)
{
	if(voPatientAssessmentData != null)
	{
		StringBuffer text = new StringBuffer();
		if(voPatientAssessmentData.getUserAssessmentIsNotNull())
		{
			UserAssessmentLiteVo userAssessment = voPatientAssessmentData.getUserAssessment();
			text.append(userAssessment.getName());
			text.append(" - (" );
			if(userAssessment.getAssessmentTypeIsNotNull())
			{
				if(userAssessment.getAssessmentType().equals(UserDefinedAssessmentType.USERDEFINEDDATASHEET))
					text.append("Non Scoring ");
				else if(userAssessment.getAssessmentType().equals(UserDefinedAssessmentType.ASSESSMENTTOOL))
					text.append("Scoring ");
			}
			text.append("Assessment)");
			
			return text.toString();
		}
		else if(voPatientAssessmentData.getGraphicIsNotNull())
		{
			GraphicAssessmentShortVo voGraphic = voPatientAssessmentData.getGraphic();
			text.append(voGraphic.getName());
			text.append(" - (Graphical Assessment");
			if(voGraphic.getAssessmentTypeIsNotNull())
			{
				if(voGraphic.getAssessmentType().equals(UserDefinedAssessmentType.ANNOTATEDIMAGEWITHQUESTIONS))
					text.append(" with Questions");
			}
			text.append(")");
			return text.toString();
			
		}
	}
	return "";
}
 
Example 14
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateUserAssessments(UserAssessmentLiteVoCollection voColl)
{
	form.recbrAssessments().clear();
	for (int i = 0; i < voColl.size(); i++)
	{
		UserAssessmentLiteVo vo = voColl.get(i);
		if(vo.getActiveStatusIsNotNull() && vo.getActiveStatus().equals(PreActiveActiveInactiveStatus.INACTIVE))
			continue;
		
		form.recbrAssessments().newRow(voColl.get(i), getUserAssessmentName(vo));
	}
	if (form.recbrAssessments().getSelectedIndex() >= 0)
		assessmentValueChanged();
}
 
Example 15
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private String getUserAssessmentName(UserAssessmentLiteVo vo)
{
	StringBuffer sb = new StringBuffer();
	if(vo != null)
	{
		if(vo.getNameIsNotNull())
		{
			sb.append(vo.getName());
		}
		
		if(vo.getActiveStatusIsNotNull())
		{
			if(sb.length() > 0)
				sb.append(",  Status: ");
			sb.append(vo.getActiveStatus());
		}
		
		if(vo.getSystemInfoIsNotNull())
		{
			if(sb.length() > 0)
				sb.append(",  Creating User: ");
			
			if(vo.getSystemInfo().getCreationUser() != null)
			{
				sb.append(vo.getSystemInfo().getCreationUser());
				
			}
			
			if(vo.getSystemInfo().getCreationDateTime() != null)
			{
				if(sb.length() > 0)
					sb.append(", ");
				sb.append(vo.getSystemInfo().getCreationDateTime());
			}
			
		}
	}
	
	return sb.toString();
}
 
Example 16
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateGridFromData(UserAssessmentLiteVo value)
{
	if(value != null)
	{
		UserAssessmentVo voUserAssessment = domain.getUserAssessment(value);
		populateDetailsGrid(voUserAssessment);
		form.getLocalContext().setUserAssessmentVo(voUserAssessment);
		//Refresh the value from the navigator - to avoid Stale Object Exceptions
		form.recbrAssessments().setValue(voUserAssessment);
	}
	
	enableNewUpdateButtons();
}
 
Example 17
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void assessmentValueChanged()
{
	UserAssessmentLiteVo value = form.recbrAssessments().getValue();
	if(value != null)
		populateGridFromData(value);
	else
		engine.showMessage("Please select an User Assessment");
}
 
Example 18
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private String getChildText(PatientAssessmentDataListVo voPatientAssessmentData)
{
	if(voPatientAssessmentData != null)
	{
		StringBuffer text = new StringBuffer();
		if(voPatientAssessmentData.getUserAssessmentIsNotNull())
		{
			UserAssessmentLiteVo userAssessment = voPatientAssessmentData.getUserAssessment();
			text.append(userAssessment.getName());
			text.append(" - (" );
			if(userAssessment.getAssessmentTypeIsNotNull())
			{
				if(userAssessment.getAssessmentType().equals(UserDefinedAssessmentType.USERDEFINEDDATASHEET))
					text.append("Non Scoring ");
				else if(userAssessment.getAssessmentType().equals(UserDefinedAssessmentType.ASSESSMENTTOOL))
					text.append("Scoring ");
			}
			text.append("Assessment)");
			
			return text.toString();
		}
		else if(voPatientAssessmentData.getGraphicIsNotNull())
		{
			GraphicAssessmentShortVo voGraphic = voPatientAssessmentData.getGraphic();
			text.append(voGraphic.getName());
			text.append(" - (Graphical Assessment");
			if(voGraphic.getAssessmentTypeIsNotNull())
			{
				if(voGraphic.getAssessmentType().equals(UserDefinedAssessmentType.ANNOTATEDIMAGEWITHQUESTIONS))
					text.append(" with Questions");
			}
			text.append(")");
			return text.toString();
			
		}
	}
	return "";
}
 
Example 19
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private String getNavFormTooltip(AppNavFormVo af)
{
	StringBuffer sb = new StringBuffer();
	
	if(af.getAppForm().isAlias())
	{
		sb.append("<b>Form : </b>"+af.getForm().getName()+" ("+af.getAppForm().getAliasName()+")");
	}
	else
	{
		sb.append("<b>Form : </b>" + af.getForm().getName());
	}
	sb.append("<br><b>RIP : </b>" + af.getFormAccessForRip().toString());
	sb.append("<br><b>EPIS : </b>" + af.getFormAccessForEpisEnd().toString());
	if (af.getLinkedClasses() != null && af.getLinkedClasses().size() > 0)
	{
		GenericIdentifierVo genId = af.getLinkedClasses().get(0);
		ValueObjectRef voRef = (ValueObjectRef)GenericIdentifierFactory.instantiate(genId);
		ValueObject assess = domain.getAssessment(voRef);
		if (assess instanceof UserAssessmentLiteVo)
		{
			genId.setClassType(STRUCTURED_ASSESSMENT);
			UserAssessmentLiteVo userAssess = (UserAssessmentLiteVo)assess;
			sb.append("<br><b>Structured Assessment : </b>" + userAssess.getName());				
		}
		else if (assess instanceof GraphicAssessmentShortVo)
		{
			genId.setClassType(GRAPHIC_ASSESSMENT);
			GraphicAssessmentShortVo graphicAssess = (GraphicAssessmentShortVo)assess;
			sb.append("<br><b>Graphic Assessment : </b>" + graphicAssess.getName());
		}
	}		
	return sb.toString();
}
 
Example 20
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
@Override
protected void onFormDialogClosed(FormName formName, DialogResult result) throws PresentationLogicException 
{
	// TODO Review code here
	if (form.getForms().Assessment.AssessmentsForSpecialty.equals(formName) && DialogResult.OK.equals(result))
	{
		UserAssessmentLiteVo userAssessmentLite = form.getGlobalContext().Core.getSelectedUserAssessmentLite();
		form.getLocalContext().setSelectedUserAssessmentLite(userAssessmentLite);
		form.ctnStructural().ccStructuralAssessment().setPatientAssessment(populatePatientAssessmentVo(userAssessmentLite),false,PatientAssessmentInfoVo.getInstance(form.getGlobalContext().Core.getPatientShort()));
		form.ctnStructural().setVisible(true);
		
		form.ctnGraphical().setVisible(false);
		
		// Set form to EDIT mode
		form.getLocalContext().setEditingGraphicalAssessment(Boolean.FALSE);
		form.setMode(FormMode.EDIT);
	}
	else if(form.getForms().Assessment.GraphicAssessmentsForSpecialty.equals(formName) && DialogResult.OK.equals(result))
	{
		openGraphicAssessment();
		
		// Set form to EDIT mode
		form.getLocalContext().setEditingGraphicalAssessment(Boolean.TRUE);
		form.setMode(FormMode.EDIT);
	}
	else
	{
		open();
	}
}
 
Example 21
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private String getChildText(PatientAssessmentDataListVo voPatientAssessmentData)
{
	if (voPatientAssessmentData != null)
	{
		StringBuffer text = new StringBuffer();
		if (voPatientAssessmentData.getUserAssessmentIsNotNull())
		{
			UserAssessmentLiteVo userAssessment = voPatientAssessmentData.getUserAssessment();
			text.append(userAssessment.getName());
			text.append(" - (");
			if (userAssessment.getAssessmentTypeIsNotNull())
			{
				if (userAssessment.getAssessmentType().equals(UserDefinedAssessmentType.USERDEFINEDDATASHEET))
					text.append("Non Scoring ");
				else if (userAssessment.getAssessmentType().equals(UserDefinedAssessmentType.ASSESSMENTTOOL))
					text.append("Scoring ");
			}
			text.append("Assessment)");

			return text.toString();
		}
		else if (voPatientAssessmentData.getGraphicIsNotNull())
		{
			GraphicAssessmentShortVo voGraphic = voPatientAssessmentData.getGraphic();
			text.append(voGraphic.getName());
			text.append(" - (Graphical Assessment");
			if (voGraphic.getAssessmentTypeIsNotNull())
			{
				if (voGraphic.getAssessmentType().equals(UserDefinedAssessmentType.ANNOTATEDIMAGEWITHQUESTIONS))
					text.append(" with Questions");
			}
			text.append(")");
			return text.toString();

		}
	}
	return "";
}
 
Example 22
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private String getChildText(PatientAssessmentDataListVo voPatientAssessmentData)
{
	if(voPatientAssessmentData != null)
	{
		StringBuffer text = new StringBuffer();
		if(voPatientAssessmentData.getUserAssessmentIsNotNull())
		{
			UserAssessmentLiteVo userAssessment = voPatientAssessmentData.getUserAssessment();
			text.append(userAssessment.getName());
			text.append(" - (" );
			if(userAssessment.getAssessmentTypeIsNotNull())
			{
				if(userAssessment.getAssessmentType().equals(UserDefinedAssessmentType.USERDEFINEDDATASHEET))
					text.append("Non Scoring ");
				else if(userAssessment.getAssessmentType().equals(UserDefinedAssessmentType.ASSESSMENTTOOL))
					text.append("Scoring ");
			}
			text.append("Assessment)");
			
			return text.toString();
		}
		else if(voPatientAssessmentData.getGraphicIsNotNull())
		{
			GraphicAssessmentShortVo voGraphic = voPatientAssessmentData.getGraphic();
			text.append(voGraphic.getName());
			text.append(" - (Graphical Assessment");
			if(voGraphic.getAssessmentTypeIsNotNull())
			{
				if(voGraphic.getAssessmentType().equals(UserDefinedAssessmentType.ANNOTATEDIMAGEWITHQUESTIONS))
					text.append(" with Questions");
			}
			text.append(")");
			return text.toString();
			
		}
	}
	return "";
}
 
Example 23
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateUserAssessments(UserAssessmentLiteVoCollection voColl)
{
	form.recbrAssessments().clear();
	for (int i = 0; i < voColl.size(); i++)
	{
		UserAssessmentLiteVo vo = voColl.get(i);
		if(vo.getActiveStatusIsNotNull() && vo.getActiveStatus().equals(PreActiveActiveInactiveStatus.INACTIVE))
			continue;
		
		form.recbrAssessments().newRow(voColl.get(i), getUserAssessmentName(vo));
	}
	if (form.recbrAssessments().getSelectedIndex() >= 0)
		assessmentValueChanged();
}
 
Example 24
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private String getUserAssessmentName(UserAssessmentLiteVo vo)
{
	StringBuffer sb = new StringBuffer();
	if(vo != null)
	{
		if(vo.getNameIsNotNull())
		{
			sb.append(vo.getName());
		}
		
		if(vo.getActiveStatusIsNotNull())
		{
			if(sb.length() > 0)
				sb.append(",  Status: ");
			sb.append(vo.getActiveStatus());
		}
		
		if(vo.getSystemInfoIsNotNull())
		{
			if(sb.length() > 0)
				sb.append(",  Creating User: ");
			
			if(vo.getSystemInfo().getCreationUser() != null)
			{
				sb.append(vo.getSystemInfo().getCreationUser());
				
			}
			
			if(vo.getSystemInfo().getCreationDateTime() != null)
			{
				if(sb.length() > 0)
					sb.append(", ");
				sb.append(vo.getSystemInfo().getCreationDateTime());
			}
			
		}
	}
	
	return sb.toString();
}
 
Example 25
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateGridFromData(UserAssessmentLiteVo value)
{
	if(value != null)
	{
		UserAssessmentVo voUserAssessment = domain.getUserAssessment(value);
		populateDetailsGrid(voUserAssessment);
		form.getLocalContext().setUserAssessmentVo(voUserAssessment);
		//Refresh the value from the navigator - to avoid Stale Object Exceptions
		form.recbrAssessments().setValue(voUserAssessment);
	}
	
	enableNewUpdateButtons();
}
 
Example 26
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void assessmentValueChanged()
{
	UserAssessmentLiteVo value = form.recbrAssessments().getValue();
	if(value != null)
		populateGridFromData(value);
	else
		engine.showMessage("Please select an User Assessment");
}
 
Example 27
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private String getChildText(PatientAssessmentDataListVo voPatientAssessmentData)
{
	if(voPatientAssessmentData != null)
	{
		StringBuffer text = new StringBuffer();
		if(voPatientAssessmentData.getUserAssessmentIsNotNull())
		{
			UserAssessmentLiteVo userAssessment = voPatientAssessmentData.getUserAssessment();
			text.append(userAssessment.getName());
			text.append(" - (" );
			if(userAssessment.getAssessmentTypeIsNotNull())
			{
				if(userAssessment.getAssessmentType().equals(UserDefinedAssessmentType.USERDEFINEDDATASHEET))
					text.append("Non Scoring ");
				else if(userAssessment.getAssessmentType().equals(UserDefinedAssessmentType.ASSESSMENTTOOL))
					text.append("Scoring ");
			}
			text.append("Assessment)");
			
			return text.toString();
		}
		else if(voPatientAssessmentData.getGraphicIsNotNull())
		{
			GraphicAssessmentShortVo voGraphic = voPatientAssessmentData.getGraphic();
			text.append(voGraphic.getName());
			text.append(" - (Graphical Assessment");
			if(voGraphic.getAssessmentTypeIsNotNull())
			{
				if(voGraphic.getAssessmentType().equals(UserDefinedAssessmentType.ANNOTATEDIMAGEWITHQUESTIONS))
					text.append(" with Questions");
			}
			text.append(")");
			return text.toString();
			
		}
	}
	return "";
}
 
Example 28
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private String getNavFormTooltip(AppNavFormVo af)
{
	StringBuffer sb = new StringBuffer();
	
	if(af.getAppForm().isAlias())
	{
		sb.append("<b>Form : </b>"+af.getForm().getName()+" ("+af.getAppForm().getAliasName()+")");
	}
	else
	{
		sb.append("<b>Form : </b>" + af.getForm().getName());
	}
	sb.append("<br><b>RIP : </b>" + af.getFormAccessForRip().toString());
	sb.append("<br><b>EPIS : </b>" + af.getFormAccessForEpisEnd().toString());
	if (af.getLinkedClasses() != null && af.getLinkedClasses().size() > 0)
	{
		GenericIdentifierVo genId = af.getLinkedClasses().get(0);
		ValueObjectRef voRef = (ValueObjectRef)GenericIdentifierFactory.instantiate(genId);
		ValueObject assess = domain.getAssessment(voRef);
		if (assess instanceof UserAssessmentLiteVo)
		{
			genId.setClassType(STRUCTURED_ASSESSMENT);
			UserAssessmentLiteVo userAssess = (UserAssessmentLiteVo)assess;
			sb.append("<br><b>Structured Assessment : </b>" + userAssess.getName());				
		}
		else if (assess instanceof GraphicAssessmentShortVo)
		{
			genId.setClassType(GRAPHIC_ASSESSMENT);
			GraphicAssessmentShortVo graphicAssess = (GraphicAssessmentShortVo)assess;
			sb.append("<br><b>Graphic Assessment : </b>" + graphicAssess.getName());
		}
	}		
	return sb.toString();
}
 
Example 29
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
@Override
protected void onFormDialogClosed(FormName formName, DialogResult result) throws PresentationLogicException 
{
	// TODO Review code here
	if (form.getForms().Assessment.AssessmentsForSpecialty.equals(formName) && DialogResult.OK.equals(result))
	{
		UserAssessmentLiteVo userAssessmentLite = form.getGlobalContext().Core.getSelectedUserAssessmentLite();
		form.getLocalContext().setSelectedUserAssessmentLite(userAssessmentLite);
		form.ctnStructural().ccStructuralAssessment().setPatientAssessment(populatePatientAssessmentVo(userAssessmentLite),false,PatientAssessmentInfoVo.getInstance(form.getGlobalContext().Core.getPatientShort()));
		form.ctnStructural().setVisible(true);
		
		form.ctnGraphical().setVisible(false);
		
		// Set form to EDIT mode
		form.getLocalContext().setEditingGraphicalAssessment(Boolean.FALSE);
		form.setMode(FormMode.EDIT);
	}
	else if(form.getForms().Assessment.GraphicAssessmentsForSpecialty.equals(formName) && DialogResult.OK.equals(result))
	{
		openGraphicAssessment();
		
		// Set form to EDIT mode
		form.getLocalContext().setEditingGraphicalAssessment(Boolean.TRUE);
		form.setMode(FormMode.EDIT);
	}
	else
	{
		open();
	}
}
 
Example 30
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private String getChildText(PatientAssessmentDataListVo voPatientAssessmentData)
{
	if (voPatientAssessmentData != null)
	{
		StringBuffer text = new StringBuffer();
		if (voPatientAssessmentData.getUserAssessmentIsNotNull())
		{
			UserAssessmentLiteVo userAssessment = voPatientAssessmentData.getUserAssessment();
			text.append(userAssessment.getName());
			text.append(" - (");
			if (userAssessment.getAssessmentTypeIsNotNull())
			{
				if (userAssessment.getAssessmentType().equals(UserDefinedAssessmentType.USERDEFINEDDATASHEET))
					text.append("Non Scoring ");
				else if (userAssessment.getAssessmentType().equals(UserDefinedAssessmentType.ASSESSMENTTOOL))
					text.append("Scoring ");
			}
			text.append("Assessment)");

			return text.toString();
		}
		else if (voPatientAssessmentData.getGraphicIsNotNull())
		{
			GraphicAssessmentShortVo voGraphic = voPatientAssessmentData.getGraphic();
			text.append(voGraphic.getName());
			text.append(" - (Graphical Assessment");
			if (voGraphic.getAssessmentTypeIsNotNull())
			{
				if (voGraphic.getAssessmentType().equals(UserDefinedAssessmentType.ANNOTATEDIMAGEWITHQUESTIONS))
					text.append(" with Questions");
			}
			text.append(")");
			return text.toString();

		}
	}
	return "";
}
 
Example 31
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private String getChildText(PatientAssessmentDataListVo voPatientAssessmentData)
{
	if(voPatientAssessmentData != null)
	{
		StringBuffer text = new StringBuffer();
		if(voPatientAssessmentData.getUserAssessmentIsNotNull())
		{
			UserAssessmentLiteVo userAssessment = voPatientAssessmentData.getUserAssessment();
			text.append(userAssessment.getName());
			text.append(" - (" );
			if(userAssessment.getAssessmentTypeIsNotNull())
			{
				if(userAssessment.getAssessmentType().equals(UserDefinedAssessmentType.USERDEFINEDDATASHEET))
					text.append("Non Scoring ");
				else if(userAssessment.getAssessmentType().equals(UserDefinedAssessmentType.ASSESSMENTTOOL))
					text.append("Scoring ");
			}
			text.append("Assessment)");
			
			return text.toString();
		}
		else if(voPatientAssessmentData.getGraphicIsNotNull())
		{
			GraphicAssessmentShortVo voGraphic = voPatientAssessmentData.getGraphic();
			text.append(voGraphic.getName());
			text.append(" - (Graphical Assessment");
			if(voGraphic.getAssessmentTypeIsNotNull())
			{
				if(voGraphic.getAssessmentType().equals(UserDefinedAssessmentType.ANNOTATEDIMAGEWITHQUESTIONS))
					text.append(" with Questions");
			}
			text.append(")");
			return text.toString();
			
		}
	}
	return "";
}
 
Example 32
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateUserAssessments(UserAssessmentLiteVoCollection voColl)
{
	form.recbrAssessments().clear();
	for (int i = 0; i < voColl.size(); i++)
	{
		UserAssessmentLiteVo vo = voColl.get(i);
		if(vo.getActiveStatusIsNotNull() && vo.getActiveStatus().equals(PreActiveActiveInactiveStatus.INACTIVE))
			continue;
		
		form.recbrAssessments().newRow(voColl.get(i), getUserAssessmentName(vo));
	}
	if (form.recbrAssessments().getSelectedIndex() >= 0)
		assessmentValueChanged();
}
 
Example 33
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private String getUserAssessmentName(UserAssessmentLiteVo vo)
{
	StringBuffer sb = new StringBuffer();
	if(vo != null)
	{
		if(vo.getNameIsNotNull())
		{
			sb.append(vo.getName());
		}
		
		if(vo.getActiveStatusIsNotNull())
		{
			if(sb.length() > 0)
				sb.append(",  Status: ");
			sb.append(vo.getActiveStatus());
		}
		
		if(vo.getSystemInfoIsNotNull())
		{
			if(sb.length() > 0)
				sb.append(",  Creating User: ");
			
			if(vo.getSystemInfo().getCreationUser() != null)
			{
				sb.append(vo.getSystemInfo().getCreationUser());
				
			}
			
			if(vo.getSystemInfo().getCreationDateTime() != null)
			{
				if(sb.length() > 0)
					sb.append(", ");
				sb.append(vo.getSystemInfo().getCreationDateTime());
			}
			
		}
	}
	
	return sb.toString();
}
 
Example 34
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateGridFromData(UserAssessmentLiteVo value)
{
	if(value != null)
	{
		UserAssessmentVo voUserAssessment = domain.getUserAssessment(value);
		populateDetailsGrid(voUserAssessment);
		form.getLocalContext().setUserAssessmentVo(voUserAssessment);
		//Refresh the value from the navigator - to avoid Stale Object Exceptions
		form.recbrAssessments().setValue(voUserAssessment);
	}
	
	enableNewUpdateButtons();
}
 
Example 35
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void assessmentValueChanged()
{
	UserAssessmentLiteVo value = form.recbrAssessments().getValue();
	if(value != null)
		populateGridFromData(value);
	else
		engine.showMessage("Please select an User Assessment");
}
 
Example 36
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private String getChildText(PatientAssessmentDataListVo voPatientAssessmentData)
{
	if(voPatientAssessmentData != null)
	{
		StringBuffer text = new StringBuffer();
		if(voPatientAssessmentData.getUserAssessmentIsNotNull())
		{
			UserAssessmentLiteVo userAssessment = voPatientAssessmentData.getUserAssessment();
			text.append(userAssessment.getName());
			text.append(" - (" );
			if(userAssessment.getAssessmentTypeIsNotNull())
			{
				if(userAssessment.getAssessmentType().equals(UserDefinedAssessmentType.USERDEFINEDDATASHEET))
					text.append("Non Scoring ");
				else if(userAssessment.getAssessmentType().equals(UserDefinedAssessmentType.ASSESSMENTTOOL))
					text.append("Scoring ");
			}
			text.append("Assessment)");
			
			return text.toString();
		}
		else if(voPatientAssessmentData.getGraphicIsNotNull())
		{
			GraphicAssessmentShortVo voGraphic = voPatientAssessmentData.getGraphic();
			text.append(voGraphic.getName());
			text.append(" - (Graphical Assessment");
			if(voGraphic.getAssessmentTypeIsNotNull())
			{
				if(voGraphic.getAssessmentType().equals(UserDefinedAssessmentType.ANNOTATEDIMAGEWITHQUESTIONS))
					text.append(" with Questions");
			}
			text.append(")");
			return text.toString();
			
		}
	}
	return "";
}
 
Example 37
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private String getNavFormTooltip(AppNavFormVo af)
{
	StringBuffer sb = new StringBuffer();
	
	if(af.getAppForm().isAlias())
	{
		sb.append("<b>Form : </b>"+af.getForm().getName()+" ("+af.getAppForm().getAliasName()+")");
	}
	else
	{
		sb.append("<b>Form : </b>" + af.getForm().getName());
	}
	sb.append("<br><b>RIP : </b>" + af.getFormAccessForRip().toString());
	sb.append("<br><b>EPIS : </b>" + af.getFormAccessForEpisEnd().toString());
	if (af.getLinkedClasses() != null && af.getLinkedClasses().size() > 0)
	{
		GenericIdentifierVo genId = af.getLinkedClasses().get(0);
		ValueObjectRef voRef = (ValueObjectRef)GenericIdentifierFactory.instantiate(genId);
		ValueObject assess = domain.getAssessment(voRef);
		if (assess instanceof UserAssessmentLiteVo)
		{
			genId.setClassType(STRUCTURED_ASSESSMENT);
			UserAssessmentLiteVo userAssess = (UserAssessmentLiteVo)assess;
			sb.append("<br><b>Structured Assessment : </b>" + userAssess.getName());				
		}
		else if (assess instanceof GraphicAssessmentShortVo)
		{
			genId.setClassType(GRAPHIC_ASSESSMENT);
			GraphicAssessmentShortVo graphicAssess = (GraphicAssessmentShortVo)assess;
			sb.append("<br><b>Graphic Assessment : </b>" + graphicAssess.getName());
		}
	}		
	return sb.toString();
}
 
Example 38
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
@Override
protected void onFormDialogClosed(FormName formName, DialogResult result) throws PresentationLogicException 
{
	// TODO Review code here
	if (form.getForms().Assessment.AssessmentsForSpecialty.equals(formName) && DialogResult.OK.equals(result))
	{
		UserAssessmentLiteVo userAssessmentLite = form.getGlobalContext().Core.getSelectedUserAssessmentLite();
		form.getLocalContext().setSelectedUserAssessmentLite(userAssessmentLite);
		form.ctnStructural().ccStructuralAssessment().setPatientAssessment(populatePatientAssessmentVo(userAssessmentLite),false,PatientAssessmentInfoVo.getInstance(form.getGlobalContext().Core.getPatientShort()));
		form.ctnStructural().setVisible(true);
		
		form.ctnGraphical().setVisible(false);
		
		// Set form to EDIT mode
		form.getLocalContext().setEditingGraphicalAssessment(Boolean.FALSE);
		form.setMode(FormMode.EDIT);
	}
	else if(form.getForms().Assessment.GraphicAssessmentsForSpecialty.equals(formName) && DialogResult.OK.equals(result))
	{
		openGraphicAssessment();
		
		// Set form to EDIT mode
		form.getLocalContext().setEditingGraphicalAssessment(Boolean.TRUE);
		form.setMode(FormMode.EDIT);
	}
	else
	{
		open();
	}
}
 
Example 39
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private String getChildText(PatientAssessmentDataListVo voPatientAssessmentData)
{
	if (voPatientAssessmentData != null)
	{
		StringBuffer text = new StringBuffer();
		if (voPatientAssessmentData.getUserAssessmentIsNotNull())
		{
			UserAssessmentLiteVo userAssessment = voPatientAssessmentData.getUserAssessment();
			text.append(userAssessment.getName());
			text.append(" - (");
			if (userAssessment.getAssessmentTypeIsNotNull())
			{
				if (userAssessment.getAssessmentType().equals(UserDefinedAssessmentType.USERDEFINEDDATASHEET))
					text.append("Non Scoring ");
				else if (userAssessment.getAssessmentType().equals(UserDefinedAssessmentType.ASSESSMENTTOOL))
					text.append("Scoring ");
			}
			text.append("Assessment)");

			return text.toString();
		}
		else if (voPatientAssessmentData.getGraphicIsNotNull())
		{
			GraphicAssessmentShortVo voGraphic = voPatientAssessmentData.getGraphic();
			text.append(voGraphic.getName());
			text.append(" - (Graphical Assessment");
			if (voGraphic.getAssessmentTypeIsNotNull())
			{
				if (voGraphic.getAssessmentType().equals(UserDefinedAssessmentType.ANNOTATEDIMAGEWITHQUESTIONS))
					text.append(" with Questions");
			}
			text.append(")");
			return text.toString();

		}
	}
	return "";
}
 
Example 40
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private String getChildText(PatientAssessmentDataListVo voPatientAssessmentData)
{
	if(voPatientAssessmentData != null)
	{
		StringBuffer text = new StringBuffer();
		if(voPatientAssessmentData.getUserAssessmentIsNotNull())
		{
			UserAssessmentLiteVo userAssessment = voPatientAssessmentData.getUserAssessment();
			text.append(userAssessment.getName());
			text.append(" - (" );
			if(userAssessment.getAssessmentTypeIsNotNull())
			{
				if(userAssessment.getAssessmentType().equals(UserDefinedAssessmentType.USERDEFINEDDATASHEET))
					text.append("Non Scoring ");
				else if(userAssessment.getAssessmentType().equals(UserDefinedAssessmentType.ASSESSMENTTOOL))
					text.append("Scoring ");
			}
			text.append("Assessment)");
			
			return text.toString();
		}
		else if(voPatientAssessmentData.getGraphicIsNotNull())
		{
			GraphicAssessmentShortVo voGraphic = voPatientAssessmentData.getGraphic();
			text.append(voGraphic.getName());
			text.append(" - (Graphical Assessment");
			if(voGraphic.getAssessmentTypeIsNotNull())
			{
				if(voGraphic.getAssessmentType().equals(UserDefinedAssessmentType.ANNOTATEDIMAGEWITHQUESTIONS))
					text.append(" with Questions");
			}
			text.append(")");
			return text.toString();
			
		}
	}
	return "";
}