Highway to PSR2
[openemr.git] / library / classes / rulesets / Cqm / reports / NFQ_0041 / Denominator.php
blob76b7f3f65248a8afae8f0ef5c21010c4241af739
1 <?php
2 // Copyright (C) 2011 Ken Chapple <ken@mi-squared.com>
3 //
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.
8 //
9 class NFQ_0041_Denominator implements CqmFilterIF
11 public function getTitle()
13 return "NFQ 0041 Denominator";
16 public function test(CqmPatient $patient, $beginDate, $endDate)
18 $periodPlus89Days = date('Y-m-d 00:00:00', strtotime('+89 day', strtotime($beginDate)));
19 $periodMinus92Days = date('Y-m-d 00:00:00', strtotime('-92 day', strtotime($endDate)));
20 if (Helper::checkEncounter(Encounter::ENC_INFLUENZA, $patient, $beginDate, $periodPlus89Days) ||
21 Helper::checkEncounter(Encounter::ENC_INFLUENZA, $patient, $periodMinus92Days, $endDate) ) {
22 return true;
25 return false;