Ejemplo n.º 1
0
  private void updatePrimerVaccinationReportsForDates(Set<String> dates) {
    DateTimeFormatter formatter = DateTimeFormat.forPattern(EbodacConstants.REPORT_DATE_FORMAT);

    for (String dateString : dates) {
      LocalDate date = LocalDate.parse(dateString, formatter);
      generateOrUpdatePrimerVaccinationReport(
          subjectService.findSubjectsPrimerVaccinatedAtDay(date), date);
    }
  }
Ejemplo n.º 2
0
  @Override
  public void generateDailyReportsFromDate(LocalDate startDate) {
    LocalDate now = DateUtil.now().toLocalDate();

    for (LocalDate date = startDate; date.isBefore(now); date = date.plusDays(1)) {
      generateOrUpdatePrimerVaccinationReport(
          subjectService.findSubjectsPrimerVaccinatedAtDay(date), date);
      generateOrUpdateBoosterVaccinationReport(
          subjectService.findSubjectsBoosterVaccinatedAtDay(date), date);
    }
  }