CDR engine: age calculation bug fix
[openemr.git] / library / classes / rulesets / Cqm / reports / NFQ_0024 / InitialPatientPopulation3.php
blob230524be20773030b7b3cf0651d04c34650eb10e
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_0024_InitialPatientPopulation3 implements CqmFilterIF
11 public function getTitle()
13 return "Initial Patient Population 3";
16 public function test( CqmPatient $patient, $beginDate, $endDate )
18 // filter for Patient characteristic: birth dateƓ (age) >=2 and <=16 years
19 $age = $patient->calculateAgeOnDate( $beginDate );
20 if ( $age >= 11 &&
21 $age <= 16 ) {
22 return true;
25 return false;