public class ExistingOrNewVisitAssignmentHandler extends ExistingVisitAssignmentHandler
EncounterVisitHandler
Constructor and Description |
---|
ExistingOrNewVisitAssignmentHandler() |
Modifier and Type | Method and Description |
---|---|
void |
beforeCreateEncounter(Encounter encounter)
Implementations of this method should look at the given
encounter and choose
whether or not it should be assigned to a Visit that is already open or if it should
be part of a new visit. |
java.lang.String |
getDisplayName(java.util.Locale locale) |
protected VisitType |
getVisitType(Encounter encounter)
Gets the visit type for an encounter.
|
getDisplayName
public java.lang.String getDisplayName(java.util.Locale locale)
getDisplayName
in interface EncounterVisitHandler
getDisplayName
in class ExistingVisitAssignmentHandler
locale
- optional locale to specify. If none is passed, Context.getLocale()
should be usedExistingVisitAssignmentHandler.getDisplayName(java.util.Locale)
public void beforeCreateEncounter(Encounter encounter)
EncounterVisitHandler
encounter
and choose
whether or not it should be assigned to a Visit
that is already open or if it should
be part of a new visit. Encounter.setVisit(Visit)
with the outcome. The visit assigned to the encounter will
be persisted to the database after this method is returned, so the handler is not required to
save it.beforeCreateEncounter
in interface EncounterVisitHandler
beforeCreateEncounter
in class ExistingVisitAssignmentHandler
encounter
- the new unsaved encounter in question of whether to assign to a visitExistingVisitAssignmentHandler.beforeCreateEncounter(org.openmrs.Encounter)
protected VisitType getVisitType(Encounter encounter) throws APIException
encounterType
- the encounter.APIException
Copyright © 2018 OpenMRS Inc.. All Rights Reserved.