51 lines
2.1 KiB
PHP
51 lines
2.1 KiB
PHP
<?php
|
|
include('includes/config/config.php');
|
|
include('includes/functions.php');
|
|
include_once 'log_entry.php';
|
|
|
|
$mockdril_id = $_REQUEST['mockdril_id'];
|
|
$id = $_REQUEST['id'];
|
|
$location = $_REQUEST['location'];
|
|
$date_of_mockdrill = date("Y-m-d");;
|
|
$bp = $_REQUEST['bp'];
|
|
$pulse = $_REQUEST['pulse'];
|
|
$Spo2 = $_REQUEST['Spo2'];
|
|
$RBS = $_REQUEST['RBS'];
|
|
$temp = $_REQUEST['temp'];
|
|
$given_treatment = $_REQUEST['given_treatment'];
|
|
$patient_attending_doctor_name = $_REQUEST['patient_attending_doctor_name'];
|
|
$patient_attending_staff_name = $_REQUEST['patient_attending_staff_name'];
|
|
$patients_in_hospital = $_REQUEST['patients_in_hospital'];
|
|
$patient_condition_on_discharge_time = $_REQUEST['patient_condition_on_discharge_time'];
|
|
|
|
$inf_rec_time = $_REQUEST['inf_rec_time'];
|
|
$dis_time = $_REQUEST['dis_time'];
|
|
$amb_sen_t = $_REQUEST['amb_sen_t'];
|
|
$info = $_REQUEST['info'];
|
|
$complt_of_patient = $_REQUEST['complt_of_patient'];
|
|
$patient_diagnosis = $_REQUEST['patient_diagnosis'];
|
|
|
|
$query = "";
|
|
$initialSql = "";
|
|
$EndSql = "";
|
|
|
|
if (!empty($mockdril_id)) {
|
|
$initialSql = "UPDATE mockdril SET ";
|
|
$EndSql = " WHERE mockdril_id = '$mockdril_id'";
|
|
} else {
|
|
$initialSql = "INSERT INTO mockdril SET ";
|
|
$EndSql = "";
|
|
}
|
|
|
|
$date_of_mockdrill = date_format(date_create($date_of_mockdrill), "Y-m-d");
|
|
|
|
$query = $initialSql . " id='$id',location='$location',date_of_mockdrill='" . $date_of_mockdrill . "',bp='$bp',pulse='$pulse',Spo2='$Spo2',RBS='$RBS',temp='$temp',given_treatment='$given_treatment',patient_attending_doctor_name='$patient_attending_doctor_name',patient_attending_staff_name='$patient_attending_staff_name',patients_in_hospital='$patients_in_hospital',patient_condition_on_discharge_time='$patient_condition_on_discharge_time',inf_rec_time='$inf_rec_time',dis_time='$dis_time',amb_sen_t='$amb_sen_t',info='$info',complt_of_patient='$complt_of_patient',patient_diagnosis='$patient_diagnosis' " . $EndSql;
|
|
|
|
|
|
error_log("MOCKDRILL QUERY" . $query);
|
|
|
|
if (!$result = mysqli_query($conn, $query)) {
|
|
error_log("Failed to exuecuted Referral point:" . mysqli_error($conn) . " Failing Query:" . $query);
|
|
die(mysqli_error($conn));
|
|
}
|