I have some questions about the LogicModule: (1) Referring to: http://archive.openmrs.org/wiki/HTML_Form_Entry_Module_HTML_Reference#.3CexcludeIf.3E
What is the difference between a velocityTest and logicTest, besides the different syntax? Is the one more powerful than the other, or are they fulfilling different purposes? (2) And is there any documentation on the logic operators and syntax for these tests? I found all operators in the source code under the org.openmrs.logic.op package, but wondering whether the operators are somewhere listed/documented (esp. for users setting up html forms). I found a list of operators at https://wiki.openmrs.org/display/docs/Logic+Service+Technical+Overview#LogicServiceTechnicalOverview-Supportedoperators, but it doesn't seem complete (for example: AsOf, In, GreaterThanEquals, LessThanEquals, Average are not listed there). Also wondering about the use of brackets. Does it work just similar to JSTL syntax? (3) Referring to: https://wiki.openmrs.org/display/docs/User-defined+Rules How to add a custom rule provider? I want to register a new token, user.roles, for which I would need a new rule provider, UserDataSource. I want to use logic expressions in logicTests in the html forms (includeIf, excludeIf tags), showing/hiding information based on the current user's roles. How to best deploy such custom data source, or hook it into the existing system? Would/should it need to be wrapped up as a module, or just a jar? How are the custom rules classes to be deployed (i.e. such as the sample rule classes mentioned on https://wiki.openmrs.org/display/docs/User-defined+Rules)? Or would that just needed to be entered into the 'Rule Content' field under http://demo.openmrs.org/openmrs/module/logic/editRuleDefinition.form?id=1 ? I'm not quite clear whether you write the rule in the OpenMRS Admin section of the Logic module (i.e. Groovy syntax), or actually write and compile a java class and deploy it somehow, i.e. a java-class based rule as described in "Registering a Rule with Logic Service": https://wiki.openmrs.org/display/docs/Rule+HOWTO About the existing data sources: When I look into the existing set of rules in the 1.8.2 demo (demo.openmrs.org), I see that they're using the PersonDataSource, but I can't find that class in the source code of the OpenMRS core anymore, however, browsing on Fisheye, I see that this class existed up to OpenMRS version 1.5.x, but not beyond. https://source.openmrs.org/browse/OpenMRS/branches/1.5.x/src/api/org/openmrs/logic/datasource/PersonDataSource.java Therefore wondering, where has this class gone, or how does 1.8.2 work without that class, when it's defined as the rule provider in the logic module configuration though? I've read the pages in the wiki at https://wiki.openmrs.org/display/docs/Logic+Service, but above questions are still open. _________________________________________ To unsubscribe from OpenMRS Implementers' mailing list, send an e-mail to [email protected] with "SIGNOFF openmrs-implement-l" in the body (not the subject) of your e-mail. [mailto:[email protected]?body=SIGNOFF%20openmrs-implement-l]

