5 * Copyright (C) 2016-2021 Jerry Padgett <sjpadgett@gmail.com>
6 * Copyright (C) 2020 Tyler Wrenn <tyler@tylerwrenn.com>
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 3
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>;.
20 * @author Jerry Padgett <sjpadgett@gmail.com>
21 * @author Tyler Wrenn <tyler@tylerwrenn.com>
22 * @link http://www.open-emr.org
26 //namespace OnsitePortal;
28 require_once("verify_session.php");
29 require_once("./../library/report.inc.php");
30 require_once("./../library/options.inc.php");
31 require_once("./../library/lists.inc.php");
32 require_once("./../custom/code_types.inc.php");
33 require_once("./../library/forms.inc.php");
34 require_once("./../library/patient.inc.php");
36 require_once("./lib/appsql.class.php");
38 $appsql = new ApplicationTable();
39 $pending = $appsql->getPortalAudit($pid, 'review');
44 .insurance
.table
.bold
{
48 .insurance
.table
.text
{
52 .demographics
.groupname
.bold
{
54 color
: var(--primary
);
57 .demographics table
.bold
{
62 .demographics table
.text
{
67 .demographics
.table td
{
74 <div
class='demographics table-responsive' id
='DEM'>
77 $result1 = getPatientData($pid);
78 $result2 = getEmployerData($pid);
81 <header
class="card-header border border-bottom-0"><?php
echo xlt('Profile Demographics'); ?
>
83 echo '<button type="button" id="editDems" class="btn btn-danger btn-sm float-right text-white">' . xlt('Pending Review') . '</button>';
85 echo '<button type="button" id="editDems" class="btn btn-success btn-sm float-right text-white">' . xlt('Revise') . '</button>';
89 <div
class="card-body border" id
="dempanel">
90 <table
class='table table-responsive table-sm'>
92 display_layout_rows('DEM', $result1, $result2);
98 <div
class='insurance table-sm table-responsive'>
100 <header
class="card-header border border-bottom-0"><?php
echo xlt('Primary Insurance');?
></header
>
101 <div
class="card-body border">
103 printRecDataOne($insurance_data_array, getRecInsuranceData($pid, "primary"), $N);
108 <header
class="card-header border border-bottom-0"><?php
echo xlt('Secondary Insurance');?
></header
>
109 <div
class="card-body border">
111 printRecDataOne($insurance_data_array, getRecInsuranceData($pid, "secondary"), $N);
115 <header
class="card-header border border-bottom-0"><?php
echo xlt('Tertiary Insurance');?
></header
>
116 <div
class="card-body border">
118 printRecDataOne($insurance_data_array, getRecInsuranceData($pid, "tertiary"), $N);
124 echo "<div class='card'>";
125 echo "<header class='card-header border border-bottom-0 immunizations'>" . xlt('Patient Immunization') . '</header>';
126 echo "<div class='card-body border'>";
128 $query = "SELECT im.*, cd.code_text, DATE(administered_date) AS administered_date,
129 DATE_FORMAT(administered_date,'%m/%d/%Y') AS administered_formatted, lo.title as route_of_administration,
130 u.title, u.fname, u.mname, u.lname, u.npi, u.street, u.streetb, u.city, u.state, u.zip, u.phonew1,
131 f.name, f.phone, lo.notes as route_code
132 FROM immunizations AS im
133 LEFT JOIN codes AS cd ON cd.code = im.cvx_code
134 JOIN code_types AS ctype ON ctype.ct_key = 'CVX' AND ctype.ct_id=cd.code_type
135 LEFT JOIN list_options AS lo ON lo.list_id = 'drug_route' AND lo.option_id = im.route
136 LEFT JOIN users AS u ON u.id = im.administered_by_id
137 LEFT JOIN facility AS f ON f.id = u.facility_id
138 WHERE im.patient_id=?";
139 $result = $appsql->zQuery($query, array($pid));
141 foreach ($result as $row) {
144 foreach ($records as $row) {
145 echo text($row['administered_formatted']) . ' : ';
146 echo text($row['code_text']) . ' : ';
147 echo text($row['note']) . ' : ';
148 echo text($row['completion_status']) . '<br />';