2 // Copyright (C) 2011 Brady Miller <brady.g.miller@gmail.com>
4 // This program is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU General Public License
6 // as published by the Free Software Foundation; either version 2
7 // of the License, or (at your option) any later version.
10 // This file contains a function to keep track of which issues
11 // types get modified.
14 class AMC_304f_Denominator
implements AmcFilterIF
16 public function getTitle()
18 return "AMC_304f Denominator";
21 public function test(AmcPatient
$patient, $beginDate, $endDate)
23 // All unique patients seen by the EP or admitted to the eligible
24 // hospital’s or CAH’s inpatient or emergency department (POS 21 or 23)
25 // Also need to have requested their records.
26 // (basically needs an encounter within the report dates and to have requested their
27 // records within the report dates)
28 $amccheck = sqlQuery("SELECT * FROM `amc_misc_data` WHERE `amc_id`=? AND `pid`=? AND `date_created`>=? AND `date_created`<=?", array('provide_rec_pat_amc',$patient->id
,$beginDate,$endDate));
29 $options = array( Encounter
::OPTION_ENCOUNTER_COUNT
=> 1 );
30 if ((Helper
::checkAnyEncounter($patient, $beginDate, $endDate, $options)) &&
31 !(empty($amccheck)) ) {