Skip to content

Commit

Permalink
Added support for the Automatic Measure Calculation MU item.
Browse files Browse the repository at this point in the history
Specifics:
1) Added support for the Automatic Measure Calculation MU item.
     -Added pertinent columns to the clinical_rules table.
     -Added mechanism to disallow patient specific customization
      in clinical_rules.php since these are standard rules. Also
      included the clinical quality measures in this mechanism.
     -Added a selector for this in the interface/reports/cqm.php
      report
2) Added some comments in sql/database.sql to clarify code.
3) Fixed some miscellaneous comment typos.
  • Loading branch information
bradymiller committed Dec 8, 2010
1 parent d9150f1 commit 8d5762e
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 46 deletions.
4 changes: 3 additions & 1 deletion interface/reports/cqm.php
Expand Up @@ -122,7 +122,9 @@ function refreshme() {
<select name='form_rule_filter'>
<option value=''>-- <?php echo htmlspecialchars( xl('Show All'), ENT_NOQUOTES); ?> --</option>
<option value='cqm' <?php if ($rule_filter == "cqm") echo "selected"; ?>>
<?php echo htmlspecialchars( xl('Official CQM Rules'), ENT_NOQUOTES); ?></option>
<?php echo htmlspecialchars( xl('Official Clinical Quality Measures (CQM) Rules'), ENT_NOQUOTES); ?></option>
<option value='amc' <?php if ($rule_filter == "amc") echo "selected"; ?>>
<?php echo htmlspecialchars( xl('Official Automated Measure Calculation Rules'), ENT_NOQUOTES); ?></option>
<option value='passive_alert' <?php if ($rule_filter == "passive_alert") echo "selected"; ?>>
<?php echo htmlspecialchars( xl('Passive Alert Rules'), ENT_NOQUOTES); ?></option>
<option value='active_alert' <?php if ($rule_filter == "active_alert") echo "selected"; ?>>
Expand Down
14 changes: 10 additions & 4 deletions library/clinical_rules.php
Expand Up @@ -78,7 +78,7 @@ function clinical_summary_widget($patient_id,$dateTarget='') {
// (can also test on one patient or patients of one provider)
// Parameters:
// $provider - id of a selected provider. If blank, then will test entire clinic.
// $type - rule filter (active_alert,passive_alert,cqm,patient_reminder). If blank then will test all rules.
// $type - rule filter (active_alert,passive_alert,cqm,amc,patient_reminder). If blank then will test all rules.
// $dateTarget - target date. If blank then will test with current date as target.
// $mode - choose either 'report' or 'reminders' (required)
// $patient_id - pid of patient. If blank then will check all patients.
Expand Down Expand Up @@ -488,9 +488,9 @@ function test_targets($patient_id,$rule,$group_id='',$dateTarget) {

// Function to return active rules
// Parameters:
// $type - rule filter (active_alert,passive_alert,cqm,patient_reminder)
// $type - rule filter (active_alert,passive_alert,cqm,amc,patient_reminder)
// $patient_id - pid of selected patient. (if custom rule does not exist then
// will use the default rule.
// will use the default rule)
// Return: array containing rules
function resolve_rules_sql($type='',$patient_id='0') {

Expand All @@ -510,7 +510,13 @@ function resolve_rules_sql($type='',$patient_id='0') {

// Decide if use default vs custom rule (preference given to custom rule)
if (!empty($customRule)) {
$goRule = $customRule;
if ($type == "cqm" || $type == "amc" ) {
// For CQM and AMC, do not use custom rules (these are to create standard clinic wide reports)
$goRule = $rule;
}
else {
$goRule = $customRule;
}
}
else {
$goRule = $rule;
Expand Down

0 comments on commit 8d5762e

Please sign in to comment.