Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Global properties are configuration variables that the user can set  through through the Administration menu, without restarting or recompiling the application. They're useful when module code needs to refer to a value that's unique to a particular instalationinstallation, such as a concept ID number or a file path.

...

From the EHSDI 204 Module Development class slides on OpenMRS tags:

Code Block

"<openmrs:globalProperty> tag:

 Used to access global properties, which are name/value pairs stored in the database

If var is specified, var becomes attribute with the property value
If not, then property value printed to response 
 For example...

The global property called "concept.weight" stores the ID of the concept to use for patient weight observations
This can set as an attribute called weightConceptId as follows...

<openmrs:globalProperty key="concept.weight" var="weightConceptId"/>"

...