Highway to PSR2
[openemr.git] / library / classes / rulesets / Amc / reports / AMC_302f_1_STG1 / Numerator.php
blobf9897c632ed8a028a464bb8f2fbb886e629b1da3
1 <?php
2 /**
4 * AMC 302f 1 STAGE1 Numerator
6 * Copyright (C) 2015 Ensoftek, Inc
8 * LICENSE: This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
19 * @package OpenEMR
20 * @author Ensoftek
21 * @link http://www.open-emr.org
24 class AMC_302f_1_STG1_Numerator implements AmcFilterIF
26 public function getTitle()
28 return "AMC_302f_1_STG1 Numerator";
31 public function test(AmcPatient $patient, $beginDate, $endDate)
33 //The number of patients in the denominator who have entries of height/length, weight and blood pressure recorded as structured data (effective 2013 only).
34 if ((exist_database_item($patient->id, 'form_vitals', 'height', 'gt', '0', 'ge', 1, '', '', $endDate)) &&
35 (exist_database_item($patient->id, 'form_vitals', 'weight', 'gt', '0', 'ge', 1, '', '', $endDate)) &&
36 (exist_database_item($patient->id, 'form_vitals', 'bps', 'gt', '0', 'ge', 1, '', '', $endDate)) &&
37 (exist_database_item($patient->id, 'form_vitals', 'bpd', 'gt', '0', 'ge', 1, '', '', $endDate)) &&
38 (exist_database_item($patient->id, 'form_vitals', 'BMI', 'gt', '0', 'ge', 1, '', '', $endDate)) ) {
39 return true;
40 } else {
41 return false;