";
$print_link = $space . "";
}
if ($hasWriteAccess) {
$edit_link = $space . "";
}
if ($hasExecuteAccess) {
$delete_link = $space . "";
}
$checkupSections = getCommaSeperatedValuesForInClause("select section_name from checkup_form_section", "section_id", $row_checkup['checkup_section_ids']);
$links = $assign_link . $view_link . $edit_link . $delete_link . $print_link;
if ($row_checkup['approve_date'] != '') {
$approve_date = date_format(date_create($row_checkup['approve_date']), "d-M-Y H:i A");
}
$checkup_name = getFieldFromTable('checkup_type_name', 'checkup_type', 'checkup_type_id', $row_checkup['checkup_type_id']);
$patient_name = getFieldFromTable('patient_name','patient_master','id', $row_checkup['emp_id']);
$d =$row_checkup['final_bill_amount'];
if ($row_checkup['final_bill_amount'] == null) {
$bill = "Pending";
} else {
$bill = "$d";
}
$data['rows'][] = array(
'id' => $row_checkup['checkup_id'],
'cell' => array(
$count++,
$links,
date_format(date_create($row_checkup['checkup_date']), "d-M-Y H:i A"),
$row_checkup['ticket_no'],
$patient_name,
$checkup_name,
$checkupSections,
// $row_checkup['final_bill_amount'],
$bill,
$row_checkup['remarks'],
// $approve_date
)
);
}
$data['rows'][] = array(
'id' => $row['filterkey'],
'cell' => array('', "", "", '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '')
);
// error_log("data: ".print_r($data, true));
echo json_encode($data);
?>