36 lines
1.3 KiB
PHP
36 lines
1.3 KiB
PHP
<?php
|
|
include('includes/config/config.php');
|
|
include('log_entry.php');
|
|
$ailmentId = $_REQUEST['id'];
|
|
$data = [];
|
|
$i = 0;
|
|
$query = "select a.*, b.* from visitors_employee_appointment a left join visitor_patient_master b on a.emp_id = b.id where a.emp_id ='".$ailmentId."' ";
|
|
error_log("query: ".$query);
|
|
if (!$result = @mysqli_query($conn,$query)) {
|
|
exit(mysqli_error($conn));
|
|
}
|
|
$data = array();
|
|
if(mysqli_num_rows($result) > 0) {
|
|
while ($row = @mysqli_fetch_assoc($result)) {
|
|
$data[$i]['appointment_date'] = date('d-m-Y g:i a', strtotime($row['appointment_date']));
|
|
$data[$i]['patient_name'] = $row['patient_name'];
|
|
$data[$i]['father_name'] = $row['father_name'];
|
|
$data[$i]['dob'] = date_diff(date_create($row['dob']), date_create('now'))->y;
|
|
$data[$i]['gender'] = $row['gender'];
|
|
$data[$i]['token_no'] = $row['token_no'];
|
|
$data[$i]['emp_code'] = $row['emp_code'];
|
|
$data[$i]['entry_med_test'] = $row['entry_med_test'];
|
|
$data[$i]['remarks'] = $row['remarks'];
|
|
$data[$i]['reviewer_comment'] = $row['reviewer_comment'];
|
|
$i++;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
$data['status'] = 200;
|
|
$data['message'] = "Data not found!";
|
|
}
|
|
// error_log(print_r($data, true));
|
|
echo json_encode($data);
|
|
?>
|