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; }
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);
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; }