...
These "work", but are very hard to use. (Why A later logic module release will make these easier to use. (But why not use Groovy instead? It's better...)
...
For example, the following would work (if it is the rule with id=3):
Code Block | ||
---|---|---|
| ||
package org.openmrs.module.logic.rule; import java.util.Map; import org.openmrs.Patient; import org.openmrs.logic.*; import org.openmrs.logic.rule.*; import org.openmrs.logic.result.*; public class CompiledRule3 extends AbstractRule { public Result eval(LogicContext context, Integer patientId, Map<String, Object> parameters) { return new Result("I would recommend Groovy instead"); } } |