private void updateReports(
      List<ReportExternalImport> insertableImportReports,
      List<ReportExternalImport> updatableImportReports) {
    Transaction tx = HibernateUtil.getSession().beginTransaction();

    try {
      for (ReportExternalImport importReport : insertableImportReports) {
        reportImportDAO.insertReportExternalImport(importReport);
      }

      for (ReportExternalImport importReport : updatableImportReports) {
        reportImportDAO.updateReportExternalImport(importReport);
      }

      tx.commit();
    } catch (Exception e) {
      tx.rollback();
    }
  }
  private ReportExternalImport createReportExternalImport(
      String sendingSiteId, String eventDate, String data) {
    ReportExternalImport importReport = new ReportExternalImport();

    importReport.setEventDate(
        DateUtil.convertStringDateToTimestampWithPatternNoLocale(eventDate, DATE_PATTERN));
    importReport.setSendingSite(sendingSiteId);
    importReport.setReportType("testIndicators");

    ReportExternalImport rei = reportImportDAO.getReportByEventDateSiteType(importReport);

    if (rei != null) {
      importReport = rei;
    }

    importReport.setData(data);
    importReport.setSysUserId("1");
    importReport.setRecievedDate(DateUtil.getTimestampAtMidnightForDaysAgo(0));

    return importReport;
  }