From b0af066a41d5ea52daf68d4825c080fa0731a69c Mon Sep 17 00:00:00 2001 From: bradymiller Date: Wed, 30 Mar 2016 00:48:25 -0700 Subject: [PATCH] MU2 project work on the CQM rules Flagged 0041 and 0059 to work with 2014 CQM report. Still trying to figure out how to get 0101 and 0384 working... --- library/classes/rulesets/Cqm/reports/NFQ_0101.php | 28 +++++++++++++++++++++++ library/classes/rulesets/Cqm/reports/NFQ_0384.php | 28 +++++++++++++++++++++++ sql/4_2_1-to-4_3_1_upgrade.sql | 4 ++++ sql/database.sql | 4 ++-- version.php | 2 +- 5 files changed, 63 insertions(+), 3 deletions(-) create mode 100644 library/classes/rulesets/Cqm/reports/NFQ_0101.php create mode 100644 library/classes/rulesets/Cqm/reports/NFQ_0384.php diff --git a/library/classes/rulesets/Cqm/reports/NFQ_0101.php b/library/classes/rulesets/Cqm/reports/NFQ_0101.php new file mode 100644 index 000000000..1e8c775b0 --- /dev/null +++ b/library/classes/rulesets/Cqm/reports/NFQ_0101.php @@ -0,0 +1,28 @@ +/** + * + * CQM NQF 0101 + * + * Copyright (C) 2016 Brady Miller + * + * LICENSE: This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see ;. + * + * @package OpenEMR + * @author Brady Miller + * @link http://www.open-emr.org + */ +class NFQ_0101 extends AbstractCqmReport +{ + public function createPopulationCriteria() + { + return new NFQ_0101_PopulationCriteria(); + } +} diff --git a/library/classes/rulesets/Cqm/reports/NFQ_0384.php b/library/classes/rulesets/Cqm/reports/NFQ_0384.php new file mode 100644 index 000000000..7f3f64043 --- /dev/null +++ b/library/classes/rulesets/Cqm/reports/NFQ_0384.php @@ -0,0 +1,28 @@ +/** + * + * CQM NFQ 0384 + * + * Copyright (C) 2016 Brady Miller + * + * LICENSE: This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see ;. + * + * @package OpenEMR + * @author Brady Miller + * @link http://www.open-emr.org + */ +class NFQ_0384 extends AbstractCqmReport +{ + public function createPopulationCriteria() + { + return new NFQ_0384_PopulationCriteria(); + } +} diff --git a/sql/4_2_1-to-4_3_1_upgrade.sql b/sql/4_2_1-to-4_3_1_upgrade.sql index f38904aca..fa088b635 100644 --- a/sql/4_2_1-to-4_3_1_upgrade.sql +++ b/sql/4_2_1-to-4_3_1_upgrade.sql @@ -140,3 +140,7 @@ ALTER TABLE `procedure_report` ADD COLUMN `date_collected_tz` varchar(5) DEFAULT #IfMissingColumn procedure_report date_report_tz ALTER TABLE `procedure_report` ADD COLUMN `date_report_tz` varchar(5) DEFAULT '' COMMENT '+-hhmm offset from UTC'; #EndIf + +UPDATE `clinical_rules` SET `cqm_2014_flag` = 1 WHERE `id` = 'rule_fall_screening_cqm' AND `pid` = 0; +UPDATE `clinical_rules` SET `cqm_2014_flag` = 1 WHERE `id` = 'rule_pain_intensity_cqm' AND `pid` = 0; + diff --git a/sql/database.sql b/sql/database.sql index 56ea7810c..c278c26d1 100644 --- a/sql/database.sql +++ b/sql/database.sql @@ -505,7 +505,7 @@ INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_ -- NQF 0024 Weight Assessment and Counseling for Children and Adolescents INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_2011_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag`, cqm_2014_flag ) VALUES ('rule_wt_assess_couns_child_cqm', 0, 0, 0, 1, 1, '0024', '', 0, '', 0, 1); -- NQF 0041 (PQRI 110) Influenza Immunization for Patients >= 50 Years Old -INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_2011_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('rule_influenza_ge_50_cqm', 0, 0, 0, 1, 1, '0041', '110', 0, '', 0); +INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_2011_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag`, `cqm_2014_flag` ) VALUES ('rule_influenza_ge_50_cqm', 0, 0, 0, 1, 1, '0041', '110', 0, '', 0, 1); -- NQF 0038 Childhood immunization Status INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_2011_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('rule_child_immun_stat_cqm', 0, 0, 0, 1, 1, '0038', '', 0, '', 0); -- NQF 0043 (PQRI 111) Pneumonia Vaccination Status for Older Adults @@ -515,7 +515,7 @@ INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_ -- NQF 0056 (PQRI 163) Diabetes: Foot Exam INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_2011_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('rule_dm_foot_cqm', 0, 0, 0, 1, 1, '0056', '163', 0, '', 0); -- NQF 0059 (PQRI 1) Diabetes: HbA1c Poor Control -INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_2011_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('rule_dm_a1c_cqm', 0, 0, 0, 1, 1, '0059', '1', 0, '', 0); +INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_2011_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag`, `cqm_2014_flag` ) VALUES ('rule_dm_a1c_cqm', 0, 0, 0, 1, 1, '0059', '1', 0, '', 0, 1); -- NQF 0061 (PQRI 3) Diabetes: Blood Pressure Management INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_2011_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('rule_dm_bp_control_cqm', 0, 0, 0, 1, 1, '0061', '3', 0, '', 0); -- NQF 0064 (PQRI 2) Diabetes: LDL Management & Control diff --git a/version.php b/version.php index 572029515..b65abaa1e 100644 --- a/version.php +++ b/version.php @@ -17,7 +17,7 @@ $v_realpatch = '0'; // is a database change in the course of development. It is used // internally to determine when a database upgrade is needed. // -$v_database = 161; +$v_database = 162; // Access control version identifier, this is to be incremented whenever there // is a access control change in the course of development. It is used -- 2.11.4.GIT