Esempio n. 1
0
     }
     $status[$actionkey] = 0;
     $baseinfo['qa_status'] = join(",", $status);
     $class->edit($baseinfo, $_POST["id"]);
 }
 // 提問狀態
 if ($_POST["do"] == "qa") {
     $post['patient_id'] = $_POST["id"];
     $post['user_id'] = $_SESSION['customer_id'];
     $post['actionkey'] = $actionkey;
     $post['content'] = $_POST["content"];
     $class = new question();
     $qid = $class->add($post);
     if ($qid) {
         $class = new patient();
         $info = $class->getInfo((int) $_POST["id"]);
         $baseinfo = array();
         $status = explode(",", $info['qa_status']);
         for ($i = 0; $i < $actionkey; $i++) {
             if (empty($status[$i])) {
                 $status[$i] = 0;
             }
         }
         $status[$actionkey] = 1;
         $baseinfo['qa_status'] = join(",", $status);
         $class->edit($baseinfo, $_POST["id"]);
         // echo $baseinfo['qa_status'];
         // mail通知
         $cusClass = new registration();
         $customerInfo = $cusClass->getCustomer($_SESSION['customer_id']);
         if ($customerInfo['group_id'] >= 2) {
Esempio n. 2
0
         $cusClass = new registration();
         $customerInfo = $cusClass->getCustomer($_SESSION['customer_id']);
     } else {
         $customerInfo = array();
     }
 }
 if (isset($_GET['patient_id'])) {
     $_SESSION['patient_id'] = (int) $_GET['patient_id'];
 } else {
     if (!in_array($_GET["action"], $action_pages)) {
         // unset($_SESSION['patient_id']);
     }
 }
 if ($_SESSION['patient_id']) {
     $patientClass = new patient();
     $patientInfo = $patientClass->getInfo((int) $_SESSION['patient_id']);
     if ($patientInfo['birthday'] == '0000-00-00') {
         $patientInfo['birthday'] = '';
     }
     if ($patientInfo['ACS_24'] == 1 && $patientInfo['2dm'] == 1 && $patientInfo['20years'] == 1 && $patientInfo['consent_given'] == 1 && $patientInfo['ACS_comorbidity'] == 0 && $patientInfo['study'] == 0) {
         $Penroll = true;
     } else {
         $Penroll = false;
     }
     $lockstatus = explode(",", $patientInfo['lock_status']);
     $qastatus = explode(",", $patientInfo['qa_status']);
     // print_r($qastatus);
 }
 $noPermission = false;
 if ($customerInfo['group_id'] <= 2) {
     if ($customerInfo['hospital_id'] != $patientInfo['hospital_id']) {