public class RuleDecisionTable<T> extends AbstractRule<T>
- name (otional) : rule name. if null the file name will be used - description (optional) : rule description - parameter...(optional) : additional (used in condition expressions) parameters with default value - matrix : decision tableDecision Table Description:
#KEY_MATRIX followed by condition names.
All conditions have the form: [OPERATOR]{VALUE}
operators are: =, !=, <, <=, >, >=
if no operator is given, = will be used
a value must be a Comparable and can referenz another parameter
The first line that starts with an empty cell will end the matrix (decision table). the last line of the matrix will
be the exptected result line.
Example:
Name;ABR-7493;;;;;;; Beschreibung;"Rezeptfehler ""Betragshorror"" bei §302: Rezept kann ohne Änderung der Daten nicht abgerechnet werden.";;;;;;; ;"Rezeptfehler ""Betragshorror"" bei §300, Rechnungstyp Arzneimittel oder Hilfsmittel: Rezept kann ohne Änderung der Daten nicht abgerechnet werden.";;;;;;; ;"Rezeptfehler ""Betragshorror"" bei §300, Rechnungstyp Pflegehilfsmittel: Rezept kann ohne Änderung der Daten abgerechnet werden.";;;;;;; ;"*Rezeptfehler ""Betragshorror"" bei §300 Pflegehilfsmittel Irrläufer: Rezept kann ohne Änderung der Daten abgerechnet werden.";;;;;;; ;;;;;;;; MATRIX;R1;R2;R3;R4;R5;R6;R7;R8 DIFF;0;0;0;0;>0;>0;>0;>0 PARAGRAPH;300;300;302;302;300;300;302;302 ISTHILFSMITTEL;Ja;Nein;Ja;Nein;Ja;Nein;Ja;Nein ERGBEBNIS;OK;OK;OK;OK;WARNUNG;FEHLER;FEHLER;FEHLER
| Modifier and Type | Field and Description |
|---|---|
static char |
PREFIX |
initializedconstraints, name, operation, operationContent, parameter, specifications| Constructor and Description |
|---|
RuleDecisionTable() |
| Modifier and Type | Method and Description |
|---|---|
static RuleDecisionTable |
fromCSV(String fileName) |
static <T> RuleDecisionTable<T> |
fromTree(STree<T> tree) |
String |
getOperation() |
protected void |
initDeserializing() |
String |
prefix()
prefix
|
T |
run(Map<String,Object> context,
Object... extArgs) |
String |
toString() |
STree |
toTree()
transforms the current decision table to a tree. each odd level holds the parameter names, followed by its
conditions (the values of the table) in the next (even) level.
|
importSubRulesaddConstraint, addSpecification, addSpecification, asSequence, checkConstraint, checkedArguments, checkSpecification, createConstraints, createParameters, createSimpleParameters, getName, getParameter, getParameterList, markArgumentsAsSequence, parameters, setOperationpublic static final char PREFIX
public String prefix()
AbstractRunnableprefix in class AbstractRule<T>public STree toTree()
public static <T> RuleDecisionTable<T> fromTree(STree<T> tree)
public static RuleDecisionTable fromCSV(String fileName)
public String getOperation()
getOperation in class AbstractRunnable<T>protected void initDeserializing()
initDeserializing in class AbstractRunnable<T>public String toString()
toString in class AbstractRunnable<T>Copyright © 2012–2018. All rights reserved.