Java Code Examples for ims.emergency.vo.TrackingListForTriageVo

The following are top voted examples for showing how to use ims.emergency.vo.TrackingListForTriageVo. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populatePatientsWaitingForTriage(TrackingListForTriageVoCollection patients) 
{
	form.dyngrdPatients().getRows().clear();
	deletePatientImages();
	
	if(patients == null)
		return;
	
	Integer totalLOS = 0;
	
	for(TrackingListForTriageVo patient : patients)
	{
		Integer los = addPatientRow(patient);
		
		if(los != null)
		{
			totalLOS += los;
		}
	}
	
	Integer averageTime = totalLOS/patients.size();
	form.lblAverageTime().setValue("Average Time to be Seen : " + EmergencyDisplayHelper.minutesToHoursAndMinutes(averageTime));//WDEV-15818
	
	form.dyngrdPatients().setValue(form.getLocalContext().getSelectedTriagePatient());
}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License 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 3
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
public int compare(TrackingListForTriageVo o1, TrackingListForTriageVo o2)
{
	if (o1 != null && o1.getAttendance() != null && o1.getAttendance().getRegistrationDateTime() != null && o2!=null && o2.getAttendance() != null && o2.getAttendance().getRegistrationDateTime() != null)
	{
		Integer LOS1 = calculateDateDiffInMinutes(new DateTime(), o1.getAttendance().getRegistrationDateTime());
		Integer LOS2 = calculateDateDiffInMinutes(new DateTime(), o2.getAttendance().getRegistrationDateTime());
		
		return order*LOS1.compareTo(LOS2);
	}
	if (o1 == null || o1.getAttendance() == null || o1.getAttendance().getRegistrationDateTime() == null)
		return -1*order;
	if (o2 == null || o2.getAttendance() == null || o2.getAttendance().getRegistrationDateTime() == null)
		return order;
	
	return 0;
}
 
Example 4
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populatePatientsWaitingForTriage(TrackingListForTriageVoCollection patients) 
{
	form.dyngrdPatients().getRows().clear();
	deletePatientImages();
	
	if(patients == null)
		return;
	
	Integer totalLOS = 0;
	
	for(TrackingListForTriageVo patient : patients)
	{
		Integer los = addPatientRow(patient);
		
		if(los != null)
		{
			totalLOS += los;
		}
	}
	
	Integer averageTime = totalLOS/patients.size();
	form.lblAverageTime().setValue("Average Time to be Seen : " + EmergencyDisplayHelper.minutesToHoursAndMinutes(averageTime));//WDEV-15818
	
	form.dyngrdPatients().setValue(form.getLocalContext().getSelectedTriagePatient());
}
 
Example 5
Project: openMAXIMS   File: Logic.java   Source Code and License 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 6
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
public int compare(TrackingListForTriageVo o1, TrackingListForTriageVo o2)
{
	if (o1 != null && o1.getAttendance() != null && o1.getAttendance().getRegistrationDateTime() != null && o2!=null && o2.getAttendance() != null && o2.getAttendance().getRegistrationDateTime() != null)
	{
		Integer LOS1 = calculateDateDiffInMinutes(new DateTime(), o1.getAttendance().getRegistrationDateTime());
		Integer LOS2 = calculateDateDiffInMinutes(new DateTime(), o2.getAttendance().getRegistrationDateTime());
		
		return order*LOS1.compareTo(LOS2);
	}
	if (o1 == null || o1.getAttendance() == null || o1.getAttendance().getRegistrationDateTime() == null)
		return -1*order;
	if (o2 == null || o2.getAttendance() == null || o2.getAttendance().getRegistrationDateTime() == null)
		return order;
	
	return 0;
}
 
Example 7
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populatePatientsWaitingForTriage(TrackingListForTriageVoCollection patients) 
{
	form.dyngrdPatients().getRows().clear();
	deletePatientImages();
	
	if(patients == null)
		return;
	
	Integer totalLOS = 0;
	
	for(TrackingListForTriageVo patient : patients)
	{
		Integer los = addPatientRow(patient);
		
		if(los != null)
		{
			totalLOS += los;
		}
	}
	
	Integer averageTime = totalLOS/patients.size();
	form.lblAverageTime().setValue("Average Time to be Seen : " + EmergencyDisplayHelper.minutesToHoursAndMinutes(averageTime));//WDEV-15818
	
	form.dyngrdPatients().setValue(form.getLocalContext().getSelectedTriagePatient());
}
 
Example 8
Project: openMAXIMS   File: Logic.java   Source Code and License 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 9
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
public int compare(TrackingListForTriageVo o1, TrackingListForTriageVo o2)
{
	if (o1 != null && o1.getAttendance() != null && o1.getAttendance().getRegistrationDateTime() != null && o2!=null && o2.getAttendance() != null && o2.getAttendance().getRegistrationDateTime() != null)
	{
		Integer LOS1 = calculateDateDiffInMinutes(new DateTime(), o1.getAttendance().getRegistrationDateTime());
		Integer LOS2 = calculateDateDiffInMinutes(new DateTime(), o2.getAttendance().getRegistrationDateTime());
		
		return order*LOS1.compareTo(LOS2);
	}
	if (o1 == null || o1.getAttendance() == null || o1.getAttendance().getRegistrationDateTime() == null)
		return -1*order;
	if (o2 == null || o2.getAttendance() == null || o2.getAttendance().getRegistrationDateTime() == null)
		return order;
	
	return 0;
}
 
Example 10
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populatePatientsWaitingForTriage(TrackingListForTriageVoCollection patients) 
{
	form.dyngrdPatients().getRows().clear();
	deletePatientImages();
	
	if(patients == null)
		return;
	
	Integer totalLOS = 0;
	
	for(TrackingListForTriageVo patient : patients)
	{
		Integer los = addPatientRow(patient);
		
		if(los != null)
		{
			totalLOS += los;
		}
	}
	
	Integer averageTime = totalLOS/patients.size();
	form.lblAverageTime().setValue("Average Time to be Seen : " + EmergencyDisplayHelper.minutesToHoursAndMinutes(averageTime));//WDEV-15818
	
	form.dyngrdPatients().setValue(form.getLocalContext().getSelectedTriagePatient());
}
 
Example 11
Project: openmaxims-linux   File: Logic.java   Source Code and License 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 12
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
public int compare(TrackingListForTriageVo o1, TrackingListForTriageVo o2)
{
	if (o1 != null && o1.getAttendance() != null && o1.getAttendance().getRegistrationDateTime() != null && o2!=null && o2.getAttendance() != null && o2.getAttendance().getRegistrationDateTime() != null)
	{
		Integer LOS1 = calculateDateDiffInMinutes(new DateTime(), o1.getAttendance().getRegistrationDateTime());
		Integer LOS2 = calculateDateDiffInMinutes(new DateTime(), o2.getAttendance().getRegistrationDateTime());
		
		return order*LOS1.compareTo(LOS2);
	}
	if (o1 == null || o1.getAttendance() == null || o1.getAttendance().getRegistrationDateTime() == null)
		return -1*order;
	if (o2 == null || o2.getAttendance() == null || o2.getAttendance().getRegistrationDateTime() == null)
		return order;
	
	return 0;
}
 
Example 13
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private Image getImageForUrgency(TrackingListForTriageVo tracking) 
{
	if(tracking == null || tracking.getAttendance() == null || tracking.getAttendance().getUrgencyLevel() == null)
		return  null;
	
	Image urgency = null;
	
	urgency = tracking.getAttendance().getUrgencyLevel().getImage();
	
	return urgency;
}
 
Example 14
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private Image getImageForUrgency(TrackingListForTriageVo tracking) 
{
	if(tracking == null || tracking.getAttendance() == null || tracking.getAttendance().getUrgencyLevel() == null)
		return  null;
	
	Image urgency = null;
	
	urgency = tracking.getAttendance().getUrgencyLevel().getImage();
	
	return urgency;
}
 
Example 15
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private Image getImageForUrgency(TrackingListForTriageVo tracking) 
{
	if(tracking == null || tracking.getAttendance() == null || tracking.getAttendance().getUrgencyLevel() == null)
		return  null;
	
	Image urgency = null;
	
	urgency = tracking.getAttendance().getUrgencyLevel().getImage();
	
	return urgency;
}
 
Example 16
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private Image getImageForUrgency(TrackingListForTriageVo tracking) 
{
	if(tracking == null || tracking.getAttendance() == null || tracking.getAttendance().getUrgencyLevel() == null)
		return  null;
	
	Image urgency = null;
	
	urgency = tracking.getAttendance().getUrgencyLevel().getImage();
	
	return urgency;
}