public abstract class FormEntryHandler extends Extension
This class allows modules that provide form entry capabilities (like formentry, htmlformentry, and xforms) to appear in the same place in the UI when the user indicates they want to enter a form, and wants to pick which form. To be able to enter forms, your module should provide a subclass that overrides the#getFormList(FormEntryContext))
, andgetFormEntryUrl()
methods. If your module wants to be able to take over the view or edit links in the list of existing encounters, then your subclass should override thegetViewFormUrl()
andgetFormsModuleCanView()
methods (for viewing) and/or thegetEditFormUrl()
andgetFormsModuleCanEdit()
methods (for editing). [WARNING: Do not be surprised if this class changes substantially in OpenMRS 1.6.]
Extension.MEDIA_TYPE
extensionIdSeparator
Constructor and Description |
---|
FormEntryHandler() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getEditFormUrl()
If your module wants to override the Edit link for encounters, override this method.
|
java.lang.String |
getFormEntryUrl()
If your module allows filling out forms, override this method.
|
java.util.Set<Form> |
getFormsModuleCanEdit()
If your module wants to override the Edit link for encounters, override this method.
|
java.util.List<Form> |
getFormsModuleCanEnter(FormEntryContext formEntryContext)
If your module allows filling out forms, override this method.
|
java.util.Set<Form> |
getFormsModuleCanView()
If your module wants to override the View link for encounters, override this method.
|
Extension.MEDIA_TYPE |
getMediaType()
Sets the content type of this extension.
|
java.lang.String |
getRequiredPrivilege()
If you want your module to require any privileges before the user can enter forms with this
particular module (besides "Form Entry" which is automatically required by the framework)
then return it here.
|
java.lang.String |
getViewFormUrl()
If your module wants to override the View link for encounters, override this method.
|
getExtensionId, getModuleId, getOverrideContent, getParameterMap, getPointId, initialize, setModuleId, setParameterMap, setPointId, toExtensionId, toString
public Extension.MEDIA_TYPE getMediaType()
Extension
getMediaType
in class Extension
Extension.getMediaType()
public java.lang.String getRequiredPrivilege()
public java.util.List<Form> getFormsModuleCanEnter(FormEntryContext formEntryContext)
formEntryContext
- details about the state of the user interface where the user is
choosing to enter a form frompublic java.lang.String getFormEntryUrl()
public java.lang.String getViewFormUrl()
public java.util.Set<Form> getFormsModuleCanView()
public java.lang.String getEditFormUrl()
public java.util.Set<Form> getFormsModuleCanEdit()
Copyright © 2018 OpenMRS Inc.. All Rights Reserved.