/**
  * Download the related events. and checks all the quarantine surveys. If a survey is in the
  * server, the survey should be set as sent. Else, the survey should be set as completed and it
  * will be resend.
  */
 public static void checkAllQuarantineSurveys() {
   List<Survey> quarantineSurveys = Survey.getAllQuarantineSurveys();
   Date minDate = Survey.getMinQuarantineEventDate();
   Date maxDate = Survey.getMaxQuarantineEventDate();
   String program = quarantineSurveys.get(0).getProgram().getUid();
   String orgUnit = OrgUnit.findUIDByName(PreferencesState.getInstance().getOrgUnit());
   List<Event> events = getEvents(program, orgUnit, minDate, maxDate);
   if (events != null) {
     for (Survey survey : quarantineSurveys) {
       updateQuarantineSurveysStatus(events, survey);
     }
   }
 }