private String generateStatusTooltip(OrderedInvestigationStatusClinicalImagingVo ordInvCurrentStatus) { if (ordInvCurrentStatus != null && ordInvCurrentStatus.getOrdInvStatus() != null) { StringBuffer sb = new StringBuffer(); sb.append("<b>Current status: </b>" + ordInvCurrentStatus.getOrdInvStatus().getText()); if (ordInvCurrentStatus.getStatusReason() != null && ordInvCurrentStatus.getStatusReason().length() > 0 && ordInvCurrentStatus.getOrdInvStatus().equals(OrderInvStatus.CANCELLED)) sb.append("<br><b>Current status reason: </b>" + ordInvCurrentStatus.getStatusReason()); sb.append("<br><b>Date changed: </b>" + ordInvCurrentStatus.getChangeDateTime()); sb.append("<br><b>Changed by: </b>" + (ordInvCurrentStatus.getChangeUserIsNotNull() ? ordInvCurrentStatus.getChangeUser().toString() : "")); return sb.toString(); } return null; }