From ef64a8d1d5ed718fcd99efa07b3f27c71dc5e18a Mon Sep 17 00:00:00 2001 From: rammohan Date: Tue, 7 Jun 2011 06:22:09 -0600 Subject: [PATCH] CQM Reporting Module: Added PQRI tags <'patient-population> and to make PQRI measures unique in the XML. Signed-off-by: rammohan --- custom/export_registry_xml.php | 21 +++++++++++++++++++++ interface/reports/cqm.php | 15 ++++++++++----- library/classes/rulesets/Cqm/library/CqmResult.php | 10 ++++++++++ 3 files changed, 41 insertions(+), 5 deletions(-) diff --git a/custom/export_registry_xml.php b/custom/export_registry_xml.php index d52dc7d4a..802b4a98a 100644 --- a/custom/export_registry_xml.php +++ b/custom/export_registry_xml.php @@ -23,6 +23,25 @@ require_once "../library/options.inc.php"; require_once("../library/clinical_rules.php"); require_once("../library/classes/PQRIXml.class.php"); +function getLabelNumber($label) { + + if ( strlen($label) == 0) { + return "1"; + } + + $tokens = explode(" ", $label); + + $num_tokens = sizeof($tokens); + if ( $tokens[$num_tokens-1] != null ) { + if ( is_numeric($tokens[$num_tokens-1])) { + return $tokens[$num_tokens-1]; + } + } + + return "1"; + +} + function getMeasureNumber($row) { if (!empty($row['cqm_pqri_code']) || !empty($row['cqm_nqf_code']) ) { if (!empty($row['cqm_pqri_code'])) { @@ -82,6 +101,8 @@ foreach ($dataSheet as $row) { // Add PQRI measures $pqri_measures = array(); $pqri_measures['pqri-measure-number'] = getMeasureNumber($row); + $pqri_measures['patient-population'] = getLabelNumber($row['population_label']); + $pqri_measures['numerator'] = getLabelNumber($row['numerator_label']); $pqri_measures['eligible-instances'] = $row['pass_filter']; $pqri_measures['meets-performance-instances'] = $row['pass_target']; $pqri_measures['performance-exclusion-instances'] = $row['excluded']; diff --git a/interface/reports/cqm.php b/interface/reports/cqm.php index a896cb1c7..82072acbf 100644 --- a/interface/reports/cqm.php +++ b/interface/reports/cqm.php @@ -399,12 +399,17 @@ $provider = trim($_POST['form_provider']); echo ")"; } - if ( isset( $row['population_label'] ) ) { - echo ", " . htmlspecialchars( xl( $row['population_label'] ), ENT_NOQUOTES) . " "; +// if ( isset( $row['population_label'] ) ) { +// echo ", " . htmlspecialchars( xl( $row['population_label'] ), ENT_NOQUOTES) . " "; +// } +// if ( isset( $row['numerator_label'] ) ) { +// echo ", " . htmlspecialchars( xl( $row['numerator_label'] ), ENT_NOQUOTES) . " "; +// } + + if ( isset( $row['concatenated_label'] ) ) { + echo ", " . htmlspecialchars( xl( $row['concatenated_label'] ), ENT_NOQUOTES) . " "; } - if ( isset( $row['numerator_label'] ) ) { - echo ", " . htmlspecialchars( xl( $row['numerator_label'] ), ENT_NOQUOTES) . " "; - } + } else { // isset($row['is_sub']) echo generate_display_field(array('data_type'=>'1','list_id'=>'rule_action_category'),$row['action_category']); diff --git a/library/classes/rulesets/Cqm/library/CqmResult.php b/library/classes/rulesets/Cqm/library/CqmResult.php index a7b06737b..ca75a1ed5 100644 --- a/library/classes/rulesets/Cqm/library/CqmResult.php +++ b/library/classes/rulesets/Cqm/library/CqmResult.php @@ -32,10 +32,20 @@ class CqmResult implements RsResultIF public function format() { + $concatenated_label = ''; + if ( $this->numeratorLabel != "Numerator" ) { + $concatenated_label = $this->populationLabel . ", " . $this->numeratorLabel; + } + else + { + $concatenated_label = $this->populationLabel; + } + $rowFormat = array( 'is_main'=>TRUE, // TO DO: figure out way to do this when multiple groups. 'population_label' => $this->populationLabel, 'numerator_label' => $this->numeratorLabel, + 'concatenated_label' => $concatenated_label, 'total_patients' => $this->totalPatients, 'excluded' => $this->patientsExcluded, 'pass_filter' => $this->patientsInPopulation, -- 2.11.4.GIT