Conditions created using Custom table not working in Clinical Decision Rules

My team and I are developing a CDSS (Clinical Decision Support System) module specifically for immunization within existing EMRs. Since OpenEMR already has an existing Clinical Decision System, We have decided to check if the current system can be used for our use case. Please check our rules for understanding

However, when we tried to implement the rules, we encountered a problem where the rule created under the type custom table was not filtered based on it. Upon checking the code, we found that even when the “passtarget” is false, In the else part, if the mode is not “report” then the action for the particular rule is added to the result.

We are wondering if there is any specific reason for this and how to filter out the patients based on the conditions, also this causes issues in the existing “Pneumonia Vaccination Status for Older Adults” and “Influenza Immunization for Patients >= 50 Years Old” rules, where the rule is triggered even when immunization is recorded for the patient.
One possible solution to overcome my issues would be if the demographics that can be configured in the rule can be associated to separate action rather than for a particular rule.
When I checked, it was not possible to achieve this because the Demographics filter criteria are stored in the “rule_filter” table and the Clinical targets are stored in the “rule_target” table.
Can you please help me find a way to implement my case in the current OpenEMR CDS module or guide me on how to proceed further to achieve my target?

1 Like

Hi can anyone help me on how to move further, Will it be a good idea to create a new updated CDS module which satisfies my use cases

Hi. Did you ever make any progress with your rule issues? I’ve done several deep dives into the code and may be able to help