Java Code Examples for ims.admin.vo.AppImageVo

The following are top voted examples for showing how to use ims.admin.vo.AppImageVo. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
protected void onFormOpen(Object[] args) throws PresentationLogicException 
{
	if (args != null)
	{
		if (args[0] != null && args[0] instanceof AppImageVo)
		{
			form.lyrPatientImage().tabUpload().imgImageUpload().setValue((AppImageVo)args[0]);
		}
		else
		{
			form.lyrPatientImage().tabUpload().imgImageUpload().setValue(form.getImages().Core.NoPatientImage);
		}
	}
	
	initialise();
}
 
Example 2
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void addPatientToLocalCollection(AppImageVo patientImage) 
{
	if(patientImage == null)
		return;
	
	List<String> imagesColl = form.getLocalContext().getPatientImagesList();
	
	if (imagesColl == null)
		imagesColl = new ArrayList<String>();
	
	if (EnvironmentConfig.getFileUploadMountpoint() != null && EnvironmentConfig.getFileUploadMountpoint() != "")
	{
		imagesColl.add(EnvironmentConfig.getFileUploadMountpoint() + patientImage.getImagePath());
	}
	else
	{
		imagesColl.add(EnvironmentConfig.getBaseUri() + patientImage.getImagePath());
	}
	
	form.getLocalContext().setPatientImagesList(imagesColl);
}
 
Example 3
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private AppImageVo getPatientImage(TrackingForClinicianWorklistAndTriageVo tracking) throws IOException
{
	if (tracking == null || tracking.getPatient() == null)
		return null;
	
	String sessionID = engine.getSessionId();
	
	AppDBImageVo dbImageVo =  tracking.getPatient().getPhoto();
	
	//Existing Patient with no image
	if (dbImageVo == null)
	{
		// NoPatientImage	
		AppImageVo imageVo = new AppImageVo();
		imageVo.setImagePath(form.getImages().Core.NoPatientImage.getImagePath());
		
		return imageVo;
	}
	
	String encodedImage = dbImageVo.getImageData();
	String type = dbImageVo.getImageType().getText();	  		  		  	
 	
	return decodeFromBase64(encodedImage, sessionID, type);
}
 
Example 4
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void addPatientToLocalCollection(AppImageVo patientImage) 
{
	if(patientImage == null)
		return;
	
	List<String> imagesColl = form.getLocalContext().getPatientImagesList();
	
	if (imagesColl == null)
		imagesColl = new ArrayList<String>();
	
	if (EnvironmentConfig.getFileUploadMountpoint() != null && EnvironmentConfig.getFileUploadMountpoint() != "")
	{
		imagesColl.add(EnvironmentConfig.getFileUploadMountpoint() + patientImage.getImagePath());
	}
	else
	{
		imagesColl.add(EnvironmentConfig.getBaseUri() + patientImage.getImagePath());
	}
	
	form.getLocalContext().setPatientImagesList(imagesColl);
}
 
Example 5
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private AppImageVo getPatientImage(TrackingListForClinicianWorklistVo tracking) throws IOException
{
	if (tracking == null || tracking.getPatient() == null)
		return null;
	
	String sessionID = engine.getSessionId();
	
	AppDBImageVo dbImageVo = tracking.getPatient().getPhoto();
	
	//Existing Patient with no image
	if (dbImageVo == null)
	{
		// NoPatientImage	
		AppImageVo imageVo = new AppImageVo();
		imageVo.setImagePath(engine.getRegisteredImage(102554).getImagePath());
		
		return imageVo;
	}
	
	String encodedImage = dbImageVo.getImageData();
	String type = dbImageVo.getImageType().getText();	  		  		  	
 	
	return decodeFromBase64(encodedImage, sessionID, type);
}
 
Example 6
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private AppImageVo getPatientImage(TrackingListForTriageVo tracking) throws IOException
{
	if (tracking == null || tracking.getPatient() == null)
		return null;
	
	String sessionID = engine.getSessionId();
	
	AppDBImageVo dbImageVo =  tracking.getPatient().getPhoto();
	
	//Existing Patient with no image
	if (dbImageVo == null)
	{
		// NoPatientImage	
		AppImageVo imageVo = new AppImageVo();
		imageVo.setImagePath(form.getImages().Core.NoPatientImage.getImagePath());
		
		return imageVo;
	}
	
	String encodedImage = dbImageVo.getImageData();
	String type = dbImageVo.getImageType().getText();	  		  		  	
 	
	return decodeFromBase64(encodedImage, sessionID, type);
}
 
Example 7
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void addPatientToLocalCollection(AppImageVo patientImage) 
{
	if(patientImage == null)
		return;
	
	List<String> imagesColl = form.getLocalContext().getPatientImagesList();
	
	if (imagesColl == null)
		imagesColl = new ArrayList<String>();
	
	if (EnvironmentConfig.getFileUploadMountpoint() != null && EnvironmentConfig.getFileUploadMountpoint() != "")
	{
		imagesColl.add(EnvironmentConfig.getFileUploadMountpoint() + patientImage.getImagePath());
	}
	else
	{
		imagesColl.add(EnvironmentConfig.getBaseUri() + patientImage.getImagePath());
	}
	
	form.getLocalContext().setPatientImagesList(imagesColl);
}
 
Example 8
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void addPatientToLocalCollection(AppImageVo patientImage) 
{
	if(patientImage == null)
		return;
	
	List<String> imagesColl = form.getLocalContext().getPatientImagesList();
	
	if (imagesColl == null)
		imagesColl = new ArrayList<String>();
	
	if (EnvironmentConfig.getFileUploadMountpoint() != null && EnvironmentConfig.getFileUploadMountpoint() != "")
	{
		imagesColl.add(EnvironmentConfig.getFileUploadMountpoint() + patientImage.getImagePath());
	}
	else
	{
		imagesColl.add(EnvironmentConfig.getBaseUri() + patientImage.getImagePath());
	}
	
	form.getLocalContext().setPatientImagesList(imagesColl);
}
 
Example 9
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private AppImageVo getPatientImage(TrackingForDisplayClinicianAndTriageWorklistVo tracking) throws IOException //WDEV-18001
{
	if (tracking == null || tracking.getPatient() == null)
		return null;
	
	String sessionID = engine.getSessionId();
	
	AppDBImageVo dbImageVo =  tracking.getPatient().getPhoto();
	
	//Existing Patient with no image
	if (dbImageVo == null)
	{
		// NoPatientImage	
		AppImageVo imageVo = new AppImageVo();
		imageVo.setImagePath(form.getImages().Core.NoPatientImage.getImagePath());
		
		return imageVo;
	}
	
	String encodedImage = dbImageVo.getImageData();
	String type = dbImageVo.getImageType().getText();	  		  		  	
 	
	return decodeFromBase64(encodedImage, sessionID, type);
}
 
Example 10
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
/**
 * WDEV-13186
 * Update the context menu options state
 * 
 */
private void updateContextMenuState()
{
	// Set a reference to selected image
	AppImageVo selectedImage = form.grdImages().getValue();
	
	// - 'Activate/Inactivate' option - visible only in VIEW mode for non system images
	form.getContextMenus().getImageAdminActivateItem().setVisible(selectedImage != null && !Boolean.TRUE.equals(selectedImage.getIsSystem()));

	// Set image and text for 'Activate/Inactivate' option
	// - if the action is active then set the text to 'Deactivate' and appropriate image
	// - else (and by default when no image is selected) set the text to 'Activate' and appropriate image
	if (selectedImage != null && Boolean.TRUE.equals(selectedImage.getIsActive()))
	{
		form.getContextMenus().getImageAdminActivateItem().setIcon(form.getImages().Core.Delete);
		form.getContextMenus().getImageAdminActivateItem().setText("Deactivate");
	}
	else
	{
		form.getContextMenus().getImageAdminActivateItem().setIcon(form.getImages().Core.Tick);
		form.getContextMenus().getImageAdminActivateItem().setText("Activate");
	}
}
 
Example 11
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
@Override
protected void onBtnSelectClick() throws ims.framework.exceptions.PresentationLogicException
{
	if (form.grdImages().getSelectedRow() == null)
	{
		engine.showErrors(new String[]{"Please select an image."});
		return;
	}
	Integer id = form.grdImages().getSelectedRow().getValue().getImageId();
	AppImageVo image =  domain.getImageById(id);
	if (image == null)
	{
		engine.showErrors(new String[]{"Database problems. The selected image couldn't be found in the database."});
		return;
	}
	INavigationNode nav = form.getGlobalContext().Admin.getNavigationEditedGroup();
	nav.setTextNode(form.txtName().getValue());
	nav.setImageNode(image);
	form.getGlobalContext().Admin.setNavigationEditedGroup(nav);
	engine.close(DialogResult.OK);
}
 
Example 12
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
protected void onFormOpen(Object[] args) throws PresentationLogicException 
{
	if (args != null)
	{
		if (args[0] != null && args[0] instanceof AppImageVo)
		{
			form.lyrPatientImage().tabUpload().imgImageUpload().setValue((AppImageVo)args[0]);
		}
		else
		{
			form.lyrPatientImage().tabUpload().imgImageUpload().setValue(form.getImages().Core.NoPatientImage);
		}
	}
	
	initialise();
}
 
Example 13
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
private void addPatientToLocalCollection(AppImageVo patientImage) 
{
	if(patientImage == null)
		return;
	
	List<String> imagesColl = form.getLocalContext().getPatientImagesList();
	
	if (imagesColl == null)
		imagesColl = new ArrayList<String>();
	
	if (EnvironmentConfig.getFileUploadMountpoint() != null && EnvironmentConfig.getFileUploadMountpoint() != "")
	{
		imagesColl.add(EnvironmentConfig.getFileUploadMountpoint() + patientImage.getImagePath());
	}
	else
	{
		imagesColl.add(EnvironmentConfig.getBaseUri() + patientImage.getImagePath());
	}
	
	form.getLocalContext().setPatientImagesList(imagesColl);
}
 
Example 14
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void addPatientToLocalCollection(AppImageVo patientImage) 
{
	if(patientImage == null)
		return;
	
	List<String> imagesColl = form.getLocalContext().getPatientImagesList();
	
	if (imagesColl == null)
		imagesColl = new ArrayList<String>();
	
	if (EnvironmentConfig.getFileUploadMountpoint() != null && EnvironmentConfig.getFileUploadMountpoint() != "")
	{
		imagesColl.add(EnvironmentConfig.getFileUploadMountpoint() + patientImage.getImagePath());
	}
	else
	{
		imagesColl.add(EnvironmentConfig.getBaseUri() + patientImage.getImagePath());
	}
	
	form.getLocalContext().setPatientImagesList(imagesColl);
}
 
Example 15
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private AppImageVo getPatientImage(TrackingForClinicianWorklistAndTriageVo tracking) throws IOException
{
	if (tracking == null || tracking.getPatient() == null)
		return null;
	
	String sessionID = engine.getSessionId();
	
	AppDBImageVo dbImageVo =  tracking.getPatient().getPhoto();
	
	//Existing Patient with no image
	if (dbImageVo == null)
	{
		// NoPatientImage	
		AppImageVo imageVo = new AppImageVo();
		imageVo.setImagePath(form.getImages().Core.NoPatientImage.getImagePath());
		
		return imageVo;
	}
	
	String encodedImage = dbImageVo.getImageData();
	String type = dbImageVo.getImageType().getText();	  		  		  	
 	
	return decodeFromBase64(encodedImage, sessionID, type);
}
 
Example 16
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void addPatientToLocalCollection(AppImageVo patientImage) 
{
	if(patientImage == null)
		return;
	
	List<String> imagesColl = form.getLocalContext().getPatientImagesList();
	
	if (imagesColl == null)
		imagesColl = new ArrayList<String>();
	
	if (EnvironmentConfig.getFileUploadMountpoint() != null && EnvironmentConfig.getFileUploadMountpoint() != "")
	{
		imagesColl.add(EnvironmentConfig.getFileUploadMountpoint() + patientImage.getImagePath());
	}
	else
	{
		imagesColl.add(EnvironmentConfig.getBaseUri() + patientImage.getImagePath());
	}
	
	form.getLocalContext().setPatientImagesList(imagesColl);
}
 
Example 17
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private AppImageVo getPatientImage(TrackingListForClinicianWorklistVo tracking) throws IOException
{
	if (tracking == null || tracking.getPatient() == null)
		return null;
	
	String sessionID = engine.getSessionId();
	
	AppDBImageVo dbImageVo = tracking.getPatient().getPhoto();
	
	//Existing Patient with no image
	if (dbImageVo == null)
	{
		// NoPatientImage	
		AppImageVo imageVo = new AppImageVo();
		imageVo.setImagePath(engine.getRegisteredImage(102554).getImagePath());
		
		return imageVo;
	}
	
	String encodedImage = dbImageVo.getImageData();
	String type = dbImageVo.getImageType().getText();	  		  		  	
 	
	return decodeFromBase64(encodedImage, sessionID, type);
}
 
Example 18
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private AppImageVo getPatientImage(TrackingListForTriageVo tracking) throws IOException
{
	if (tracking == null || tracking.getPatient() == null)
		return null;
	
	String sessionID = engine.getSessionId();
	
	AppDBImageVo dbImageVo =  tracking.getPatient().getPhoto();
	
	//Existing Patient with no image
	if (dbImageVo == null)
	{
		// NoPatientImage	
		AppImageVo imageVo = new AppImageVo();
		imageVo.setImagePath(form.getImages().Core.NoPatientImage.getImagePath());
		
		return imageVo;
	}
	
	String encodedImage = dbImageVo.getImageData();
	String type = dbImageVo.getImageType().getText();	  		  		  	
 	
	return decodeFromBase64(encodedImage, sessionID, type);
}
 
Example 19
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
private AppImageVo getPatientImage(TrackingListForTriageVo tracking) throws IOException
{
	if (tracking == null || tracking.getPatient() == null)
		return null;
	
	String sessionID = engine.getSessionId();
	
	AppDBImageVo dbImageVo =  tracking.getPatient().getPhoto();
	
	//Existing Patient with no image
	if (dbImageVo == null)
	{
		// NoPatientImage	
		AppImageVo imageVo = new AppImageVo();
		imageVo.setImagePath(form.getImages().Core.NoPatientImage.getImagePath());
		
		return imageVo;
	}
	
	String encodedImage = dbImageVo.getImageData();
	String type = dbImageVo.getImageType().getText();	  		  		  	
 	
	return decodeFromBase64(encodedImage, sessionID, type);
}
 
Example 20
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private AppImageVo getPatientImage(TrackingForPatientWhiteBoardVo tempVo) throws IOException
{
	if (tempVo == null || tempVo.getPatient() == null)
		return null;
	
	String sessionID = engine.getSessionId();
	
	AppDBImageVo dbImageVo =  tempVo.getPatient().getPhoto();
	
	//Existing Patient with no image
	if (dbImageVo == null)
	{
		// NoPatientImage	
		AppImageVo imageVo = new AppImageVo();
		imageVo.setImagePath(form.getImages().Core.NoPatientImage.getImagePath());
		
		return imageVo;
	}
	
	String encodedImage = dbImageVo.getImageData();
	String type = dbImageVo.getImageType().getText();	  		  		  	
 	
	return decodeFromBase64(encodedImage, sessionID, type);
}
 
Example 21
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void addPatientToLocalCollection(AppImageVo patientImage) 
{
	if(patientImage == null)
		return;
	
	List<String> imagesColl = form.getLocalContext().getPatientImagesList();
	
	if (imagesColl == null)
		imagesColl = new ArrayList<String>();
	
	if (EnvironmentConfig.getFileUploadMountpoint() != null && EnvironmentConfig.getFileUploadMountpoint() != "")
	{
		imagesColl.add(EnvironmentConfig.getFileUploadMountpoint() + patientImage.getImagePath());
	}
	else
	{
		imagesColl.add(EnvironmentConfig.getBaseUri() + patientImage.getImagePath());
	}
	
	form.getLocalContext().setPatientImagesList(imagesColl);
}
 
Example 22
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private AppImageVo getPatientImage(TrackingForDisplayClinicianAndTriageWorklistVo tracking) throws IOException //WDEV-18001
{
	if (tracking == null || tracking.getPatient() == null)
		return null;
	
	String sessionID = engine.getSessionId();
	
	AppDBImageVo dbImageVo =  tracking.getPatient().getPhoto();
	
	//Existing Patient with no image
	if (dbImageVo == null)
	{
		// NoPatientImage	
		AppImageVo imageVo = new AppImageVo();
		imageVo.setImagePath(form.getImages().Core.NoPatientImage.getImagePath());
		
		return imageVo;
	}
	
	String encodedImage = dbImageVo.getImageData();
	String type = dbImageVo.getImageType().getText();	  		  		  	
 	
	return decodeFromBase64(encodedImage, sessionID, type);
}
 
Example 23
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
@Override
protected void onBtnSelectClick() throws ims.framework.exceptions.PresentationLogicException
{
	if (form.grdImages().getSelectedRow() == null)
	{
		engine.showErrors(new String[]{"Please select an image."});
		return;
	}
	Integer id = form.grdImages().getSelectedRow().getValue().getImageId();
	AppImageVo image =  domain.getImageById(id);
	if (image == null)
	{
		engine.showErrors(new String[]{"Database problems. The selected image couldn't be found in the database."});
		return;
	}
	INavigationNode nav = form.getGlobalContext().Admin.getNavigationEditedGroup();
	nav.setTextNode(form.txtName().getValue());
	nav.setImageNode(image);
	form.getGlobalContext().Admin.setNavigationEditedGroup(nav);
	engine.close(DialogResult.OK);
}
 
Example 24
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
/**
 * WDEV-13186
 * Update the context menu options state
 * 
 */
private void updateContextMenuState()
{
	// Set a reference to selected image
	AppImageVo selectedImage = form.grdImages().getValue();
	
	// - 'Activate/Inactivate' option - visible only in VIEW mode for non system images
	form.getContextMenus().getImageAdminActivateItem().setVisible(selectedImage != null && !Boolean.TRUE.equals(selectedImage.getIsSystem()));

	// Set image and text for 'Activate/Inactivate' option
	// - if the action is active then set the text to 'Deactivate' and appropriate image
	// - else (and by default when no image is selected) set the text to 'Activate' and appropriate image
	if (selectedImage != null && Boolean.TRUE.equals(selectedImage.getIsActive()))
	{
		form.getContextMenus().getImageAdminActivateItem().setIcon(form.getImages().Core.Delete);
		form.getContextMenus().getImageAdminActivateItem().setText("Deactivate");
	}
	else
	{
		form.getContextMenus().getImageAdminActivateItem().setIcon(form.getImages().Core.Tick);
		form.getContextMenus().getImageAdminActivateItem().setText("Activate");
	}
}
 
Example 25
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
protected void onFormOpen(Object[] args) throws PresentationLogicException 
{
	if (args != null)
	{
		if (args[0] != null && args[0] instanceof AppImageVo)
		{
			form.lyrPatientImage().tabUpload().imgImageUpload().setValue((AppImageVo)args[0]);
		}
		else
		{
			form.lyrPatientImage().tabUpload().imgImageUpload().setValue(form.getImages().Core.NoPatientImage);
		}
	}
	
	initialise();
}
 
Example 26
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
private void addPatientToLocalCollection(AppImageVo patientImage) 
{
	if(patientImage == null)
		return;
	
	List<String> imagesColl = form.getLocalContext().getPatientImagesList();
	
	if (imagesColl == null)
		imagesColl = new ArrayList<String>();
	
	if (EnvironmentConfig.getFileUploadMountpoint() != null && EnvironmentConfig.getFileUploadMountpoint() != "")
	{
		imagesColl.add(EnvironmentConfig.getFileUploadMountpoint() + patientImage.getImagePath());
	}
	else
	{
		imagesColl.add(EnvironmentConfig.getBaseUri() + patientImage.getImagePath());
	}
	
	form.getLocalContext().setPatientImagesList(imagesColl);
}
 
Example 27
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void addPatientToLocalCollection(AppImageVo patientImage) 
{
	if(patientImage == null)
		return;
	
	List<String> imagesColl = form.getLocalContext().getPatientImagesList();
	
	if (imagesColl == null)
		imagesColl = new ArrayList<String>();
	
	if (EnvironmentConfig.getFileUploadMountpoint() != null && EnvironmentConfig.getFileUploadMountpoint() != "")
	{
		imagesColl.add(EnvironmentConfig.getFileUploadMountpoint() + patientImage.getImagePath());
	}
	else
	{
		imagesColl.add(EnvironmentConfig.getBaseUri() + patientImage.getImagePath());
	}
	
	form.getLocalContext().setPatientImagesList(imagesColl);
}
 
Example 28
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void addPatientToLocalCollection(AppImageVo patientImage) 
{
	if(patientImage == null)
		return;
	
	List<String> imagesColl = form.getLocalContext().getPatientImagesList();
	
	if (imagesColl == null)
		imagesColl = new ArrayList<String>();
	
	if (EnvironmentConfig.getFileUploadMountpoint() != null && EnvironmentConfig.getFileUploadMountpoint() != "")
	{
		imagesColl.add(EnvironmentConfig.getFileUploadMountpoint() + patientImage.getImagePath());
	}
	else
	{
		imagesColl.add(EnvironmentConfig.getBaseUri() + patientImage.getImagePath());
	}
	
	form.getLocalContext().setPatientImagesList(imagesColl);
}
 
Example 29
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private AppImageVo getPatientImage(TrackingListForClinicianWorklistVo tracking) throws IOException
{
	if (tracking == null || tracking.getPatient() == null)
		return null;
	
	String sessionID = engine.getSessionId();
	
	AppDBImageVo dbImageVo = tracking.getPatient().getPhoto();
	
	//Existing Patient with no image
	if (dbImageVo == null)
	{
		// NoPatientImage	
		AppImageVo imageVo = new AppImageVo();
		imageVo.setImagePath(engine.getRegisteredImage(102554).getImagePath());
		
		return imageVo;
	}
	
	String encodedImage = dbImageVo.getImageData();
	String type = dbImageVo.getImageType().getText();	  		  		  	
 	
	return decodeFromBase64(encodedImage, sessionID, type);
}
 
Example 30
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private AppImageVo getPatientImage(TrackingListForTriageVo tracking) throws IOException
{
	if (tracking == null || tracking.getPatient() == null)
		return null;
	
	String sessionID = engine.getSessionId();
	
	AppDBImageVo dbImageVo =  tracking.getPatient().getPhoto();
	
	//Existing Patient with no image
	if (dbImageVo == null)
	{
		// NoPatientImage	
		AppImageVo imageVo = new AppImageVo();
		imageVo.setImagePath(form.getImages().Core.NoPatientImage.getImagePath());
		
		return imageVo;
	}
	
	String encodedImage = dbImageVo.getImageData();
	String type = dbImageVo.getImageType().getText();	  		  		  	
 	
	return decodeFromBase64(encodedImage, sessionID, type);
}
 
Example 31
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void addPatientToLocalCollection(AppImageVo patientImage) 
{
	if(patientImage == null)
		return;
	
	List<String> imagesColl = form.getLocalContext().getPatientImagesList();
	
	if (imagesColl == null)
		imagesColl = new ArrayList<String>();
	
	if (EnvironmentConfig.getFileUploadMountpoint() != null && EnvironmentConfig.getFileUploadMountpoint() != "")
	{
		imagesColl.add(EnvironmentConfig.getFileUploadMountpoint() + patientImage.getImagePath());
	}
	else
	{
		imagesColl.add(EnvironmentConfig.getBaseUri() + patientImage.getImagePath());
	}
	
	form.getLocalContext().setPatientImagesList(imagesColl);
}
 
Example 32
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private AppImageVo getPatientImage(TrackingForDisplayClinicianAndTriageWorklistVo tracking) throws IOException //WDEV-18001
{
	if (tracking == null || tracking.getPatient() == null)
		return null;
	
	String sessionID = engine.getSessionId();
	
	AppDBImageVo dbImageVo =  tracking.getPatient().getPhoto();
	
	//Existing Patient with no image
	if (dbImageVo == null)
	{
		// NoPatientImage	
		AppImageVo imageVo = new AppImageVo();
		imageVo.setImagePath(form.getImages().Core.NoPatientImage.getImagePath());
		
		return imageVo;
	}
	
	String encodedImage = dbImageVo.getImageData();
	String type = dbImageVo.getImageType().getText();	  		  		  	
 	
	return decodeFromBase64(encodedImage, sessionID, type);
}
 
Example 33
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
/**
 * WDEV-13186
 * Update the context menu options state
 * 
 */
private void updateContextMenuState()
{
	// Set a reference to selected image
	AppImageVo selectedImage = form.grdImages().getValue();
	
	// - 'Activate/Inactivate' option - visible only in VIEW mode for non system images
	form.getContextMenus().getImageAdminActivateItem().setVisible(selectedImage != null && !Boolean.TRUE.equals(selectedImage.getIsSystem()));

	// Set image and text for 'Activate/Inactivate' option
	// - if the action is active then set the text to 'Deactivate' and appropriate image
	// - else (and by default when no image is selected) set the text to 'Activate' and appropriate image
	if (selectedImage != null && Boolean.TRUE.equals(selectedImage.getIsActive()))
	{
		form.getContextMenus().getImageAdminActivateItem().setIcon(form.getImages().Core.Delete);
		form.getContextMenus().getImageAdminActivateItem().setText("Deactivate");
	}
	else
	{
		form.getContextMenus().getImageAdminActivateItem().setIcon(form.getImages().Core.Tick);
		form.getContextMenus().getImageAdminActivateItem().setText("Activate");
	}
}
 
Example 34
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
@Override
protected void onBtnSelectClick() throws ims.framework.exceptions.PresentationLogicException
{
	if (form.grdImages().getSelectedRow() == null)
	{
		engine.showErrors(new String[]{"Please select an image."});
		return;
	}
	Integer id = form.grdImages().getSelectedRow().getValue().getImageId();
	AppImageVo image =  domain.getImageById(id);
	if (image == null)
	{
		engine.showErrors(new String[]{"Database problems. The selected image couldn't be found in the database."});
		return;
	}
	INavigationNode nav = form.getGlobalContext().Admin.getNavigationEditedGroup();
	nav.setTextNode(form.txtName().getValue());
	nav.setImageNode(image);
	form.getGlobalContext().Admin.setNavigationEditedGroup(nav);
	engine.close(DialogResult.OK);
}
 
Example 35
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
/**
 * WDEV-13186
 * Update the context menu options state
 * 
 */
private void updateContextMenuState()
{
	// Set a reference to selected image
	AppImageVo selectedImage = form.grdImages().getValue();
	
	// - 'Activate/Inactivate' option - visible only in VIEW mode for non system images
	form.getContextMenus().getImageAdminActivateItem().setVisible(selectedImage != null && !Boolean.TRUE.equals(selectedImage.getIsSystem()));

	// Set image and text for 'Activate/Inactivate' option
	// - if the action is active then set the text to 'Deactivate' and appropriate image
	// - else (and by default when no image is selected) set the text to 'Activate' and appropriate image
	if (selectedImage != null && Boolean.TRUE.equals(selectedImage.getIsActive()))
	{
		form.getContextMenus().getImageAdminActivateItem().setIcon(form.getImages().Core.Delete);
		form.getContextMenus().getImageAdminActivateItem().setText("Deactivate");
	}
	else
	{
		form.getContextMenus().getImageAdminActivateItem().setIcon(form.getImages().Core.Tick);
		form.getContextMenus().getImageAdminActivateItem().setText("Activate");
	}
}
 
Example 36
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
protected void onFormOpen(Object[] args) throws PresentationLogicException 
{
	if (args != null)
	{
		if (args[0] != null && args[0] instanceof AppImageVo)
		{
			form.lyrPatientImage().tabUpload().imgImageUpload().setValue((AppImageVo)args[0]);
		}
		else
		{
			form.lyrPatientImage().tabUpload().imgImageUpload().setValue(form.getImages().Core.NoPatientImage);
		}
	}
	
	initialise();
}
 
Example 37
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
private void addPatientToLocalCollection(AppImageVo patientImage) 
{
	if(patientImage == null)
		return;
	
	List<String> imagesColl = form.getLocalContext().getPatientImagesList();
	
	if (imagesColl == null)
		imagesColl = new ArrayList<String>();
	
	if (EnvironmentConfig.getFileUploadMountpoint() != null && EnvironmentConfig.getFileUploadMountpoint() != "")
	{
		imagesColl.add(EnvironmentConfig.getFileUploadMountpoint() + patientImage.getImagePath());
	}
	else
	{
		imagesColl.add(EnvironmentConfig.getBaseUri() + patientImage.getImagePath());
	}
	
	form.getLocalContext().setPatientImagesList(imagesColl);
}
 
Example 38
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
private AppImageVo getPatientImage(TrackingForClinicianWorklistAndTriageVo tracking) throws IOException
{
	if (tracking == null || tracking.getPatient() == null)
		return null;
	
	String sessionID = engine.getSessionId();
	
	AppDBImageVo dbImageVo =  tracking.getPatient().getPhoto();
	
	//Existing Patient with no image
	if (dbImageVo == null)
	{
		// NoPatientImage	
		AppImageVo imageVo = new AppImageVo();
		imageVo.setImagePath(form.getImages().Core.NoPatientImage.getImagePath());
		
		return imageVo;
	}
	
	String encodedImage = dbImageVo.getImageData();
	String type = dbImageVo.getImageType().getText();	  		  		  	
 	
	return decodeFromBase64(encodedImage, sessionID, type);
}
 
Example 39
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
private void addPatientToLocalCollection(AppImageVo patientImage) 
{
	if(patientImage == null)
		return;
	
	List<String> imagesColl = form.getLocalContext().getPatientImagesList();
	
	if (imagesColl == null)
		imagesColl = new ArrayList<String>();
	
	if (EnvironmentConfig.getFileUploadMountpoint() != null && EnvironmentConfig.getFileUploadMountpoint() != "")
	{
		imagesColl.add(EnvironmentConfig.getFileUploadMountpoint() + patientImage.getImagePath());
	}
	else
	{
		imagesColl.add(EnvironmentConfig.getBaseUri() + patientImage.getImagePath());
	}
	
	form.getLocalContext().setPatientImagesList(imagesColl);
}
 
Example 40
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
private AppImageVo getPatientImage(TrackingListForClinicianWorklistVo tracking) throws IOException
{
	if (tracking == null || tracking.getPatient() == null)
		return null;
	
	String sessionID = engine.getSessionId();
	
	AppDBImageVo dbImageVo = tracking.getPatient().getPhoto();
	
	//Existing Patient with no image
	if (dbImageVo == null)
	{
		// NoPatientImage	
		AppImageVo imageVo = new AppImageVo();
		imageVo.setImagePath(engine.getRegisteredImage(102554).getImagePath());
		
		return imageVo;
	}
	
	String encodedImage = dbImageVo.getImageData();
	String type = dbImageVo.getImageType().getText();	  		  		  	
 	
	return decodeFromBase64(encodedImage, sessionID, type);
}