protected RejectionReportBean createIdentityRejectionBean(
      RejectionReportBean item, boolean blankCollectionDate) {
    RejectionReportBean filler = new RejectionReportBean();

    filler.setAccessionNumber(item.getAccessionNumber());
    filler.setReceivedDate(item.getReceivedDate());
    filler.setCollectionDate(blankCollectionDate ? " " : item.getCollectionDate());
    filler.setPatientOrTestName(item.getNonPrintingPatient());

    return filler;
  }
  protected void injectPatientLineAndCopyToFinalList(ArrayList<RejectionReportBean> rawResults) {
    Collections.sort(
        rawResults,
        new Comparator<RejectionReportBean>() {
          @Override
          public int compare(RejectionReportBean o1, RejectionReportBean o2) {
            int sortResult = o1.getAccessionNumber().compareTo(o2.getAccessionNumber());
            return sortResult == 0
                ? o1.getPatientOrTestName().compareTo(o2.getPatientOrTestName())
                : sortResult;
          }
        });

    String currentAccessionNumber = "";
    for (RejectionReportBean item : rawResults) {
      if (!currentAccessionNumber.equals(item.getAccessionNumber())) {
        rejections.add(createIdentityRejectionBean(item, false));
        currentAccessionNumber = item.getAccessionNumber();
      }
      item.setCollectionDate(null);
      rejections.add(item);
    }
  }