Java Code Examples for ims.emergency.vo.TrackingListForClinicianWorklistVo

The following are top voted examples for showing how to use ims.emergency.vo.TrackingListForClinicianWorklistVo. 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 Image getPriorityImage(TrackingListForClinicianWorklistVo tracking) 
{
	if(tracking == null || tracking.getTriageDetails() == null)
		return null;
	
	if(TriagePriority.PRIORITY1.equals(tracking.getTriageDetails().getCurrentTriagePriority()))
		return form.getImages().Emergency.Triage_Priority_P1;
	else if(TriagePriority.PRIORITY2.equals(tracking.getTriageDetails().getCurrentTriagePriority()))
		return form.getImages().Emergency.Triage_Priority_P2;
	else if(TriagePriority.PRIORITY3.equals(tracking.getTriageDetails().getCurrentTriagePriority()))
		return form.getImages().Emergency.Triage_Priority_P3;
	else if(TriagePriority.PRIORITY4.equals(tracking.getTriageDetails().getCurrentTriagePriority()))
		return form.getImages().Emergency.Triage_Priority_P4;
	else if(TriagePriority.PRIORITY5.equals(tracking.getTriageDetails().getCurrentTriagePriority()))
		return form.getImages().Emergency.Triage_Priority_P5;
	
	return null;
}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License 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 3
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private int compareByLOS(TrackingListForClinicianWorklistVo o1, TrackingListForClinicianWorklistVo 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());
		
		int orderByLOS = -1 * LOS1.compareTo(LOS2);
		
		if(orderByLOS == 0)
		{
			return compareByName(o1, o2);
		}
		
		return orderByLOS;
	}
	
	if (o1 == null || o1.getAttendance() == null || o1.getAttendance().getRegistrationDateTime() == null)
		return -1;
	
	if (o2 == null || o2.getAttendance() == null || o2.getAttendance().getRegistrationDateTime() == null)
		return 1;
	
	return 0;
}
 
Example 4
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private Image getPriorityImage(TrackingListForClinicianWorklistVo tracking) 
{
	if(tracking == null || tracking.getTriageDetails() == null)
		return null;
	
	if(TriagePriority.PRIORITY1.equals(tracking.getTriageDetails().getCurrentTriagePriority()))
		return form.getImages().Emergency.Triage_Priority_P1;
	else if(TriagePriority.PRIORITY2.equals(tracking.getTriageDetails().getCurrentTriagePriority()))
		return form.getImages().Emergency.Triage_Priority_P2;
	else if(TriagePriority.PRIORITY3.equals(tracking.getTriageDetails().getCurrentTriagePriority()))
		return form.getImages().Emergency.Triage_Priority_P3;
	else if(TriagePriority.PRIORITY4.equals(tracking.getTriageDetails().getCurrentTriagePriority()))
		return form.getImages().Emergency.Triage_Priority_P4;
	else if(TriagePriority.PRIORITY5.equals(tracking.getTriageDetails().getCurrentTriagePriority()))
		return form.getImages().Emergency.Triage_Priority_P5;
	else if(TriagePriority.SKIPPED_TRIAGE.equals(tracking.getTriageDetails().getCurrentTriagePriority()))
		return form.getImages().Emergency.Triage_Priority_SkippedTriage;
	
	return null;
}
 
Example 5
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private int compareByLOS(TrackingListForClinicianWorklistVo o1, TrackingListForClinicianWorklistVo 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());
		
		int orderByLOS = -1 * LOS1.compareTo(LOS2);
		
		if(orderByLOS == 0)
		{
			return compareByName(o1, o2);
		}
		
		return orderByLOS;
	}
	
	if (o1 == null || o1.getAttendance() == null || o1.getAttendance().getRegistrationDateTime() == null)
		return -1;
	
	if (o2 == null || o2.getAttendance() == null || o2.getAttendance().getRegistrationDateTime() == null)
		return 1;
	
	return 0;
}
 
Example 6
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private Image getPriorityImage(TrackingListForClinicianWorklistVo tracking) 
{
	if(tracking == null || tracking.getTriageDetails() == null)
		return null;
	
	if(TriagePriority.PRIORITY1.equals(tracking.getTriageDetails().getCurrentTriagePriority()))
		return form.getImages().Emergency.Triage_Priority_P1;
	else if(TriagePriority.PRIORITY2.equals(tracking.getTriageDetails().getCurrentTriagePriority()))
		return form.getImages().Emergency.Triage_Priority_P2;
	else if(TriagePriority.PRIORITY3.equals(tracking.getTriageDetails().getCurrentTriagePriority()))
		return form.getImages().Emergency.Triage_Priority_P3;
	else if(TriagePriority.PRIORITY4.equals(tracking.getTriageDetails().getCurrentTriagePriority()))
		return form.getImages().Emergency.Triage_Priority_P4;
	else if(TriagePriority.PRIORITY5.equals(tracking.getTriageDetails().getCurrentTriagePriority()))
		return form.getImages().Emergency.Triage_Priority_P5;
	
	return null;
}
 
Example 7
Project: openMAXIMS   File: Logic.java   Source Code and License 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 8
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private int compareByLOS(TrackingListForClinicianWorklistVo o1, TrackingListForClinicianWorklistVo 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());
		
		int orderByLOS = -1 * LOS1.compareTo(LOS2);
		
		if(orderByLOS == 0)
		{
			return compareByName(o1, o2);
		}
		
		return orderByLOS;
	}
	
	if (o1 == null || o1.getAttendance() == null || o1.getAttendance().getRegistrationDateTime() == null)
		return -1;
	
	if (o2 == null || o2.getAttendance() == null || o2.getAttendance().getRegistrationDateTime() == null)
		return 1;
	
	return 0;
}
 
Example 9
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private int compareByLOS(TrackingListForClinicianWorklistVo o1, TrackingListForClinicianWorklistVo 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());
		
		int orderByLOS = -1 * LOS1.compareTo(LOS2);
		
		if(orderByLOS == 0)
		{
			return compareByName(o1, o2);
		}
		
		return orderByLOS;
	}
	
	if (o1 == null || o1.getAttendance() == null || o1.getAttendance().getRegistrationDateTime() == null)
		return -1;
	
	if (o2 == null || o2.getAttendance() == null || o2.getAttendance().getRegistrationDateTime() == null)
		return 1;
	
	return 0;
}
 
Example 10
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private Image getPriorityImage(TrackingListForClinicianWorklistVo tracking) 
{
	if(tracking == null || tracking.getTriageDetails() == null)
		return null;
	
	if(TriagePriority.PRIORITY1.equals(tracking.getTriageDetails().getCurrentTriagePriority()))
		return form.getImages().Emergency.Triage_Priority_P1;
	else if(TriagePriority.PRIORITY2.equals(tracking.getTriageDetails().getCurrentTriagePriority()))
		return form.getImages().Emergency.Triage_Priority_P2;
	else if(TriagePriority.PRIORITY3.equals(tracking.getTriageDetails().getCurrentTriagePriority()))
		return form.getImages().Emergency.Triage_Priority_P3;
	else if(TriagePriority.PRIORITY4.equals(tracking.getTriageDetails().getCurrentTriagePriority()))
		return form.getImages().Emergency.Triage_Priority_P4;
	else if(TriagePriority.PRIORITY5.equals(tracking.getTriageDetails().getCurrentTriagePriority()))
		return form.getImages().Emergency.Triage_Priority_P5;
	
	return null;
}
 
Example 11
Project: openMAXIMS   File: Logic.java   Source Code and License 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 12
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private int compareByLOS(TrackingListForClinicianWorklistVo o1, TrackingListForClinicianWorklistVo 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());
		
		int orderByLOS = -1 * LOS1.compareTo(LOS2);
		
		if(orderByLOS == 0)
		{
			return compareByName(o1, o2);
		}
		
		return orderByLOS;
	}
	
	if (o1 == null || o1.getAttendance() == null || o1.getAttendance().getRegistrationDateTime() == null)
		return -1;
	
	if (o2 == null || o2.getAttendance() == null || o2.getAttendance().getRegistrationDateTime() == null)
		return 1;
	
	return 0;
}
 
Example 13
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private Image getPriorityImage(TrackingListForClinicianWorklistVo tracking) 
{
	if(tracking == null || tracking.getTriageDetails() == null)
		return null;
	
	if(TriagePriority.PRIORITY1.equals(tracking.getTriageDetails().getCurrentTriagePriority()))
		return form.getImages().Emergency.Triage_Priority_P1;
	else if(TriagePriority.PRIORITY2.equals(tracking.getTriageDetails().getCurrentTriagePriority()))
		return form.getImages().Emergency.Triage_Priority_P2;
	else if(TriagePriority.PRIORITY3.equals(tracking.getTriageDetails().getCurrentTriagePriority()))
		return form.getImages().Emergency.Triage_Priority_P3;
	else if(TriagePriority.PRIORITY4.equals(tracking.getTriageDetails().getCurrentTriagePriority()))
		return form.getImages().Emergency.Triage_Priority_P4;
	else if(TriagePriority.PRIORITY5.equals(tracking.getTriageDetails().getCurrentTriagePriority()))
		return form.getImages().Emergency.Triage_Priority_P5;
	else if(TriagePriority.SKIPPED_TRIAGE.equals(tracking.getTriageDetails().getCurrentTriagePriority()))
		return form.getImages().Emergency.Triage_Priority_SkippedTriage;
	
	return null;
}
 
Example 14
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private int compareByLOS(TrackingListForClinicianWorklistVo o1, TrackingListForClinicianWorklistVo 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());
		
		int orderByLOS = -1 * LOS1.compareTo(LOS2);
		
		if(orderByLOS == 0)
		{
			return compareByName(o1, o2);
		}
		
		return orderByLOS;
	}
	
	if (o1 == null || o1.getAttendance() == null || o1.getAttendance().getRegistrationDateTime() == null)
		return -1;
	
	if (o2 == null || o2.getAttendance() == null || o2.getAttendance().getRegistrationDateTime() == null)
		return 1;
	
	return 0;
}
 
Example 15
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private Image getPriorityImage(TrackingListForClinicianWorklistVo tracking) 
{
	if(tracking == null || tracking.getTriageDetails() == null)
		return null;
	
	if(TriagePriority.PRIORITY1.equals(tracking.getTriageDetails().getCurrentTriagePriority()))
		return form.getImages().Emergency.Triage_Priority_P1;
	else if(TriagePriority.PRIORITY2.equals(tracking.getTriageDetails().getCurrentTriagePriority()))
		return form.getImages().Emergency.Triage_Priority_P2;
	else if(TriagePriority.PRIORITY3.equals(tracking.getTriageDetails().getCurrentTriagePriority()))
		return form.getImages().Emergency.Triage_Priority_P3;
	else if(TriagePriority.PRIORITY4.equals(tracking.getTriageDetails().getCurrentTriagePriority()))
		return form.getImages().Emergency.Triage_Priority_P4;
	else if(TriagePriority.PRIORITY5.equals(tracking.getTriageDetails().getCurrentTriagePriority()))
		return form.getImages().Emergency.Triage_Priority_P5;
	
	return null;
}
 
Example 16
Project: openmaxims-linux   File: Logic.java   Source Code and License 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 17
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private int compareByLOS(TrackingListForClinicianWorklistVo o1, TrackingListForClinicianWorklistVo 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());
		
		int orderByLOS = -1 * LOS1.compareTo(LOS2);
		
		if(orderByLOS == 0)
		{
			return compareByName(o1, o2);
		}
		
		return orderByLOS;
	}
	
	if (o1 == null || o1.getAttendance() == null || o1.getAttendance().getRegistrationDateTime() == null)
		return -1;
	
	if (o2 == null || o2.getAttendance() == null || o2.getAttendance().getRegistrationDateTime() == null)
		return 1;
	
	return 0;
}
 
Example 18
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private Image getPriorityImage(TrackingListForClinicianWorklistVo tracking) 
{
	if(tracking == null || tracking.getTriageDetails() == null)
		return null;
	
	if(TriagePriority.PRIORITY1.equals(tracking.getTriageDetails().getCurrentTriagePriority()))
		return form.getImages().Emergency.Triage_Priority_P1;
	else if(TriagePriority.PRIORITY2.equals(tracking.getTriageDetails().getCurrentTriagePriority()))
		return form.getImages().Emergency.Triage_Priority_P2;
	else if(TriagePriority.PRIORITY3.equals(tracking.getTriageDetails().getCurrentTriagePriority()))
		return form.getImages().Emergency.Triage_Priority_P3;
	else if(TriagePriority.PRIORITY4.equals(tracking.getTriageDetails().getCurrentTriagePriority()))
		return form.getImages().Emergency.Triage_Priority_P4;
	else if(TriagePriority.PRIORITY5.equals(tracking.getTriageDetails().getCurrentTriagePriority()))
		return form.getImages().Emergency.Triage_Priority_P5;
	else if(TriagePriority.SKIPPED_TRIAGE.equals(tracking.getTriageDetails().getCurrentTriagePriority()))
		return form.getImages().Emergency.Triage_Priority_SkippedTriage;
	
	return null;
}
 
Example 19
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private int compareByLOS(TrackingListForClinicianWorklistVo o1, TrackingListForClinicianWorklistVo 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());
		
		int orderByLOS = -1 * LOS1.compareTo(LOS2);
		
		if(orderByLOS == 0)
		{
			return compareByName(o1, o2);
		}
		
		return orderByLOS;
	}
	
	if (o1 == null || o1.getAttendance() == null || o1.getAttendance().getRegistrationDateTime() == null)
		return -1;
	
	if (o2 == null || o2.getAttendance() == null || o2.getAttendance().getRegistrationDateTime() == null)
		return 1;
	
	return 0;
}
 
Example 20
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
public int compare(TrackingListForClinicianWorklistVo o1, TrackingListForClinicianWorklistVo o2)
{
	if (o1 != null && o1.getTriageDetails() != null && o1.getTriageDetails().getCurrentTriagePriority() != null && o2!=null && o2.getTriageDetails() != null && o2.getTriageDetails().getCurrentTriagePriority() != null)
	{
		Integer priorityOrder1 = getOrderByIndex(o1.getTriageDetails().getCurrentTriagePriority());
		Integer priorityOrder2 = getOrderByIndex(o2.getTriageDetails().getCurrentTriagePriority());
		
		int orderByPriority = priorityOrder1.compareTo(priorityOrder2);
		
		if(orderByPriority == 0)
		{
			return compareByLOS(o1, o2);
		}
		
		return orderByPriority;
	}
	
	if((o1 == null || o1.getTriageDetails() == null || o1.getTriageDetails().getCurrentTriagePriority() == null) && (o2 == null || o2.getTriageDetails() == null || o2.getTriageDetails().getCurrentTriagePriority() == null))
		return compareByLOS(o1, o2);
	
	if (o1 == null || o1.getTriageDetails() == null || o1.getTriageDetails().getCurrentTriagePriority() == null)
		return 1;
	
	if (o2 == null || o2.getTriageDetails() == null || o2.getTriageDetails().getCurrentTriagePriority() == null)
		return -1;
	
	return 0;
}
 
Example 21
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private int compareByName(TrackingListForClinicianWorklistVo o1, TrackingListForClinicianWorklistVo o2) 
{
	if(o1 != null && o1.getPatient() != null && o1.getPatient().getName() != null && o2 != null && o2.getPatient() != null && o2.getPatient().getName() != null)
	{
		return o1.getPatient().getName().compareTo(o2.getPatient().getName(), true);
	}
	
	if (o1 == null || o1.getPatient() == null || o1.getPatient().getName() == null)
		return -1;
	
	if (o2 == null || o2.getPatient() == null || o2.getPatient().getName() == null)
		return 1;
	
	return 0;
}
 
Example 22
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
public int compare(TrackingListForClinicianWorklistVo o1, TrackingListForClinicianWorklistVo o2)
{
	if (o1 != null && o1.getTriageDetails() != null && o1.getTriageDetails().getCurrentTriagePriority() != null && o2!=null && o2.getTriageDetails() != null && o2.getTriageDetails().getCurrentTriagePriority() != null)
	{
		Integer priorityOrder1 = getOrderByIndex(o1.getTriageDetails().getCurrentTriagePriority());
		Integer priorityOrder2 = getOrderByIndex(o2.getTriageDetails().getCurrentTriagePriority());
		
		int orderByPriority = priorityOrder1.compareTo(priorityOrder2);
		
		if(orderByPriority == 0)
		{
			return compareByLOS(o1, o2);
		}
		
		return orderByPriority;
	}
	
	if((o1 == null || o1.getTriageDetails() == null || o1.getTriageDetails().getCurrentTriagePriority() == null) && (o2 == null || o2.getTriageDetails() == null || o2.getTriageDetails().getCurrentTriagePriority() == null))
		return compareByLOS(o1, o2);
	
	if (o1 == null || o1.getTriageDetails() == null || o1.getTriageDetails().getCurrentTriagePriority() == null)
		return 1;
	
	if (o2 == null || o2.getTriageDetails() == null || o2.getTriageDetails().getCurrentTriagePriority() == null)
		return -1;
	
	return 0;
}
 
Example 23
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private int compareByName(TrackingListForClinicianWorklistVo o1, TrackingListForClinicianWorklistVo o2) 
{
	if(o1 != null && o1.getPatient() != null && o1.getPatient().getName() != null && o2 != null && o2.getPatient() != null && o2.getPatient().getName() != null)
	{
		return o1.getPatient().getName().compareTo(o2.getPatient().getName(), true);
	}
	
	if (o1 == null || o1.getPatient() == null || o1.getPatient().getName() == null)
		return -1;
	
	if (o2 == null || o2.getPatient() == null || o2.getPatient().getName() == null)
		return 1;
	
	return 0;
}
 
Example 24
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
public int compare(TrackingListForClinicianWorklistVo o1, TrackingListForClinicianWorklistVo o2)
{
	if (o1 != null && o1.getTriageDetails() != null && o1.getTriageDetails().getCurrentTriagePriority() != null && o2!=null && o2.getTriageDetails() != null && o2.getTriageDetails().getCurrentTriagePriority() != null)
	{
		Integer priorityOrder1 = getOrderByIndex(o1.getTriageDetails().getCurrentTriagePriority());
		Integer priorityOrder2 = getOrderByIndex(o2.getTriageDetails().getCurrentTriagePriority());
		
		int orderByPriority = priorityOrder1.compareTo(priorityOrder2);
		
		if(orderByPriority == 0)
		{
			return compareByLOS(o1, o2);
		}
		
		return orderByPriority;
	}
	
	if((o1 == null || o1.getTriageDetails() == null || o1.getTriageDetails().getCurrentTriagePriority() == null) && (o2 == null || o2.getTriageDetails() == null || o2.getTriageDetails().getCurrentTriagePriority() == null))
		return compareByLOS(o1, o2);
	
	if (o1 == null || o1.getTriageDetails() == null || o1.getTriageDetails().getCurrentTriagePriority() == null)
		return 1;
	
	if (o2 == null || o2.getTriageDetails() == null || o2.getTriageDetails().getCurrentTriagePriority() == null)
		return -1;
	
	return 0;
}
 
Example 25
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private int compareByName(TrackingListForClinicianWorklistVo o1, TrackingListForClinicianWorklistVo o2) 
{
	if(o1 != null && o1.getPatient() != null && o1.getPatient().getName() != null && o2 != null && o2.getPatient() != null && o2.getPatient().getName() != null)
	{
		return o1.getPatient().getName().compareTo(o2.getPatient().getName(), true);
	}
	
	if (o1 == null || o1.getPatient() == null || o1.getPatient().getName() == null)
		return -1;
	
	if (o2 == null || o2.getPatient() == null || o2.getPatient().getName() == null)
		return 1;
	
	return 0;
}
 
Example 26
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
public int compare(TrackingListForClinicianWorklistVo o1, TrackingListForClinicianWorklistVo o2)
{
	if (o1 != null && o1.getTriageDetails() != null && o1.getTriageDetails().getCurrentTriagePriority() != null && o2!=null && o2.getTriageDetails() != null && o2.getTriageDetails().getCurrentTriagePriority() != null)
	{
		Integer priorityOrder1 = getOrderByIndex(o1.getTriageDetails().getCurrentTriagePriority());
		Integer priorityOrder2 = getOrderByIndex(o2.getTriageDetails().getCurrentTriagePriority());
		
		int orderByPriority = priorityOrder1.compareTo(priorityOrder2);
		
		if(orderByPriority == 0)
		{
			return compareByLOS(o1, o2);
		}
		
		return orderByPriority;
	}
	
	if((o1 == null || o1.getTriageDetails() == null || o1.getTriageDetails().getCurrentTriagePriority() == null) && (o2 == null || o2.getTriageDetails() == null || o2.getTriageDetails().getCurrentTriagePriority() == null))
		return compareByLOS(o1, o2);
	
	if (o1 == null || o1.getTriageDetails() == null || o1.getTriageDetails().getCurrentTriagePriority() == null)
		return 1;
	
	if (o2 == null || o2.getTriageDetails() == null || o2.getTriageDetails().getCurrentTriagePriority() == null)
		return -1;
	
	return 0;
}
 
Example 27
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private int compareByName(TrackingListForClinicianWorklistVo o1, TrackingListForClinicianWorklistVo o2) 
{
	if(o1 != null && o1.getPatient() != null && o1.getPatient().getName() != null && o2 != null && o2.getPatient() != null && o2.getPatient().getName() != null)
	{
		return o1.getPatient().getName().compareTo(o2.getPatient().getName(), true);
	}
	
	if (o1 == null || o1.getPatient() == null || o1.getPatient().getName() == null)
		return -1;
	
	if (o2 == null || o2.getPatient() == null || o2.getPatient().getName() == null)
		return 1;
	
	return 0;
}
 
Example 28
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
public int compare(TrackingListForClinicianWorklistVo o1, TrackingListForClinicianWorklistVo o2)
{
	if (o1 != null && o1.getTriageDetails() != null && o1.getTriageDetails().getCurrentTriagePriority() != null && o2!=null && o2.getTriageDetails() != null && o2.getTriageDetails().getCurrentTriagePriority() != null)
	{
		Integer priorityOrder1 = getOrderByIndex(o1.getTriageDetails().getCurrentTriagePriority());
		Integer priorityOrder2 = getOrderByIndex(o2.getTriageDetails().getCurrentTriagePriority());
		
		int orderByPriority = priorityOrder1.compareTo(priorityOrder2);
		
		if(orderByPriority == 0)
		{
			return compareByLOS(o1, o2);
		}
		
		return orderByPriority;
	}
	
	if((o1 == null || o1.getTriageDetails() == null || o1.getTriageDetails().getCurrentTriagePriority() == null) && (o2 == null || o2.getTriageDetails() == null || o2.getTriageDetails().getCurrentTriagePriority() == null))
		return compareByLOS(o1, o2);
	
	if (o1 == null || o1.getTriageDetails() == null || o1.getTriageDetails().getCurrentTriagePriority() == null)
		return 1;
	
	if (o2 == null || o2.getTriageDetails() == null || o2.getTriageDetails().getCurrentTriagePriority() == null)
		return -1;
	
	return 0;
}
 
Example 29
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private int compareByName(TrackingListForClinicianWorklistVo o1, TrackingListForClinicianWorklistVo o2) 
{
	if(o1 != null && o1.getPatient() != null && o1.getPatient().getName() != null && o2 != null && o2.getPatient() != null && o2.getPatient().getName() != null)
	{
		return o1.getPatient().getName().compareTo(o2.getPatient().getName(), true);
	}
	
	if (o1 == null || o1.getPatient() == null || o1.getPatient().getName() == null)
		return -1;
	
	if (o2 == null || o2.getPatient() == null || o2.getPatient().getName() == null)
		return 1;
	
	return 0;
}
 
Example 30
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
public int compare(TrackingListForClinicianWorklistVo o1, TrackingListForClinicianWorklistVo o2)
{
	if (o1 != null && o1.getTriageDetails() != null && o1.getTriageDetails().getCurrentTriagePriority() != null && o2!=null && o2.getTriageDetails() != null && o2.getTriageDetails().getCurrentTriagePriority() != null)
	{
		Integer priorityOrder1 = getOrderByIndex(o1.getTriageDetails().getCurrentTriagePriority());
		Integer priorityOrder2 = getOrderByIndex(o2.getTriageDetails().getCurrentTriagePriority());
		
		int orderByPriority = priorityOrder1.compareTo(priorityOrder2);
		
		if(orderByPriority == 0)
		{
			return compareByLOS(o1, o2);
		}
		
		return orderByPriority;
	}
	
	if((o1 == null || o1.getTriageDetails() == null || o1.getTriageDetails().getCurrentTriagePriority() == null) && (o2 == null || o2.getTriageDetails() == null || o2.getTriageDetails().getCurrentTriagePriority() == null))
		return compareByLOS(o1, o2);
	
	if (o1 == null || o1.getTriageDetails() == null || o1.getTriageDetails().getCurrentTriagePriority() == null)
		return 1;
	
	if (o2 == null || o2.getTriageDetails() == null || o2.getTriageDetails().getCurrentTriagePriority() == null)
		return -1;
	
	return 0;
}
 
Example 31
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private int compareByName(TrackingListForClinicianWorklistVo o1, TrackingListForClinicianWorklistVo o2) 
{
	if(o1 != null && o1.getPatient() != null && o1.getPatient().getName() != null && o2 != null && o2.getPatient() != null && o2.getPatient().getName() != null)
	{
		return o1.getPatient().getName().compareTo(o2.getPatient().getName(), true);
	}
	
	if (o1 == null || o1.getPatient() == null || o1.getPatient().getName() == null)
		return -1;
	
	if (o2 == null || o2.getPatient() == null || o2.getPatient().getName() == null)
		return 1;
	
	return 0;
}
 
Example 32
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
public int compare(TrackingListForClinicianWorklistVo o1, TrackingListForClinicianWorklistVo o2)
{
	if (o1 != null && o1.getTriageDetails() != null && o1.getTriageDetails().getCurrentTriagePriority() != null && o2!=null && o2.getTriageDetails() != null && o2.getTriageDetails().getCurrentTriagePriority() != null)
	{
		Integer priorityOrder1 = getOrderByIndex(o1.getTriageDetails().getCurrentTriagePriority());
		Integer priorityOrder2 = getOrderByIndex(o2.getTriageDetails().getCurrentTriagePriority());
		
		int orderByPriority = priorityOrder1.compareTo(priorityOrder2);
		
		if(orderByPriority == 0)
		{
			return compareByLOS(o1, o2);
		}
		
		return orderByPriority;
	}
	
	if((o1 == null || o1.getTriageDetails() == null || o1.getTriageDetails().getCurrentTriagePriority() == null) && (o2 == null || o2.getTriageDetails() == null || o2.getTriageDetails().getCurrentTriagePriority() == null))
		return compareByLOS(o1, o2);
	
	if (o1 == null || o1.getTriageDetails() == null || o1.getTriageDetails().getCurrentTriagePriority() == null)
		return 1;
	
	if (o2 == null || o2.getTriageDetails() == null || o2.getTriageDetails().getCurrentTriagePriority() == null)
		return -1;
	
	return 0;
}
 
Example 33
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private int compareByName(TrackingListForClinicianWorklistVo o1, TrackingListForClinicianWorklistVo o2) 
{
	if(o1 != null && o1.getPatient() != null && o1.getPatient().getName() != null && o2 != null && o2.getPatient() != null && o2.getPatient().getName() != null)
	{
		return o1.getPatient().getName().compareTo(o2.getPatient().getName(), true);
	}
	
	if (o1 == null || o1.getPatient() == null || o1.getPatient().getName() == null)
		return -1;
	
	if (o2 == null || o2.getPatient() == null || o2.getPatient().getName() == null)
		return 1;
	
	return 0;
}
 
Example 34
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
public int compare(TrackingListForClinicianWorklistVo o1, TrackingListForClinicianWorklistVo o2)
{
	if (o1 != null && o1.getTriageDetails() != null && o1.getTriageDetails().getCurrentTriagePriority() != null && o2!=null && o2.getTriageDetails() != null && o2.getTriageDetails().getCurrentTriagePriority() != null)
	{
		Integer priorityOrder1 = getOrderByIndex(o1.getTriageDetails().getCurrentTriagePriority());
		Integer priorityOrder2 = getOrderByIndex(o2.getTriageDetails().getCurrentTriagePriority());
		
		int orderByPriority = priorityOrder1.compareTo(priorityOrder2);
		
		if(orderByPriority == 0)
		{
			return compareByLOS(o1, o2);
		}
		
		return orderByPriority;
	}
	
	if((o1 == null || o1.getTriageDetails() == null || o1.getTriageDetails().getCurrentTriagePriority() == null) && (o2 == null || o2.getTriageDetails() == null || o2.getTriageDetails().getCurrentTriagePriority() == null))
		return compareByLOS(o1, o2);
	
	if (o1 == null || o1.getTriageDetails() == null || o1.getTriageDetails().getCurrentTriagePriority() == null)
		return 1;
	
	if (o2 == null || o2.getTriageDetails() == null || o2.getTriageDetails().getCurrentTriagePriority() == null)
		return -1;
	
	return 0;
}
 
Example 35
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private int compareByName(TrackingListForClinicianWorklistVo o1, TrackingListForClinicianWorklistVo o2) 
{
	if(o1 != null && o1.getPatient() != null && o1.getPatient().getName() != null && o2 != null && o2.getPatient() != null && o2.getPatient().getName() != null)
	{
		return o1.getPatient().getName().compareTo(o2.getPatient().getName(), true);
	}
	
	if (o1 == null || o1.getPatient() == null || o1.getPatient().getName() == null)
		return -1;
	
	if (o2 == null || o2.getPatient() == null || o2.getPatient().getName() == null)
		return 1;
	
	return 0;
}
 
Example 36
Project: AvoinApotti   File: Logic.java   Source Code and License 4 votes vote down vote up
private void setProblemCellOptionColor(TableCellOptions cellOptions, TrackingListForClinicianWorklistVo tracking, Integer LOS) 
{
	if(cellOptions == null)
		return;
	
	if(tracking == null || tracking.getTriageDetails() == null)
	{
		cellOptions.setTextColor(Color.Black);
		return;
	}
	
	if(tracking.getTriageDetails().getCurrentTriagePriority() == null)
	{
		cellOptions.setTextColor(Color.Black);
	}
	else
	{
		if(tracking.getTriageDetails().getMedicInterventionStartDateTime() != null)
		{
			cellOptions.setTextColor(tracking.getTriageDetails().getCurrentTriagePriority().getColor());
		}
		else
		{
			if(LOS == null)
			{
				cellOptions.setTextColor(Color.Black);
				return;
			}
			
			if(form.getLocalContext().getAttendanceKPIConfig() == null)
			{
				cellOptions.setTextColor(Color.Black);
				return;
			}
			
			TriagePriorityKpConfigVo triagePriorityKpConfig = getTriagePriorityKpConfig(tracking.getTriageDetails().getCurrentTriagePriority());
			
			if(triagePriorityKpConfig == null)
			{
				cellOptions.setTextColor(Color.Black);
				return;
			}
			
			Integer breachWarningInMins = triagePriorityKpConfig.getPriorityBreachWarningKPI();
			
			if(breachWarningInMins == null)
			{
				cellOptions.setTextColor(Color.Black);
				return;
			}
			
			Integer breachedKPIInMIns = triagePriorityKpConfig.getPriorityBreachedKPI();
			
			if(breachedKPIInMIns == null)
			{
				cellOptions.setTextColor(Color.Black);
				return;
			}
			
			if(LOS >= breachWarningInMins && LOS < breachedKPIInMIns)
			{
				cellOptions.setTextAndBackgroundBlink(triagePriorityKpConfig.getPriorityBreachWarningKPITextColour(),triagePriorityKpConfig.getPriorityBreachWarningKPIFlashingTextColour() ,triagePriorityKpConfig.getPriorityBreachWarningKPIBackgroundColour(),triagePriorityKpConfig.getPriorityBreachWarningKPIBackgroundColour()); //wdev-16138
				cellOptions.setTextColor(triagePriorityKpConfig.getPriorityBreachWarningKPITextColour());						//wdev-16138
				cellOptions.setBackgroundColor(triagePriorityKpConfig.getPriorityBreachWarningKPIBackgroundColour());			//wdev-16138
			}
			else if(LOS >= breachedKPIInMIns)
			{
				cellOptions.setTextAndBackgroundBlink(triagePriorityKpConfig.getPriorityBreachKPITextColour(), triagePriorityKpConfig.getPriorityBreachedKPIFlashingTextColour() ,triagePriorityKpConfig.getPriorityBreachedKPIBackgroundColour(),triagePriorityKpConfig.getPriorityBreachedKPIBackgroundColour());	//wdev-16138
				cellOptions.setTextColor(triagePriorityKpConfig.getPriorityBreachKPITextColour());
				cellOptions.setBackgroundColor(triagePriorityKpConfig.getPriorityBreachedKPIBackgroundColour());				//wdev-16138
				//cellOptions.setBlink(true);
			}
		}
	}
}
 
Example 37
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private void setProblemCellOptionColor(TableCellOptions cellOptions, TrackingListForClinicianWorklistVo tracking, Integer LOS) 
{
	if(cellOptions == null)
		return;
	
	if(tracking == null || tracking.getTriageDetails() == null)
	{
		cellOptions.setTextColor(Color.Black);
		return;
	}
	
	if(tracking.getTriageDetails().getCurrentTriagePriority() == null)
	{
		cellOptions.setTextColor(Color.Black);
	}
	else
	{
		if(tracking.getTriageDetails().getMedicInterventionStartDateTime() != null)
		{
			cellOptions.setTextColor(tracking.getTriageDetails().getCurrentTriagePriority().getColor());
		}
		else
		{
			if(LOS == null)
			{
				cellOptions.setTextColor(Color.Black);
				return;
			}
			
			if(form.getLocalContext().getAttendanceKPIConfig() == null)
			{
				cellOptions.setTextColor(Color.Black);
				return;
			}
			
			TriagePriorityKpConfigVo triagePriorityKpConfig = getTriagePriorityKpConfig(tracking.getTriageDetails().getCurrentTriagePriority());
			
			if(triagePriorityKpConfig == null)
			{
				cellOptions.setTextColor(Color.Black);
				return;
			}
			
			Integer breachWarningInMins = triagePriorityKpConfig.getPriorityBreachWarningKPI();
			
			if(breachWarningInMins == null)
			{
				cellOptions.setTextColor(Color.Black);
				return;
			}
			
			Integer breachedKPIInMIns = triagePriorityKpConfig.getPriorityBreachedKPI();
			
			if(breachedKPIInMIns == null)
			{
				cellOptions.setTextColor(Color.Black);
				return;
			}
			
			if(LOS >= breachWarningInMins && LOS < breachedKPIInMIns)
			{
				cellOptions.setTextAndBackgroundBlink(triagePriorityKpConfig.getPriorityBreachWarningKPITextColour(),triagePriorityKpConfig.getPriorityBreachWarningKPIFlashingTextColour() ,triagePriorityKpConfig.getPriorityBreachWarningKPIBackgroundColour(),triagePriorityKpConfig.getPriorityBreachWarningKPIBackgroundColour()); //wdev-16138
				cellOptions.setTextColor(triagePriorityKpConfig.getPriorityBreachWarningKPITextColour());						//wdev-16138
				cellOptions.setBackgroundColor(triagePriorityKpConfig.getPriorityBreachWarningKPIBackgroundColour());			//wdev-16138
			}
			else if(LOS >= breachedKPIInMIns)
			{
				cellOptions.setTextAndBackgroundBlink(triagePriorityKpConfig.getPriorityBreachKPITextColour(), triagePriorityKpConfig.getPriorityBreachedKPIFlashingTextColour() ,triagePriorityKpConfig.getPriorityBreachedKPIBackgroundColour(),triagePriorityKpConfig.getPriorityBreachedKPIBackgroundColour());	//wdev-16138
				cellOptions.setTextColor(triagePriorityKpConfig.getPriorityBreachKPITextColour());
				cellOptions.setBackgroundColor(triagePriorityKpConfig.getPriorityBreachedKPIBackgroundColour());				//wdev-16138
				//cellOptions.setBlink(true);
			}
		}
	}
}
 
Example 38
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private void setProblemCellOptionColor(TableCellOptions cellOptions, TrackingListForClinicianWorklistVo tracking, Integer LOS) 
{
	if(cellOptions == null)
		return;
	
	if(tracking == null || tracking.getTriageDetails() == null)
	{
		cellOptions.setTextColor(Color.Black);
		return;
	}
	
	if(tracking.getTriageDetails().getCurrentTriagePriority() == null)
	{
		cellOptions.setTextColor(Color.Black);
	}
	else
	{
		if(tracking.getTriageDetails().getMedicInterventionStartDateTime() != null)
		{
			cellOptions.setTextColor(tracking.getTriageDetails().getCurrentTriagePriority().getColor());
		}
		else
		{
			if(LOS == null)
			{
				cellOptions.setTextColor(Color.Black);
				return;
			}
			
			if(form.getLocalContext().getAttendanceKPIConfig() == null)
			{
				cellOptions.setTextColor(Color.Black);
				return;
			}
			
			TriagePriorityKpConfigVo triagePriorityKpConfig = getTriagePriorityKpConfig(tracking.getTriageDetails().getCurrentTriagePriority());
			
			if(triagePriorityKpConfig == null)
			{
				cellOptions.setTextColor(Color.Black);
				return;
			}
			
			Integer breachWarningInMins = triagePriorityKpConfig.getPriorityBreachWarningKPI();
			
			if(breachWarningInMins == null)
			{
				cellOptions.setTextColor(Color.Black);
				return;
			}
			
			Integer breachedKPIInMIns = triagePriorityKpConfig.getPriorityBreachedKPI();
			
			if(breachedKPIInMIns == null)
			{
				cellOptions.setTextColor(Color.Black);
				return;
			}
			
			if(LOS >= breachWarningInMins && LOS < breachedKPIInMIns)
			{
				cellOptions.setTextAndBackgroundBlink(triagePriorityKpConfig.getPriorityBreachWarningKPITextColour(),triagePriorityKpConfig.getPriorityBreachWarningKPIFlashingTextColour() ,triagePriorityKpConfig.getPriorityBreachWarningKPIBackgroundColour(),triagePriorityKpConfig.getPriorityBreachWarningKPIBackgroundColour()); //wdev-16138
				cellOptions.setTextColor(triagePriorityKpConfig.getPriorityBreachWarningKPITextColour());						//wdev-16138
				cellOptions.setBackgroundColor(triagePriorityKpConfig.getPriorityBreachWarningKPIBackgroundColour());			//wdev-16138
			}
			else if(LOS >= breachedKPIInMIns)
			{
				cellOptions.setTextAndBackgroundBlink(triagePriorityKpConfig.getPriorityBreachKPITextColour(), triagePriorityKpConfig.getPriorityBreachedKPIFlashingTextColour() ,triagePriorityKpConfig.getPriorityBreachedKPIBackgroundColour(),triagePriorityKpConfig.getPriorityBreachedKPIBackgroundColour());	//wdev-16138
				cellOptions.setTextColor(triagePriorityKpConfig.getPriorityBreachKPITextColour());
				cellOptions.setBackgroundColor(triagePriorityKpConfig.getPriorityBreachedKPIBackgroundColour());				//wdev-16138
				//cellOptions.setBlink(true);
			}
		}
	}
}
 
Example 39
Project: openmaxims-linux   File: Logic.java   Source Code and License 4 votes vote down vote up
private void setProblemCellOptionColor(TableCellOptions cellOptions, TrackingListForClinicianWorklistVo tracking, Integer LOS) 
{
	if(cellOptions == null)
		return;
	
	if(tracking == null || tracking.getTriageDetails() == null)
	{
		cellOptions.setTextColor(Color.Black);
		return;
	}
	
	if(tracking.getTriageDetails().getCurrentTriagePriority() == null)
	{
		cellOptions.setTextColor(Color.Black);
	}
	else
	{
		if(tracking.getTriageDetails().getMedicInterventionStartDateTime() != null)
		{
			cellOptions.setTextColor(tracking.getTriageDetails().getCurrentTriagePriority().getColor());
		}
		else
		{
			if(LOS == null)
			{
				cellOptions.setTextColor(Color.Black);
				return;
			}
			
			if(form.getLocalContext().getAttendanceKPIConfig() == null)
			{
				cellOptions.setTextColor(Color.Black);
				return;
			}
			
			TriagePriorityKpConfigVo triagePriorityKpConfig = getTriagePriorityKpConfig(tracking.getTriageDetails().getCurrentTriagePriority());
			
			if(triagePriorityKpConfig == null)
			{
				cellOptions.setTextColor(Color.Black);
				return;
			}
			
			Integer breachWarningInMins = triagePriorityKpConfig.getPriorityBreachWarningKPI();
			
			if(breachWarningInMins == null)
			{
				cellOptions.setTextColor(Color.Black);
				return;
			}
			
			Integer breachedKPIInMIns = triagePriorityKpConfig.getPriorityBreachedKPI();
			
			if(breachedKPIInMIns == null)
			{
				cellOptions.setTextColor(Color.Black);
				return;
			}
			
			if(LOS >= breachWarningInMins && LOS < breachedKPIInMIns)
			{
				cellOptions.setTextAndBackgroundBlink(triagePriorityKpConfig.getPriorityBreachWarningKPITextColour(),triagePriorityKpConfig.getPriorityBreachWarningKPIFlashingTextColour() ,triagePriorityKpConfig.getPriorityBreachWarningKPIBackgroundColour(),triagePriorityKpConfig.getPriorityBreachWarningKPIBackgroundColour()); //wdev-16138
				cellOptions.setTextColor(triagePriorityKpConfig.getPriorityBreachWarningKPITextColour());						//wdev-16138
				cellOptions.setBackgroundColor(triagePriorityKpConfig.getPriorityBreachWarningKPIBackgroundColour());			//wdev-16138
			}
			else if(LOS >= breachedKPIInMIns)
			{
				cellOptions.setTextAndBackgroundBlink(triagePriorityKpConfig.getPriorityBreachKPITextColour(), triagePriorityKpConfig.getPriorityBreachedKPIFlashingTextColour() ,triagePriorityKpConfig.getPriorityBreachedKPIBackgroundColour(),triagePriorityKpConfig.getPriorityBreachedKPIBackgroundColour());	//wdev-16138
				cellOptions.setTextColor(triagePriorityKpConfig.getPriorityBreachKPITextColour());
				cellOptions.setBackgroundColor(triagePriorityKpConfig.getPriorityBreachedKPIBackgroundColour());				//wdev-16138
				//cellOptions.setBlink(true);
			}
		}
	}
}