Java Code Examples for ims.assessment.vo.GraphicAssessmentFindingVoCollection

The following are top voted examples for showing how to use ims.assessment.vo.GraphicAssessmentFindingVoCollection. 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 DrawingGraphicFindingVo getGraphicFinding(int brushId)
{
	PatientAssessmentVo patientAssessmentVo = form.getLocalContext().getPatientAssessment();
	
	if(patientAssessmentVo == null || patientAssessmentVo.getAssessmentData() == null)
		return null;
	
	PatientAssessmentDataVo voPatAssessmentData = patientAssessmentVo.getAssessmentData();
	
	GraphicAssessmentFindingVoCollection findingColl = voPatAssessmentData.getGraphic().getFindingsAndQuestions();

	if (findingColl != null)
	{
		for (int i = 0; i < findingColl.size(); i++)
		{
			if (findingColl.get(i).getFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFinding().intValue() == brushId)
			{
				return findingColl.get(i).getFinding();
			}
		}
	}

	return null;
}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private DrawingGraphicFindingVo getGraphicFinding(int brushId)
{
	DrawingGraphicImageVo voDrawingGraphicImage = form.getLocalContext().getCurrentImage();

	GraphicAssessmentFindingVoCollection findingColl = getFindingCollection(voDrawingGraphicImage);
	GraphicAssessmentFindingVo voGraphicAssessmentFinding = new GraphicAssessmentFindingVo();
	if (findingColl != null)
	{
		for (int i = 0; i < findingColl.size(); i++)
		{
			if (findingColl.get(i).getFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFinding().intValue() == brushId)
			{
				voGraphicAssessmentFinding = findingColl.get(i);
				return voGraphicAssessmentFinding.getFinding();
			}
		}
	}

	return null;
}
 
Example 3
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private DrawingGraphicFindingVo getGraphicFinding(int brushId)
{
	DrawingGraphicImageVo voDrawingGraphicImage = form.cmbImages().getValue();
	GraphicAssessmentFindingVoCollection findingColl = getFindingCollection(voDrawingGraphicImage);
	GraphicAssessmentFindingVo voGraphicAssessmentFinding = new GraphicAssessmentFindingVo();
	if (findingColl != null)
	{
		for (int i = 0; i < findingColl.size(); i++)
		{
			if (findingColl.get(i).getFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFinding().intValue() == brushId)
			{
				voGraphicAssessmentFinding = findingColl.get(i);
				return voGraphicAssessmentFinding.getFinding();
			}
		}
	}

	return null;
}
 
Example 4
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private GraphicAssessmentFindingVoCollection getFindingCollection(DrawingGraphicImageVo voDrawingGraphicImage)
{
	UserDefinedObjectComponentVo voUserDefComp = getEditedComponent();
	if (voUserDefComp != null && voUserDefComp.getGraphicIsNotNull() && voUserDefComp.getGraphic().getImagesIsNotNull())
	{
		for (int i = 0; i < voUserDefComp.getGraphic().getImages().size(); i++)
		{
			if (voUserDefComp.getGraphic().getImages().get(i).equals(voDrawingGraphicImage))
			{
				return voUserDefComp.getGraphic().getFindingsAndQuestions();
			}
		}
	}

	return null;
}
 
Example 5
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private DrawingGraphicFindingVo getGraphicFinding(int brushId)
{
	PatientAssessmentVo patientAssessmentVo = form.getLocalContext().getPatientAssessment();
	
	if(patientAssessmentVo == null || patientAssessmentVo.getAssessmentData() == null)
		return null;
	
	PatientAssessmentDataVo voPatAssessmentData = patientAssessmentVo.getAssessmentData();
	
	GraphicAssessmentFindingVoCollection findingColl = voPatAssessmentData.getGraphic().getFindingsAndQuestions();

	if (findingColl != null)
	{
		for (int i = 0; i < findingColl.size(); i++)
		{
			if (findingColl.get(i).getFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFinding().intValue() == brushId)
			{
				return findingColl.get(i).getFinding();
			}
		}
	}

	return null;
}
 
Example 6
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private DrawingGraphicFindingVo getGraphicFinding(int brushId)
{
	DrawingGraphicImageVo voDrawingGraphicImage = form.getLocalContext().getCurrentImage();

	GraphicAssessmentFindingVoCollection findingColl = getFindingCollection(voDrawingGraphicImage);
	GraphicAssessmentFindingVo voGraphicAssessmentFinding = new GraphicAssessmentFindingVo();
	if (findingColl != null)
	{
		for (int i = 0; i < findingColl.size(); i++)
		{
			if (findingColl.get(i).getFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFinding().intValue() == brushId)
			{
				voGraphicAssessmentFinding = findingColl.get(i);
				return voGraphicAssessmentFinding.getFinding();
			}
		}
	}

	return null;
}
 
Example 7
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private DrawingGraphicFindingVo getGraphicFinding(int brushId)
{
	DrawingGraphicImageVo voDrawingGraphicImage = form.cmbImages().getValue();
	GraphicAssessmentFindingVoCollection findingColl = getFindingCollection(voDrawingGraphicImage);
	GraphicAssessmentFindingVo voGraphicAssessmentFinding = new GraphicAssessmentFindingVo();
	if (findingColl != null)
	{
		for (int i = 0; i < findingColl.size(); i++)
		{
			if (findingColl.get(i).getFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFinding().intValue() == brushId)
			{
				voGraphicAssessmentFinding = findingColl.get(i);
				return voGraphicAssessmentFinding.getFinding();
			}
		}
	}

	return null;
}
 
Example 8
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private GraphicAssessmentFindingVoCollection getFindingCollection(DrawingGraphicImageVo voDrawingGraphicImage)
{
	UserDefinedObjectComponentVo voUserDefComp = getEditedComponent();
	if (voUserDefComp != null && voUserDefComp.getGraphicIsNotNull() && voUserDefComp.getGraphic().getImagesIsNotNull())
	{
		for (int i = 0; i < voUserDefComp.getGraphic().getImages().size(); i++)
		{
			if (voUserDefComp.getGraphic().getImages().get(i).equals(voDrawingGraphicImage))
			{
				return voUserDefComp.getGraphic().getFindingsAndQuestions();
			}
		}
	}

	return null;
}
 
Example 9
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private DrawingGraphicFindingVo getGraphicFinding(int brushId)
{
	PatientAssessmentVo patientAssessmentVo = form.getLocalContext().getPatientAssessment();
	
	if(patientAssessmentVo == null || patientAssessmentVo.getAssessmentData() == null)
		return null;
	
	PatientAssessmentDataVo voPatAssessmentData = patientAssessmentVo.getAssessmentData();
	
	GraphicAssessmentFindingVoCollection findingColl = voPatAssessmentData.getGraphic().getFindingsAndQuestions();

	if (findingColl != null)
	{
		for (int i = 0; i < findingColl.size(); i++)
		{
			if (findingColl.get(i).getFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFinding().intValue() == brushId)
			{
				return findingColl.get(i).getFinding();
			}
		}
	}

	return null;
}
 
Example 10
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private DrawingGraphicFindingVo getGraphicFinding(int brushId)
{
	DrawingGraphicImageVo voDrawingGraphicImage = form.getLocalContext().getCurrentImage();

	GraphicAssessmentFindingVoCollection findingColl = getFindingCollection(voDrawingGraphicImage);
	GraphicAssessmentFindingVo voGraphicAssessmentFinding = new GraphicAssessmentFindingVo();
	if (findingColl != null)
	{
		for (int i = 0; i < findingColl.size(); i++)
		{
			if (findingColl.get(i).getFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFinding().intValue() == brushId)
			{
				voGraphicAssessmentFinding = findingColl.get(i);
				return voGraphicAssessmentFinding.getFinding();
			}
		}
	}

	return null;
}
 
Example 11
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private DrawingGraphicFindingVo getGraphicFinding(int brushId)
{
	DrawingGraphicImageVo voDrawingGraphicImage = form.cmbImages().getValue();
	GraphicAssessmentFindingVoCollection findingColl = getFindingCollection(voDrawingGraphicImage);
	GraphicAssessmentFindingVo voGraphicAssessmentFinding = new GraphicAssessmentFindingVo();
	if (findingColl != null)
	{
		for (int i = 0; i < findingColl.size(); i++)
		{
			if (findingColl.get(i).getFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFinding().intValue() == brushId)
			{
				voGraphicAssessmentFinding = findingColl.get(i);
				return voGraphicAssessmentFinding.getFinding();
			}
		}
	}

	return null;
}
 
Example 12
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private GraphicAssessmentFindingVoCollection getFindingCollection(DrawingGraphicImageVo voDrawingGraphicImage)
{
	UserDefinedObjectComponentVo voUserDefComp = getEditedComponent();
	if (voUserDefComp != null && voUserDefComp.getGraphicIsNotNull() && voUserDefComp.getGraphic().getImagesIsNotNull())
	{
		for (int i = 0; i < voUserDefComp.getGraphic().getImages().size(); i++)
		{
			if (voUserDefComp.getGraphic().getImages().get(i).equals(voDrawingGraphicImage))
			{
				return voUserDefComp.getGraphic().getFindingsAndQuestions();
			}
		}
	}

	return null;
}
 
Example 13
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private DrawingGraphicFindingVo getGraphicFinding(int brushId)
{
	PatientAssessmentVo patientAssessmentVo = form.getLocalContext().getPatientAssessment();
	
	if(patientAssessmentVo == null || patientAssessmentVo.getAssessmentData() == null)
		return null;
	
	PatientAssessmentDataVo voPatAssessmentData = patientAssessmentVo.getAssessmentData();
	
	GraphicAssessmentFindingVoCollection findingColl = voPatAssessmentData.getGraphic().getFindingsAndQuestions();

	if (findingColl != null)
	{
		for (int i = 0; i < findingColl.size(); i++)
		{
			if (findingColl.get(i).getFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFinding().intValue() == brushId)
			{
				return findingColl.get(i).getFinding();
			}
		}
	}

	return null;
}
 
Example 14
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private DrawingGraphicFindingVo getGraphicFinding(int brushId)
{
	DrawingGraphicImageVo voDrawingGraphicImage = form.getLocalContext().getCurrentImage();

	GraphicAssessmentFindingVoCollection findingColl = getFindingCollection(voDrawingGraphicImage);
	GraphicAssessmentFindingVo voGraphicAssessmentFinding = new GraphicAssessmentFindingVo();
	if (findingColl != null)
	{
		for (int i = 0; i < findingColl.size(); i++)
		{
			if (findingColl.get(i).getFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFinding().intValue() == brushId)
			{
				voGraphicAssessmentFinding = findingColl.get(i);
				return voGraphicAssessmentFinding.getFinding();
			}
		}
	}

	return null;
}
 
Example 15
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private DrawingGraphicFindingVo getGraphicFinding(int brushId)
{
	DrawingGraphicImageVo voDrawingGraphicImage = form.cmbImages().getValue();
	GraphicAssessmentFindingVoCollection findingColl = getFindingCollection(voDrawingGraphicImage);
	GraphicAssessmentFindingVo voGraphicAssessmentFinding = new GraphicAssessmentFindingVo();
	if (findingColl != null)
	{
		for (int i = 0; i < findingColl.size(); i++)
		{
			if (findingColl.get(i).getFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFinding().intValue() == brushId)
			{
				voGraphicAssessmentFinding = findingColl.get(i);
				return voGraphicAssessmentFinding.getFinding();
			}
		}
	}

	return null;
}
 
Example 16
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private GraphicAssessmentFindingVoCollection getFindingCollection(DrawingGraphicImageVo voDrawingGraphicImage)
{
	UserDefinedObjectComponentVo voUserDefComp = getEditedComponent();
	if (voUserDefComp != null && voUserDefComp.getGraphicIsNotNull() && voUserDefComp.getGraphic().getImagesIsNotNull())
	{
		for (int i = 0; i < voUserDefComp.getGraphic().getImages().size(); i++)
		{
			if (voUserDefComp.getGraphic().getImages().get(i).equals(voDrawingGraphicImage))
			{
				return voUserDefComp.getGraphic().getFindingsAndQuestions();
			}
		}
	}

	return null;
}
 
Example 17
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void setBrushes(GraphicAssessmentFindingVoCollection findingColl)
{
	if (findingColl != null)
	{
		findingColl.sort();
		for (int i = 0; i < findingColl.size(); i++)
		{
			DrawingGraphicFindingVo voDrawingGraphicFinding = findingColl.get(i).getFinding();
			//Findings
			Integer id = voDrawingGraphicFinding.getID_DrawingGraphicFinding();
			String text = voDrawingGraphicFinding.getDisplayText();
			String tooltip = voDrawingGraphicFinding.getDescription();
			Image img = voDrawingGraphicFinding.getImageIsNotNull() ? engine.getRegisteredImage(voDrawingGraphicFinding.getImage().getID_AppImage().intValue()) : null;
			Color colour = voDrawingGraphicFinding.getColourIsNotNull() ? voDrawingGraphicFinding.getColour() : null;
			boolean multipleMarkings = voDrawingGraphicFinding.getIsSingleMarkIsNotNull() && voDrawingGraphicFinding.getIsSingleMark().booleanValue() ? false : true;

			if (img != null)
			{
				form.drawingBodyChart().addBrush(id.intValue(), text, img, multipleMarkings, tooltip);
			}

			if (colour != null)
			{
				form.drawingBodyChart().addBrush(id.intValue(), text, colour, multipleMarkings, tooltip);
			}
		}
	}
	else
	{
		//Set default brush
		form.drawingBodyChart().addBrush(-1, "", Color.White);
	}
}
 
Example 18
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void setBrushes(GraphicAssessmentFindingVoCollection findingColl)
{
	getGraphicControl().clearBrushes();

	if (findingColl != null)
	{
		findingColl.sort();
		for (int i = 0; i < findingColl.size(); i++)
		{
			DrawingGraphicFindingVo voDrawingGraphicFinding = findingColl.get(i).getFinding();
			// Findings
			Integer id = voDrawingGraphicFinding.getID_DrawingGraphicFinding();
			String text = voDrawingGraphicFinding.getDisplayText();
			String tooltip = voDrawingGraphicFinding.getDescription();
			Image img = voDrawingGraphicFinding.getImageIsNotNull() ? engine.getRegisteredImage(voDrawingGraphicFinding.getImage().getID_AppImage().intValue()) : null;
			Color colour = voDrawingGraphicFinding.getColourIsNotNull() ? voDrawingGraphicFinding.getColour() : null;
			boolean multipleMarkings = voDrawingGraphicFinding.getIsSingleMarkIsNotNull() && voDrawingGraphicFinding.getIsSingleMark().booleanValue() ? false : true;

			if (img != null)
			{
				getGraphicControl().addBrush(id.intValue(), text, img, multipleMarkings, tooltip);
			}

			if (colour != null)
			{
				getGraphicControl().addBrush(id.intValue(), text, colour, multipleMarkings, tooltip);
			}
		}
	}
	else
	{
		// Set default brush
		getGraphicControl().addBrush(-1, "", Color.White);
	}
}
 
Example 19
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void imagesValueChanged()
{
	DrawingGraphicImageVo voDrawingGraphicImage = form.cmbImages().getValue();
	PatientAssessmentDataVo voPatientAssessmentData = form.getLocalContext().getCurrentPatientAssessmentData();
	GraphicAssessmentFindingVoCollection findingColl = getFindingCollection(voDrawingGraphicImage);
	if (voPatientAssessmentData != null && voPatientAssessmentData.getGraphicFindingsIsNotNull())
	{
		PatientGraphicAssessmentVo voGraphicAssessment = getSavedGraphicAssessment(voDrawingGraphicImage, voPatientAssessmentData);
		loadImage(voDrawingGraphicImage, voGraphicAssessment, findingColl);
	}
}
 
Example 20
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void setBrushes(GraphicAssessmentFindingVoCollection findingColl)
{
	if (findingColl != null)
	{
		findingColl.sort();
		for (int i = 0; i < findingColl.size(); i++)
		{
			DrawingGraphicFindingVo voDrawingGraphicFinding = findingColl.get(i).getFinding();
			//Findings
			Integer id = voDrawingGraphicFinding.getID_DrawingGraphicFinding();
			String text = voDrawingGraphicFinding.getDisplayText();
			String tooltip = voDrawingGraphicFinding.getDescription();
			Image img = voDrawingGraphicFinding.getImageIsNotNull() ? engine.getRegisteredImage(voDrawingGraphicFinding.getImage().getID_AppImage().intValue()) : null;
			Color colour = voDrawingGraphicFinding.getColourIsNotNull() ? voDrawingGraphicFinding.getColour() : null;
			boolean multipleMarkings = voDrawingGraphicFinding.getIsSingleMarkIsNotNull() && voDrawingGraphicFinding.getIsSingleMark().booleanValue() ? false : true;

			if (img != null)
			{
				form.lyrDetails().tabImages().drawingImageQuestions().addBrush(id.intValue(), text, img, multipleMarkings, tooltip);
			}

			if (colour != null)
			{
				form.lyrDetails().tabImages().drawingImageQuestions().addBrush(id.intValue(), text, colour, multipleMarkings, tooltip);
			}
		}
	}
	else
	{
		//Set default brush
		form.lyrDetails().tabImages().drawingImageQuestions().addBrush(-1, "", Color.White);
	}
}
 
Example 21
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void setBrushes(GraphicAssessmentFindingVoCollection findingColl)
{
	if (findingColl != null)
	{
		findingColl.sort();
		for (int i = 0; i < findingColl.size(); i++)
		{
			DrawingGraphicFindingVo voDrawingGraphicFinding = findingColl.get(i).getFinding();
			//Findings
			Integer id = voDrawingGraphicFinding.getID_DrawingGraphicFinding();
			String text = voDrawingGraphicFinding.getDisplayText();
			String tooltip = voDrawingGraphicFinding.getDescription();
			Image img = voDrawingGraphicFinding.getImageIsNotNull() ? engine.getRegisteredImage(voDrawingGraphicFinding.getImage().getID_AppImage().intValue()) : null;
			Color colour = voDrawingGraphicFinding.getColourIsNotNull() ? voDrawingGraphicFinding.getColour() : null;
			boolean multipleMarkings = voDrawingGraphicFinding.getIsSingleMarkIsNotNull() && voDrawingGraphicFinding.getIsSingleMark().booleanValue() ? false : true;

			if (img != null)
			{
				form.drawingBodyChart().addBrush(id.intValue(), text, img, multipleMarkings, tooltip);
			}

			if (colour != null)
			{
				form.drawingBodyChart().addBrush(id.intValue(), text, colour, multipleMarkings, tooltip);
			}
		}
	}
	else
	{
		//Set default brush
		form.drawingBodyChart().addBrush(-1, "", Color.White);
	}
}
 
Example 22
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void setBrushes(GraphicAssessmentFindingVoCollection findingColl)
{
	getGraphicControl().clearBrushes();

	if (findingColl != null)
	{
		findingColl.sort();
		for (int i = 0; i < findingColl.size(); i++)
		{
			DrawingGraphicFindingVo voDrawingGraphicFinding = findingColl.get(i).getFinding();
			// Findings
			Integer id = voDrawingGraphicFinding.getID_DrawingGraphicFinding();
			String text = voDrawingGraphicFinding.getDisplayText();
			String tooltip = voDrawingGraphicFinding.getDescription();
			Image img = voDrawingGraphicFinding.getImageIsNotNull() ? engine.getRegisteredImage(voDrawingGraphicFinding.getImage().getID_AppImage().intValue()) : null;
			Color colour = voDrawingGraphicFinding.getColourIsNotNull() ? voDrawingGraphicFinding.getColour() : null;
			boolean multipleMarkings = voDrawingGraphicFinding.getIsSingleMarkIsNotNull() && voDrawingGraphicFinding.getIsSingleMark().booleanValue() ? false : true;

			if (img != null)
			{
				getGraphicControl().addBrush(id.intValue(), text, img, multipleMarkings, tooltip);
			}

			if (colour != null)
			{
				getGraphicControl().addBrush(id.intValue(), text, colour, multipleMarkings, tooltip);
			}
		}
	}
	else
	{
		// Set default brush
		getGraphicControl().addBrush(-1, "", Color.White);
	}
}
 
Example 23
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void imagesValueChanged()
{
	DrawingGraphicImageVo voDrawingGraphicImage = form.cmbImages().getValue();
	PatientAssessmentDataVo voPatientAssessmentData = form.getLocalContext().getCurrentPatientAssessmentData();
	GraphicAssessmentFindingVoCollection findingColl = getFindingCollection(voDrawingGraphicImage);
	if (voPatientAssessmentData != null && voPatientAssessmentData.getGraphicFindingsIsNotNull())
	{
		PatientGraphicAssessmentVo voGraphicAssessment = getSavedGraphicAssessment(voDrawingGraphicImage, voPatientAssessmentData);
		loadImage(voDrawingGraphicImage, voGraphicAssessment, findingColl);
	}
}
 
Example 24
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void setBrushes(GraphicAssessmentFindingVoCollection findingColl)
{
	if (findingColl != null)
	{
		findingColl.sort();
		for (int i = 0; i < findingColl.size(); i++)
		{
			DrawingGraphicFindingVo voDrawingGraphicFinding = findingColl.get(i).getFinding();
			//Findings
			Integer id = voDrawingGraphicFinding.getID_DrawingGraphicFinding();
			String text = voDrawingGraphicFinding.getDisplayText();
			String tooltip = voDrawingGraphicFinding.getDescription();
			Image img = voDrawingGraphicFinding.getImageIsNotNull() ? engine.getRegisteredImage(voDrawingGraphicFinding.getImage().getID_AppImage().intValue()) : null;
			Color colour = voDrawingGraphicFinding.getColourIsNotNull() ? voDrawingGraphicFinding.getColour() : null;
			boolean multipleMarkings = voDrawingGraphicFinding.getIsSingleMarkIsNotNull() && voDrawingGraphicFinding.getIsSingleMark().booleanValue() ? false : true;

			if (img != null)
			{
				form.lyrDetails().tabImages().drawingImageQuestions().addBrush(id.intValue(), text, img, multipleMarkings, tooltip);
			}

			if (colour != null)
			{
				form.lyrDetails().tabImages().drawingImageQuestions().addBrush(id.intValue(), text, colour, multipleMarkings, tooltip);
			}
		}
	}
	else
	{
		//Set default brush
		form.lyrDetails().tabImages().drawingImageQuestions().addBrush(-1, "", Color.White);
	}
}
 
Example 25
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void setBrushes(GraphicAssessmentFindingVoCollection findingColl)
{
	if (findingColl != null)
	{
		findingColl.sort();
		for (int i = 0; i < findingColl.size(); i++)
		{
			DrawingGraphicFindingVo voDrawingGraphicFinding = findingColl.get(i).getFinding();
			//Findings
			Integer id = voDrawingGraphicFinding.getID_DrawingGraphicFinding();
			String text = voDrawingGraphicFinding.getDisplayText();
			String tooltip = voDrawingGraphicFinding.getDescription();
			Image img = voDrawingGraphicFinding.getImageIsNotNull() ? engine.getRegisteredImage(voDrawingGraphicFinding.getImage().getID_AppImage().intValue()) : null;
			Color colour = voDrawingGraphicFinding.getColourIsNotNull() ? voDrawingGraphicFinding.getColour() : null;
			boolean multipleMarkings = voDrawingGraphicFinding.getIsSingleMarkIsNotNull() && voDrawingGraphicFinding.getIsSingleMark().booleanValue() ? false : true;

			if (img != null)
			{
				form.drawingBodyChart().addBrush(id.intValue(), text, img, multipleMarkings, tooltip);
			}

			if (colour != null)
			{
				form.drawingBodyChart().addBrush(id.intValue(), text, colour, multipleMarkings, tooltip);
			}
		}
	}
	else
	{
		//Set default brush
		form.drawingBodyChart().addBrush(-1, "", Color.White);
	}
}
 
Example 26
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void setBrushes(GraphicAssessmentFindingVoCollection findingColl)
{
	getGraphicControl().clearBrushes();

	if (findingColl != null)
	{
		findingColl.sort();
		for (int i = 0; i < findingColl.size(); i++)
		{
			DrawingGraphicFindingVo voDrawingGraphicFinding = findingColl.get(i).getFinding();
			// Findings
			Integer id = voDrawingGraphicFinding.getID_DrawingGraphicFinding();
			String text = voDrawingGraphicFinding.getDisplayText();
			String tooltip = voDrawingGraphicFinding.getDescription();
			Image img = voDrawingGraphicFinding.getImageIsNotNull() ? engine.getRegisteredImage(voDrawingGraphicFinding.getImage().getID_AppImage().intValue()) : null;
			Color colour = voDrawingGraphicFinding.getColourIsNotNull() ? voDrawingGraphicFinding.getColour() : null;
			boolean multipleMarkings = voDrawingGraphicFinding.getIsSingleMarkIsNotNull() && voDrawingGraphicFinding.getIsSingleMark().booleanValue() ? false : true;

			if (img != null)
			{
				getGraphicControl().addBrush(id.intValue(), text, img, multipleMarkings, tooltip);
			}

			if (colour != null)
			{
				getGraphicControl().addBrush(id.intValue(), text, colour, multipleMarkings, tooltip);
			}
		}
	}
	else
	{
		// Set default brush
		getGraphicControl().addBrush(-1, "", Color.White);
	}
}
 
Example 27
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void imagesValueChanged()
{
	DrawingGraphicImageVo voDrawingGraphicImage = form.cmbImages().getValue();
	PatientAssessmentDataVo voPatientAssessmentData = form.getLocalContext().getCurrentPatientAssessmentData();
	GraphicAssessmentFindingVoCollection findingColl = getFindingCollection(voDrawingGraphicImage);
	if (voPatientAssessmentData != null && voPatientAssessmentData.getGraphicFindingsIsNotNull())
	{
		PatientGraphicAssessmentVo voGraphicAssessment = getSavedGraphicAssessment(voDrawingGraphicImage, voPatientAssessmentData);
		loadImage(voDrawingGraphicImage, voGraphicAssessment, findingColl);
	}
}
 
Example 28
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void setBrushes(GraphicAssessmentFindingVoCollection findingColl)
{
	if (findingColl != null)
	{
		findingColl.sort();
		for (int i = 0; i < findingColl.size(); i++)
		{
			DrawingGraphicFindingVo voDrawingGraphicFinding = findingColl.get(i).getFinding();
			//Findings
			Integer id = voDrawingGraphicFinding.getID_DrawingGraphicFinding();
			String text = voDrawingGraphicFinding.getDisplayText();
			String tooltip = voDrawingGraphicFinding.getDescription();
			Image img = voDrawingGraphicFinding.getImageIsNotNull() ? engine.getRegisteredImage(voDrawingGraphicFinding.getImage().getID_AppImage().intValue()) : null;
			Color colour = voDrawingGraphicFinding.getColourIsNotNull() ? voDrawingGraphicFinding.getColour() : null;
			boolean multipleMarkings = voDrawingGraphicFinding.getIsSingleMarkIsNotNull() && voDrawingGraphicFinding.getIsSingleMark().booleanValue() ? false : true;

			if (img != null)
			{
				form.lyrDetails().tabImages().drawingImageQuestions().addBrush(id.intValue(), text, img, multipleMarkings, tooltip);
			}

			if (colour != null)
			{
				form.lyrDetails().tabImages().drawingImageQuestions().addBrush(id.intValue(), text, colour, multipleMarkings, tooltip);
			}
		}
	}
	else
	{
		//Set default brush
		form.lyrDetails().tabImages().drawingImageQuestions().addBrush(-1, "", Color.White);
	}
}
 
Example 29
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void setBrushes(GraphicAssessmentFindingVoCollection findingColl)
{
	if (findingColl != null)
	{
		findingColl.sort();
		for (int i = 0; i < findingColl.size(); i++)
		{
			DrawingGraphicFindingVo voDrawingGraphicFinding = findingColl.get(i).getFinding();
			//Findings
			Integer id = voDrawingGraphicFinding.getID_DrawingGraphicFinding();
			String text = voDrawingGraphicFinding.getDisplayText();
			String tooltip = voDrawingGraphicFinding.getDescription();
			Image img = voDrawingGraphicFinding.getImageIsNotNull() ? engine.getRegisteredImage(voDrawingGraphicFinding.getImage().getID_AppImage().intValue()) : null;
			Color colour = voDrawingGraphicFinding.getColourIsNotNull() ? voDrawingGraphicFinding.getColour() : null;
			boolean multipleMarkings = voDrawingGraphicFinding.getIsSingleMarkIsNotNull() && voDrawingGraphicFinding.getIsSingleMark().booleanValue() ? false : true;

			if (img != null)
			{
				form.drawingBodyChart().addBrush(id.intValue(), text, img, multipleMarkings, tooltip);
			}

			if (colour != null)
			{
				form.drawingBodyChart().addBrush(id.intValue(), text, colour, multipleMarkings, tooltip);
			}
		}
	}
	else
	{
		//Set default brush
		form.drawingBodyChart().addBrush(-1, "", Color.White);
	}
}
 
Example 30
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void setBrushes(GraphicAssessmentFindingVoCollection findingColl)
{
	getGraphicControl().clearBrushes();

	if (findingColl != null)
	{
		findingColl.sort();
		for (int i = 0; i < findingColl.size(); i++)
		{
			DrawingGraphicFindingVo voDrawingGraphicFinding = findingColl.get(i).getFinding();
			// Findings
			Integer id = voDrawingGraphicFinding.getID_DrawingGraphicFinding();
			String text = voDrawingGraphicFinding.getDisplayText();
			String tooltip = voDrawingGraphicFinding.getDescription();
			Image img = voDrawingGraphicFinding.getImageIsNotNull() ? engine.getRegisteredImage(voDrawingGraphicFinding.getImage().getID_AppImage().intValue()) : null;
			Color colour = voDrawingGraphicFinding.getColourIsNotNull() ? voDrawingGraphicFinding.getColour() : null;
			boolean multipleMarkings = voDrawingGraphicFinding.getIsSingleMarkIsNotNull() && voDrawingGraphicFinding.getIsSingleMark().booleanValue() ? false : true;

			if (img != null)
			{
				getGraphicControl().addBrush(id.intValue(), text, img, multipleMarkings, tooltip);
			}

			if (colour != null)
			{
				getGraphicControl().addBrush(id.intValue(), text, colour, multipleMarkings, tooltip);
			}
		}
	}
	else
	{
		// Set default brush
		getGraphicControl().addBrush(-1, "", Color.White);
	}
}
 
Example 31
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void imagesValueChanged()
{
	DrawingGraphicImageVo voDrawingGraphicImage = form.cmbImages().getValue();
	PatientAssessmentDataVo voPatientAssessmentData = form.getLocalContext().getCurrentPatientAssessmentData();
	GraphicAssessmentFindingVoCollection findingColl = getFindingCollection(voDrawingGraphicImage);
	if (voPatientAssessmentData != null && voPatientAssessmentData.getGraphicFindingsIsNotNull())
	{
		PatientGraphicAssessmentVo voGraphicAssessment = getSavedGraphicAssessment(voDrawingGraphicImage, voPatientAssessmentData);
		loadImage(voDrawingGraphicImage, voGraphicAssessment, findingColl);
	}
}
 
Example 32
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void setBrushes(GraphicAssessmentFindingVoCollection findingColl)
{
	if (findingColl != null)
	{
		findingColl.sort();
		for (int i = 0; i < findingColl.size(); i++)
		{
			DrawingGraphicFindingVo voDrawingGraphicFinding = findingColl.get(i).getFinding();
			//Findings
			Integer id = voDrawingGraphicFinding.getID_DrawingGraphicFinding();
			String text = voDrawingGraphicFinding.getDisplayText();
			String tooltip = voDrawingGraphicFinding.getDescription();
			Image img = voDrawingGraphicFinding.getImageIsNotNull() ? engine.getRegisteredImage(voDrawingGraphicFinding.getImage().getID_AppImage().intValue()) : null;
			Color colour = voDrawingGraphicFinding.getColourIsNotNull() ? voDrawingGraphicFinding.getColour() : null;
			boolean multipleMarkings = voDrawingGraphicFinding.getIsSingleMarkIsNotNull() && voDrawingGraphicFinding.getIsSingleMark().booleanValue() ? false : true;

			if (img != null)
			{
				form.lyrDetails().tabImages().drawingImageQuestions().addBrush(id.intValue(), text, img, multipleMarkings, tooltip);
			}

			if (colour != null)
			{
				form.lyrDetails().tabImages().drawingImageQuestions().addBrush(id.intValue(), text, colour, multipleMarkings, tooltip);
			}
		}
	}
	else
	{
		//Set default brush
		form.lyrDetails().tabImages().drawingImageQuestions().addBrush(-1, "", Color.White);
	}
}
 
Example 33
Project: AvoinApotti   File: Logic.java   Source Code and License 4 votes vote down vote up
protected GraphicAssessmentVo populateDataFromScreen(GraphicAssessmentVo voGraphicAssessment)
{
	if (voGraphicAssessment != null)
	{
		GraphicAssessmentFindingVoCollection voGAFQcoll = getFindingsFromGrid();
		voGraphicAssessment.setFindingsAndQuestions(voGAFQcoll);
		
		voGraphicAssessment.setAssessmentStage(form.getLocalContext().getStages());
		
		if(voGraphicAssessment.getAssessmentStage() == null)
			voGraphicAssessment.setAssessmentStage(new GraphicAssessmentStageVoCollection());
		
		if(form.getLocalContext().getInactiveStagesIsNotNull())
		{
			for (int i = 0; i < form.getLocalContext().getInactiveStages().size(); i++)
			{
				voGraphicAssessment.getAssessmentStage().add(form.getLocalContext().getInactiveStages().get(i));
			}
		}
	}
	
	voGraphicAssessment = super.populateDataFromScreen(voGraphicAssessment);
	
	//Set sequence for the Associated Questions
	if(voGraphicAssessment != null && voGraphicAssessment.getAssociatedQuestionsIsNotNull())
	{
		for(int i = 0; i < voGraphicAssessment.getAssociatedQuestions().size(); i++)
		{
			voGraphicAssessment.getAssociatedQuestions().get(i).setSequence(new Integer(i));
		}
	}
	
	voGraphicAssessment.setAssessmentSpecialties(populateSpecialitiesDataFromScreen());
	
	// WDEV-13704
	//voGraphicAssessment.setAssociatedReportForPrinting(form.getLocalContext().getLinkedReport());
	//WDEV-14708
	voGraphicAssessment.setAssociatedReportForPrinting(domain.getReportTemplateByName(form.txtReport().getValue()));
	
	
	return voGraphicAssessment;
}
 
Example 34
Project: AvoinApotti   File: Logic.java   Source Code and License 4 votes vote down vote up
private PatientGraphicAssessmentFindingQuestionAnswerVoCollection getFindingQuestion(int brushId, GraphicAssessmentStageVo stageVo)
{
	PatientAssessmentDataVo voPatAssessmentData = form.getLocalContext().getPatientAssessment().getAssessmentData();

	GraphicAssessmentFindingVoCollection findingColl = voPatAssessmentData.getGraphic().getFindingsAndQuestions();
	GraphicAssessmentFindingQuestionVoCollection questions = null;
	PatientGraphicAssessmentFindingQuestionAnswerVoCollection findingQuestions = new PatientGraphicAssessmentFindingQuestionAnswerVoCollection();
	if (findingColl != null)
	{
		for (int i = 0; i < findingColl.size(); i++)
		{
			if (findingColl.get(i).getFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFinding().intValue() == brushId)
			{
				//TODO - this works for Graphical Assessment and Graphical Assessment with questions where we have
				// 1:1 relationship between GraphicAssessmentFinding and FindingStageQuestions
				// need to review for the third type of assessment
				if(findingColl.get(i).getFindingStageIsNotNull() && findingColl.get(i).getFindingStage().size() > 0)
				{
					for (int j = 0; j < findingColl.get(i).getFindingStage().size(); j++)
					{
						if(findingColl.get(i).getFindingStage().get(j).getAssessmentStageIsNotNull() && findingColl.get(i).getFindingStage().get(j).getAssessmentStage().equals(stageVo))
						{
							questions = findingColl.get(i).getFindingStage().get(j).getAssociatedQuestions();
							break;
						}
					}
				}
				
			}
		}
	}

	if (questions != null)
	{
		for (int i = 0; i < questions.size(); i++)
		{
			ims.assessment.vo.GraphicAssessmentFindingQuestionVo voFindingQuestion = questions.get(i);
			PreActiveActiveInactiveStatus findingStatus = voFindingQuestion.getActiveStatus();
			//WDEV-1211 - Go back to configurtation for every new findings 
			if (findingStatus != null && findingStatus.equals(PreActiveActiveInactiveStatus.ACTIVE))
			{
				PatientGraphicAssessmentFindingQuestionAnswerVo voPGAFQuestion = new PatientGraphicAssessmentFindingQuestionAnswerVo();
				voPGAFQuestion.setGraphicFindingQuestion(voFindingQuestion);
				voPGAFQuestion.setIsAnswered(new Boolean(false));
				voPGAFQuestion.setIsMandatory(voFindingQuestion.getIsMandatory());
				findingQuestions.add(voPGAFQuestion);
			}
		}
	}

	return findingQuestions;
}
 
Example 35
Project: AvoinApotti   File: Logic.java   Source Code and License 4 votes vote down vote up
private PatientGraphicAssessmentFindingQuestionAnswerVoCollection getFindingQuestion(PatientAssessmentDataVo voPatAssessmentData, int brushId, GraphicAssessmentStageVo stageVo)
{
	GraphicAssessmentFindingVoCollection findingColl = voPatAssessmentData.getGraphic().getFindingsAndQuestions();
	GraphicAssessmentFindingQuestionVoCollection questions = null;
	PatientGraphicAssessmentFindingQuestionAnswerVoCollection findingQuestions = new PatientGraphicAssessmentFindingQuestionAnswerVoCollection();
	if (findingColl != null)
	{
		for (int i = 0; i < findingColl.size(); i++)
		{
			if (findingColl.get(i).getFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFinding().intValue() == brushId)
			{
				if(findingColl.get(i).getFindingStageIsNotNull() && findingColl.get(i).getFindingStage().size() > 0)
				{
					for (int j = 0; j < findingColl.get(i).getFindingStage().size(); j++)
					{
						if(findingColl.get(i).getFindingStage().get(j).getAssessmentStageIsNotNull() && findingColl.get(i).getFindingStage().get(j).getAssessmentStage().equals(stageVo))
						{
							questions = findingColl.get(i).getFindingStage().get(j).getAssociatedQuestions();
							break;
						}
					}
				}
				
			}
		}
	}

	if (questions != null)
	{
		for (int i = 0; i < questions.size(); i++)
		{
			ims.assessment.vo.GraphicAssessmentFindingQuestionVo voFindingQuestion = questions.get(i);
			PreActiveActiveInactiveStatus findingStatus = voFindingQuestion.getActiveStatus();
			//WDEV-1211 - Go back to configurtation for every new findings 
			if (findingStatus != null && findingStatus.equals(PreActiveActiveInactiveStatus.ACTIVE))
			{
				PatientGraphicAssessmentFindingQuestionAnswerVo voPGAFQuestion = new PatientGraphicAssessmentFindingQuestionAnswerVo();
				voPGAFQuestion.setGraphicFindingQuestion(voFindingQuestion);
				voPGAFQuestion.setIsAnswered(new Boolean(false));
				voPGAFQuestion.setIsMandatory(voFindingQuestion.getIsMandatory());
				findingQuestions.add(voPGAFQuestion);
			}
		}
	}

	return findingQuestions;
}
 
Example 36
Project: AvoinApotti   File: Logic.java   Source Code and License 4 votes vote down vote up
private PatientGraphicAssessmentFindingQuestionAnswerVoCollection getFindingQuestion(int brushId)
{
	DrawingGraphicImageVo voDrawingGraphicImage = form.getLocalContext().getCurrentImage();

	GraphicAssessmentFindingVoCollection findingColl = getFindingCollection(voDrawingGraphicImage);
	GraphicAssessmentFindingQuestionVoCollection questions = null;
	PatientGraphicAssessmentFindingQuestionAnswerVoCollection findingQuestions = new PatientGraphicAssessmentFindingQuestionAnswerVoCollection();
	if (findingColl != null)
	{
		for (int i = 0; i < findingColl.size(); i++)
		{
			if (findingColl.get(i).getFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFinding().intValue() == brushId)
			{
				// TODO - this works for Graphical Assessment and Graphical Assessment with questions where we have
				// 1:1 relationship between GraphicAssessmentFinding and FindingStageQuestions
				// need to review for the third type of assessment
				if (findingColl.get(i).getFindingStageIsNotNull() && findingColl.get(i).getFindingStage().size() > 0)
					questions = findingColl.get(i).getFindingStage().get(0).getAssociatedQuestions();

				break;
			}
		}
	}

	if (questions != null)
	{
		for (int i = 0; i < questions.size(); i++)
		{
			ims.assessment.vo.GraphicAssessmentFindingQuestionVo voFindingQuestion = questions.get(i);
			// WDEV-11366
			if (isQuestionInvalidForPatient(voFindingQuestion.getQuestion()))
				continue;
			PreActiveActiveInactiveStatus findingStatus = voFindingQuestion.getActiveStatus();
			// WDEV-1211 - Go back to configurtation for every new findings
			if (findingStatus != null && findingStatus.equals(PreActiveActiveInactiveStatus.ACTIVE))
			{

				PatientGraphicAssessmentFindingQuestionAnswerVo voPGAFQuestion = new PatientGraphicAssessmentFindingQuestionAnswerVo();
				voPGAFQuestion.setGraphicFindingQuestion(voFindingQuestion);
				voPGAFQuestion.setIsAnswered(new Boolean(false));
				voPGAFQuestion.setIsMandatory(voFindingQuestion.getIsMandatory());
				findingQuestions.add(voPGAFQuestion);
			}
		}
	}

	return findingQuestions;
}
 
Example 37
Project: AvoinApotti   File: Logic.java   Source Code and License 4 votes vote down vote up
private GraphicAssessmentFindingVoCollection getFindingCollection(DrawingGraphicImageVo voDrawingGraphicImage)
{
	return form.getLocalContext().getPatientAssessment().getAssessmentData().getGraphic().getFindingsAndQuestions();
}
 
Example 38
Project: AvoinApotti   File: Logic.java   Source Code and License 4 votes vote down vote up
private PatientGraphicAssessmentFindingQuestionAnswerVoCollection getFindingQuestion(int brushId)
{
	DrawingGraphicImageVo voDrawingGraphicImage = form.cmbImages().getValue();
	GraphicAssessmentFindingVoCollection findingColl = getFindingCollection(voDrawingGraphicImage);
	GraphicAssessmentFindingQuestionVoCollection questions = null;
	PatientGraphicAssessmentFindingQuestionAnswerVoCollection findingQuestions = new PatientGraphicAssessmentFindingQuestionAnswerVoCollection();
	if (findingColl != null)
	{
		for (int i = 0; i < findingColl.size(); i++)
		{
			if (findingColl.get(i).getFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFinding().intValue() == brushId)
			{
				//TODO - this works for Graphical Assessment and Graphical Assessment with questions where we have
				// 1:1 relationship between GraphicAssessmentFinding and FindingStageQuestions
				// need to review for the third type of assessment
				if(findingColl.get(i).getFindingStageIsNotNull() && findingColl.get(i).getFindingStage().size() > 0)
					questions = findingColl.get(i).getFindingStage().get(0).getAssociatedQuestions();
				
				break;
			}
		}
	}

	if (questions != null)
	{
		for (int i = 0; i < questions.size(); i++)
		{
			ims.assessment.vo.GraphicAssessmentFindingQuestionVo voFindingQuestion = questions.get(i);
			PreActiveActiveInactiveStatus findingStatus = voFindingQuestion.getActiveStatus();
			//WDEV-1211 - Go back to configurtation for every new findings 
			if (findingStatus != null && findingStatus.equals(PreActiveActiveInactiveStatus.ACTIVE))
			{
				PatientGraphicAssessmentFindingQuestionAnswerVo voPGAFQuestion = new PatientGraphicAssessmentFindingQuestionAnswerVo();
				voPGAFQuestion.setGraphicFindingQuestion(voFindingQuestion);
				voPGAFQuestion.setIsAnswered(new Boolean(false));
				voPGAFQuestion.setIsMandatory(voFindingQuestion.getIsMandatory());
				findingQuestions.add(voPGAFQuestion);
			}
		}
	}

	return findingQuestions;
}
 
Example 39
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
protected GraphicAssessmentVo populateDataFromScreen(GraphicAssessmentVo voGraphicAssessment)
{
	if (voGraphicAssessment != null)
	{
		GraphicAssessmentFindingVoCollection voGAFQcoll = getFindingsFromGrid();
		voGraphicAssessment.setFindingsAndQuestions(voGAFQcoll);
		
		voGraphicAssessment.setAssessmentStage(form.getLocalContext().getStages());
		
		if(voGraphicAssessment.getAssessmentStage() == null)
			voGraphicAssessment.setAssessmentStage(new GraphicAssessmentStageVoCollection());
		
		if(form.getLocalContext().getInactiveStagesIsNotNull())
		{
			for (int i = 0; i < form.getLocalContext().getInactiveStages().size(); i++)
			{
				voGraphicAssessment.getAssessmentStage().add(form.getLocalContext().getInactiveStages().get(i));
			}
		}
	}
	
	voGraphicAssessment = super.populateDataFromScreen(voGraphicAssessment);
	
	//Set sequence for the Associated Questions
	if(voGraphicAssessment != null && voGraphicAssessment.getAssociatedQuestionsIsNotNull())
	{
		for(int i = 0; i < voGraphicAssessment.getAssociatedQuestions().size(); i++)
		{
			voGraphicAssessment.getAssociatedQuestions().get(i).setSequence(new Integer(i));
		}
	}
	
	voGraphicAssessment.setAssessmentSpecialties(populateSpecialitiesDataFromScreen());
	
	// WDEV-13704
	//voGraphicAssessment.setAssociatedReportForPrinting(form.getLocalContext().getLinkedReport());
	//WDEV-14708
	voGraphicAssessment.setAssociatedReportForPrinting(domain.getReportTemplateByName(form.txtReport().getValue()));
	
	
	return voGraphicAssessment;
}
 
Example 40
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private PatientGraphicAssessmentFindingQuestionAnswerVoCollection getFindingQuestion(int brushId, GraphicAssessmentStageVo stageVo)
{
	PatientAssessmentDataVo voPatAssessmentData = form.getLocalContext().getPatientAssessment().getAssessmentData();

	GraphicAssessmentFindingVoCollection findingColl = voPatAssessmentData.getGraphic().getFindingsAndQuestions();
	GraphicAssessmentFindingQuestionVoCollection questions = null;
	PatientGraphicAssessmentFindingQuestionAnswerVoCollection findingQuestions = new PatientGraphicAssessmentFindingQuestionAnswerVoCollection();
	if (findingColl != null)
	{
		for (int i = 0; i < findingColl.size(); i++)
		{
			if (findingColl.get(i).getFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFindingIsNotNull() && findingColl.get(i).getFinding().getID_DrawingGraphicFinding().intValue() == brushId)
			{
				//TODO - this works for Graphical Assessment and Graphical Assessment with questions where we have
				// 1:1 relationship between GraphicAssessmentFinding and FindingStageQuestions
				// need to review for the third type of assessment
				if(findingColl.get(i).getFindingStageIsNotNull() && findingColl.get(i).getFindingStage().size() > 0)
				{
					for (int j = 0; j < findingColl.get(i).getFindingStage().size(); j++)
					{
						if(findingColl.get(i).getFindingStage().get(j).getAssessmentStageIsNotNull() && findingColl.get(i).getFindingStage().get(j).getAssessmentStage().equals(stageVo))
						{
							questions = findingColl.get(i).getFindingStage().get(j).getAssociatedQuestions();
							break;
						}
					}
				}
				
			}
		}
	}

	if (questions != null)
	{
		for (int i = 0; i < questions.size(); i++)
		{
			ims.assessment.vo.GraphicAssessmentFindingQuestionVo voFindingQuestion = questions.get(i);
			PreActiveActiveInactiveStatus findingStatus = voFindingQuestion.getActiveStatus();
			//WDEV-1211 - Go back to configurtation for every new findings 
			if (findingStatus != null && findingStatus.equals(PreActiveActiveInactiveStatus.ACTIVE))
			{
				PatientGraphicAssessmentFindingQuestionAnswerVo voPGAFQuestion = new PatientGraphicAssessmentFindingQuestionAnswerVo();
				voPGAFQuestion.setGraphicFindingQuestion(voFindingQuestion);
				voPGAFQuestion.setIsAnswered(new Boolean(false));
				voPGAFQuestion.setIsMandatory(voFindingQuestion.getIsMandatory());
				findingQuestions.add(voPGAFQuestion);
			}
		}
	}

	return findingQuestions;
}