"; // $view_link .= $space; // } else if ($appointment_type == 'I') { // $view_link = ""; // $view_link .= $space; // } // if ($appointment_type == 'O') { // $edit_link = ""; // $edit_link .= $space; // } else if ($appointment_type == 'I') { $view_link = $space . ""; $edit_link = $space . ""; $followup_links = ""; $query_followup = "select * from followup_details where appointment_id='" . $row_employee_appointment['appointment_id'] . "' and ((doctor_attended_flag='N' and attended_status='DRP') or (doctor_attended_flag='Y' and attended_status='MDP') or (doctor_attended_flag='Y' and attended_status='DRP')) and appointment_type='I' and ohc_type_id='" . $_SESSION['current_ohcttype'] . "' "; error_log("Patient_Search_followup:" . $query_followup); if (!$result_followup = @mysqli_query($conn, $query_followup)) { exit(mysqli_error($conn)); } if (mysqli_num_rows($result_followup) > 0) { while ($row_followup = mysqli_fetch_assoc($result_followup)) { if (isAccessible($_SESSION['RoleId'], $menu_key, 'W')) { $followup_links .= "" . $row_followup["ticket_no"] . ""; } } } // $edit_link .= $space; // } // if ($appointment_type == 'O') { // $approve_link = ""; // $approve_link .= $space; // } else if ($appointment_type == 'I') { // $approve_link .= $space; // } // $convert_link=""; // $delete_link=""; // echo $hasReadAccess =isAccessible($_SESSION['RoleId'],$menu_key,'R'); // echo $hasWriteAccess = isAccessible($_SESSION['RoleId'],$menu_key,'W'); // echo $hasReadAccess; // echo $hasWriteAccess; if (!isAccessible($_SESSION['RoleId'], $menu_key, 'R')) { $view_link = ""; } if (!isAccessible($_SESSION['RoleId'], $menu_key, 'W')) { $edit_link = ""; } $links = $edit_link; $isEmergency = ""; if ($row_employee_appointment['IsEmergency'] == 1) { $isEmergency = "Yes"; } else { $isEmergency = "No"; } $doctor_attended_flag = ""; if ($row_employee_appointment['doctor_attended_flag'] == 'Y') { $doctor_attended_flag = "Yes"; } else { $doctor_attended_flag = "No"; } $check_results = "SBP:" . $row_employee_appointment['bp_sbp'] . ", DBP:" . $row_employee_appointment['bp_dbp'] . ", FBS:" . $row_employee_appointment['blood_sugar_fbs'] . ", RBS:" . $row_employee_appointment['blood_sugar_rbs'] . ", PPBS:" . $row_employee_appointment['blood_sugar_ppbs'] . ", TEMP:" . $row_employee_appointment['temperature'] . ", SpO2:" . $row_employee_appointment['spo2_percent'];; // echo $row_employee_appointment['bp_sbp']; $data['rows'][] = array( 'id' => $row_employee_appointment['appointment_id'], 'cell' => array( $links, $count++, date_format(date_create($row_employee_appointment['appointment_date']), "d-M-Y H:i A"), $followup_links, $row_employee_appointment['ticket_no'], $row_employee_appointment['emp_code'], $row_employee_appointment['patient_name'], $isEmergency, $doctor_attended_flag, $complaints, $check_results, $row_employee_appointment['remarks_rece'], ) ); } $data['rows'][] = array( 'id' => $row['filterkey'], 'cell' => array( '', "", "", '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '' ) ); error_log("data: " . print_r($data, true)); echo json_encode($data); ?>