Wiki Spaces
Documentation
Projects
Resources
Get Help from Others
Q&A: Ask OpenMRS »
Discussion: OpenMRS Talk »
Real-Time: IRC Chat
The Manage Other Settings page (accessed from the Administration page) allows for the configuration of other setting including:
The Manage Other Settings page also contains a series of settings that allow for the customization of the fields that are displayed in provider, patient, and person lists and search results. The fields are specified in pipe-delimited list of label/field name pairs where field names are referenced by standard dot notation. For instance:
Identifier:provider.identifier|Given Name:provider.person.personName.givenName|Family Name:provider.person.personName.familyName|Role:provider.providerRole|Gender:provider.person.gender|Start Date:relationship.startDate
The standard Provider object is accessible via dot notation when displaying provider lists and search results, and the Patient and Person objects are accessible when display patient and person list/search results. Besides these objects, access to a few other fields are available in the display context:
The provider module provides a set of new privileges hat can be used to customize the experience for various users/roles. The privileges are broken down into high level API privileges, as well as privileges that control what access at the web layer:
(TODO: document the OpenMRS general privileges that a user must have in order to use the module properly)
When assigning supervisees to supervisors, certain supervisees can be suggested as potential supervisees for the provider. These suggestion are set up by creating suggestion rules. By default, no rules are configured, but, after a rule has been configured, a Suggest button will be added to the action buttons that appear in the Supervisee pane of the Provider Dashboard. Clicking the suggest button will list the providers that match the suggestion rule.
Suggestions can be configured by going to the Manage Suggestions page, accessible from the Administration page. A suggestion has the following fields:
The criteria should be a Groovy script that returns a set of persons (the set of suggested supervisees). In the Groovy context, the Person object (not the Provider object) associated with the supervisor we are evaluating the suggestion for is bound to the variable "provider". The core Openmrs services are accessible via variables in the format "providerService", and the provider management service API is available via the variable "providerManagementService".
For instance, here is an example of a suggestion that suggests all providers with the same cityVillage as the supervisee. Note that the result will still be filtered to exclude any providers who do not have a role that the selected provider is able to supervise.
// the supervisor is bound to the provider variable def supervisor = provider // get all providers in the system, excluding retired providers List providers = providerService.getAllProviders(false) // initialize the set we are going to pass back as a result // (note that it is a list of persons, not providers) Set results = new HashSet<org.openmrs.Person>() // iterate through the list of providers we have fetched for (org.openmrs.Provider p : providers) { // if the provider has the same city/village as the supervisor, add the *person* associated with this provider to the results list if (p.getPerson() && p.getPerson().getPersonAddress()?.getCityVillage().equals(supervisor.getPersonAddress()?.getCityVillage())) { results.add(p.getPerson()) } } // return the results return results