* Copyright (C) 2020 Tyler Wrenn * * LICENSE: This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 3 * of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with this program. If not, see ;. * * @package OpenEMR * @author Jerry Padgett * @author Tyler Wrenn * @link http://www.open-emr.org * */ //namespace OnsitePortal; require_once("verify_session.php"); require_once("./../library/report.inc"); require_once("./../library/options.inc.php"); require_once("./../library/lists.inc"); require_once("./../custom/code_types.inc.php"); require_once("./../library/forms.inc"); require_once("./../library/patient.inc"); require_once("./lib/appsql.class.php"); $appsql = new ApplicationTable(); $pending = $appsql->getPortalAudit($pid, 'review'); $N = 7; ?>
' . xlt('Pending Review') . ''; } else { echo ''; } ?>
"; echo "
" . xlt('Patient Immunization') . '
'; echo "
"; $query = "SELECT im.*, cd.code_text, DATE(administered_date) AS administered_date, DATE_FORMAT(administered_date,'%m/%d/%Y') AS administered_formatted, lo.title as route_of_administration, u.title, u.fname, u.mname, u.lname, u.npi, u.street, u.streetb, u.city, u.state, u.zip, u.phonew1, f.name, f.phone, lo.notes as route_code FROM immunizations AS im LEFT JOIN codes AS cd ON cd.code = im.cvx_code JOIN code_types AS ctype ON ctype.ct_key = 'CVX' AND ctype.ct_id=cd.code_type LEFT JOIN list_options AS lo ON lo.list_id = 'drug_route' AND lo.option_id = im.route LEFT JOIN users AS u ON u.id = im.administered_by_id LEFT JOIN facility AS f ON f.id = u.facility_id WHERE im.patient_id=?"; $result = $appsql->zQuery($query, array($pid)); $records = array(); foreach ($result as $row) { $records[] = $row; } foreach ($records as $row) { echo text($row['administered_formatted']) . ' : '; echo text($row['code_text']) . ' : '; echo text($row['note']) . ' : '; echo text($row['completion_status']) . '
'; } echo "
"; ?>