Exemplo n.º 1
0
  public void updateNote() {

    try {
      if (clientNoteHome != null
          && !Strings.isNullOrEmpty(clientNoteHome.getInstance().getNotes())) {

        clientNoteHome.getInstance().setUsername(currentUser.getUser().getUserName());
        clientNoteHome.getInstance().setEntrydate(new Date());

        String action = clientNoteHome.update();

        if (action != null && action.equalsIgnoreCase("updated")) {

          clientNoteHome.clearInstance();
          clientNoteHome.wire();
        }

        facesMessages.clearGlobalMessages();
        facesMessages.clear();
      }
    } catch (Exception e) {
      String s = "";
    }

    String s = "";
  }
Exemplo n.º 2
0
  public void addNoteSummary() {

    try {
      if (clientNoteSummaryHome != null
          && !Strings.isNullOrEmpty(clientNoteSummaryHome.getInstance().getNotes())) {

        clientNoteSummaryHome.getInstance().setClient(currentRSDIClient.getClient());
        clientNoteSummaryHome.getInstance().setUsername(currentUser.getUser().getUserName());
        clientNoteSummaryHome.getInstance().setEntrydate(new Date());

        String action = clientNoteSummaryHome.persist();

        if (action.equals("persisted") || action.equals("updated")) {
          init();

          clientNoteSummaryHome.clearInstance();
          clientNoteSummaryHome.wire();
          clientHome.getInstance().getClientNotes().add(clientNoteSummaryHome.getInstance());
          clientHome.update();
        }

        facesMessages.clearGlobalMessages();
        facesMessages.clear();
      }
    } catch (Exception e) {
      String s = "";
    }

    String s = "";
  }
Exemplo n.º 3
0
  public void determineContactStatus(ContactCom contact) {

    Integer stayOpenCount = 0;

    // referral
    if (!contact.getReferrals().isEmpty()) {
      for (ReferralCom r : contact.getReferrals()) {
        if (r != null
            && !r.getDeleted()
            && r.getDisposition() != null
            && r.getDisposition().getInternalCode().equalsIgnoreCase("OPEN")) {
          stayOpenCount++;
        }
      }
    }

    // appointment
    if (!contact.getAppointments().isEmpty()) {
      for (AppointmentCom a : contact.getAppointments()) {
        if (a != null
            && !a.getDeleted()
            && a.getDisposition() != null
            && a.getDisposition().getInternalCode().equalsIgnoreCase("OPEN")) {
          stayOpenCount++;
        }
      }
    }

    // incentive
    if (contact.getEligibility() != null
        && !contact.getEligibility().getEligibilityPromotions().isEmpty()) {
      for (EligibilityPromotion e : contact.getEligibility().getEligibilityPromotions()) {
        if (e != null && !e.getDeleted() && e.getPromise() == null) {
          stayOpenCount++;
        }
      }
    }

    // callback
    if (!contact.getCallbacks().isEmpty()) {
      for (Callback c : contact.getCallbacks()) {
        if (c != null
            && !c.getDeleted()
            && c.getDisposition() != null
            && c.getDisposition().getInternalCode().equalsIgnoreCase("OPEN")) {
          stayOpenCount++;
        }
      }
    }

    // followup
    if (!contact.getFollowupDues().isEmpty()) {
      stayOpenCount++;
    }

    if (stayOpenCount > 0) {
      contact.setDisposition(lookupItemList.getInternalCode("CONTACT-STATUS", "OPEN"));
    } else {
      if (contact.getDisposition() == null
          || contact.getDisposition().getInternalCode().equalsIgnoreCase("OPEN")
          || contact.getDisposition().getInternalCode().equalsIgnoreCase("CLOSED")) {
        contact.setDisposition(lookupItemList.getInternalCode("CONTACT-STATUS", "CLOSED"));
      }
    }

    contact.setDispositionDate(new Date());
    Format formatter = new SimpleDateFormat("h:mm a");
    contact.setDispositionTime(formatter.format(new Date()));
    contact.setUpdateByUserName(currentUser.getUser().getUserName());
    contact.setUpdateDate(new Date());
  }