/** * Retrieves a formatted header for the current user. * * @return Formatted header. */ public String getUserInfo() { IUser user = UserContext.getActiveUser(); return user == null ? "No User Selected" : user.getFullName(); }
/** * Retrieves a formatted header for the current user. * * @return Formatted header. */ public String getUserInfo() { IUser user = UserContext.getActiveUser(); return user == null ? "No User Selected" : user.getFullName(); }
@Override protected void updateContext(ContextMap context) { IUser user = UserContext.getActiveUser(); if (user != null) { context.put("userId", user.getLogicalId()); } }
@Override public void onLoad(ElementPlugin plugin) { super.onLoad(plugin); setUser(UserContext.getActiveUser()); UserContext.getUserContext().addListener(userChangeListener); }
@Override protected void updateContext(ContextMap context) { IUser user = UserContext.getActiveUser(); if (user != null) { context.put("full_name", user.getFullName()); context.put("id", user.getLogicalId()); } }
/** * @see org.carewebframework.api.context.IContextEvent#committed() */ @Override public void committed() { IUser user = UserContext.getActiveUser(); if (log.isDebugEnabled()) { log.debug("user: " + user); } if (currentUser != null && currentUser.equals(user)) { return; } currentUser = user; String text = user == null ? "" : user.getFullName(); if (user != null && user.getSecurityDomain() != null) { text += "@" + user.getSecurityDomain().getName(); } HttpServletRequest request = FrameworkWebSupport.getHttpServletRequest(); String info = StringUtils.trimToEmpty((request == null ? "" : request.getLocalAddr()) + " " + dbRegion); userHeader.setValue(text + (info.isEmpty() ? "" : " (" + info + ")")); password.setVisible(SecurityUtil.getSecurityService().canChangePassword()); Clients.resize(root); }
public void onClick$btnAddNote() { String note = AddNoteController.execute(); if (note == null || note.isEmpty()) { return; } ProblemNote pn = new ProblemNote(); IUser user = UserContext.getActiveUser(); pn.setAuthor(user.getFullName()); pn.setFacility((Organization) PatientContext.getActivePatient().getManagingOrganization().getResource()); pn.setNumber("*"); pn.setNarrative(note); pn.setDateAdded(new FMDate(DateUtil.stripTime(new Date()))); changedNotes.add(pn); renderNote(pn); } }
private static void deletePatientEd(String visitIEN, String icdIEN) { Patient patient = PatientContext.getActivePatient(); IUser user = UserContext.getActiveUser(); BrokerSession broker = VistAUtil.getBrokerSession(); String s = VistAUtil.concatParams(patient.getId().getIdPart(), visitIEN);
public static String addProblem(String sICDIEN, String narrative, String onset) { BrokerSession broker = VistAUtil.getBrokerSession(); String institution = UserContext.getActiveUser().getSecurityDomain().getLogicalId(); Patient patient = PatientContext.getActivePatient(); if (onset == null) { onset = StrUtil.piece(broker.getHostTime().toString(), " "); } // ICD IEN or Code [1] ^ Narrative [2] ^ Location IEN [3] ^ Date of Onset [4] ^ Class [5] ^ // Status [6] ^ Patient IEN [7] ^ Problem IEN [8] ^ Problem # [9] String s = VistAUtil.concatParams(sICDIEN, narrative, institution, onset, null, "A", patient.getId().getIdPart(), null, null); return broker.callRPC("BGOPROB SET", s); }
@Override public void doAfterCompose(Component comp) throws Exception { super.doAfterCompose(comp); panel = comp; forced = !FrameworkUtil.isInitialized(); String title; String label; if (!forced) { user = UserContext.getActiveUser(); title = "password.change.dialog.panel.title"; label = "password.change.dialog.label"; } else { user = (IUser) arg.get("user"); title = "password.change.dialog.expired.panel.title"; label = "password.change.dialog.expired.label"; } if (user == null) { doCancel(); } else { lblTitle.setValue(StrUtil.getLabel(title) + " - " + user.getFullName()); lblInfo.setValue(StrUtil.getLabel(label, MESSAGE_PASSWORD_RULES)); } }
public void refreshProviders() { Practitioner provider = getSelectedProvider(lstEncounterProviders); ListModel<Practitioner> model = new ListModelList<Practitioner>(encounterProvider.getProviders()); lstEncounterProviders.setModel((ListModel<?>) null); lstEncounterProviders.setModel(model); if (model.getSize() == 1) { lstEncounterProviders.setSelectedIndex(0); } else { selectFirstProvider(provider, UserContext.getActiveUser(), encounterProvider.getCurrentProvider(), encounterProvider.getPrimaryProvider()); } }
/** * Initialize the dialog. */ @Override public void doAfterCompose(Component comp) throws Exception { super.doAfterCompose(comp); notification = (ScheduledNotification) arg.get("notification"); for (Priority priority : Priority.values()) { Comboitem item = new Comboitem(PriorityRenderer.getDisplayName(priority), PriorityRenderer.getImage(priority)); item.setValue(priority); cboPriority.appendChild(item); } if (notification == null) { notification = new ScheduledNotification(); notification.setPriority(Priority.LOW); notification.setDeliveryDate(new FMDate()); recipients.add(new Recipient(UserContext.getActiveUser())); } else { service.getScheduledNotificationRecipients(notification, recipients); } populateForm(); }
public void loadEncounterParticipants(Encounter encounter) { encounterParticipantsModel.clear(); encounterParticipantsModel.addAll(encounter.getParticipant()); currentParticipant = EncounterParticipantContext.getActiveParticipant(); encounterParticipantRenderer.setPrimaryParticipant(EncounterUtil.getPrimaryParticipant(encounter)); if (encounterParticipantsModel.getSize() == 1) { lstEncounterParticipants.setSelectedIndex(0); } else { selectFirstParticipant(UserContext.getActiveUser(), currentParticipant, getPrimaryParticipant()); } participantsModified = false; primaryModified = false; }
public static String addProcedure(String cptIEN, String narrative, String qty, String mod1, String mod2, String principal) { //if (!checkActiveVisit()) // return "-1"; Patient patient = PatientContext.getActivePatient(); Encounter encounter = EncounterContext.getActiveEncounter(); IUser user = UserContext.getActiveUser(); // Visit IEN [1] ^ CPT IEN [2] ^ Patient IEN [3] ^ Event Date [4] ^ Quantity [5] ^ // Diagnosis [6] ^ Modifier #1 [7] ^ Provider IEN [8] ^ Principal [9] ^ V File IEN [10] ^ // Narrative [11] ^ Modifier #2 [12] ^ Location IEN [13] ^ Outside Location [14] ^ // Historical [15] ^ ICD Procedure Flag [16] ^ No Dups [17] String sParam = VistAUtil.concatParams(encounter.getId().getIdPart(), cptIEN, patient.getId().getIdPart(), null, qty, null, mod1, user.getLogicalId(), principal, null, narrative, mod2); return VistAUtil.getBrokerSession().callRPC("BGOVCPT SET", sParam); }
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))); } }
IUser user = UserContext.getActiveUser(); Practitioner activePractitioner = (Practitioner) EncounterParticipantContext.getActivePractitioner().getIndividual() .getResource();
record.setIndicated(true); record.setStartDate(DateUtil.today()); IUser user = UserContext.getActiveUser(); Practitioner provider = new Practitioner(); provider.setId(user.getLogicalId());