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"><?php
echo xl('Select Patient') . ' ' . $patient . ' ' . xl('by') . ' ' . xl($findBy); ?
></a
>
26 <table border
='0' cellpadding
='5' cellspacing
='0'>
29 <span
class='bold'><?php
xl('Name','e');?
></span
>
31 <span
class='bold'><?php
xl('SS','e');?
></span
>
33 <span
class='bold'><?php
xl('DOB','e');?
></span
>
35 <span
class='bold'><?php
xl('ID','e');?
></span
>
42 if ($findBy == "Last")
43 $result = getPatientLnames("$patient","*, DATE_FORMAT(DOB,'%m/%d/%Y') as DOB_TS");
44 else if ($findBy == "ID")
45 $result = getPatientId("$patient","*, DATE_FORMAT(DOB,'%m/%d/%Y') as DOB_TS");
46 else if ($findBy == "DOB")
47 $result = getPatientDOB("$patient","*, DATE_FORMAT(DOB,'%m/%d/%Y') as DOB_TS");
48 else if ($findBy == "SSN")
49 $result = getPatientSSN("$patient","*, DATE_FORMAT(DOB,'%m/%d/%Y') as DOB_TS");
52 foreach ($result as $iter) {
53 if ($total >= $M) break;
54 // For the old layout we load a frameset that also sets up the new pid.
55 // The new layout loads just the demographics frame here, which in turn
56 // will set the pid and load all the other frames.
57 if ($GLOBALS['concurrent_layout']) {
58 $anchor = "<a href='../../patient_file/summary/demographics.php?set_pid=" . $iter['pid'] . "'>";
60 $anchor = "<a class='text' target='_top' " .
61 "href='../../patient_file/patient_file.php?set_pid=" .
64 print "<tr><td>$anchor" . $iter['lname'] . ", " . $iter['fname'] . "</a></td>\n";
65 print "<td>$anchor" . $iter['ss'] . "</a></td>";
66 if ($iter{"DOB"} != "0000-00-00 00:00:00") {
67 print "<td>$anchor" . $iter['DOB_TS'] . "</a></td>";
69 print "<td>$anchor </a></td>";
71 print "<td>$anchor" . $iter['pubpid'] . "</a></td>";
78 if ($findBy == "Last" && $result = getPatientLnames("$patient","*, DATE_FORMAT(DOB,'%m/%d/%Y') as DOB_TS") ) {
79 foreach ($result as $iter) {
84 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";
85 print "<td><a class=text target=_top href='../../patient_file/patient_file.php?set_pid=".$iter{"pid"}."'>".$iter{"ss"}."</a></td>";
86 if ($iter{"DOB"} != "0000-00-00 00:00:00") {
87 print "<td><a class=text target=_top href='../../patient_file/patient_file.php?set_pid=".$iter{"pid"}."'>".$iter["DOB_TS"]."</a></td>";
89 print "<td><a class=text target=_top href='../../patient_file/patient_file.php?set_pid=".$iter{"pid"}."'> </a></td>";
91 print "<td><a class=text target=_top href='../../patient_file/patient_file.php?set_pid=".$iter{"pid"}."'>".$iter{"pubpid"}."</a></td>";
97 if ($findBy == "ID" && $result = getPatientId("$patient","*, DATE_FORMAT(DOB,'%m/%d/%Y') as DOB_TS") ) {
98 foreach ($result as $iter) {
103 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";
104 print "<td><a class=text target=_top href='../../patient_file/patient_file.php?set_pid=".$iter{"pid"}."'>".$iter{"ss"}."</a></td>";
105 if ($iter{"DOB"} != "0000-00-00 00:00:00") {
106 print "<td><a class=text target=_top href='../../patient_file/patient_file.php?set_pid=".$iter{"pid"}."'>".$iter["DOB_TS"]."</a></td>";
108 print "<td><a class=text target=_top href='../../patient_file/patient_file.php?set_pid=".$iter{"pid"}."'> </a></td>";
110 print "<td><a class=text target=_top href='../../patient_file/patient_file.php?set_pid=".$iter{"pid"}."'>".$iter{"pubpid"}."</a></td>";
116 if ($findBy == "DOB" && $result = getPatientDOB("$patient","*, DATE_FORMAT(DOB,'%m/%d/%Y') as DOB_TS") ) {
117 foreach ($result as $iter) {
122 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";
123 print "<td><a class=text target=_top href='../../patient_file/patient_file.php?set_pid=".$iter{"pid"}."'>".$iter{"ss"}."</a></td>";
124 if ($iter{"DOB"} != "0000-00-00 00:00:00") {
125 print "<td><a class=text target=_top href='../../patient_file/patient_file.php?set_pid=".$iter{"pid"}."'>".$iter["DOB_TS"]."</a></td>";
127 print "<td><a class=text target=_top href='../../patient_file/patient_file.php?set_pid=".$iter{"pid"}."'> </a></td>";
129 print "<td><a class=text target=_top href='../../patient_file/patient_file.php?set_pid=".$iter{"pid"}."'>".$iter{"pubpid"}."</a></td>";
135 if ($findBy == "SSN" && $result = getPatientSSN("$patient","*, DATE_FORMAT(DOB,'%m/%d/%Y') as DOB_TS") ) {
136 foreach ($result as $iter) {
141 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";
142 print "<td><a class=text target=_top href='../../patient_file/patient_file.php?set_pid=".$iter{"pid"}."'>".$iter{"ss"}."</a></td>";
143 if ($iter{"DOB"} != "0000-00-00 00:00:00") {
144 print "<td><a class=text target=_top href='../../patient_file/patient_file.php?set_pid=".$iter{"pid"}."'>".$iter["DOB_TS"]."</a></td>";
146 print "<td><a class=text target=_top href='../../patient_file/patient_file.php?set_pid=".$iter{"pid"}."'> </a></td>";
148 print "<td><a class=text target=_top href='../../patient_file/patient_file.php?set_pid=".$iter{"pid"}."'>".$iter{"pubpid"}."</a></td>";