Hi all
The questions to the developers of the openmrs-form-engine-lib project (https://ohri-docs.globalhealthapp.net/) (AMPATH Forms Builder)
Purpose of the task: Find a way to hide/display form elements based on uuid roles/privileges and the current uuid user location, which are generated in the AMPATH Forms json config.
How to get the uuid of the session user’s current location and all the uuid of roles and privileges in the form designer (ohri forms - AMPATH forms) for JS expressions in json configuration?
If there is no such built-in feature, what is the best way to initialize the data in advance so that it can later be used in configurator expressions (ohri forms - AMPATH Forms)?
Is there an example of getting your own data from the server API and using it in JS expressions in the json configuration?
Example: { “hide”: { “hideWhenExpression”: “CheckUserLocation(‘UUID - Privilege’) && CheckUserRole(‘UUID - Privilege’) && CheckUserPrivilege(‘UUID - Privilege’)'” } }