</td> <td><?php echo $r->titlename; ?> <?php if (!$ln) { $ln2 = $fn; } else { $ln2 = $ln; } echo str_replace($fn, "<font color=red><strong>" . $fn . "</strong></font>", $r->fname), ' ', str_replace($ln2, "<font color=red><strong>" . $ln2 . "</strong></font>", $r->lname); ?> </td> <td align="center" > <?php echo $data->GetStringData("select timestampdiff(year,p.birth,curdate()) as cc from person as p where pid='" . $r->pid . "'"); ?> </td> <td align="center"> <?php echo $r->addr; ?> </td> <td align="center"> <button data-theme="b" id="button1" type="submit" data-ajax="false" data-mini="true" class="ui-btn ui-btn-b ui-btn-corner-all ui-btn-inline " aria-disabled="false" onclick="window.location='index.php?url=<?php echo $encode->encodeUrl("page/opd/opd_screen.php"); ?> &pid=<?php echo $encode->encodeUrl($r->pid); ?>
$fdate = new dateClass(); /*$firstName = $_POST[firstName]; $lastName = $_POST[lastName]; */ if (@isset($_REQUEST[member_status])) { @($status = $_REQUEST[member_status]); $memberstatus = $data->GetArrData($status); } else { $memberstatus = "'3'"; } if (@isset($_REQUEST[discharge])) { @($discharge = $_REQUEST[discharge]); } else { $discharge = "N"; } $countmember = $data->GetStringData("select count(distinct p.person_id) as cc\r\n from person p\r\n join clinicmember c on c.hn=p.patient_hn\r\n join clinic_member_status cs on cs.clinic_member_status_id=c.clinic_member_status_id\r\n where c.clinic='" . $_REQUEST['clinic'] . "' and c.clinic_member_status_id in ({$memberstatus}) and c.discharge='" . $discharge . "' "); ?> <form id='fdmlist' name='fdmlist' method="POST" action="#"> <input name="clinic" type="hidden" value="<?php echo $_REQUEST['clinic']; ?> "> <ul data-role="listview" data-inset="true" data-filter="true" data-divider-theme="a" data-count-theme="a">
<?php include '../../includes/conf.ini.php'; include '../../includes/DBConn.php'; include '../../includes/function.php'; include '../../includes/dateClass.php'; $data = new dbClass(); $pcucode = $_POST['pcucode']; $visitno = $_POST['visitno']; $diagnote = $_POST['diagnote']; $doctor = $_POST['doctor']; $flagservice = $data->GetStringData("select flagservice as cc from visit where visitno='{$visitno}' "); if ($flagservice == '00') { $sqlflag = "update visit set flagservice='02' where visitno='" . $_POST['visitno'] . "'"; $db->exec($sqlflag); } $sql = "update visit set diagnote='" . $diagnote . "',username='******' where visitno='" . $visitno . "'"; $db->exec($sql); $json_status = array("status" => 'OK'); echo json_encode($json_status);
<?php include '../../includes/conf.ini.php'; include '../../includes/DBConn.php'; include '../../includes/function.php'; include '../../includes/dateClass.php'; $data = new dbClass(); $pcucode = $_POST['pcucode']; $visitno = $_POST['visitno']; $icd10 = strtoupper($_POST['icd10']); $icd_check = $data->GetStringData("select count(diseasecode) as cc from cdisease where diseasecode='" . $icd10 . "' and validscore='y' "); $icd2 = $data->GetStringData("select count(diagcode) as cc from visitdiag where visitno='" . $_POST['visitno'] . "' and diagcode='" . $icd10 . "' "); if ($icd_check < 1) { $status = "ICD10"; } elseif ($icd2 > 0) { $status = "ICD102"; } else { $status = "OK"; } $flagservice = $data->GetStringData("select flagservice as cc from visit where visitno='{$visitno}' "); if ($flagservice == '00') { $sqlflag = "update visit set flagservice='02' where visitno='" . $_POST['visitno'] . "'"; $db->exec($sqlflag); } if ($data->GetStringData("select count(diagcode) as cc from visitdiag where visitno='" . $_POST['visitno'] . "' and dxtype='01' ") < 1) { $diag = "insert into visitdiag(pcucode,visitno,diagcode,conti,clinic,dxtype,dateupdate,doctordiag) \r\n values('" . $pcucode . "','" . $_POST['visitno'] . "','" . $icd10 . "','0','00','01',DATE_FORMAT(NOW(),'%Y-%m-%d %H:%i:%s'),'" . $_POST['doctor'] . "')"; } else { $diag = "insert into visitdiag(pcucode,visitno,diagcode,conti,clinic,dxtype,dateupdate,doctordiag) \r\n values('" . $pcucode . "','" . $_POST['visitno'] . "','" . $icd10 . "','0','00','04',DATE_FORMAT(NOW(),'%Y-%m-%d %H:%i:%s'),'" . $_POST['doctor'] . "')"; } $db->exec($diag); $json_status = array("status" => $status);
<?php include '../../includes/conf.ini.php'; include '../../includes/DBConn.php'; include '../../includes/function.php'; include '../../includes/dateClass.php'; $data = new dbClass(); $birth = date_format(date_create($_REQUEST['birth']), 'Y-m-d'); $sql = "update person set \nprename='" . $_REQUEST['prename'] . "', \nfname='" . $_REQUEST['fname'] . "', \nlname='" . $_REQUEST['lname'] . "', \nbirth='" . $birth . "', \nsex='" . $_REQUEST['sex'] . "', \nidcard='" . $_REQUEST['cid'] . "', \nbloodgroup='" . $_REQUEST['bloodgroup'] . "', \nbloodrh='" . $_REQUEST['bloodrh'] . "', \nmarystatus='" . $_REQUEST['marystatus'] . "', \neducate='" . $_REQUEST['educate'] . "', \noccupa='" . $_REQUEST['occupa'] . "', \nnation='" . $_REQUEST['nation'] . "', \norigin='" . $_REQUEST['origin'] . "', \nreligion='" . $_REQUEST['religion'] . "', \nfamilyposition='" . $_REQUEST['familyposition'] . "', \ntypelive='" . $_REQUEST['typelive'] . "', \ndischargetype='" . $_REQUEST['dischargetype'] . "' where pid='" . $_REQUEST['pid'] . "'"; $db->exec($sql); echo "บันทึก/ปรับปรุงข้อมูล"; echo "<br>"; echo $data->GetStringData("select concat('คุณ',fname,' ',lname) as cc from person where idcard=" . $_REQUEST['cid']); echo "<br>"; echo "เสร็จสมบูรณ์"; ?>
<?php include '../../includes/conf.ini.php'; include '../../includes/DBConn.php'; include '../../includes/function.php'; include '../../includes/dateClass.php'; $data = new dbClass(); $pcucode = $_POST['pcucode']; $visitno = $_POST['visitno']; $drugcode = $_POST['drugcode']; $doctor = $_POST['doctor']; $unit = $_POST['unit']; $dose = $_POST['dose']; $flagservice = $data->GetStringData("select flagservice as cc from visit where visitno='{$visitno}' "); if ($flagservice == '00') { $sqlflag = "update visit set flagservice='02' where visitno='" . $_POST['visitno'] . "'"; $db->exec($sqlflag); } $drugcost = $data->GetStringData("select cost as cc from cdrug where drugcode='{$drugcode}' "); $drugname = $data->GetStringData("select drugname as cc from cdrug where drugcode='{$drugcode}' "); $realprice = $data->GetStringData("select sell as cc from cdrug where drugcode='{$drugcode}' "); $drugcheck = $data->GetStringData("select drugcode as cc from visitdrug where visitno='" . $visitno . "' and drugcode='" . $drugcode . "'"); if ($drugcheck < 1) { //insert $sql = "insert into visitdrug (pcucode,visitno,drugcode,unit,costprice,realprice,dose,doctor1,flag18fileexpo,dateupdate)\r\nvalues('" . $pcucode . "','" . $visitno . "','" . $drugcode . "','" . $unit . "','" . $drugcost . "','" . $realprice . "','" . $dose . "','" . $doctor . "',2,DATE_FORMAT(NOW(),'%Y-%m-%d %H:%i:%s'))"; } else { //update $sql = "update visitdrug set unit='" . $unit . "',costprice='" . $drugcost . "',realprice='" . $realprice . "',dose='" . $dose . "',doctor1='" . $doctor . "',\r\n dateupdate=DATE_FORMAT(NOW(),'%Y-%m-%d %H:%i:%s') where visitno='" . $visitno . "' and drugcode='" . $drugcode . "' "; } $db->exec($sql); $json_status = array("status" => 'OK', "drugname" => $drugname, "dose" => $dose, "unit" => $unit);
if (empty($_REQUEST['bladder'])) { $bladder = 0; } else { $bladder = $_REQUEST['bladder']; } if (empty($_REQUEST['stairs'])) { $stairs = 0; } else { $stairs = $_REQUEST['stairs']; } if ($_REQUEST['adl_id'] > 0) { $sql = "update hhc_person_adl_screen set\r\n screen_date='" . $date . "',\r\n screen_time='" . $time . "', \r\n feeding='" . $feeding . "',\r\n transfer='" . $transfer . "',\r\n mobility='" . $mobility . "',\r\n dressing='" . $dressing . "',\r\n bathing='" . $bathing . "',\r\n groming='" . $groming . "',\r\n toilet_use='" . $toilet_use . "',\r\n bowels='" . $bowels . "',\r\n bladder='" . $bladder . "',\r\n stairs='" . $stairs . "',\r\n staff='" . $_REQUEST['staff'] . "' where person_id='" . $_REQUEST['pid'] . "' and adl_id='" . $_REQUEST['adl_id'] . "'"; $db->exec($sql); echo "<h4><font color='green'>ปรับปรุงข้อมูลเสร็จเรียบร้อยแล้วครับ </font></h4>"; } else { $check_save = $data->GetStringData("select person_id as cc from hhc_person_adl_screen where person_id='" . $_REQUEST['pid'] . "' and screen_date='" . $date . "'"); if ($check_save > 0) { echo "<font color='red'>คุณบันทึกการประเมิน ADL บุคคลนี้ไปแล้วในวันนี้<br>กรุณาตรวจสอบข้อมูลครับ<br></font>"; } else { $adl_id = $data->GetStringData("select max(adl_id)+1 as cc from hhc_person_adl_screen "); $sql = "insert into hhc_person_adl_screen (adl_id,person_id,screen_time,\r\nscreen_date,feeding,transfer,\r\nmobility,dressing,bathing,\r\ngroming,toilet_use,bowels,bladder,\r\nstairs,staff)\r\nvalues ('" . $adl_id . "',\r\n'" . $_REQUEST['pid'] . "',\r\n'" . $time . "',\r\n'" . $date . "',\r\n'" . $feeding . "',\r\n'" . $transfer . "',\r\n'" . $mobility . "',\r\n'" . $dressing . "',\r\n'" . $bathing . "',\r\n'" . $groming . "',\r\n'" . $toilet_use . "',\r\n'" . $bowels . "',\r\n'" . $bladder . "',\r\n'" . $stairs . "',\r\n'" . $_REQUEST['staff'] . "')"; $db->exec($sql); echo "<h4><font color='green'>บันทึกเสร็จเรียบร้อยแล้วครับ </font></h4>"; } } $score = $feeding + $transfer + $mobility + $dressing + $bathing + $groming + $toilet_use + $bowels + $bladder + $stairs; switch ($score) { case 0: $text = "ติดเตียง (เตียง 3)"; break; case $score > 12:
<?php ob_start(); include 'includes/conf.ini.php'; include 'includes/DBConn.php'; include 'includes/function.php'; include 'includes/dateClass.php'; include 'includes/encode.php'; $data = new dbClass(); header("Content - type : image/jpeg"); echo $data->GetStringData("select person_image as cc from person_image where person_id='" . $_POST['pid'] . "'"); ?>
<?php $data = new dbClass(); $clinic_dm = $data->GetStringData("select sys_value as cc from sys_var where sys_name ='dm_clinic_code' "); $clinic_ht = $data->GetStringData("select sys_value as cc from sys_var where sys_name ='ht_clinic_code' "); $dm_count = $data->GetStringData("select count(distinct hn) as cc from clinicmember c where discharge <>'Y' and clinic={$clinic_dm}"); $ht_count = $data->GetStringData("select count(distinct hn) as cc from clinicmember c where discharge <>'Y' and clinic={$clinic_ht}"); ?> <ul data-role="listview" data-split-icon="info" data-split-theme="a" data-inset="true"> <li data-role="list-divider"><h4>ทะเบียนผู้ป่วยโรคเบาหวาน-ความดันโลหิตสูง</h4></li> <li><a href="index.php?url=<?php echo $encode->encodeUrl("page/ncd_clinic/ncd_dm.php"); ?> &clinic=<?php echo $clinic_dm; ?> "> <img src="images/health/diabetes-icon.png"> <h2>เบาหวาน</h2> <p>ผู้ป่วยคลินิกพิเศษเบาหวาน</p> <span class="ui-li-count"><?php echo $dm_count; ?> คน</span> </a> <a href="index.php?m=ncd_clinic&a=summary_pingpong_dm">ตั้งค่า Clinic</a> </li> <li><a href="#"> <img src="images/health/078.png">