Wiki Spaces
Documentation
Projects
Resources
Get Help from Others
Q&A: Ask OpenMRS
Discussion: OpenMRS Talk
Real-Time: IRC Chat | Slack
The logic module is a core module that provides the implementation of the OpenMRS logic service. The majority of the logic service implementation was moved into this module so that the logic service could evolve at a separate pace from the OpenMRS application. OpenMRS cannot run without this module installed.
For further details about the logic service, please refer to the Logic Service page.
The purpose of this version was to have a version of logic that doesn't declare an upper bound on its allowed OpenMRS version. (0.5 only works up to OpenMRS 1.8.*, so it can't be used with OpenMRS 1.9...)
It includes a few other tickets whose code had already been committed:
This version allows you to define rules in Groovy or Java and save them to the database (see User-defined Rules), has a better UI for managing tokens and rules, and has significant performance improvements when running rules on large cohorts.
This version of the module works with the following OpenMRS versions:
Ticket | Description |
---|---|
Implement asOf() operator for LogicCriteria | |
Edit / Remove Logic Token | |
Make logic module compatible with 1.6+ and replace Derived Concept with LogicRule | |
Patient data source of patient identifier is not implemented | |
PersonDataSource should let you access ther person's name | |
Tokens should be case-preserving case-insensitive | |
Better UI for managing logic tokens and rules | |
Groovy rules |
Ticket | Description |
---|---|
Logic Module contains antlr-2.7.6 in its lib folder | |
Logic Rule Token needs a uuid | |
LogicDataSources have their names defined in XML | |
LogicService.eval(..., String, ...) should treat the String as an expression, not a token | |
LogicContext's indexDate operates as a date+time, but it should just operate as a date | |
Logic cache never has any cache hits | |
Rename LogicRuleToken to TokenRegistration | |
Introduce a RuleProvider interface so modules can consistently provide and register rules | |
Allow modules to register LanguageHandlers via Spring | |
Allow users to change names of tokens, while still allowing RuleProviders to access their rules | |
Call afterStartup methods of RuleProviders after the logic module starts up | |
TokenService should cache rules it gets from RuleProviders, so they don't have to be recompiled every time | |
Rules have access to a full Patient, but LogicDataSources don't |
Ticket | Description | Author |
---|---|---|
LogicService.parse(String) on a badly-formed expression may run forever | djazayeri |
1 Comment
Darius Jazayeri
If you are running OpenMRS 1.6.3+ and you see an error message like this:
...then you need to download a custom build of the logic module that's linked on this page.