' . getTableFieldValue('communication', 'com_item', 'communication_id', $row_details['communication_id']) . '::' . $row_details['details'] . '
';
// error_log("dettttttttttttttails" . $communication_info);
}
if (isset($row_details['remarks']) && $row_details['remarks'] != '') {
$remarks_info .= '' . getTableFieldValue('communication', 'com_item', 'communication_id', $row_details['communication_id']) . '::' . $row_details['remarks'] . '
';
// error_log("remarks:::" . $remarks_info);
}
$status_name = $row_details['status_name'];
$start_date_time = $row_details['start_date_time'];
$end_date_time = $row_details['end_date_time'];
}
//echo $;
$view_link = "";
$edit_link = "";
$delete_link = "";
$links = "";
$current_date = date("Y-m-d H:i:s");
error_log("current date" . $current_date);
$timestamp1 = strtotime($current_date);
error_log("time 1 date" . $timestamp1);
error_log("comm_date " . $comm_date);
$timestamp2 = strtotime($comm_date);
error_log("time 2 date" . $timestamp2);
$tim_diff = round(($timestamp1 - $timestamp2) / 3600, 1);
error_log("Actusal hhhhhhhhhhhhhhhh" . $tim_diff);
error_log("modified by:::::" . $row['modified_by']);
if ($hasReadAccess) {
//echo "";
$view_link = "";
}
if ($hasWriteAccess) {
//if ($tim_diff <= 24) {
$edit_link = "";
//}
}
if ($hasExecuteAccess) {
//if ($tim_diff <= 24) {
$delete_link = "";
//}
}
// $pdf_link = $space . "";
$space = " ";
$links = $assign_link . $space . $view_link . $space . $edit_link . $space . $delete_link . $space . $pdf_link;
$data['rows'][] = array(
'id' => $row['com_id'],
'cell' => array(
$links,
$count++,
$status_name,
$start_date_time,
$end_date_time,
date_format(date_create($row['comm_date']), "d-M-Y"),
getTableFieldValue('patient_master', 'patient_name', 'id', $row['emp_id']),
$communication_info,
$remarks_info,
)
);
}
// error_log(print_r($data, true));
echo json_encode($data);
?>