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.
11 class AMC_302j_Numerator
implements AmcFilterIF
13 public function getTitle()
15 return "AMC_302j Numerator";
18 public function test(AmcPatient
$patient, $beginDate, $endDate)
20 // Need a medication reconciliation completed.
21 // (so basically the completed element of the object can't be empty
22 $sql = "SELECT amc_misc_data.map_id as `encounter`, amc_misc_data.date_completed as `completed`, form_encounter.date as `date` " .
23 "FROM `amc_misc_data`, `form_encounter` " .
24 "WHERE amc_misc_data.map_id = form_encounter.encounter " .
25 "AND amc_misc_data.map_category = 'form_encounter' " .
26 "AND amc_misc_data.amc_id = 'med_reconc_amc' " .
27 "AND form_encounter.encounter = ?";
28 $check = sqlQuery($sql, array($patient->object['encounter']));
29 if ($check['completed'] != "") {