public class ExistingOrNewVisitAssignmentHandler extends ExistingVisitAssignmentHandler implements GlobalPropertyListener
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. |
String |
getDisplayName(Locale locale) |
void |
globalPropertyChanged(GlobalProperty newValue)
Called after a global property is created or updated
|
void |
globalPropertyDeleted(String propertyName)
Called after a global property is deleted
|
boolean |
supportsPropertyName(String propertyName)
Asks this listener whether it wants to be notified about the given property name
|
getDisplayNamepublic String getDisplayName(Locale locale)
getDisplayName in interface EncounterVisitHandlergetDisplayName in class ExistingVisitAssignmentHandlerlocale - optional locale to specify. If none is passed, Context.getLocale()
should be usedExistingVisitAssignmentHandler.getDisplayName(java.util.Locale)public void beforeCreateEncounter(Encounter encounter)
EncounterVisitHandlerencounter 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 EncounterVisitHandlerbeforeCreateEncounter in class ExistingVisitAssignmentHandlerencounter - the new unsaved encounter in question of whether to assign to a visitShould assign existing visit if match found
Should assign new visit if no match found
Should resolve encounter and visit type uuids as global property valuespublic boolean supportsPropertyName(String propertyName)
GlobalPropertyListenersupportsPropertyName in interface GlobalPropertyListenerpublic void globalPropertyChanged(GlobalProperty newValue)
GlobalPropertyListenerglobalPropertyChanged in interface GlobalPropertyListenernewValue - the new value of the property that was just savedpublic void globalPropertyDeleted(String propertyName)
GlobalPropertyListenerglobalPropertyDeleted in interface GlobalPropertyListenerpropertyName - the name of the property that was just deletedCopyright © 2024 OpenMRS Inc.. All rights reserved.