Add new modules loaded event (#7463)
[openemr.git] / library / classes / rulesets / Amc / reports / AMC_302g / Denominator.php
blobdd20b7e871efe1f871e278f80c3b2f3aeb988c38
1 <?php
3 // Copyright (C) 2011 Brady Miller <brady.g.miller@gmail.com>
4 //
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
9 //
11 // This file contains a function to keep track of which issues
12 // types get modified.
15 class AMC_302g_Denominator implements AmcFilterIF
17 public function getTitle()
19 return "AMC_302g Denominator";
22 public function test(AmcPatient $patient, $beginDate, $endDate)
24 // All unique patients 13 years or older seen by the EP or admitted to the eligible
25 // hospital’s or CAH’s inpatient or emergency department (POS 21 or 23)
26 // (basically needs an encounter within the report dates and needs to be 13 by the end report date)
27 $options = array( Encounter::OPTION_ENCOUNTER_COUNT => 1 );
28 if (
29 (Helper::checkAnyEncounter($patient, $beginDate, $endDate, $options)) &&
30 ($patient->calculateAgeOnDate($endDate) >= 13)
31 ) {
32 return true;
33 } else {
34 return false;