Commit f07a0ef2 by Jithin

service in progress

parent 664e0135
...@@ -96,15 +96,20 @@ public function check_cancelBooking() ...@@ -96,15 +96,20 @@ public function check_cancelBooking()
$result = $this->Patient_model->get_Booking($_POST['booking_id']); $result = $this->Patient_model->get_Booking($_POST['booking_id']);
$policy = $this->Patient_model->get_all_policy(); $policy = $this->Patient_model->get_all_policy();
$nowin_server = date("Y-m-d TH:i:s");
if($_POST['UTCoffset']['sign']=='+')
{
$nowin_server_addoffset = date('Y-m-d H:i:s',strtotime('+'.$_POST['UTCoffset']['hour'].' hour +'.$_POST['UTCoffset']['minute'].' minutes',strtotime($nowin_server)));
}
elseif ($_POST['UTCoffset']['sign']=='-')
{
$nowin_server_addoffset = date('Y-m-d H:i:s',strtotime('-'.$_POST['UTCoffset']['hour'].' hour -'.$_POST['UTCoffset']['minute'].' minutes',strtotime($nowin_server)));
}
$day = date('Y-m-d H:i:s',$result['time_start']); $day = date('Y-m-d H:i:s',$result['time_start']);
$newdate = date("Y-m-d H:i:s",strtotime($day." -".$policy['duration']." hours")); $newdate = date("Y-m-d H:i:s",strtotime($day." -".$policy['duration']." hours"));
$now = date("Y-m-d TH:i:s"); if(strtotime($nowin_server_addoffset)<strtotime($newdate))
$cenvertedTime = date('Y-m-d H:i:s',strtotime('+5 hour +30 minutes',strtotime($now)));
if(strtotime($cenvertedTime)<strtotime($newdate))
{ {
$res = array('status' => 'success', 'msg'=>'booking can canceled'); $res = array('status' => 'success', 'msg'=>'booking can canceled');
} }
...@@ -453,7 +458,7 @@ public function check_current_user_credential() ...@@ -453,7 +458,7 @@ public function check_current_user_credential()
$enterd_pass = md5($_POST['password']); $enterd_pass = md5($_POST['password']);
if($db_pass['password']==$enterd_pass) if($db_pass['password']==$enterd_pass)
{ {
$this->db->sentConfirmationcode($userdata); $this->sentConfirmationcode($userdata);
$res = array('status' =>'success' , 'msg'=>'Valid Credentials'); $res = array('status' =>'success' , 'msg'=>'Valid Credentials');
} }
else else
......
...@@ -162,7 +162,38 @@ class Searchdoctor extends CI_Controller { ...@@ -162,7 +162,38 @@ class Searchdoctor extends CI_Controller {
$result_availability = $this->Search_doctor_model->doctor_availability($_POST['doctor_id'],$_POST['clinic_id']); $result_availability = $this->Search_doctor_model->doctor_availability($_POST['doctor_id'],$_POST['clinic_id']);
$consult_duration = $this->Doctor_model->check_consult_duration($_POST['doctor_id']); $consult_duration = $this->Doctor_model->check_consult_duration($_POST['doctor_id']);
//print_r($_POST);
$res_new = array();
$nowin_server = date("Y-m-d TH:i:s");
if($_POST['UTCoffset']['sign']=='+')
{
//$clienttime_UTC = date("Y-m-d H:i:s",strtotime($_POST['currenttime']." -".$_POST['UTCoffset']['hour']." hours -".$_POST['UTCoffset']['minute']." minutes"));
//print_r($clienttime_UTC);
$nowin_server_addoffset = date('Y-m-d H:i:s',strtotime('+'.$_POST['UTCoffset']['hour'].' hour +'.$_POST['UTCoffset']['minute'].' minutes',strtotime($nowin_server)));
}
elseif ($_POST['UTCoffset']['sign']=='-')
{
//$clienttime_UTC = date("Y-m-d H:i:s",strtotime($_POST['currenttime']." +".$_POST['UTCoffset']['hour']." hours +".$_POST['UTCoffset']['minute']." minutes"));
//print_r($clienttime_UTC);
$nowin_server_addoffset = date('Y-m-d H:i:s',strtotime('-'.$_POST['UTCoffset']['hour'].' hour -'.$_POST['UTCoffset']['minute'].' minutes',strtotime($nowin_server)));
}
//$clienttime_UTC_add1hr = date("Y-m-d H:i:s",strtotime($clienttime_UTC." + 1hours "));
//if(strtotime($clienttime_UTC_add1hr)>strtotime($nowin_server))
//{
/*print_r($clienttime_UTC);
print_r($clienttime_UTC_add1hr);
print_r($nowin_server);
print_r($nowin_server_addoffset);*/
//}
if($result_availability['data']['active_schedule']=='0') if($result_availability['data']['active_schedule']=='0')
{ {
$schedule = $result_availability['data']['date']; $schedule = $result_availability['data']['date'];
...@@ -172,7 +203,6 @@ class Searchdoctor extends CI_Controller { ...@@ -172,7 +203,6 @@ class Searchdoctor extends CI_Controller {
$schedule = $result_availability['data']['date_secondary']; $schedule = $result_availability['data']['date_secondary'];
} }
$res_new = array();
if(($result_availability['status']) == 'success' and ($schedule!='""')) if(($result_availability['status']) == 'success' and ($schedule!='""'))
{ {
...@@ -195,7 +225,7 @@ class Searchdoctor extends CI_Controller { ...@@ -195,7 +225,7 @@ class Searchdoctor extends CI_Controller {
if(isset($value['time']['break_from']) && isset($value['time']['break_to']) && ($value['time']['break_from'] != 'null' ) && ($value['time']['break_to'] != 'null') && strlen($value['time']['break_from']) && strlen($value['time']['break_to'])) if(isset($value['time']['break_from']) && isset($value['time']['break_to']) && ($value['time']['break_from'] != 'null' ) && ($value['time']['break_to'] != 'null') && strlen($value['time']['break_from']) && strlen($value['time']['break_to']))
{ {
if(!((($initial < strtotime($value['time']['break_from'])) &&($end > strtotime($value['time']['break_from'])))||(($initial < strtotime($value['time']['break_to'])) &&($end > strtotime($value['time']['break_to']))))&&(strtotime($_POST['currenttime'])<$initial)) if(!((($initial < strtotime($value['time']['break_from'])) &&($end > strtotime($value['time']['break_from'])))||(($initial < strtotime($value['time']['break_to'])) &&($end > strtotime($value['time']['break_to']))))&&($initial>strtotime($nowin_server_addoffset)))
{ {
if($end <= $end_time) if($end <= $end_time)
...@@ -206,7 +236,7 @@ class Searchdoctor extends CI_Controller { ...@@ -206,7 +236,7 @@ class Searchdoctor extends CI_Controller {
} }
else else
{ {
if(($end <= $end_time)&&(strtotime($_POST['currenttime'])<$initial)) if(($end <= $end_time)&&($initial>strtotime($nowin_server_addoffset)))
{ {
array_push($res, array('time'=>date('h:i a',$initial).' - '.date('h:i a',$end),'start'=>$initial,'end'=>$end)); array_push($res, array('time'=>date('h:i a',$initial).' - '.date('h:i a',$end),'start'=>$initial,'end'=>$end));
} }
......
...@@ -364,7 +364,8 @@ public function get_booking_details($book_id) ...@@ -364,7 +364,8 @@ public function get_booking_details($book_id)
tbl_booking.time as book_time, tbl_booking.time as book_time,
tbl_booking.amount as book_price, tbl_booking.amount as book_price,
tbl_registration.id as pat_id, tbl_registration.id as pat_id,
tbl_registration.name as pat_name"); tbl_registration.name as pat_name,
tbl_booking.doctor_id as doc_id");
$this->db->from('tbl_booking'); $this->db->from('tbl_booking');
$this->db->join('tbl_registration', 'tbl_booking.patient_id = tbl_registration.id','inner'); $this->db->join('tbl_registration', 'tbl_booking.patient_id = tbl_registration.id','inner');
$this->db->where('tbl_booking.id',$book_id); $this->db->where('tbl_booking.id',$book_id);
...@@ -493,12 +494,134 @@ function get_major_subproblems($id) ...@@ -493,12 +494,134 @@ function get_major_subproblems($id)
function get_distinct_medicines() function get_distinct_medicines()
{ {
$this->db->select('medicine_name'); $this->db->select('medicine_name,
id as medicine_id');
$this->db->from('tbl_medicine'); $this->db->from('tbl_medicine');
$this->db->group_by('medicine_name'); $this->db->group_by('medicine_name');
$query = $this->db->get(); $query = $this->db->get();
return $query->result_array(); return $query->result_array();
} }
function get_distinct_exams()
{
$this->db->select('exam_procedure as exam_name,
id as exam_id');
$this->db->from('tbl_exams');
$this->db->group_by('exam_procedure');
$query = $this->db->get();
return $query->result_array();
}
function get_distinct_procedure()
{
$this->db->select('budget_procedure as procedure_name,
id as procedure_id');
$this->db->from('tbl_budget');
$this->db->group_by('budget_procedure');
$query = $this->db->get();
return $query->result_array();
}
function get_distinct_cid()
{
$this->db->select('disease_name,
code');
$this->db->from('tbl_disease_code');
$this->db->group_by('disease_name');
$query = $this->db->get();
return $query->result_array();
}
function check_medical_record($booking_id)
{
$this->db->select('count(id) as count,
id as record_id');
$this->db->from('tbl_medical_records');
$this->db->where('booking_id',$booking_id);
$query = $this->db->get();
return $query->row_array();
}
function insert_medical_record($booking_id)
{
$array = array('booking_id' => $booking_id );
$this->db->insert('tbl_medical_records',$array);
return $this->db->insert_id();
}
function update_booking($booking_id,$array)
{
$this->db->where('tbl_booking.id',$booking_id);
$this->db->update('tbl_booking',$array);
}
function update_records($booking_id,$array)
{
$this->db->where('booking_id',$booking_id);
if($this->db->update('tbl_medical_records',$array))
return true;
else
return false;
}
function get_medicine_for_name($name)
{
$this->db->select('medicine_dosage,
medicine_procedure');
$this->db->from('tbl_medicine');
$this->db->where('medicine_name',$name);
$query = $this->db->get();
return $query->result_array();
}
function get_exam_for_name($name)
{
$this->db->select('observation');
$this->db->from('tbl_exams');
$this->db->where('exam_procedure',$name);
$query = $this->db->get();
return $query->result_array();
}
function get_budget_for_name($name)
{
$this->db->select('amount,
quantity');
$this->db->from('tbl_budget');
$this->db->where('budget_procedure',$name);
$query = $this->db->get();
return $query->result_array();
}
function get_medical_record_for_booking($booking_id)
{
$this->db->select('*');
$this->db->from('tbl_medical_records');
$this->db->where('booking_id',$booking_id);
$query = $this->db->get();
return $query->row_array();
}
function get_certificate_letters()
{
$this->db->select('cid_letter,
letter');
$this->db->from('tbl_policy');
$query = $this->db->get();
return $query->row_array();
}
function get_current_booking_status($booking_id)
{
$this->db->select('booking_status');
$this->db->from('tbl_booking');
$this->db->where('id',$booking_id);
$query = $this->db->get();
return $query->row_array();
}
} }
?> ?>
\ No newline at end of file
...@@ -14,5 +14,7 @@ ...@@ -14,5 +14,7 @@
$(function() $(function()
{ {
CKEDITOR.replace('editor1'); CKEDITOR.replace('editor1');
CKEDITOR.replace('certificate');
CKEDITOR.replace('otherobservation');
}) })
</script> </script>
\ No newline at end of file
...@@ -13,18 +13,20 @@ ...@@ -13,18 +13,20 @@
<script src="<?php echo base_url();?>assets/js/ie-emulation-modes-warning.js.download"></script> <script src="<?php echo base_url();?>assets/js/ie-emulation-modes-warning.js.download"></script>
<script src="<?php echo base_url();?>assets/js/jquery.min.js"></script> <script src="<?php echo base_url();?>assets/js/jquery.min.js"></script>
<script src="<?php echo base_url();?>assets/js/moment.min.js"></script> <script src="<?php echo base_url();?>assets/js/moment.min.js"></script>
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/moment-timezone/0.4.1/moment-timezone-with-data-2010-2020.min.js"></script> -->
<!-- <script src="../assets/js/fullcalendar.min.js"></script> --> <!-- <script src="../assets/js/fullcalendar.min.js"></script> -->
<script>window.jQuery || document.write('<script src="<?php echo base_url();?>assets/js/vendor/jquery.min.js"><\/script>')</script> <script>window.jQuery || document.write('<script src="<?php echo base_url();?>assets/js/vendor/jquery.min.js"><\/script>')</script>
<script src="<?php echo base_url();?>assets/js/bootstrap.min.js"></script> <script src="<?php echo base_url();?>assets/js/bootstrap.min.js"></script>
<script src="<?php echo base_url();?>assets/js/ie10-viewport-bug-workaround.js.download"></script> <script src="<?php echo base_url();?>assets/js/ie10-viewport-bug-workaround.js.download"></script>
<script src="<?php echo base_url();?>assets/js/jquery-ui.js"></script> <script src="<?php echo base_url();?>assets/js/jquery-ui.js"></script>
<script src="<?php echo base_url();?>assets/js/chosen.jquery.min.js"></script>
<!-- <script src="<?php echo base_url();?>assets/js/gmap.js"></script> --> <!-- <script src="<?php echo base_url();?>assets/js/gmap.js"></script> -->
<script src="<?php echo base_url();?>assets/js/slick.min.js"></script> <script src="<?php echo base_url();?>assets/js/slick.min.js"></script>
<script src="<?php echo base_url();?>assets/js/parsley.min.js"></script> <script src="<?php echo base_url();?>assets/js/parsley.min.js"></script>
<script src="<?php echo base_url();?>assets/js/custom.js"></script> <script src="<?php echo base_url();?>assets/js/custom.js"></script>
<script src="<?php echo base_url();?>assets/js/ckeditor.js"></script> <script src="<?php echo base_url();?>assets/ckeditor/ckeditor.js"></script>
<!-- <script src="https://cdn.ckeditor.com/4.5.7/basic/ckeditor.js"></script>; --> <!-- <script src="https://cdn.ckeditor.com/4.5.7/basic/ckeditor.js"></script> -->
<script src="<?php echo base_url();?>assets/js/bootstrap-datepicker.js"></script> <script src="<?php echo base_url();?>assets/js/bootstrap-datepicker.js"></script>
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<link href= "<?php echo base_url();?>assets/css/bootstrap.min.css" rel="stylesheet"> <link href= "<?php echo base_url();?>assets/css/bootstrap.min.css" rel="stylesheet">
<link href="<?php echo base_url();?>assets/css/ie10-viewport-bug-workaround.css" rel="stylesheet"> <link href="<?php echo base_url();?>assets/css/ie10-viewport-bug-workaround.css" rel="stylesheet">
<!-- <link href="../assets/css/fullcalendar.min.css" rel="stylesheet"> --> <!-- <link href="../assets/css/fullcalendar.min.css" rel="stylesheet"> -->
<link href="<?php echo base_url();?>assets/css/chosen.css" rel="stylesheet">
<link href="<?php echo base_url();?>assets/css/parsley.css" rel="stylesheet"> <link href="<?php echo base_url();?>assets/css/parsley.css" rel="stylesheet">
<link href="<?php echo base_url();?>assets/css/custom.css" rel="stylesheet"> <link href="<?php echo base_url();?>assets/css/custom.css" rel="stylesheet">
<link href="<?php echo base_url();?>assets/css/responsive.css" rel="stylesheet"> <link href="<?php echo base_url();?>assets/css/responsive.css" rel="stylesheet">
......
...@@ -960,7 +960,7 @@ unicode-bidi: bidi-override;display: inline-block;position: relative;bottom: 5px ...@@ -960,7 +960,7 @@ unicode-bidi: bidi-override;display: inline-block;position: relative;bottom: 5px
.ip_edit_set_btn1{width:100%;height:35px;outline:none;border-radius:3px;color: #fff;text-align: center;background:#d9d9d9;border:none;font-weight:900;} .ip_edit_set_btn1{width:100%;height:35px;outline:none;border-radius:3px;color: #fff;text-align: center;background:#d9d9d9;border:none;font-weight:900;}
.ip_edit_set_btn2{width:100%;height:35px;outline:none;border-radius:3px;color: #d9d9d9;text-align: center;background:#ffffff;border:none;font-weight:900;border:2px solid #d9d9d9;} .ip_edit_set_btn2{width:100%;height:35px;outline:none;border-radius:3px;color: #d9d9d9;text-align: center;background:#ffffff;border:none;font-weight:900;border:2px solid #d9d9d9;}
.ip_budject_list{width:100%;} .ip_budject_list{width:100%;}
.ip_budject_list li{width:100%;color: #797979;border-bottom:2px solid #f5f5f5;list-style: none;padding-bottom: 10px;padding-top: 10px;font-weight: 900;} .ip_budject_list li{width:100%;color: #797979;border-bottom:0px solid #f5f5f5;list-style: none;padding-bottom: 10px;padding-top: 10px;font-weight: 900;}
.ip_budject_list li .child1{float: left;text-align: left;width:50%;} .ip_budject_list li .child1{float: left;text-align: left;width:50%;}
.ip_budject_list li .child2{float: right;text-align: right;width:50%;} .ip_budject_list li .child2{float: right;text-align: right;width:50%;}
.ip_budject_list .select{border-bottom:1px solid #b31aaa;} .ip_budject_list .select{border-bottom:1px solid #b31aaa;}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
File added
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment