?> </td> <td align="left"> <?php echo "<a href='patient_medication_record.php?hn=" . $rsOpd_Socail['hn'] . "&vn=" . $rsOpd_Socail['vn'] . "' \r\n\t\t\t\t\t\t target='_blank'>" . change_misis($rsOpd_Socail['fname']) . "</a>"; ?> </td> <td align="center"> <?php echo $rsOpd_Socail['lname']; ?> </td> <td align="center"> <?php echo FormatDateEng($rsOpd_Socail['birthday']); ?> </td> <td align="left"> <?php echo $rsOpd_Socail['nation_name']; ?> </td> <td align="right"><?php echo "áç§Ò¹"; ?> </td> <td align="left"> <?php echo $rsOpd_Socail['sex_name'];
//end opd } elseif ($exp_file == "opd_mianma") { //choice exp_file //ÃÒ§ҹ¾ÁèÒ ¼Ùé»èǹ͡ opd //opd $sqlOpd_Socail = "SELECT v.vn,v.hn,v.vstdate ,v.hospmain ,p.cid,p.pname,p.fname as fname,p.lname as lname,p.birthday ,p.nationality ,\r\n n.name as nation_name ,s.name as sex_name,p.informaddr ,p.informname,p.informname ,p.hometel,\r\n\t\tdr.name as doc_name, st.service5 as startexam\r\nFROM vn_stat v\r\nleft outer join service_time st on st.vn = v.vn\r\nleft outer join ovst ov on ov.vn = v.vn\r\nleft outer join doctor dr on dr.code=ov.doctor\r\nleft outer join patient p on p.hn = v.hn\r\nleft outer join nationality n on n.nationality = p.nationality\r\nleft outer join sex s on s.code = p.sex\r\nWHERE v.vstdate between '{$d1}' and '{$d2}'\r\nand v.pdx in ('Z008','Z000') and p.nationality!=99 and v.pttype in ('42', '43', '44','45') \r\norder by v.vstdate,st.service5 "; $resultOpd_Socail = ResultDB($sqlOpd_Socail); //echo mysql_num_rows($resultDenService); if (mysql_num_rows($resultOpd_Socail) > 0) { //row opd print "ÃÒ§ҹªèǧÇѹ·Õè {$d1} ¶Ö§ {$d2} \n"; print "Ç/´/» ·Õèŧ·ÐàºÕ¹,ÃËÑÊ˹èǧҹ,àÅ¢ºÑµÃ»ÃШӵÑÇ,¤Ó¹Ó˹éÒ,ª×èÍ,Ê¡ØÅ,Çѹà¡Ô´,àª×éͪҵÔ,»ÃÐàÀ·,à¾È,·ÕèÍÂÙè,¹Ò¨éÒ§,ª×è͹Ò¨éÒ§,àºÍÃìâ·ÃÈѾ·ì,á¾·Âì¼ÙéµÃǨ,àÇÅÒá¾·ÂìàÃÔèÁµÃǨ\n"; $i = 0; while ($i < mysql_num_rows($resultOpd_Socail)) { //while $rsOpd_Socail = mysql_fetch_array($resultOpd_Socail); print FormatDateEng($rsOpd_Socail['vstdate']) . "," . $rsOpd_Socail['hospmain'] . "," . "00" . $rsOpd_Socail['cid'] . "," . $rsOpd_Socail['pname'] . "," . $rsOpd_Socail['fname'] . "," . $rsOpd_Socail['lname'] . "," . FormatDateEng($rsOpd_Socail['birthday']) . "," . $rsOpd_Socail['nation_name'] . "," . "áç§Ò¹" . "," . $rsOpd_Socail['sex_name'] . "," . $rsOpd_Socail['informaddr'] . "," . $rsOpd_Socail['informname'] . "," . $rsOpd_Socail['informname'] . "," . $rsOpd_Socail['hometel'] . "," . $rsOpd_Socail['doc_name'] . "," . $rsOpd_Socail['startexam'] . "\n"; //} $i++; } //while } //row opd //end opd } elseif ($exp_file == "er_list_export") { //choice exp_file //ÃÒ§ҹ¼Ùé»èÇ·ÕèÁÒÃѺºÃÔ¡Ò÷ÕèËéͧ ER //opd $sqlErlist = "select vs.vn as vn,vs.item_money as item_money,e.*,ert.name as emergency_name,erc.name as dch_name,o.icd10 as icd10,v.hn,v.vsttime,v.spclty as spclty,concat(p.pname,p.fname,' ',p.lname) as pt_name,ep.name as period_name,d.name as doctor_name,k.department as name_department "; $sqlErlist .= "from er_regist e "; $sqlErlist .= "left outer join ovst v on v.vn=e.vn "; $sqlErlist .= "left outer join er_emergency_type ert on ert.er_emergency_type=e.er_emergency_type "; $sqlErlist .= "left outer join er_dch_type erc on erc.er_dch_type=e.er_dch_type ";
//$bgm=""; } else { $bg = "#FFFFFF"; //$bgm="img_mian/bgcolor.gif"; } //color ?> <tr bgcolor="<?php echo $bg; ?> "> <td align="center"><?php echo FormatDateEng($rsOpd_Socail['vstdate']); ?> </td> <td align="center"><?php echo $rsOpd_Socail['hn']; ?> </td> <td align="left"><?php echo $rsOpd_Socail['pt_name']; ?> </td> <td align="center"><?php echo $rsOpd_Socail['cid']; ?> </td>