示例#1
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 = "";
  }
示例#2
0
  public void doPrintClient() {
    List<Client> outList = new ArrayList<Client>(0);

    HttpServletRequest request =
        (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();
    String selectedLineList[] = request.getParameterValues("selectedLineId");
    if (selectedLineList == null) {
      facesMessages.add(
          StatusMessage.Severity.ERROR, "No row selected.  Please select at least one record.");
    } else {

      for (String selectedLineId : selectedLineList) {
        clientHome.setClientId(Long.parseLong(selectedLineId));
        clientHome.wire();
        outList.add(clientHome.getInstance());
      }
    }

    printClient = outList;
  }
  public void validatePatient() {
    String patientId = billing1500FormHome.getInstance().getPatientId();
    if (!Strings.isNullOrEmpty(patientId)) {
      Client client = getPatient(patientId);
      if (client != null) {
        clientHome.setInstance(client);
        billing1500FormHome
            .getInstance()
            .setPatientFirstName(clientHome.getInstance().getFirstname());
        billing1500FormHome
            .getInstance()
            .setPatientLastName(clientHome.getInstance().getLastname());
        billing1500FormHome
            .getInstance()
            .setPatientMiddleName(clientHome.getInstance().getMiddleinitial());
        billing1500FormHome
            .getInstance()
            .setPatientBirthDate(clientHome.getInstance().getBirthDate());
        if (!Strings.isNullOrEmpty(clientHome.getInstance().getGender())) {
          if (clientHome.getInstance().getGender().toUpperCase().equals("MALE")) {
            billing1500FormHome.getInstance().setPatientGender("M");
          } else if (clientHome.getInstance().getGender().toUpperCase().equals("FEMALE")) {
            billing1500FormHome.getInstance().setPatientGender("F");
          }
        }
        if (clientHome.getInstance().getMailingAddress() != null
            && clientHome.getInstance().getMailingAddress().getAddress() != null) {
          billing1500FormHome
              .getInstance()
              .setPatientAddress(
                  clientHome.getInstance().getMailingAddress().getAddress().getStreetaddress());
          billing1500FormHome
              .getInstance()
              .setPatientCity(clientHome.getInstance().getMailingAddress().getAddress().getCity());
          billing1500FormHome
              .getInstance()
              .setPatientState(
                  clientHome.getInstance().getMailingAddress().getAddress().getState());
          billing1500FormHome
              .getInstance()
              .setPatientZipCode(
                  clientHome.getInstance().getMailingAddress().getAddress().getZipcode());
        }
        if (clientHome.getInstance().getHomePhone() != null
            && clientHome.getInstance().getHomePhone().getPhone() != null) {
          billing1500FormHome
              .getInstance()
              .setPatientPhone(clientHome.getInstance().getHomePhone().getPhone().getFullNumber());
        }

        // populate registration insurance info
        PublicQuestionAnswers publicQuestionAnswers = getRegistrationInsuranceByClient(client);
        if (publicQuestionAnswers != null && publicQuestionAnswers.getAnswer() != null) {
          billingEobFormHome.getInstance().setOtherInsuranceName(publicQuestionAnswers.getAnswer());
        } else {
          billingEobFormHome.getInstance().setOtherInsuranceName(null);
        }
      } else {
        organizationHome.setInstance(null);
        billingEobFormHome.getInstance().setOtherInsuranceName(null);
        resetPatient();
      }
    }
  }