37 lines
1.7 KiB
PHP
37 lines
1.7 KiB
PHP
<?php
|
|
|
|
include('includes/config/config.php');
|
|
include('includes/functions.php');
|
|
include('log_entry.php');
|
|
|
|
if (isset($_REQUEST['cityId'])) {
|
|
|
|
$sql = "SELECT * from appointment_details where id = '" . $_REQUEST['cityId'] . "'";
|
|
error_log('apps' . $sql);
|
|
$query = mysqli_query($conn, $sql);
|
|
while( $fetch = mysqli_fetch_assoc($query)){
|
|
|
|
$data = array(
|
|
'doc_mail'=>getTableFieldValue('patient_master','offiial_email_id','id','"'.$fetch['doctor_id'].'"'),
|
|
'emp_mail'=>getTableFieldValue('patient_master','offiial_email_id','id','"'.$fetch['emp_id'].'"'),
|
|
|
|
|
|
'id' => $fetch['id'],
|
|
'status' => $fetch['status'],
|
|
'app_type' => $fetch['app_type'],
|
|
'remarks' => $fetch['Remarks'],
|
|
'date' => date_format(date_create($fetch['date']), "d-m-Y ") ,
|
|
'patient_name' => getTableFieldValue('patient_master', 'patient_name', 'id','"'. $fetch['emp_id'].'"'),
|
|
'ohc_type' => getTableFieldValue('ohc_type', 'ohc_type_name', 'ohc_type_id', '"'.$fetch['ohc_type_id'].'"'),
|
|
'ohc_mail' => getTableFieldValue('ohc_type', 'primary_email', 'ohc_type_id', '"'.$fetch['ohc_type_id'].'"'),
|
|
'app_root' => getTableFieldValue('config', 'value', 'key_name', '"APP_ROOT"'),
|
|
'doctor_name' => getTableFieldValue('patient_master', 'patient_name', 'id', '"'.$fetch['doctor_id'].'"'),
|
|
'slot' => getTableFieldValue("appoinment_slots ","TIME_FORMAT(slot, '%h:%i %p')" , "slot_id", '"'.$fetch['time'].'"'),
|
|
'slot_end' => getTableFieldValue("appoinment_slots ","TIME_FORMAT(slot_end, '%h:%i %p')" , "slot_id", '"'.$fetch['time'].'"'),
|
|
|
|
);
|
|
}
|
|
error_log('apps' . print_r($data, true));
|
|
echo json_encode($data);
|
|
}
|