2 include_once("../../globals.php");
4 include_once("$srcdir/forms.inc");
5 include_once("$srcdir/billing.inc");
6 include_once("$srcdir/patient.inc");
7 include_once("$srcdir/report.inc");
8 include_once("$srcdir/acl.inc");
9 include_once("$srcdir/options.inc.php");
11 // get various authorization levels
12 $auth_notes_a = acl_check('encounters', 'notes_a');
13 $auth_notes = acl_check('encounters', 'notes');
14 $auth_coding_a = acl_check('encounters', 'coding_a');
15 $auth_coding = acl_check('encounters', 'coding');
16 $auth_relaxed = acl_check('encounters', 'relaxed');
17 $auth_med = acl_check('patients' , 'med');
18 $auth_demo = acl_check('patients' , 'demo');
20 if (!isset($_GET["viewnum"])) { $N = 6; }
21 else { $N = $_GET["viewnum"]; }
27 <?php
html_header_show();?
>
29 <link rel
="stylesheet" href
="<?php echo $css_header;?>" type
="text/css">
33 <body
class="body_top">
34 <div id
="report_custom"> <!-- large outer DIV
-->
37 echo "<div class='text demographics' id='DEM'>\n";
38 print "<h1>".xl('Patient Data').":</h1>";
40 <a href
="patient_report.php"><h1
class='title'><?php
xl('Patient Record Report','e'); ?
></h1
><span
class='back'><?php
echo $tback;?
></span
></a
>
42 <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
>
46 <div
class='demographics'>
47 <h1
><?php
xl('Patient Data','e'); ?
>:</h1
>
49 printRecData($patient_data_array, getRecPatientData ($pid), $N);
55 <?php
if (acl_check('patients', 'med')): ?
>
57 <h1
><?php
xl('History Data','e'); ?
>:</h1
>
58 <?php
printRecData($history_data_array, getRecHistoryData ($pid), $N); ?
>
64 <div
class='demographics'>
65 <h1
><?php
xl('Employer Data','e'); ?
>:</h1
>
67 printRecData($employer_data_array, getRecEmployerData ($pid), $N);
73 <div
class='insurance'>
74 <h1
><?php
xl('Insurance Data','e'); ?
>:</h1
>
75 <span
class='bold'><?php
xl('Primary Insurance Data','e'); ?
>:</span
> <br
/>
77 printRecData($insurance_data_array, getRecInsuranceData ($pid,"primary"), $N);
81 <span
class='bold'><?php
xl('Secondary Insurance Data','e'); ?
>:</span
> <br
/>
83 printRecData($insurance_data_array, getRecInsuranceData ($pid,"secondary"), $N);
87 <span
class='bold'><?php
xl('Tertiary Insurance Data','e'); ?
>:</span
> <br
/>
89 printRecData($insurance_data_array, getRecInsuranceData ($pid,"tertiary"), $N);
94 <!-- Patient Issues
-->
95 <?php
if (acl_check('patients', 'med')): ?
>
96 <div
class='issues history'>
97 <h1
><?php
xl('Issues','e'); ?
>:</h1
>
99 <h2
><?php
xl('Allergies','e'); ?
>:</h2
>
100 <?php
printListData($pid, "allergy", "1") ?
>
103 <h2
><?php
xl('Medications','e'); ?
>:</h2
>
104 <?php
printListData($pid, "medication", "1") ?
>
107 <h2
><?php
xl('Medical Problems','e'); ?
>:</h2
>
108 <?php
printListData($pid, "medical_problem", "1") ?
>
112 <div
class='issues history'>
113 <h1
><?php
xl('Immunizations','e'); ?
>:</h1
>
115 $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";
117 $result = sqlStatement($sql);
118 while ($row=sqlFetchArray($result)){
119 echo "<span class=text> " . $row{'immunization_data'} .
120 generate_display_field(array('data_type'=>'1','list_id'=>'immunizations'), $row['immunization_id']) .
127 <?php
endif; // end patient-issues ?>
129 <!-- Patient communications
-->
130 <div
class='communications'>
131 <h1
><?php
xl('Patient Comunication Sent','e'); ?
>:</h1
>
133 $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'";
135 $result = sqlStatement($sql);
136 while ($row=sqlFetchArray($result)) {
137 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";
144 <h1
><?php
xl('Patient Notes','e'); ?
>:</h1
>
145 <?php
printPatientNotes($pid); ?
>
149 <?php
if (acl_check('acct', 'rep') ||
acl_check('acct', 'eob') ||
acl_check('acct', 'bill')) : ?
>
150 <div
class='billing'>
151 <h1
><?php
xl('Billing','e'); ?
>:</h1
>
152 <?php
printPatientBilling($pid); ?
>
157 <div
class='transactions'>
158 <h1
><?php
xl('Transactions','e'); ?
>:</h1
>
159 <?php
printPatientTransactions($pid); ?
>
163 <!-- Encounters
and Forms
-->
164 <?php
if (($auth_notes_a ||
$auth_notes ||
$auth_coding_a ||
$auth_coding ||
$auth_med ||
$auth_relaxed)): ?
>
165 <div
class='encounters'>
166 <h1
><?php
xl('Encounters & Forms','e'); ?
>:</h1
>
167 <?php
printPatientForms($pid, $N); ?
>
171 </div
> <!-- close large outer DIV
-->