public void addNewNote() { try { if (clientNoteHome != null && !Strings.isNullOrEmpty(clientNoteHome.getInstance().getNotes())) { clientNoteHome.getInstance().setClient(clientHome.getInstance()); clientNoteHome.getInstance().setUsername(currentUser.getUser().getUserName()); clientNoteHome.getInstance().setEntrydate(new Date()); String action = clientNoteHome.persist(); if (action != null && action.equalsIgnoreCase("persisted")) { init(); clientNoteHome.clearInstance(); clientNoteHome.wire(); clientHome.getInstance().getClientNotes().add(clientNoteHome.getInstance()); clientHome.update(); } facesMessages.clearGlobalMessages(); facesMessages.clear(); } } catch (Exception e) { String s = ""; } String s = ""; }
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(); } } }