48 lines
2.4 KiB
PHP
48 lines
2.4 KiB
PHP
<?php
|
|
error_reporting(0);
|
|
include "../includes/config/config.php";
|
|
include "functions.php";
|
|
include 'log_entry.php';
|
|
|
|
$appointment_date = $_REQUEST['appointment_date'];
|
|
$branch_area = $_REQUEST['branch_area'];
|
|
$injury_cause = $_REQUEST['injury_cause'];
|
|
$branch_area = $_REQUEST['branch_area'];
|
|
$incident_location = $_REQUEST['incident_location'];
|
|
$injuryTypes_new = $_REQUEST['injury_type'];
|
|
$injuryClasses_new = $_REQUEST['injury_class'];
|
|
$injuryParts_new = $_REQUEST['injury_part'];
|
|
$complaints = $_REQUEST['complaints'];
|
|
$complaints = handleDynamicMasterInsertDoc ( "complaints", "complaint", "complaint_id", $complaints, true,24);
|
|
|
|
error_log ( "complaint_ids:" . implode ( ',', $complaints ) );
|
|
$complaints = getMultiValuedSelectData ( $complaints );
|
|
error_log ( "complaint_ids2:" . $complaints );
|
|
$ailments_new = strtoupper($_REQUEST['diagnosis']);
|
|
$ailments_new = handleDynamicMasterInsertDoc ( "ailment", "ailment_name", "ailment_id", $ailments_new, true,24 );
|
|
error_log ( "Diagnosis:" . implode ( ',', $ailments_new ) );
|
|
$ailments_new = getMultiValuedSelectData ( $ailments_new );
|
|
error_log ( "Diagnosis:" . $ailments_new );
|
|
$examination_remarks = $_REQUEST['examination_remarks'];
|
|
$examination_remarks = handleDynamicMasterInsertDoc ( "examination_findings", "examination_finding", "id", $examination_remarks, true,24 );
|
|
error_log ( "finding_ids:" . implode ( ',', $examination_remarks ) );
|
|
$examination_remarks = getMultiValuedSelectData ( $examination_remarks );
|
|
error_log ( "finding_ids2:" . $finding_ids );
|
|
$remarks = $_REQUEST['remarks_rece'];
|
|
$ticket_no = $_REQUEST['ticket_no'];
|
|
// $drug = $_REQUEST['drug'];
|
|
// $datetime = $_REQUEST['datetime'];
|
|
|
|
if (!empty($ticket_no)) {
|
|
$sql = "UPDATE employee_appointment SET appointment_date=STR_TO_DATE('".$appointment_date. "', '%d/%m/%Y %h:%i %p'), injury_time='".$_REQUEST['injury_time']."', ailments_new='".$ailments_new."', examination_remarks='".$examination_remarks."',remarks_rece = '".$remarks."',incident_location='".$incident_location."',injury_cause='".$injury_cause."',branch_area='".$branch_area."',injury_types_new='" . addslashes ( $injuryTypes_new ) . "',injury_classes_new='" . addslashes ( $injuryClasses_new ) . "',injury_parts_new='" . addslashes ( $injuryParts_new ) . "',attended_status='DRA' WHERE ticket_no = '".$ticket_no."'";
|
|
|
|
$query = mysqli_query($conn , $sql);
|
|
error_log("INJURY UPDATE QUERY::" .$sql);
|
|
if (!$query) {
|
|
echo 1;
|
|
} else {
|
|
echo 0;
|
|
}
|
|
}
|
|
|
|
?>
|