2 include_once("../../globals.php");
4 include_once("$srcdir/forms.inc");
5 include_once("$srcdir/billing.inc");
6 include_once("$srcdir/pnotes.inc");
7 include_once("$srcdir/patient.inc");
8 include_once("$srcdir/report.inc");
9 include_once("$srcdir/acl.inc");
10 include_once("$srcdir/options.inc.php");
12 // get various authorization levels
13 $auth_notes_a = acl_check('encounters', 'notes_a');
14 $auth_notes = acl_check('encounters', 'notes');
15 $auth_coding_a = acl_check('encounters', 'coding_a');
16 $auth_coding = acl_check('encounters', 'coding');
17 $auth_relaxed = acl_check('encounters', 'relaxed');
18 $auth_med = acl_check('patients' , 'med');
19 $auth_demo = acl_check('patients' , 'demo');
21 if (!isset($_GET["viewnum"])) { $N = 6; }
22 else { $N = $_GET["viewnum"]; }
28 <?php
html_header_show();?
>
30 <link rel
="stylesheet" href
="<?php echo $css_header;?>" type
="text/css">
34 <body
class="body_top">
35 <div id
="report_custom"> <!-- large outer DIV
-->
38 echo "<div class='text demographics' id='DEM'>\n";
39 print "<h1>".xl('Patient Data').":</h1>";
41 <a href
="patient_report.php"><h1
class='title'><?php
xl('Patient Record Report','e'); ?
></h1
><span
class='back'><?php
echo $tback;?
></span
></a
>
43 <a href
="full_report.php?viewnum=6" class=link_submit
>[<?php
xl('Normal View','e'); ?
>]</a
><a href
="full_report.php?viewnum=1" class=link_submit
>[<?php
xl('Expanded View','e'); ?
>]</a
><br
>
47 <div
class='demographics'>
48 <h1
><?php
xl('Patient Data','e'); ?
>:</h1
>
50 printRecData($patient_data_array, getRecPatientData ($pid), $N);
56 <?php
if (acl_check('patients', 'med')): ?
>
58 <h1
><?php
xl('History Data','e'); ?
>:</h1
>
59 <?php
printRecData($history_data_array, getRecHistoryData ($pid), $N); ?
>
65 <div
class='demographics'>
66 <h1
><?php
xl('Employer Data','e'); ?
>:</h1
>
68 printRecData($employer_data_array, getRecEmployerData ($pid), $N);
74 <div
class='insurance'>
75 <h1
><?php
xl('Insurance Data','e'); ?
>:</h1
>
76 <span
class='bold'><?php
xl('Primary Insurance Data','e'); ?
>:</span
> <br
/>
78 printRecData($insurance_data_array, getRecInsuranceData ($pid,"primary"), $N);
82 <span
class='bold'><?php
xl('Secondary Insurance Data','e'); ?
>:</span
> <br
/>
84 printRecData($insurance_data_array, getRecInsuranceData ($pid,"secondary"), $N);
88 <span
class='bold'><?php
xl('Tertiary Insurance Data','e'); ?
>:</span
> <br
/>
90 printRecData($insurance_data_array, getRecInsuranceData ($pid,"tertiary"), $N);
95 <!-- Patient Issues
-->
96 <?php
if (acl_check('patients', 'med')): ?
>
97 <div
class='issues history'>
98 <h1
><?php
xl('Issues','e'); ?
>:</h1
>
100 <h2
><?php
xl('Allergies','e'); ?
>:</h2
>
101 <?php
printListData($pid, "allergy", "1") ?
>
104 <h2
><?php
xl('Medications','e'); ?
>:</h2
>
105 <?php
printListData($pid, "medication", "1") ?
>
108 <h2
><?php
xl('Medical Problems','e'); ?
>:</h2
>
109 <?php
printListData($pid, "medical_problem", "1") ?
>
113 <div
class='issues history'>
114 <h1
><?php
xl('Immunizations','e'); ?
>:</h1
>
116 $sql = "select i1.immunization_id as immunization_id, if(i1.administered_date,concat(i1.administered_date,' - ') ,substring(i1.note,1,20) ) as immunization_data from immunizations i1 where i1.patient_id = $pid order by administered_date desc";
118 $result = sqlStatement($sql);
119 while ($row=sqlFetchArray($result)){
120 echo "<span class=text> " . $row{'immunization_data'} .
121 generate_display_field(array('data_type'=>'1','list_id'=>'immunizations'), $row['immunization_id']) .
128 <?php
endif; // end patient-issues ?>
130 <!-- Patient communications
-->
131 <div
class='communications'>
132 <h1
><?php
xl('Patient Comunication Sent','e'); ?
>:</h1
>
134 $sql="SELECT concat( 'Messsage Type: ', batchcom.msg_type, ', Message Subject: ', batchcom.msg_subject, ', Sent on:', batchcom.msg_date_sent ) AS batchcom_data, batchcom.msg_text, concat( users.fname, users.lname ) AS user_name FROM `batchcom` JOIN `users` ON users.id = batchcom.sent_by WHERE batchcom.patient_id='$pid'";
136 $result = sqlStatement($sql);
137 while ($row=sqlFetchArray($result)) {
138 echo "<tr><td><span class=text>".$row{'batchcom_data'}.", By: ".$row{'user_name'}."</td></tr><tr><td>Text:<br> ".$row{'msg_txt'}."</span></td></tr>\n";
145 <h1
><?php
xl('Patient Notes','e'); ?
>:</h1
>
146 <?php
printPatientNotes($pid); ?
>
150 <?php
if (acl_check('acct', 'rep') ||
acl_check('acct', 'eob') ||
acl_check('acct', 'bill')) : ?
>
151 <div
class='billing'>
152 <h1
><?php
xl('Billing','e'); ?
>:</h1
>
153 <?php
printPatientBilling($pid); ?
>
158 <div
class='transactions'>
159 <h1
><?php
xl('Transactions','e'); ?
>:</h1
>
160 <?php
printPatientTransactions($pid); ?
>
164 <!-- Encounters
and Forms
-->
165 <?php
if (($auth_notes_a ||
$auth_notes ||
$auth_coding_a ||
$auth_coding ||
$auth_med ||
$auth_relaxed)): ?
>
166 <div
class='encounters'>
167 <h1
><?php
xl('Encounters & Forms','e'); ?
>:</h1
>
168 <?php
printPatientForms($pid, $N); ?
>
172 </div
> <!-- close large outer DIV
-->