We are able to currently extend OpenMRS Reference application using either apps or extensions and determine who can view our extension areas using requiredPrivilege attribute, i wonder whether there’s actually an attribute to set a condition which would evaluate to either hiding or displaying (activating or de-activating) either an app or extension.
When this is achievable, we solve the use case; Although i have loaded a module that adds a specific extension, i want to be able to trigger either its activation or de-activation
Can you give an example of such a condition?
the condition can be as simple as what it should evaluate to, in this case true or false
I recall as though what @k_joseph is saying is supported but @darius might know better
(Sorry, just getting to this now as I dig out from my vacation-induced email hole.)
You can enable/disable an app. You can do it from the UI on the Manage Apps page, or you can do it programmatically via AppFrameworkService. You can also enable/disable an extension programmatically (or in the DB), because there’s no UI for it yet. (The ticket is RA-923.)
There is also a
require property on the app or extension where you can provide an expression that will be dynamically evaluated every time we decide whether or not to show the app/extension. See the wiki page on Conditionally Displaying Apps and Extensions.
I hope this answers your question @k_joseph.
very helpful @darius and at the right time, i will go either ways and thanks