/** * Returns the user in the current context. * * @return User in current context. */ public static IUser getActiveUser() { return getUserContext().getContextObject(false); }
/** * Returns the current participant from the shared context. * * @return Current participant. */ public static EncounterParticipantComponent getActiveParticipant() { return getParticipantContext().getContextObject(false); }
/** * Returns the current encounter from the shared context. * * @return Current encounter. */ public static Encounter getActiveEncounter() { return getEncounterContext().getContextObject(false); }
/** * Returns the current participant from the shared context. * * @return Current participant. */ public static Participant getActiveParticipant() { return getParticipantContext().getContextObject(false); }
/** * Returns the current location from the shared context. * * @return Current location. */ public static Location getActiveLocation() { return getLocationContext().getContextObject(false); }
/** * Returns the patient in the current context. * * @return Patient object (may be null). */ public static Patient getActivePatient() { return getPatientContext().getContextObject(false); }
/** * Returns the user in the current context. * * @return User in current context. */ public static IUser getActiveUser() { return getUserContext().getContextObject(false); }
@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 if it is a practitioner. * * @return Current practitioner. */ public static EncounterParticipantComponent getActivePractitioner() { EncounterParticipantComponent participant = getParticipantContext().getContextObject(false); return participant == null ? null : participant.getIndividual().getResource() instanceof Practitioner ? participant : null; }
/** * 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; }