@Override public String pending(boolean silent) { Encounter encounter = EncounterContext.getEncounterContext().getContextObject(true); changeParticipant(encounter == null ? null : encounter.getParticipantFirstRep()); return null; } }
/** * Returns the current participant from the shared context. * * @return Current participant. */ public static Participant getActiveParticipant() { return getParticipantContext().getContextObject(false); }
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; }
if (EncounterParticipantContext.getActivePractitioner() == null) { appendItem(sb, Constants.TX_NO_PRV); && !isProvider(EncounterParticipantContext.getActivePractitioner())) { return Constants.TX_NO_KEY;
Date date = period.isEmpty() ? null : period.getStart(); lblDate.setValue(DateUtil.formatDate(date)); Participant participant = EncounterParticipantContext.getActiveParticipant(); String name = participant == null ? null : FhirUtil.formatName(EncounterUtil.getName(participant)); lblParticipant.setValue(name);
Encounter encounter = EncounterContext.getActiveEncounter(); IUser user = UserContext.getActiveUser(); Practitioner activePractitioner = (Practitioner) EncounterParticipantContext.getActivePractitioner().getIndividual() .getResource(); String practitionerId = activePractitioner == null ? null : activePractitioner.getId().getIdPart();
public static boolean forceCreate(Encounter encounter) { if (encounter == null || !isPrepared(encounter)) { return false; } if (VistAUtil.validateIEN(encounter)) { return true; } Patient patient = PatientContext.getActivePatient(); if (patient == null) { return false; } Participant participant = EncounterParticipantContext.getActiveParticipant(); String partId = getParticipantId(participant); String s = VistAUtil.getBrokerSession().callRPC("RGCWENCX FETCH", patient.getId().getIdPart(), encode(encounter), partId, true); String id = StrUtil.piece(s, StrUtil.U, 6); if (!VistAUtil.validateIEN(id)) { return false; } encounter.setId(id); return true; }
EncounterParticipantContext.changeParticipant(getSelectedParticipant(lstEncounterParticipants));
/** * Requests a context change to the specified participant. * * @param participant The participant. */ public static void changeParticipant(Participant participant) { try { getParticipantContext().requestContextChange(participant); } catch (Exception e) { log.error("Error during request context change.", e); } }
/** * Returns the current participant from the shared context if it is a practitioner. * * @return Current practitioner. */ public static Participant getActivePractitioner() { Participant participant = getParticipantContext().getContextObject(false); return participant == null ? null : participant.getIndividual().getResource() instanceof Practitioner ? participant : null; }