public static boolean checkActiveVisit() { if (!ensureEncounter(EF1)) { PromptDialog.showError(TX_NO_ACTIVE_VISIT, TC_NO_ACTIVE_VISIT); return false; } return true; }
public static boolean checkActiveVisit() { if (!EncounterSelection.ensureEncounter(EF1)) { PromptDialog.showError(TX_NO_ACTIVE_VISIT, TC_NO_ACTIVE_VISIT); return false; } return true; }
/** * Form invokable via direct call. */ public static void show() { if (PopupDialog.popup(DIALOG_CHANGE_PASSWORD, false, false) == null) { PromptDialog.showError(Labels.getLabel("change.password.dialog.unavailable")); } }
public static boolean errorCheck(String data) { try { BgoUtil.errorCheck(data); return false; } catch (BgoException e) { PromptDialog.showError(e.getMessage()); return true; } }
public void onClick$btnParticipant() { String search = edtParticipant.getText().trim(); if (!search.isEmpty()) { try { PractitionerSearchCriteria criteria = new PractitionerSearchCriteria(search); allParticipantsModel.clear(); allParticipantsModel.addAll(practitionerSearch.search(criteria)); } catch (Exception e) { PromptDialog.showError(e); } } }
public void onClick$btnOK() { String text = VistAUtil.trimNarrative(txtNote.getValue()); if (text.length() < 3) { PromptDialog.showError("Note must be at least 3 characters in length.", "Note too Short"); txtNote.setValue(text); return; } result = text; close(false); }
private boolean validateAll() { if (!NumberUtils.isDigits(txtID.getValue())) { PromptDialog.showError(BgoConstants.TX_NO_NUMERIC, "Not Numeric"); txtID.setFocus(true); return false; } String txt = VistAUtil.trimNarrative(txtNarrative.getValue()); if (txt.isEmpty()) { PromptDialog.showError(BgoConstants.TX_NO_NARR, BgoConstants.TC_NO_NARR); return false; } if (txt.length() > 80) { if (PromptDialog.confirm(BgoConstants.TX_NARR_TOO_LONG, BgoConstants.TC_NARR_TOO_LONG)) { txt = txt.substring(0, 80); } else { return false; } } txtNarrative.setValue(txt); return true; }
/** * Show detail for specified list item. * * @param li The list item. */ protected void showDetail(Listitem li) { @SuppressWarnings("unchecked") M modelObject = li == null ? null : (M) li.getValue(); String detail = modelObject == null ? null : getDetail(modelObject); if (!StringUtils.isEmpty(detail)) { if (getShowDetailPane()) { detailView.setContent(detail); } else { Map<Object, Object> map = new HashMap<Object, Object>(); map.put("title", detailTitle); map.put("content", detail); map.put("allowPrint", getAllowPrint()); try { ((Window) ZKUtil.loadZulPage(Constants.RESOURCE_PREFIX + "resourceListDetail.zul", null, map)).doModal(); } catch (Exception e) { PromptDialog.showError(e); } } } }
public void onClick$btnOK() { clearMessages(); Radio radio = rgReason.getSelectedItem(); String reasonCode = radio == null ? null : (String) radio.getValue(); if (reasonCode == null) { Clients.wrongValue(rgReason, "You must select a reason for the deletion."); return; } String reasonText = "3".equals(reasonCode) ? txtOther.getText().trim() : null; if (reasonText != null && reasonText.isEmpty()) { Clients.wrongValue(txtOther, "Please enter text describing the reason for the deletion."); return; } try { service.delete(record, reasonCode, reasonText); } catch (Exception e) { PromptDialog.showError(e.getMessage()); return; } root.setAttribute("ok", true); root.detach(); } }
/** * @see org.carewebframework.api.security.ISecurityService#changePassword() */ @Override public void changePassword() { if (canChangePassword()) { if (PopupDialog.popup(passwordChangeUrl, false, false) == null) { PromptDialog.showError(StrUtil.getLabel("password.change.dialog.unavailable")); } } else { PromptDialog.showWarning(StrUtil.getLabel(Constants.LBL_PASSWORD_CHANGE_UNAVAILABLE)); } }
return true; } else { PromptDialog.showError(StrUtil.piece(s, StrUtil.U, 2)); return false;
public void delete() { Practitioner provider = getProvider(); IUser user = UserContext.getActiveUser(); if (skinTest != null && provider != null && !user.equals(provider)) { String s = VistAUtil.getBrokerSession().callRPC("BGOVPRV PRIPRV", skinTest.getEncounter().getId().getIdPart()); String[] pcs = StrUtil.split(s, StrUtil.U, 2); if (!user.getLogicalId().equals(pcs[0])) { PromptDialog.showError("To delete the skin test, you must either be the person that entered it or be " + "designated as the primary provider for the visit.\n" + BgoConstants.TC_PRI_PRV + pcs[1] + "\nAdministered By: " + provider.getName(), "Cannot Delete"); return; } } if (PromptDialog.confirm("Are you sure that you wish to delete the skin test:\n" + getTestName(), "Delete Skin Test?")) { PCC.errorCheck(VistAUtil.getBrokerSession().callRPC( "BGOSK DEL", VistAUtil.concatParams(skinTest != null ? skinTest.getId().getIdPart() : null, refusal != null ? refusal .getId().getIdPart() : null))); } }
public void onClick$btnSave() { if (validateInputs()) { if (record.getVisitIEN() == null) { Encounter encounter = EncounterContext.getActiveEncounter(); EncounterUtil.forceCreate(encounter); record.setVisitCategory(EncounterUtil.getServiceCategory(encounter)); record.setVisitDate(encounter.getPeriod().getStart()); record.setVisitIEN(encounter.getId().getIdPart()); record.setVisitLocked(EncounterUtil.isLocked(encounter)); } try { service.update(record); } catch (Exception e) { PromptDialog.showError(e.getMessage()); return; } root.setAttribute(ATTR_RESULT, record); root.detach(); } }
/** * Update the scheduled notification with new input values and send to the server, then close * the dialog if successful. */ public void onClick$btnOK() { if (validate()) { notification.setDeliveryDate(new FMDate(dtbDelivery.getDate())); notification.setDfn(chkAssociate.isChecked() ? (String) chkAssociate.getValue() : null); notification.setPatientName(chkAssociate.isChecked() ? lblPatient.getValue() : null); notification.setSubject(txtSubject.getValue()); notification.setPriority((Priority) cboPriority.getSelectedItem().getValue()); List<String> message = StrUtil.toList(txtMessage.getText()); if (service.scheduleNotification(notification, message, recipients)) { root.setAttribute("notification", notification); root.detach(); } else { PromptDialog.showError("@vistanotification.schedule.save.failure"); } } }