Page tree
Skip to end of metadata
Go to start of metadata

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.

Download

Logic Module Release Notes

0.5.0.1

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:

  • LOGIC-92 - indexDate needs to be inclusive (tmdugan)
  • LOGIC-94 - Check the cache for a Rule before accessing token registration information from the database (sjmckee)
  • LOGIC-95 - Remove the support of finding concepts by ID. Logic is currently only finding them by name (sjmckee)

0.5

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.

Requirements

This version of the module works with the following OpenMRS versions:

  • in the 1.8.x line: any version after 1.8 Beta (from revision 17709)
  • in the 1.7.x line: from 1.7.2 (from revision 17710)
  • in the 1.6.x line: from 1.6.3 (from revision 17711 – use this custom version, identical to the one in the module repository but with a more relaxed require_version.)

User-visible changes

Ticket

Description

LOGIC-3

Implement asOf() operator for LogicCriteria

LOGIC-42

Edit / Remove Logic Token

LOGIC-47

Make logic module compatible with 1.6+ and replace Derived Concept with LogicRule

LOGIC-54

Patient data source of patient identifier is not implemented

LOGIC-57

PersonDataSource should let you access ther person's name

LOGIC-61

Tokens should be case-preserving case-insensitive

LOGIC-62

Better UI for managing logic tokens and rules

LOGIC-67

Groovy rules

Under-the-hood changes

Ticket

Description

LOGIC-46

Logic Module contains antlr-2.7.6 in its lib folder

LOGIC-59

Logic Rule Token needs a uuid

LOGIC-71

LogicDataSources have their names defined in XML

LOGIC-78

LogicService.eval(..., String, ...) should treat the String as an expression, not a token

LOGIC-79

LogicContext's indexDate operates as a date+time, but it should just operate as a date

LOGIC-80

Logic cache never has any cache hits

LOGIC-64

Rename LogicRuleToken to TokenRegistration

LOGIC-65

Introduce a RuleProvider interface so modules can consistently provide and register rules

LOGIC-68

Allow modules to register LanguageHandlers via Spring

LOGIC-69

Allow users to change names of tokens, while still allowing RuleProviders to access their rules

LOGIC-70

Call afterStartup methods of RuleProviders after the logic module starts up

LOGIC-76

TokenService should cache rules it gets from RuleProviders, so they don't have to be recompiled every time

LOGIC-77

Rules have access to a full Patient, but LogicDataSources don't


0.4.1

Ticket

Description

Author

LOGIC-53

LogicService.parse(String) on a badly-formed expression may run forever

djazayeri

  • No labels

1 Comment

  1. If you are running OpenMRS 1.6.3+ and you see an error message like this:

    Error while trying to start module: logic
    org.openmrs.module.ModuleException: Module requires at least version '1.7.2.17710-1.9.*'.  Current code version is only '1.6.4.21802' Module: Logic Module
    

    ...then you need to download a custom build of the logic module that's linked on this page.