private TriagePriorityKpConfigVo getTriagePriorityKpConfig(TriagePriority currentTriagePriority) { if(form.getLocalContext().getAttendanceKPIConfig() == null || form.getLocalContext().getAttendanceKPIConfig().getTriagePriorityKPIs() == null || currentTriagePriority == null) return null; for(TriagePriorityKpConfigVo triagePriorityConfig : form.getLocalContext().getAttendanceKPIConfig().getTriagePriorityKPIs()) { if(triagePriorityConfig == null) continue; if(currentTriagePriority.equals(triagePriorityConfig.getTriagePriority())) return triagePriorityConfig; } return null; }
private TriagePriorityKpConfigVo getTriagePriority(TriagePriorityKpConfigVoCollection temColl,TriagePriority prio) { if(temColl == null || temColl.size() == 0 || prio == null) return null; for(int j = 0;j < temColl.size();j++) { TriagePriorityKpConfigVo tempVo = temColl.get(j); if(tempVo != null && tempVo.getTriagePriorityIsNotNull() && tempVo.getTriagePriority().equals(prio) ) return tempVo; } return null; }
private DateTime calculateBreachTime(DateTime triageStartTime) { if(triageStartTime == null) return null; if(form.getLocalContext().getSelectedTriagePatient() == null || form.getLocalContext().getSelectedTriagePatient().getTriageDetails() == null || form.getLocalContext().getSelectedTriagePatient().getTriageDetails().getCurrentTriagePriority() == null) return null; if(form.getLocalContext().getAttendanceKPIConfig() == null || form.getLocalContext().getAttendanceKPIConfig().getTriagePriorityKPIs() == null) return null; Integer priorityBreachedKPI = null; for(TriagePriorityKpConfigVo priorityConfig : form.getLocalContext().getAttendanceKPIConfig().getTriagePriorityKPIs()) { if(form.getLocalContext().getSelectedTriagePatient().getTriageDetails().getCurrentTriagePriority().equals(priorityConfig.getTriagePriority())) { priorityBreachedKPI = priorityConfig.getPriorityBreachedKPI(); break; } } if(priorityBreachedKPI == null) return null; return ((DateTime) triageStartTime.clone()).addMinutes(priorityBreachedKPI); }
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); } } } }
private void setPriorityCellColor(TableCellOptions cellOptions, TrackingVo tracking) { if(cellOptions == null) return; Color priorityFontColor = null; Color priorityBackgroudColor = null; Color priorityFlashingTextColour = null; boolean priorityBreachWarning = false; boolean priorityBreached = false; YesNo priorityBreachWarningFlashing = null; YesNo priorityBreachedFlashing = null; if(tracking != null && tracking.getTriageDetails() != null) { if(tracking.getTriageDetails().getMedicInterventionStartDateTime() != null && tracking.getTriageDetails().getCurrentTriagePriority() != null) { if(tracking.getTriageDetails().getCurrentTriagePriority().getColor() != null) priorityFontColor = tracking.getTriageDetails().getCurrentTriagePriority().getColor(); } else { TriagePriorityKpConfigVo triagePriorityKpConfig = getTriagePriorityKpConfig(tracking.getTriageDetails().getCurrentTriagePriority()); if(triagePriorityKpConfig != null) { if(triagePriorityKpConfig.getDefaultFontColour() != null) priorityFontColor = triagePriorityKpConfig.getDefaultFontColour(); if(triagePriorityKpConfig.getDefaultRowColour()!= null) priorityBackgroudColor = triagePriorityKpConfig.getDefaultRowColour(); } if(tracking.getTriageDetails().getTriageStartDateTime() != null) { int timeSinceTriage = calculateDateDiffInMinutes(new DateTime(), tracking.getTriageDetails().getTriageStartDateTime()); if(triagePriorityKpConfig != null) { if(triagePriorityKpConfig.getPriorityBreachWarningKPI() != null && triagePriorityKpConfig.getPriorityBreachedKPI() != null) { if(timeSinceTriage >= triagePriorityKpConfig.getPriorityBreachWarningKPI() && timeSinceTriage < triagePriorityKpConfig.getPriorityBreachedKPI()) { priorityFontColor = triagePriorityKpConfig.getPriorityBreachWarningKPITextColour(); priorityBackgroudColor = triagePriorityKpConfig.getPriorityBreachWarningKPIBackgroundColour(); priorityFlashingTextColour = triagePriorityKpConfig.getPriorityBreachWarningKPIFlashingTextColour(); priorityBreachWarning = true; priorityBreachWarningFlashing = triagePriorityKpConfig.getPriorityBreachWarningKPIFlashingText(); } else if(timeSinceTriage >= triagePriorityKpConfig.getPriorityBreachedKPI()) { priorityFontColor = triagePriorityKpConfig.getPriorityBreachKPITextColour(); priorityBackgroudColor = triagePriorityKpConfig.getPriorityBreachedKPIBackgroundColour(); priorityFlashingTextColour = triagePriorityKpConfig.getPriorityBreachedKPIFlashingTextColour(); priorityBreached = true; priorityBreachedFlashing = triagePriorityKpConfig.getPriorityBreachedKPIFlashingText(); } } } } } } if((priorityBreachWarning && YesNo.YES.equals(priorityBreachWarningFlashing)) || (priorityBreached && YesNo.YES.equals(priorityBreachedFlashing))) { if(priorityFontColor != null && priorityFlashingTextColour != null && priorityBackgroudColor != null) cellOptions.setTextAndBackgroundBlink(priorityFontColor ,priorityFlashingTextColour ,priorityBackgroudColor, priorityBackgroudColor); } if(priorityBackgroudColor != null) cellOptions.setBackgroundColor(priorityBackgroudColor); if(priorityFontColor != null) cellOptions.setTextColor(priorityFontColor); }
private void setProblemCellOptionColor(TableCellOptions cellOptions, TrackingForDisplayClinicianAndTriageWorklistVo tempVo, Integer LOS) //WDEV-18001 { if(cellOptions == null) return; Color problemFontColor = null; Color problemBackgroudColor = null; Color problemFlashingTextColour = null; boolean problemBreachWarning = false; boolean problemBreached = false; YesNo problemBreachWarningFlashing = null; YesNo problemBreachedFlashing = null; if(tempVo != null && tempVo.getTriageDetails() != null) { if(tempVo.getTriageDetails().getMedicInterventionStartDateTime() != null && tempVo.getTriageDetails().getCurrentTriagePriority() != null) { if(tempVo.getTriageDetails().getCurrentTriagePriority().getColor() != null) problemFontColor = tempVo.getTriageDetails().getCurrentTriagePriority().getColor(); } else { TriagePriorityKpConfigVo triagePriorityKpConfig = getTriagePriorityKpConfig(tempVo.getTriageDetails().getCurrentTriagePriority()); if(triagePriorityKpConfig != null) { problemFontColor = triagePriorityKpConfig.getDefaultFontColour(); problemBackgroudColor = triagePriorityKpConfig.getDefaultRowColour(); } if(LOS != null && triagePriorityKpConfig != null) { if(triagePriorityKpConfig.getPriorityBreachWarningKPI() != null && triagePriorityKpConfig.getPriorityBreachedKPI() != null) { if(LOS >= triagePriorityKpConfig.getPriorityBreachWarningKPI() && LOS < triagePriorityKpConfig.getPriorityBreachedKPI()) { problemFontColor = triagePriorityKpConfig.getPriorityBreachWarningKPITextColour(); problemBackgroudColor = triagePriorityKpConfig.getPriorityBreachWarningKPIBackgroundColour(); problemFlashingTextColour = triagePriorityKpConfig.getPriorityBreachWarningKPIFlashingTextColour(); problemBreachWarning = true; problemBreachWarningFlashing = triagePriorityKpConfig.getPriorityBreachWarningKPIFlashingText(); } else if(LOS >= triagePriorityKpConfig.getPriorityBreachedKPI()) { problemFontColor = triagePriorityKpConfig.getPriorityBreachKPITextColour(); problemBackgroudColor = triagePriorityKpConfig.getPriorityBreachedKPIBackgroundColour(); problemFlashingTextColour = triagePriorityKpConfig.getPriorityBreachedKPIFlashingTextColour(); problemBreached = true; problemBreachedFlashing = triagePriorityKpConfig.getPriorityBreachedKPIFlashingText(); } } } } } if((problemBreachWarning && YesNo.YES.equals(problemBreachWarningFlashing)) || (problemBreached && YesNo.YES.equals(problemBreachedFlashing))) { if(problemFontColor != null && problemFlashingTextColour != null && problemBackgroudColor != null) cellOptions.setTextAndBackgroundBlink(problemFontColor ,problemFlashingTextColour ,problemBackgroudColor, problemBackgroudColor); } if(problemBackgroudColor != null) cellOptions.setBackgroundColor(problemBackgroudColor); if(problemFontColor != null) cellOptions.setTextColor(problemFontColor); }