/** * Function used to populate the grid with comments from a collection */ private void populateCommentsGrid(ResultCommentsVoCollection commentCollection) { // Clear grid form.grdComments().getRows().clear(); // Check parameter for null collection if (commentCollection == null) return; // Iterate comments collection and add each collection for (ResultCommentsVo comment : commentCollection) { grdCommentsRow row = form.grdComments().getRows().newRow(); row.setColAuthorDate(comment.getAuthoringInformation().getAuthoringDateTime().toString()); row.setColAuthorHCP(comment.getAuthoringInformation().getAuthoringHcp().toString()); row.setColComment(comment.getComment()); row.setTooltipForColComment(comment.getComment()); if (comment.getCorrectingHcpIsNotNull() && comment.getCorrectingDateTimeIsNotNull()) { row.setTextColor(Color.Gray); } row.setValue(comment); } }
public ResultCommentsVoCollection listComments(OcsPathRadResultVo result) { if (result == null) return null; if (Category.PATHOLOGY.equals(result.getCategory())) return listCommentsFromOrderSpeciment(result); if (Category.CLINICALIMAGING.equals(result.getCategory()) || Category.CLINICAL.equals(result.getCategory())) //WDEV-16643 return listCommentsFromOrderInvestigation(result); return null; }
private ResultCommentsVoCollection listCommentsFromOrderInvestigation(OcsPathRadResultVo result) { if (result == null || !result.getOrderInvestigationIsNotNull() || !result.getOrderInvestigation().getID_OrderInvestigationIsNotNull()) return null; StringBuilder query = new StringBuilder(); query.append("SELECT comm FROM OrderInvestigation AS inv LEFT JOIN inv.resultConclusionComments AS comm "); query.append("WHERE inv.id = :INV_ID"); query.append(" order by comm.authoringInformation.authoringDateTime desc"); //WDEV-14077 return ResultCommentsVoAssembler.createResultCommentsVoCollectionFromResultConclusionAndActionComment(getDomainFactory().find(query.toString(), "INV_ID", result.getOrderInvestigation().getID_OrderInvestigation())); }
private ResultCommentsVoCollection listCommentsFromOrderSpeciment(OcsPathRadResultVo result) { if (result == null || !result.getOrderInvestigationIsNotNull() || !result.getOrderInvestigation().getID_OrderInvestigationIsNotNull()) return null; StringBuilder query = new StringBuilder(); query.append("SELECT comm FROM OrderInvestigation AS inv LEFT JOIN inv.specimen AS spec LEFT JOIN spec.resultConclusionComments AS comm "); query.append("WHERE inv.id = :INV_ID"); query.append(" order by comm.authoringInformation.authoringDateTime desc"); //WDEV-14077 return ResultCommentsVoAssembler.createResultCommentsVoCollectionFromResultConclusionAndActionComment(getDomainFactory().find(query.toString(), "INV_ID", result.getOrderInvestigation().getID_OrderInvestigation())); }