Demo available at https://jugu.github.io/medical-rule-builder/
To run the code locally
- Install Node (https://nodejs.org/en/)
- Run the command: node ruleserver.js
- Open the application in browser at: http://localhost:3000/medical-rule-builder/index.html (port may vary)
(The only libraries/plugins used are JQuery and select2) This is an online rule builder tool. Currently customized for dynamically creating/editing rules for illnesses/diseases. This can be used to create any kind of rule definitions and/or for building queries.
The interpreter is inspired by Douglas Crockford's Top Down Operator Precedence parser http://javascript.crockford.com/tdop/tdop.html
- Build rules with AND and OR associations
- Build rules of the type Any 2/Any 3/.../Any k , where only a particular number of conditions may be true
- Build rules using previously defined subconditions
- Build rules using previously defined rules
- Test the rules
- Export the rules with the interpreter text in JSON format
Also in the pipeline is an easy way to import your own set of query parameters, then build rules on top of them, and finally execute the rules based on parameter values to view the results.