2 include_once("../../globals.php");
3 include_once("$srcdir/patient.inc");
5 //the maximum number of patient records to display:
8 // this is a quick fix so it doesn't go to thousands records.
9 // the searching functions on patient.inc need improvement.
10 if ($patient=='') $patient=xl('Please enter some information','e');
16 <link rel
=stylesheet href
="<?php echo $css_header;?>" type
="text/css">
19 <body
<?php
echo $top_bg_line; ?
> topmargin
='0' rightmargin
='0' leftmargin
='2'
20 bottommargin
='0' marginwidth
='2' marginheight
='0'>
22 <a
class="title" href
="../main_screen.php" target
="_top" onclick
="top.restoreSession()">
23 <?php
echo xl('Select Patient') . ' ' . $patient . ' ' . xl('by') . ' ' . xl($findBy); ?
></a
>
27 <table border
='0' cellpadding
='5' cellspacing
='0'>
30 <span
class='bold'><?php
xl('Name','e');?
></span
>
32 <span
class='bold'><?php
xl('SS','e');?
></span
>
34 <span
class='bold'><?php
xl('DOB','e');?
></span
>
36 <span
class='bold'><?php
xl('ID','e');?
></span
>
43 if ($findBy == "Last")
44 $result = getPatientLnames("$patient","*, DATE_FORMAT(DOB,'%m/%d/%Y') as DOB_TS");
45 else if ($findBy == "ID")
46 $result = getPatientId("$patient","*, DATE_FORMAT(DOB,'%m/%d/%Y') as DOB_TS");
47 else if ($findBy == "DOB")
48 $result = getPatientDOB("$patient","*, DATE_FORMAT(DOB,'%m/%d/%Y') as DOB_TS");
49 else if ($findBy == "SSN")
50 $result = getPatientSSN("$patient","*, DATE_FORMAT(DOB,'%m/%d/%Y') as DOB_TS");
53 foreach ($result as $iter) {
54 if ($total >= $M) break;
55 // For the old layout we load a frameset that also sets up the new pid.
56 // The new layout loads just the demographics frame here, which in turn
57 // will set the pid and load all the other frames.
58 if ($GLOBALS['concurrent_layout']) {
59 $anchor = "<a href='../../patient_file/summary/demographics.php?set_pid=" .
60 $iter['pid'] . "' class='text' onclick='top.restoreSession()'>";
62 $anchor = "<a class='text' target='_top' " .
63 "href='../../patient_file/patient_file.php?set_pid=" .
64 $iter['pid'] . "' onclick='top.restoreSession()'>";
66 print "<tr><td>$anchor" . $iter['lname'] . ", " . $iter['fname'] . "</a></td>\n";
67 print "<td>$anchor" . $iter['ss'] . "</a></td>";
68 if ($iter{"DOB"} != "0000-00-00 00:00:00") {
69 print "<td>$anchor" . $iter['DOB_TS'] . "</a></td>";
71 print "<td>$anchor </a></td>";
73 print "<td>$anchor" . $iter['pubpid'] . "</a></td>";
80 if ($findBy == "Last" && $result = getPatientLnames("$patient","*, DATE_FORMAT(DOB,'%m/%d/%Y') as DOB_TS") ) {
81 foreach ($result as $iter) {
86 print "<tr><td><a class=text target=_top href='../../patient_file/patient_file.php?set_pid=".$iter{"pid"}."'>".$iter{"lname"}.", ".$iter{"fname"}."</td></a>\n";
87 print "<td><a class=text target=_top href='../../patient_file/patient_file.php?set_pid=".$iter{"pid"}."'>".$iter{"ss"}."</a></td>";
88 if ($iter{"DOB"} != "0000-00-00 00:00:00") {
89 print "<td><a class=text target=_top href='../../patient_file/patient_file.php?set_pid=".$iter{"pid"}."'>".$iter["DOB_TS"]."</a></td>";
91 print "<td><a class=text target=_top href='../../patient_file/patient_file.php?set_pid=".$iter{"pid"}."'> </a></td>";
93 print "<td><a class=text target=_top href='../../patient_file/patient_file.php?set_pid=".$iter{"pid"}."'>".$iter{"pubpid"}."</a></td>";
99 if ($findBy == "ID" && $result = getPatientId("$patient","*, DATE_FORMAT(DOB,'%m/%d/%Y') as DOB_TS") ) {
100 foreach ($result as $iter) {
105 print "<tr><td><a class=text target=_top href='../../patient_file/patient_file.php?set_pid=".$iter{"pid"}."'>".$iter{"lname"}.", ".$iter{"fname"}."</td></a>\n";
106 print "<td><a class=text target=_top href='../../patient_file/patient_file.php?set_pid=".$iter{"pid"}."'>".$iter{"ss"}."</a></td>";
107 if ($iter{"DOB"} != "0000-00-00 00:00:00") {
108 print "<td><a class=text target=_top href='../../patient_file/patient_file.php?set_pid=".$iter{"pid"}."'>".$iter["DOB_TS"]."</a></td>";
110 print "<td><a class=text target=_top href='../../patient_file/patient_file.php?set_pid=".$iter{"pid"}."'> </a></td>";
112 print "<td><a class=text target=_top href='../../patient_file/patient_file.php?set_pid=".$iter{"pid"}."'>".$iter{"pubpid"}."</a></td>";
118 if ($findBy == "DOB" && $result = getPatientDOB("$patient","*, DATE_FORMAT(DOB,'%m/%d/%Y') as DOB_TS") ) {
119 foreach ($result as $iter) {
124 print "<tr><td><a class=text target=_top href='../../patient_file/patient_file.php?set_pid=".$iter{"pid"}."'>".$iter{"lname"}.", ".$iter{"fname"}."</td></a>\n";
125 print "<td><a class=text target=_top href='../../patient_file/patient_file.php?set_pid=".$iter{"pid"}."'>".$iter{"ss"}."</a></td>";
126 if ($iter{"DOB"} != "0000-00-00 00:00:00") {
127 print "<td><a class=text target=_top href='../../patient_file/patient_file.php?set_pid=".$iter{"pid"}."'>".$iter["DOB_TS"]."</a></td>";
129 print "<td><a class=text target=_top href='../../patient_file/patient_file.php?set_pid=".$iter{"pid"}."'> </a></td>";
131 print "<td><a class=text target=_top href='../../patient_file/patient_file.php?set_pid=".$iter{"pid"}."'>".$iter{"pubpid"}."</a></td>";
137 if ($findBy == "SSN" && $result = getPatientSSN("$patient","*, DATE_FORMAT(DOB,'%m/%d/%Y') as DOB_TS") ) {
138 foreach ($result as $iter) {
143 print "<tr><td><a class=text target=_top href='../../patient_file/patient_file.php?set_pid=".$iter{"pid"}."'>".$iter{"lname"}.", ".$iter{"fname"}."</td></a>\n";
144 print "<td><a class=text target=_top href='../../patient_file/patient_file.php?set_pid=".$iter{"pid"}."'>".$iter{"ss"}."</a></td>";
145 if ($iter{"DOB"} != "0000-00-00 00:00:00") {
146 print "<td><a class=text target=_top href='../../patient_file/patient_file.php?set_pid=".$iter{"pid"}."'>".$iter["DOB_TS"]."</a></td>";
148 print "<td><a class=text target=_top href='../../patient_file/patient_file.php?set_pid=".$iter{"pid"}."'> </a></td>";
150 print "<td><a class=text target=_top href='../../patient_file/patient_file.php?set_pid=".$iter{"pid"}."'>".$iter{"pubpid"}."</a></td>";