Patient reminder & CDR - issues

visolveemr wrote on Thursday, July 21, 2011:

Hi,

We created a new rule with filter criteria of Procedure_results.abnormal with value equals high and the following sql error got displayed in patient reminder section and CDR section of patient summary.

ERROR: query failed: SELECT `abnormal` FROM `procedure_result` WHERE `abnormal`=? AND `pid`=? AND `date` <= ‘2011-08-03 16:47:50’

Error: Unknown column ‘pid’ in ‘where clause’

Since the pid column is not in the procedure_results table, it is showing this error and the same error is getting displayed if we use tables which doesn’t have pid as its column.

At present, we can able to add medical problems, medications and medication allergy as filter criteria. OpenEMR should have the feature to add lab test results as filter criteria to pass NIST testing.

Thanks,
ViCarePlus Team

bradymiller wrote on Thursday, July 21, 2011:

Hi,

OpenEMR does not need the feature to add lab test to pass NIST testing. Here are requirements for NIST:
*evaluates the capability to provide one or more automated, electronic clinical
decision support rules (in addition to drug-drug and drug-allergy contraindication checking) based on
data elements in a patient’s problem list, medication list, demographics and laboratory test results.

The NIST testing can be passed by utilizing the already existing ‘Coumadin Management - INR Monitoring’ rule. This rule does the following: If there is a medications titled ‘coumadin’ or ‘warfarin’ (denominator), then will check if there is a lab result titled ‘INR’ within the last 3 weeks (numerator); if no INR within last 3 weeks, then will issue reminder).

Agree that there is currently a bug along with 2 pertinent feature request. But none of these are required for NIST testing, but should be addressed before next release:

1. Bug - In CDR admin gui, when listing raw tables to base rules on, should only offer tables that are “one-dimensional” (ie. contain a patient id field and do not require a custom method; such as history_data and labs). For fix recommend making a list in list_options of the applicable tables (this is nice, because then would display user-friendly terms that can also be translated). MI2 knows this CDR GUI the best, since they built it, so hopefully they can address this before the next official release.

2. Feature Request 1 - In the CDR engine, allow searching for labs via procedure code in addition to the lab ‘title’. Since this is deep within the CDR engine, I plan to incorporate this before next official release.

3. Feature Request 2 - In the CDR admin GUI, allow addition of lab/procedure rules. MI2 knows this CDR GUI the best, since they built it, so hopefully they can address this before the next official release. Whomever takes this on, in order to help them out, here are the database elements of the current  ‘Coumadin Management - INR Monitoring’ rule:

  • Coumadin Management - INR Monitoring
    INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES (‘rule_inr_monitor’, 0, 0, 1, 0, ‘’, ‘’, 0, ‘’, 0);

INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES (‘rule_action’ ,‘act_lab_inr’, ‘INR’, 150, 0);
INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES (‘clinical_rules’, ‘rule_inr_monitor’, ‘Coumadin Management - INR Monitoring’, 1000, 0);

INSERT INTO `rule_action` ( `id`, `group_id`, `category`, `item` ) VALUES (‘rule_inr_monitor’, 1, ‘act_cat_measure’, ‘act_lab_inr’);

INSERT INTO `rule_action_item` ( `category`, `item`, `clin_rem_link`, `reminder_message`, `custom_flag` ) VALUES (‘act_cat_measure’, ‘act_lab_inr’, ‘’, ‘’, 0);

  • Coumadin Management - INR Monitoring
    INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES (‘rule_inr_monitor’, 1, 0, ‘filt_lists’, ‘medication’, ‘coumadin’);
    INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES (‘rule_inr_monitor’, 1, 0, ‘filt_lists’, ‘medication’, ‘warfarin’);

  • Coumadin Management - INR Monitoring
    INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES (‘rule_inr_monitor’, ‘clinical_reminder_pre’, ‘week’, ‘2’);
    INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES (‘rule_inr_monitor’, ‘clinical_reminder_post’, ‘month’, ‘1’);
    INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES (‘rule_inr_monitor’, ‘patient_reminder_pre’, ‘week’, ‘2’);
    INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES (‘rule_inr_monitor’, ‘patient_reminder_post’, ‘month’, ‘1’);

  • Coumadin Management - INR Monitoring
    INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES (‘rule_inr_monitor’, 1, 1, 1, ‘target_interval’, ‘week’, 3);
    INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES (‘rule_inr_monitor’, 1, 1, 1, ‘target_proc’, ‘INR::::::::ge::1’, 0);

-brady

bradymiller wrote on Thursday, July 21, 2011:

Hi Visolve,

After reading through your message above more closely, I just realized that you’re differentiating between filters and targets. NIST does not make that differentiation and just states the rules need to be “based” on certain elements. Note that I initially filter out all deceased patients first in the CDR engine; with your logic, this would then mean all my rules are based on demographics (ie. is the patient dead or not).

thanks,
-brady