bradymiller wrote on Friday, January 29, 2016:
Hi Harley,
Don’t set a filter. Instead just set a target(see attached). This will work but you will have an issue with the interval in future; this a bug and the gui should support adding a target without a interval. After you create the rule, you can remove the interval setting manually from the rule_target sql table. The row that need to be removed is highlighted in screenshot below.
It appears the GUI rule editor has flip flopped the Option/Required setting. This setting correlates with the required_flag in both the rule_target and rule_filter tables(note the comment of the sql row also appears to be flip flopped; 1 should means required and 0 should mean optional). This setting solves the problem when there are multiple filter items or target items. When it is set to 1, then that filter or target is required to pass (for example, if there are two elements in a target and both need to be there, then would set this to 1; a good example if a blood pressure where need the systolic BP and diastolic BP columns to be populated). When it is set to 0, then that filter or target is not required itself to pass, but only one of them is required to pass(a good example of this is when filtering through 20 ICD10 codes; in this case only 1 is needed to pass(ie. considered optional))(another good example if when looking for immunization targets where there are several possible targets(ie. CVX codes), but only 1 needs to be positive). Recommend doing a quick glance through the rule_filters and rule_target sql tables and it will make things much more clear.
It appears three easy to fix bugs are apparent from looking at this:
- The Rules GUI for the targets should give option of not setting a Interval.
- The Rules GUI for the filters and targets should flip/flop the Required/Optional settings.
- The sql comments for the required_flag sql row in the rule_target and rule_filters sql tables should be flip flopped(I am guessing this is what originally threw off Aaron when he wrote the GUI rule editor).
Any developers want to take this on? It would be a moderately easy(and small) project.
-brady
OpenEMR