Highway to PSR2
[openemr.git] / library / classes / rulesets / Amc / reports / AMC_314g_1_2_14 / Numerator.php
blobc9d399f9ec0058447a8684006078bbae5da9fe4d
1 <?php
2 /**
4 * AMC 314g_1_2_14 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_314g_1_2_14_Numerator implements AmcFilterIF
26 public function getTitle()
28 return "AMC_314g_1_2_14 Numerator";
31 public function test(AmcPatient $patient, $beginDate, $endDate)
33 // The number of unique patients (or their authorized representatives) in
34 // the denominator who have viewed online, downloaded, or transmitted to a
35 // third party the patient's health information.
37 // Still TODO
38 // AMC MU2 TODO :
39 // This needs to be converted to the Z&H offsite portal solution.
41 $check = sqlQuery('select count(id) as count from ccda where pid = ? and (view = 1 or emr_transfer = 1) and user_id is null and updated_date >= ? and updated_date <= ?', array($patient->id,$beginDate,$endDate));
42 if ($check['count'] > 0) {
43 return true;
44 } else {
45 return false;