Java Code Examples for ims.core.vo.DrawingGraphicImageVo

The following are top voted examples for showing how to use ims.core.vo.DrawingGraphicImageVo. 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 String getImageRowTolltip(DrawingGraphicImageVo voDrawingGraphicImage)
{
	if (voDrawingGraphicImage != null)
	{
		StringBuffer tooltip = new StringBuffer();
		if (voDrawingGraphicImage.getImageDescriptionIsNotNull())
		{
			tooltip.append("*Image Description: *");
			tooltip.append(voDrawingGraphicImage.getImageDescription());
			tooltip.append(CR);
		}
		if (voDrawingGraphicImage.getVersionNumberIsNotNull())
		{
			tooltip.append("*Version No. : *");
			tooltip.append(voDrawingGraphicImage.getVersionNumber());
			tooltip.append(CR);
		}

		return new Textile().process(tooltip.toString());
	}

	return "";
}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void processEditedFinding(PatientAssessmentVo assessment, PatientGraphicAssessmentFindingVo voPatientGraphicAssessmentFinding)
{
	PatientAssessmentDataVo voPatAssessmentData = assessment.getAssessmentData();
	
	DrawingGraphicImageVo voDrawingGraphicImage = form.getLocalContext().getCurrentImage();
	if (voPatAssessmentData != null && voPatAssessmentData.getGraphicFindingsIsNotNull())
	{
		for (int i = 0; i < voPatAssessmentData.getGraphicFindings().size(); i++)
		{
			// Check to be in the context of the same Patient Graphic Assessment
			PatientGraphicAssessmentVo voPatientGraphicAssessment = voPatAssessmentData.getGraphicFindings().get(i);
			if (voPatientGraphicAssessment.getGraphicImageIsNotNull() && voPatientGraphicAssessment.getGraphicImage().equals(voDrawingGraphicImage))
			{
				int index = voPatientGraphicAssessment.getPatientGraphicFinding().indexOf(voPatientGraphicAssessmentFinding);
				if (index >= 0)
					voPatAssessmentData.getGraphicFindings().get(i).getPatientGraphicFinding().set(index, voPatientGraphicAssessmentFinding);
				else
					voPatAssessmentData.getGraphicFindings().get(i).getPatientGraphicFinding().add(voPatientGraphicAssessmentFinding);

				assessment.setAssessmentData(voPatAssessmentData);
				form.getLocalContext().setPatientAssessment(assessment);
				break;
			}
		}
	}
}
 
Example 3
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void process_EditedFinding(Patient_AssessmentVo assessment, Patient_GraphicAssessmentFindingVo voPatientGraphicAssessmentFinding)
{
	Patient_AssessmentDataVo voPatAssessmentData = assessment.getAssessmentData();
	
	DrawingGraphicImageVo voDrawingGraphicImage = form.getLocalContext().getCurrentImage();
	if (voPatAssessmentData != null && voPatAssessmentData.getGraphicFindingsIsNotNull())
	{
		for (int i = 0; i < voPatAssessmentData.getGraphicFindings().size(); i++)
		{
			// Check to be in the context of the same Patient Graphic Assessment
			Patient_GraphicAssessmentVo voPatientGraphicAssessment = voPatAssessmentData.getGraphicFindings().get(i);
			if (voPatientGraphicAssessment.getGraphicImageIsNotNull() && voPatientGraphicAssessment.getGraphicImage().equals(voDrawingGraphicImage))
			{
				int index = voPatientGraphicAssessment.getPatientGraphicFinding().indexOf(voPatientGraphicAssessmentFinding);
				if (index >= 0)
					voPatAssessmentData.getGraphicFindings().get(i).getPatientGraphicFinding().set(index, voPatientGraphicAssessmentFinding);
				else
					voPatAssessmentData.getGraphicFindings().get(i).getPatientGraphicFinding().add(voPatientGraphicAssessmentFinding);

				assessment.setAssessmentData(voPatAssessmentData);
				form.getLocalContext().setPatient_Assessment(assessment);
				break;
			}
		}
	}
}
 
Example 4
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void configureImageSelection(GraphicAssessmentVo config)
{
	configureTabs();

	for (int x = 0; x < config.getImages().size(); x++)
	{
		GenForm.lyrAssessmentLayer.tabSelectImageContainer.grdImagesRow row = form.lyrAssessment().tabSelectImage().grdImages().getRows().newRow();
		DrawingGraphicImageVo img = config.getImages().get(x);
		if (img != null)
		{
			String imageName = img.getImageName();
			row.setValue(img);
			row.setcolImage(imageName == null ? "?" : imageName);
		}
	}
}
 
Example 5
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private DrawingGraphicFindingVo get_GraphicFinding(int brushId)
{
	DrawingGraphicImageVo voDrawingGraphicImage = form.getLocalContext().getCurrentImage();

	Graphic_AssessmentFindingVoCollection findingColl = get_FindingCollection(voDrawingGraphicImage);
	Graphic_AssessmentFindingVo voGraphicAssessmentFinding = new Graphic_AssessmentFindingVo();
	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 6
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 7
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void configureImageSelection(Graphic_AssessmentVo config)
{
	configure_Tabs();

	for (int x = 0; x < config.getImages().size(); x++)
	{
		GenForm.lyrAssessmentLayer.tabSelectImageContainer.grdImagesRow row = form.lyrAssessment().tabSelectImage().grdImages().getRows().newRow();
		DrawingGraphicImageVo img = config.getImages().get(x);
		if (img != null)
		{
			String imageName = img.getImageName();
			row.setValue(img);
			row.setcolImage(imageName == null ? "?" : imageName);
		}
	}
}
 
Example 8
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 9
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 10
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateCombos()
{
	//Image Combo
	UserDefinedObjectComponentVo voUserDefComp = getEditedComponent();
	if (voUserDefComp != null && voUserDefComp.getGraphicIsNotNull() && voUserDefComp.getGraphic().getImagesIsNotNull())
	{
		voUserDefComp.getGraphic().getImages().sort();
		for (int i = 0; i < voUserDefComp.getGraphic().getImages().size(); i++)
		{
			DrawingGraphicImageVo voImage = voUserDefComp.getGraphic().getImages().get(i);
			form.cmbImages().newRow(voImage, voImage.getImageName());
			if (i == 0)
				form.cmbImages().setValue(voImage);
		}
	}

	loadStatusCombo(false);
}
 
Example 11
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void setImageName(DrawingGraphicImageVo voDrawingGraphicImage) {
	if (voDrawingGraphicImage.getID_DrawingGraphicImage() == null)
	{
		String imageName = form.lyrDrawing().tabImageSelect().txtImageName().getValue();
		if (imageName == null || imageName.equals(""))
		{
			engine.showMessage("Please enter an Image Name");
			form.lyrDrawing().tabImageSelect().txtImageName().setFocus();
			form.lyrDrawing().tabImageSelect().setEnabled(true);
			form.lyrDrawing().showtabImageSelect();
			return;
		}

		DrawingControlGroup group = form.lyrDrawing().tabRegionConfig().drawingConfig().getAreas();
		group.setName(imageName);
		form.lyrDrawing().tabRegionConfig().drawingConfig().setAreas(group);
	}
}
 
Example 12
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private String getTooltip(DrawingGraphicImageVo voDGImage)
{
	if (voDGImage != null)
	{
		StringBuffer tooltip = new StringBuffer();
		if (voDGImage.getImageIsNotNull() && voDGImage.getImage().getImagePathIsNotNull())
		{
			tooltip.append("*Image Path: *");
			tooltip.append(voDGImage.getImage().getImagePath());
			tooltip.append(CR);
		}
		if (voDGImage.getImageDescriptionIsNotNull())
		{
			tooltip.append("*Description: *");
			tooltip.append(voDGImage.getImageDescription());
			tooltip.append(CR);
		}

		return new Textile().process(tooltip.toString());
	}

	return "";
}
 
Example 13
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void populateScreenFromData(DrawingGraphicImageVo voGraphicImage)
{
	form.getLocalContext().setImageRecord(voGraphicImage);
	this.clearScreen();
	super.populateScreenFromData(voGraphicImage);
	// Populate the unbinded controls
	if (voGraphicImage != null && voGraphicImage.getImageIsNotNull() && voGraphicImage.getImage().getID_AppImageIsNotNull())
	{
		Image repImage = engine.getRegisteredImage(voGraphicImage.getImage().getID_AppImage().intValue());
		if(repImage != null)
		{
			form.lyrDrawing().tabImageSelect().imgPreview().setValue(repImage);
			form.lyrDrawing().tabImageSelect().txtImagePath().setValue(repImage.getImagePath());
		}
	}
	// Populate the drawing Image
	setDefaultImage(voGraphicImage);

	if (form.getMode().equals(FormMode.VIEW))
	{
		form.btnUpdate().setVisible(true);
	}
	enbleRegionConfigTab(true);
}
 
Example 14
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void copyDrawingDetails()
{
	if (form.getGlobalContext().Admin.getDrawingGraphicImageShortVo() != null && form.getGlobalContext().Admin.getDrawingGraphicImageShortVo().getID_DrawingGraphicImageIsNotNull())
	{
		form.getLocalContext().setIsCopyDrawingMode(new Boolean(true));
		DrawingGraphicImageVo voDrawing = domain.getDrawingGraphicImage(form.getGlobalContext().Admin.getDrawingGraphicImageShortVo());
		if (voDrawing == null)
		{
			engine.showMessage("Please select a record");
			return;
		}

		voDrawing = setCopiedDrawingVo(voDrawing);
		populateScreenFromData(voDrawing);
		form.setMode(FormMode.EDIT);
	}
}
 
Example 15
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void loadAvalilableImages()
{
	form.lyrTabs().tabDrawing().cmbGraphicAdnotationImage().clear();

	GraphicAssessmentVo graphicAssessment = domain.getActiveGraphicAssessment(UserDefinedAssessmentType.MEDICALNOTING);
	if (graphicAssessment == null)
		return;

	for (int i = 0; i < graphicAssessment.getImages().size(); i++)
	{
		DrawingGraphicImageVo image = graphicAssessment.getImages().get(i);
		if (image != null)
		{
			form.lyrTabs().tabDrawing().cmbGraphicAdnotationImage().newRow(image, image.getImageName() == null ? "Untitled" : image.getImageName());
		}
	}
}
 
Example 16
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void setImageName(DrawingGraphicImageVo voDrawingGraphicImage) {
	if (voDrawingGraphicImage.getID_DrawingGraphicImage() == null)
	{
		String imageName = form.lyrDrawing().tabImageSelect().txtImageName().getValue();
		if (imageName == null || imageName.equals(""))
		{
			engine.showMessage("Please enter an Image Name");
			form.lyrDrawing().tabImageSelect().txtImageName().setFocus();
			form.lyrDrawing().tabImageSelect().setEnabled(true);
			form.lyrDrawing().showtabImageSelect();
			return;
		}

		DrawingControlGroup group = form.lyrDrawing().tabRegionConfig().drawingConfig().getAreas();
		group.setName(imageName);
		form.lyrDrawing().tabRegionConfig().drawingConfig().setAreas(group);
	}
}
 
Example 17
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void processEditedFinding(PatientAssessmentVo assessment, PatientGraphicAssessmentFindingVo voPatientGraphicAssessmentFinding)
{
	PatientAssessmentDataVo voPatAssessmentData = assessment.getAssessmentData();
	
	DrawingGraphicImageVo voDrawingGraphicImage = form.getLocalContext().getCurrentImage();
	if (voPatAssessmentData != null && voPatAssessmentData.getGraphicFindingsIsNotNull())
	{
		for (int i = 0; i < voPatAssessmentData.getGraphicFindings().size(); i++)
		{
			// Check to be in the context of the same Patient Graphic Assessment
			PatientGraphicAssessmentVo voPatientGraphicAssessment = voPatAssessmentData.getGraphicFindings().get(i);
			if (voPatientGraphicAssessment.getGraphicImageIsNotNull() && voPatientGraphicAssessment.getGraphicImage().equals(voDrawingGraphicImage))
			{
				int index = voPatientGraphicAssessment.getPatientGraphicFinding().indexOf(voPatientGraphicAssessmentFinding);
				if (index >= 0)
					voPatAssessmentData.getGraphicFindings().get(i).getPatientGraphicFinding().set(index, voPatientGraphicAssessmentFinding);
				else
					voPatAssessmentData.getGraphicFindings().get(i).getPatientGraphicFinding().add(voPatientGraphicAssessmentFinding);

				assessment.setAssessmentData(voPatAssessmentData);
				form.getLocalContext().setPatientAssessment(assessment);
				break;
			}
		}
	}
}
 
Example 18
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void process_EditedFinding(Patient_AssessmentVo assessment, Patient_GraphicAssessmentFindingVo voPatientGraphicAssessmentFinding)
{
	Patient_AssessmentDataVo voPatAssessmentData = assessment.getAssessmentData();
	
	DrawingGraphicImageVo voDrawingGraphicImage = form.getLocalContext().getCurrentImage();
	if (voPatAssessmentData != null && voPatAssessmentData.getGraphicFindingsIsNotNull())
	{
		for (int i = 0; i < voPatAssessmentData.getGraphicFindings().size(); i++)
		{
			// Check to be in the context of the same Patient Graphic Assessment
			Patient_GraphicAssessmentVo voPatientGraphicAssessment = voPatAssessmentData.getGraphicFindings().get(i);
			if (voPatientGraphicAssessment.getGraphicImageIsNotNull() && voPatientGraphicAssessment.getGraphicImage().equals(voDrawingGraphicImage))
			{
				int index = voPatientGraphicAssessment.getPatientGraphicFinding().indexOf(voPatientGraphicAssessmentFinding);
				if (index >= 0)
					voPatAssessmentData.getGraphicFindings().get(i).getPatientGraphicFinding().set(index, voPatientGraphicAssessmentFinding);
				else
					voPatAssessmentData.getGraphicFindings().get(i).getPatientGraphicFinding().add(voPatientGraphicAssessmentFinding);

				assessment.setAssessmentData(voPatAssessmentData);
				form.getLocalContext().setPatient_Assessment(assessment);
				break;
			}
		}
	}
}
 
Example 19
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private String getTooltip(DrawingGraphicImageVo voDGImage)
{
	if (voDGImage != null)
	{
		StringBuffer tooltip = new StringBuffer();
		if (voDGImage.getImageIsNotNull() && voDGImage.getImage().getImagePathIsNotNull())
		{
			tooltip.append("*Image Path: *");
			tooltip.append(voDGImage.getImage().getImagePath());
			tooltip.append(CR);
		}
		if (voDGImage.getImageDescriptionIsNotNull())
		{
			tooltip.append("*Description: *");
			tooltip.append(voDGImage.getImageDescription());
			tooltip.append(CR);
		}

		return new Textile().process(tooltip.toString());
	}

	return "";
}
 
Example 20
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 21
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void processEditedFinding(PatientAssessmentVo assessment, PatientGraphicAssessmentFindingVo voPatientGraphicAssessmentFinding)
{
	PatientAssessmentDataVo voPatAssessmentData = assessment.getAssessmentData();
	
	DrawingGraphicImageVo voDrawingGraphicImage = form.getLocalContext().getCurrentImage();
	if (voPatAssessmentData != null && voPatAssessmentData.getGraphicFindingsIsNotNull())
	{
		for (int i = 0; i < voPatAssessmentData.getGraphicFindings().size(); i++)
		{
			// Check to be in the context of the same Patient Graphic Assessment
			PatientGraphicAssessmentVo voPatientGraphicAssessment = voPatAssessmentData.getGraphicFindings().get(i);
			if (voPatientGraphicAssessment.getGraphicImageIsNotNull() && voPatientGraphicAssessment.getGraphicImage().equals(voDrawingGraphicImage))
			{
				int index = voPatientGraphicAssessment.getPatientGraphicFinding().indexOf(voPatientGraphicAssessmentFinding);
				if (index >= 0)
					voPatAssessmentData.getGraphicFindings().get(i).getPatientGraphicFinding().set(index, voPatientGraphicAssessmentFinding);
				else
					voPatAssessmentData.getGraphicFindings().get(i).getPatientGraphicFinding().add(voPatientGraphicAssessmentFinding);

				assessment.setAssessmentData(voPatAssessmentData);
				form.getLocalContext().setPatientAssessment(assessment);
				break;
			}
		}
	}
}
 
Example 22
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 23
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void configureImageSelection(Graphic_AssessmentVo config)
{
	configure_Tabs();

	for (int x = 0; x < config.getImages().size(); x++)
	{
		GenForm.lyrAssessmentLayer.tabSelectImageContainer.grdImagesRow row = form.lyrAssessment().tabSelectImage().grdImages().getRows().newRow();
		DrawingGraphicImageVo img = config.getImages().get(x);
		if (img != null)
		{
			String imageName = img.getImageName();
			row.setValue(img);
			row.setcolImage(imageName == null ? "?" : imageName);
		}
	}
}
 
Example 24
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 25
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void process_EditedFinding(Patient_AssessmentVo assessment, Patient_GraphicAssessmentFindingVo voPatientGraphicAssessmentFinding)
{
	Patient_AssessmentDataVo voPatAssessmentData = assessment.getAssessmentData();
	
	DrawingGraphicImageVo voDrawingGraphicImage = form.getLocalContext().getCurrentImage();
	if (voPatAssessmentData != null && voPatAssessmentData.getGraphicFindingsIsNotNull())
	{
		for (int i = 0; i < voPatAssessmentData.getGraphicFindings().size(); i++)
		{
			// Check to be in the context of the same Patient Graphic Assessment
			Patient_GraphicAssessmentVo voPatientGraphicAssessment = voPatAssessmentData.getGraphicFindings().get(i);
			if (voPatientGraphicAssessment.getGraphicImageIsNotNull() && voPatientGraphicAssessment.getGraphicImage().equals(voDrawingGraphicImage))
			{
				int index = voPatientGraphicAssessment.getPatientGraphicFinding().indexOf(voPatientGraphicAssessmentFinding);
				if (index >= 0)
					voPatAssessmentData.getGraphicFindings().get(i).getPatientGraphicFinding().set(index, voPatientGraphicAssessmentFinding);
				else
					voPatAssessmentData.getGraphicFindings().get(i).getPatientGraphicFinding().add(voPatientGraphicAssessmentFinding);

				assessment.setAssessmentData(voPatAssessmentData);
				form.getLocalContext().setPatient_Assessment(assessment);
				break;
			}
		}
	}
}
 
Example 26
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 27
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateCombos()
{
	//Image Combo
	UserDefinedObjectComponentVo voUserDefComp = getEditedComponent();
	if (voUserDefComp != null && voUserDefComp.getGraphicIsNotNull() && voUserDefComp.getGraphic().getImagesIsNotNull())
	{
		voUserDefComp.getGraphic().getImages().sort();
		for (int i = 0; i < voUserDefComp.getGraphic().getImages().size(); i++)
		{
			DrawingGraphicImageVo voImage = voUserDefComp.getGraphic().getImages().get(i);
			form.cmbImages().newRow(voImage, voImage.getImageName());
			if (i == 0)
				form.cmbImages().setValue(voImage);
		}
	}

	loadStatusCombo(false);
}
 
Example 28
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 29
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void setImageName(DrawingGraphicImageVo voDrawingGraphicImage) {
	if (voDrawingGraphicImage.getID_DrawingGraphicImage() == null)
	{
		String imageName = form.lyrDrawing().tabImageSelect().txtImageName().getValue();
		if (imageName == null || imageName.equals(""))
		{
			engine.showMessage("Please enter an Image Name");
			form.lyrDrawing().tabImageSelect().txtImageName().setFocus();
			form.lyrDrawing().tabImageSelect().setEnabled(true);
			form.lyrDrawing().showtabImageSelect();
			return;
		}

		DrawingControlGroup group = form.lyrDrawing().tabRegionConfig().drawingConfig().getAreas();
		group.setName(imageName);
		form.lyrDrawing().tabRegionConfig().drawingConfig().setAreas(group);
	}
}
 
Example 30
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private String getTooltip(DrawingGraphicImageVo voDGImage)
{
	if (voDGImage != null)
	{
		StringBuffer tooltip = new StringBuffer();
		if (voDGImage.getImageIsNotNull() && voDGImage.getImage().getImagePathIsNotNull())
		{
			tooltip.append("*Image Path: *");
			tooltip.append(voDGImage.getImage().getImagePath());
			tooltip.append(CR);
		}
		if (voDGImage.getImageDescriptionIsNotNull())
		{
			tooltip.append("*Description: *");
			tooltip.append(voDGImage.getImageDescription());
			tooltip.append(CR);
		}

		return new Textile().process(tooltip.toString());
	}

	return "";
}
 
Example 31
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void populateScreenFromData(DrawingGraphicImageVo voGraphicImage)
{
	form.getLocalContext().setImageRecord(voGraphicImage);
	this.clearScreen();
	super.populateScreenFromData(voGraphicImage);
	// Populate the unbinded controls
	if (voGraphicImage != null && voGraphicImage.getImageIsNotNull() && voGraphicImage.getImage().getID_AppImageIsNotNull())
	{
		Image repImage = engine.getRegisteredImage(voGraphicImage.getImage().getID_AppImage().intValue());
		if(repImage != null)
		{
			form.lyrDrawing().tabImageSelect().imgPreview().setValue(repImage);
			form.lyrDrawing().tabImageSelect().txtImagePath().setValue(repImage.getImagePath());
		}
	}
	// Populate the drawing Image
	setDefaultImage(voGraphicImage);

	if (form.getMode().equals(FormMode.VIEW))
	{
		form.btnUpdate().setVisible(true);
	}
	enbleRegionConfigTab(true);
}
 
Example 32
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void copyDrawingDetails()
{
	if (form.getGlobalContext().Admin.getDrawingGraphicImageShortVo() != null && form.getGlobalContext().Admin.getDrawingGraphicImageShortVo().getID_DrawingGraphicImageIsNotNull())
	{
		form.getLocalContext().setIsCopyDrawingMode(new Boolean(true));
		DrawingGraphicImageVo voDrawing = domain.getDrawingGraphicImage(form.getGlobalContext().Admin.getDrawingGraphicImageShortVo());
		if (voDrawing == null)
		{
			engine.showMessage("Please select a record");
			return;
		}

		voDrawing = setCopiedDrawingVo(voDrawing);
		populateScreenFromData(voDrawing);
		form.setMode(FormMode.EDIT);
	}
}
 
Example 33
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void loadAvalilableImages()
{
	form.lyrTabs().tabDrawing().cmbGraphicAdnotationImage().clear();

	GraphicAssessmentVo graphicAssessment = domain.getActiveGraphicAssessment(UserDefinedAssessmentType.MEDICALNOTING);
	if (graphicAssessment == null)
		return;

	for (int i = 0; i < graphicAssessment.getImages().size(); i++)
	{
		DrawingGraphicImageVo image = graphicAssessment.getImages().get(i);
		if (image != null)
		{
			form.lyrTabs().tabDrawing().cmbGraphicAdnotationImage().newRow(image, image.getImageName() == null ? "Untitled" : image.getImageName());
		}
	}
}
 
Example 34
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void processEditedFinding(PatientAssessmentVo assessment, PatientGraphicAssessmentFindingVo voPatientGraphicAssessmentFinding)
{
	PatientAssessmentDataVo voPatAssessmentData = assessment.getAssessmentData();
	
	DrawingGraphicImageVo voDrawingGraphicImage = form.getLocalContext().getCurrentImage();
	if (voPatAssessmentData != null && voPatAssessmentData.getGraphicFindingsIsNotNull())
	{
		for (int i = 0; i < voPatAssessmentData.getGraphicFindings().size(); i++)
		{
			// Check to be in the context of the same Patient Graphic Assessment
			PatientGraphicAssessmentVo voPatientGraphicAssessment = voPatAssessmentData.getGraphicFindings().get(i);
			if (voPatientGraphicAssessment.getGraphicImageIsNotNull() && voPatientGraphicAssessment.getGraphicImage().equals(voDrawingGraphicImage))
			{
				int index = voPatientGraphicAssessment.getPatientGraphicFinding().indexOf(voPatientGraphicAssessmentFinding);
				if (index >= 0)
					voPatAssessmentData.getGraphicFindings().get(i).getPatientGraphicFinding().set(index, voPatientGraphicAssessmentFinding);
				else
					voPatAssessmentData.getGraphicFindings().get(i).getPatientGraphicFinding().add(voPatientGraphicAssessmentFinding);

				assessment.setAssessmentData(voPatAssessmentData);
				form.getLocalContext().setPatientAssessment(assessment);
				break;
			}
		}
	}
}
 
Example 35
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void configureImageSelection(Graphic_AssessmentVo config)
{
	configure_Tabs();

	for (int x = 0; x < config.getImages().size(); x++)
	{
		GenForm.lyrAssessmentLayer.tabSelectImageContainer.grdImagesRow row = form.lyrAssessment().tabSelectImage().grdImages().getRows().newRow();
		DrawingGraphicImageVo img = config.getImages().get(x);
		if (img != null)
		{
			String imageName = img.getImageName();
			row.setValue(img);
			row.setcolImage(imageName == null ? "?" : imageName);
		}
	}
}
 
Example 36
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 37
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void populateScreenFromData(DrawingGraphicImageVo voGraphicImage)
{
	form.getLocalContext().setImageRecord(voGraphicImage);
	this.clearScreen();
	super.populateScreenFromData(voGraphicImage);
	// Populate the unbinded controls
	if (voGraphicImage != null && voGraphicImage.getImageIsNotNull() && voGraphicImage.getImage().getID_AppImageIsNotNull())
	{
		Image repImage = engine.getRegisteredImage(voGraphicImage.getImage().getID_AppImage().intValue());
		if(repImage != null)
		{
			form.lyrDrawing().tabImageSelect().imgPreview().setValue(repImage);
			form.lyrDrawing().tabImageSelect().txtImagePath().setValue(repImage.getImagePath());
		}
	}
	// Populate the drawing Image
	setDefaultImage(voGraphicImage);

	if (form.getMode().equals(FormMode.VIEW))
	{
		form.btnUpdate().setVisible(true);
	}
	enbleRegionConfigTab(true);
}
 
Example 38
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateCombos()
{
	//Image Combo
	UserDefinedObjectComponentVo voUserDefComp = getEditedComponent();
	if (voUserDefComp != null && voUserDefComp.getGraphicIsNotNull() && voUserDefComp.getGraphic().getImagesIsNotNull())
	{
		voUserDefComp.getGraphic().getImages().sort();
		for (int i = 0; i < voUserDefComp.getGraphic().getImages().size(); i++)
		{
			DrawingGraphicImageVo voImage = voUserDefComp.getGraphic().getImages().get(i);
			form.cmbImages().newRow(voImage, voImage.getImageName());
			if (i == 0)
				form.cmbImages().setValue(voImage);
		}
	}

	loadStatusCombo(false);
}
 
Example 39
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void configureImageSelection(GraphicAssessmentVo config)
{
	configureTabs();

	for (int x = 0; x < config.getImages().size(); x++)
	{
		GenForm.lyrAssessmentLayer.tabSelectImageContainer.grdImagesRow row = form.lyrAssessment().tabSelectImage().grdImages().getRows().newRow();
		DrawingGraphicImageVo img = config.getImages().get(x);
		if (img != null)
		{
			String imageName = img.getImageName();
			row.setValue(img);
			row.setcolImage(imageName == null ? "?" : imageName);
		}
	}
}
 
Example 40
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private DrawingGraphicFindingVo get_GraphicFinding(int brushId)
{
	DrawingGraphicImageVo voDrawingGraphicImage = form.getLocalContext().getCurrentImage();

	Graphic_AssessmentFindingVoCollection findingColl = get_FindingCollection(voDrawingGraphicImage);
	Graphic_AssessmentFindingVo voGraphicAssessmentFinding = new Graphic_AssessmentFindingVo();
	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 41
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateCombos()
{
	//Image Combo
	UserDefinedObjectComponentVo voUserDefComp = getEditedComponent();
	if (voUserDefComp != null && voUserDefComp.getGraphicIsNotNull() && voUserDefComp.getGraphic().getImagesIsNotNull())
	{
		voUserDefComp.getGraphic().getImages().sort();
		for (int i = 0; i < voUserDefComp.getGraphic().getImages().size(); i++)
		{
			DrawingGraphicImageVo voImage = voUserDefComp.getGraphic().getImages().get(i);
			form.cmbImages().newRow(voImage, voImage.getImageName());
			if (i == 0)
				form.cmbImages().setValue(voImage);
		}
	}

	loadStatusCombo(false);
}
 
Example 42
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void copyDrawingDetails()
{
	if (form.getGlobalContext().Admin.getDrawingGraphicImageShortVo() != null && form.getGlobalContext().Admin.getDrawingGraphicImageShortVo().getID_DrawingGraphicImageIsNotNull())
	{
		form.getLocalContext().setIsCopyDrawingMode(new Boolean(true));
		DrawingGraphicImageVo voDrawing = domain.getDrawingGraphicImage(form.getGlobalContext().Admin.getDrawingGraphicImageShortVo());
		if (voDrawing == null)
		{
			engine.showMessage("Please select a record");
			return;
		}

		voDrawing = setCopiedDrawingVo(voDrawing);
		populateScreenFromData(voDrawing);
		form.setMode(FormMode.EDIT);
	}
}
 
Example 43
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private String getImageRowTolltip(DrawingGraphicImageVo voDrawingGraphicImage)
{
	if (voDrawingGraphicImage != null)
	{
		StringBuffer tooltip = new StringBuffer();
		if (voDrawingGraphicImage.getImageDescriptionIsNotNull())
		{
			tooltip.append("*Image Description: *");
			tooltip.append(voDrawingGraphicImage.getImageDescription());
			tooltip.append(CR);
		}
		if (voDrawingGraphicImage.getVersionNumberIsNotNull())
		{
			tooltip.append("*Version No. : *");
			tooltip.append(voDrawingGraphicImage.getVersionNumber());
			tooltip.append(CR);
		}

		return new Textile().process(tooltip.toString());
	}

	return "";
}
 
Example 44
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void loadAvalilableImages()
{
	form.lyrTabs().tabDrawing().cmbGraphicAdnotationImage().clear();

	GraphicAssessmentVo graphicAssessment = domain.getActiveGraphicAssessment(UserDefinedAssessmentType.MEDICALNOTING);
	if (graphicAssessment == null)
		return;

	for (int i = 0; i < graphicAssessment.getImages().size(); i++)
	{
		DrawingGraphicImageVo image = graphicAssessment.getImages().get(i);
		if (image != null)
		{
			form.lyrTabs().tabDrawing().cmbGraphicAdnotationImage().newRow(image, image.getImageName() == null ? "Untitled" : image.getImageName());
		}
	}
}
 
Example 45
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 46
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
/**

		
	 * @param voDrawingGraphicImage
	 * @return
	 */
	private void displayImageRow(DrawingGraphicImageVo voDrawingGraphicImage, boolean autoSelect)
	{
		grdImagesRow row = form.lyrDetails().tabImages().grdImages().getRowByValue(voDrawingGraphicImage);
		if (row == null)
			row = form.lyrDetails().tabImages().grdImages().getRows().newRow(autoSelect);
		row.setcolImageName(voDrawingGraphicImage.getImageName());
		row.setcolStatus(voDrawingGraphicImage.getImageStatusIsNotNull() ? voDrawingGraphicImage.getImageStatus().toString() : "");
		row.setTooltip(getImageRowTolltip(voDrawingGraphicImage));
		row.setValue(voDrawingGraphicImage);
	}
 
Example 47
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private DrawingGraphicImageVo getCurrentImage()
{
	PatientAssessmentVo patientAssessment = form.getLocalContext().getPatientAssessment();
	
	if(patientAssessment == null || patientAssessment.getAssessmentData() == null || patientAssessment.getAssessmentData().getGraphicFindings() == null || patientAssessment.getAssessmentData().getGraphicFindings().size() == 0)
		return null;
	
	return patientAssessment.getAssessmentData().getGraphicFindings().get(0).getGraphicImage();
}
 
Example 48
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private PatientGraphicAssessmentVo getSavedGraphicAssessment(DrawingGraphicImageVo voDrawingGraphicImage, PatientAssessmentDataVo voPatientAssessmentData)
{
	if (voPatientAssessmentData.getGraphicFindings() == null)
		return null;

	for (int i = 0; i < voPatientAssessmentData.getGraphicFindings().size(); i++)
	{
		if (voPatientAssessmentData.getGraphicFindings().get(i).getGraphicImageIsNotNull() && voPatientAssessmentData.getGraphicFindings().get(i).getGraphicImage().equals(voDrawingGraphicImage))
			return voPatientAssessmentData.getGraphicFindings().get(i);
	}
	return null;
}
 
Example 49
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void removeGraphicFinding(int index)
{
	PatientAssessmentDataVo voPatAssessmentData = form.getLocalContext().getPatientAssessment().getAssessmentData();
	DrawingGraphicImageVo voDrawingGraphicImage = form.getLocalContext().getCurrentImage();

	if (voDrawingGraphicImage == null)
		throw new CodingRuntimeException("Invalid image");

	if (voPatAssessmentData != null && voPatAssessmentData.getGraphicFindingsIsNotNull())
	{
		for (int i = 0; i < voPatAssessmentData.getGraphicFindings().size(); i++)
		{
			// Check to be in the context of the same Patient Graphic Assessment
			PatientGraphicAssessmentVo voPatientGraphicAssessment = voPatAssessmentData.getGraphicFindings().get(i);
			if (voPatientGraphicAssessment.getGraphicImage().equals(voDrawingGraphicImage))
			{
				for (int j = 0; j < voPatientGraphicAssessment.getPatientGraphicFinding().size(); j++)
				{
					Integer patGraphAssFindId = voPatientGraphicAssessment.getPatientGraphicFinding().get(j).getDrawingId();
					if (patGraphAssFindId != null && patGraphAssFindId.intValue() == index)
					{
						// Remove it from vo
						voPatientGraphicAssessment.getPatientGraphicFinding().remove(j);
						voPatAssessmentData.getGraphicFindings().set(i, voPatientGraphicAssessment);
						PatientAssessmentVo assessment = getPatientAssessment();
						assessment.setAssessmentData(voPatAssessmentData);
						form.getLocalContext().setPatientAssessment(assessment);
						break;
					}
				}
				break;
			}
		}
	}
}
 
Example 50
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void remove_GraphicFinding(int index)
{
	Patient_AssessmentDataVo voPatAssessmentData = form.getLocalContext().getPatient_Assessment().getAssessmentData();
	DrawingGraphicImageVo voDrawingGraphicImage = form.getLocalContext().getCurrentImage();

	if (voDrawingGraphicImage == null)
		throw new CodingRuntimeException("Invalid image");

	if (voPatAssessmentData != null && voPatAssessmentData.getGraphicFindingsIsNotNull())
	{
		for (int i = 0; i < voPatAssessmentData.getGraphicFindings().size(); i++)
		{
			// Check to be in the context of the same Patient Graphic Assessment
			Patient_GraphicAssessmentVo voPatientGraphicAssessment = voPatAssessmentData.getGraphicFindings().get(i);
			if (voPatientGraphicAssessment.getGraphicImage().equals(voDrawingGraphicImage))
			{
				for (int j = 0; j < voPatientGraphicAssessment.getPatientGraphicFinding().size(); j++)
				{
					Integer patGraphAssFindId = voPatientGraphicAssessment.getPatientGraphicFinding().get(j).getDrawingId();
					if (patGraphAssFindId != null && patGraphAssFindId.intValue() == index)
					{
						// Remove it from vo
						voPatientGraphicAssessment.getPatientGraphicFinding().remove(j);
						voPatAssessmentData.getGraphicFindings().set(i, voPatientGraphicAssessment);
						Patient_AssessmentVo assessment = getPatient_Assessment();
						assessment.setAssessmentData(voPatAssessmentData);
						form.getLocalContext().setPatient_Assessment(assessment);
						break;
					}
				}
				break;
			}
		}
	}
}
 
Example 51
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void displaySelectedImage()
{
	DrawingGraphicImageVo img = form.lyrAssessment().tabSelectImage().grdImages().getSelectedRow().getValue();
	if (img != null)
	{
		Image image = engine.getRegisteredImage(img.getImage().getID_AppImage().intValue());
		if (image != null)
		{
			form.lyrAssessment().tabSelectImage().imgPreview().setVisible(true);
			form.lyrAssessment().tabSelectImage().imgPreview().setValue(image);
			form.lyrAssessment().tabSelectImage().btnSelectImage().setEnabled(true);
		}
	}
}
 
Example 52
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private Patient_GraphicAssessmentVo getSavedGraphicAssessment(DrawingGraphicImageVo voDrawingGraphicImage, Patient_AssessmentDataVo voPatientAssessmentData)
{
	if (voPatientAssessmentData.getGraphicFindings() == null)
		return null;

	for (int i = 0; i < voPatientAssessmentData.getGraphicFindings().size(); i++)
	{
		if (voPatientAssessmentData.getGraphicFindings().get(i).getGraphicImageIsNotNull() && voPatientAssessmentData.getGraphicFindings().get(i).getGraphicImage().equals(voDrawingGraphicImage))
			return voPatientAssessmentData.getGraphicFindings().get(i);
	}

	return null;
}
 
Example 53
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void onFormDialogClosed(ims.framework.FormName formName, ims.framework.enumerations.DialogResult result) throws ims.framework.exceptions.PresentationLogicException
{
	if (result.equals(DialogResult.OK))
	{
		if (formName.equals(form.getForms().Assessment.GraphicAssessmentInstantiationFinding))
		{
			PatientAssessmentDataVo voPatAssessmentData = form.getLocalContext().getCurrentPatientAssessmentData();
			PatientGraphicAssessmentFindingVo voPatientGraphicAssessmentFinding = form.getGlobalContext().Core.getPatientGraphicAssessmentFinding();
			DrawingGraphicImageVo voDrawingGraphicImage = form.cmbImages().getValue();
			if (voPatAssessmentData != null && voPatAssessmentData.getGraphicFindingsIsNotNull())
			{
				for (int i = 0; i < voPatAssessmentData.getGraphicFindings().size(); i++)
				{
					//Check to be in the context of the same Patient Graphic Assessment
					PatientGraphicAssessmentVo voPatientGraphicAssessment = voPatAssessmentData.getGraphicFindings().get(i);
					if (voPatientGraphicAssessment.getGraphicImageIsNotNull() && voPatientGraphicAssessment.getGraphicImage().equals(voDrawingGraphicImage))
					{
						int index = voPatientGraphicAssessment.getPatientGraphicFinding().indexOf(voPatientGraphicAssessmentFinding);
						if (index >= 0)
							voPatAssessmentData.getGraphicFindings().get(i).getPatientGraphicFinding().set(index, voPatientGraphicAssessmentFinding);
						else
							voPatAssessmentData.getGraphicFindings().get(i).getPatientGraphicFinding().add(voPatientGraphicAssessmentFinding);

						form.getLocalContext().setCurrentPatientAssessmentData(voPatAssessmentData);
						break;
					}
				}
			}
		}
	}
}
 
Example 54
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
/**
 * @param index
 */
private void removeGraphicFinding(int index)
{
	PatientAssessmentDataVo voPatAssessmentData = form.getLocalContext().getCurrentPatientAssessmentData();
	DrawingGraphicImageVo voDrawingGraphicImage = form.cmbImages().getValue();

	if (voDrawingGraphicImage == null)
	{
		engine.showMessage("Please select an Image");
		form.cmbImages().setFocus();
		return;
	}

	if (voPatAssessmentData != null && voPatAssessmentData.getGraphicFindingsIsNotNull())
	{
		for (int i = 0; i < voPatAssessmentData.getGraphicFindings().size(); i++)
		{
			//Check to be in the context of the same Patient Graphic Assessment
			PatientGraphicAssessmentVo voPatientGraphicAssessment = voPatAssessmentData.getGraphicFindings().get(i);
			if (voPatientGraphicAssessment.getGraphicImage().equals(voDrawingGraphicImage))
			{
				for (int j = 0; j < voPatientGraphicAssessment.getPatientGraphicFinding().size(); j++)
				{
					Integer patGraphAssFindId = voPatientGraphicAssessment.getPatientGraphicFinding().get(j).getDrawingId();
					if (patGraphAssFindId != null && patGraphAssFindId.intValue() == index)
					{
						//Remove it from vo
						voPatientGraphicAssessment.getPatientGraphicFinding().remove(j);
						voPatAssessmentData.getGraphicFindings().set(i, voPatientGraphicAssessment);
						form.getLocalContext().setCurrentPatientAssessmentData(voPatAssessmentData);
						break;
					}
				}
				break;
			}
		}
	}
}
 
Example 55
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 56
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private PatientGraphicAssessmentVo getSavedGraphicAssessment(DrawingGraphicImageVo voDrawingGraphicImage, PatientAssessmentDataVo voPatientAssessmentData)
{
	if (voPatientAssessmentData.getGraphicFindings() == null)
		return null;

	for (int i = 0; i < voPatientAssessmentData.getGraphicFindings().size(); i++)
	{
		if (voPatientAssessmentData.getGraphicFindings().get(i).getGraphicImageIsNotNull() && voPatientAssessmentData.getGraphicFindings().get(i).getGraphicImage().equals(voDrawingGraphicImage))
			return voPatientAssessmentData.getGraphicFindings().get(i);
	}
	return null;
}
 
Example 57
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void onlyrDrawingTabChanged(LayerBridge tab)
{
	if (tab.equals(form.lyrDrawing().tabRegionConfig()))
	{
		DrawingGraphicImageVo voDrawingGraphicImage = form.getLocalContext().getImageRecord();
		// Set the Image name - as it should be displayed as a root for the
		// DrawingConfing control
		setImageName(voDrawingGraphicImage);
	}
}
 
Example 58
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void initialize()
{
	this.clearScreen();

	if (isDialog())
	{
		form.lyrDrawing().showtabImageSearch();
		form.lyrDrawing().tabImageSearch().setHeaderVisible(true);
		form.lyrDrawing().tabImageSelect().setHeaderVisible(false);
		form.lyrDrawing().tabRegionConfig().setHeaderVisible(false);
		form.lyrDrawing().tabImageSearch().txtImageNameSearch().setFocus();
		form.lyrDrawing().tabImageSearch().GroupSearchCriteria().setValue(GroupSearchCriteriaEnumeration.rdoBeginsWith);
		setDefaultImage(null, true);
		setDefaultImage(null);
		form.setMode(FormMode.EDIT);
	}
	else
	{
		form.lyrDrawing().showtabImageSelect();
		form.lyrDrawing().tabImageSearch().setHeaderVisible(false);

		DrawingGraphicImageVo voGraphic = getDrawingGraphicImageVo();
		form.getLocalContext().setImageRecord(voGraphic);
		setDefaultImage(null, true);
		setDefaultImage(voGraphic);
		populateScreenFromData(voGraphic);
		enbleRegionConfigTab(false);

		if (isNewRecord())
			form.lyrDrawing().tabImageSelect().txtImageName().setFocus();

		if (form.getGlobalContext().Admin.getDrawingConfigFormMode() == null)
			copyDrawingDetails();
		else
			form.setMode(form.getGlobalContext().Admin.getDrawingConfigFormMode());
	}
}
 
Example 59
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void open()
{
	this.clearScreen();

	DrawingGraphicImageVo voGraphicImage = domain.getDrawingGraphicImage(form.getLocalContext().getImageRecord()); //WDEV-15246
	populateScreenFromData(voGraphicImage);
	form.setMode(FormMode.VIEW);
}
 
Example 60
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private DrawingGraphicImageVo getDrawingGraphicImageVo()
{
	DrawingGraphicImageShortVo voDrawingGraphicImageShort = form.getGlobalContext().Admin.getDrawingGraphicImageShortVo();
	if (voDrawingGraphicImageShort != null && voDrawingGraphicImageShort.getID_DrawingGraphicImageIsNotNull())
	{
		return domain.getDrawingGraphicImage(voDrawingGraphicImageShort);
	}

	DrawingGraphicImageVo voDrawingGraphicImage = new DrawingGraphicImageVo();
	voDrawingGraphicImage.setImageStatus(PreActiveActiveInactiveStatus.PREACTIVE);
	return voDrawingGraphicImage;
}