Commit c44ccd74 by Jansa Jose

change text

parent 267f217d
...@@ -1267,10 +1267,15 @@ CASE when tbl_registration.gender='0' then 'MALE' when tbl_registration.gender=' ...@@ -1267,10 +1267,15 @@ CASE when tbl_registration.gender='0' then 'MALE' when tbl_registration.gender='
} }
$check = $this->db->get_where('tbl_booking',array('doctor_id'=>$data['doctor_id'],'clinic_id'=>$data['clinic_id'],'date'=>$data['date'],'time'=>$data['time'],'payment_status'=>'1')); $check = $this->db->get_where('tbl_booking',array('doctor_id'=>$data['doctor_id'],'clinic_id'=>$data['clinic_id'],'date'=>$data['date'],'time'=>$data['time'],'payment_status'=>'1'));
$this->db->select('name,profile_pic,specialization'); $this->db->select('name,profile_pic,specialization');
$doctr_data = $this->db->get_where('tbl_doctors',array('id'=>$data['doctor_id']))->row_array(); $doctr_data = $this->db->get_where('tbl_doctors',array('id'=>$data['doctor_id']))->row_array();
$this->db->select('name');
$pat_data = $this->db->get_where('tbl_registration',array('id'=>$patientid['userid']))->row_array();
$special = $this->db->get_where('tbl_specialization',array('id'=>$doctr_data['specialization']))->row(); $special = $this->db->get_where('tbl_specialization',array('id'=>$doctr_data['specialization']))->row();
$fcm_user = $this->db->get_where('tbl_authtoken',array('userid'=>$patientid['userid']))->row(); $fcm_user = $this->db->get_where('tbl_authtoken',array('userid'=>$patientid['userid']))->row();
$conslt_time = date('Y-m-d h:i:s'); $conslt_time = date('Y-m-d h:i:s');
$conslt_time = strtotime($conslt_time); $conslt_time = strtotime($conslt_time);
$settngs = $this->db->get('settings')->row(); $settngs = $this->db->get('settings')->row();
...@@ -1280,8 +1285,10 @@ CASE when tbl_registration.gender='0' then 'MALE' when tbl_registration.gender=' ...@@ -1280,8 +1285,10 @@ CASE when tbl_registration.gender='0' then 'MALE' when tbl_registration.gender='
$times = explode('-', $data['time']); $times = explode('-', $data['time']);
$start_time = strtotime($date_def.$times[0]); $start_time = strtotime($date_def.$times[0]);
$end_time = strtotime($date_def.$times[1]); $end_time = strtotime($date_def.$times[1]);
$msg = "Your booking for doctor ".$doctr_data['name']." at time ".$data['time']." is confirmed";
$msg2 = "You have a new booking on ".date('jS F Y',$data['date'])." at ".date('h:i A',$start_time); $msg = "Your appointment was scheduled in the system, on ".date('d.m.Y',$start_time)." at ".date('H:i a',$start_time).", doctor ".$doctr_data['name'];
$msg2 = "A new appointment was scheduled in the system, on ".date('d.m.Y',$start_time)." at ".date('H:i a',$start_time).", patient ".decrypt_data($pat_data['name']);
if($this->db->insert('tbl_booking',array('doctor_id'=>$data['doctor_id'],'clinic_id'=>$data['clinic_id'],'patient_id'=>$patientid['userid'],'ipok_fee'=>$ipokefees,'date'=>$data['date'],'time'=>$data['time'],'booking_status'=>'1','payment_status'=>$payment_status,'free_visit_status'=>$free_visit_status,'visit_type'=>$visit,'amount'=>$data['amount'],'promo_name'=>$promo_name,'promo_amount'=>$new_amnt,'payment_type'=>$data['payment_mode'],'total_sum'=>$diff,'time_start'=>$start_time,'time_end'=>$end_time,'requested_date'=>time()))){ if($this->db->insert('tbl_booking',array('doctor_id'=>$data['doctor_id'],'clinic_id'=>$data['clinic_id'],'patient_id'=>$patientid['userid'],'ipok_fee'=>$ipokefees,'date'=>$data['date'],'time'=>$data['time'],'booking_status'=>'1','payment_status'=>$payment_status,'free_visit_status'=>$free_visit_status,'visit_type'=>$visit,'amount'=>$data['amount'],'promo_name'=>$promo_name,'promo_amount'=>$new_amnt,'payment_type'=>$data['payment_mode'],'total_sum'=>$diff,'time_start'=>$start_time,'time_end'=>$end_time,'requested_date'=>time()))){
$insert_id = $this->db->insert_id(); $insert_id = $this->db->insert_id();
...@@ -1339,7 +1346,9 @@ CASE when tbl_registration.gender='0' then 'MALE' when tbl_registration.gender=' ...@@ -1339,7 +1346,9 @@ CASE when tbl_registration.gender='0' then 'MALE' when tbl_registration.gender='
$times = explode('-', $data['time']); $times = explode('-', $data['time']);
$start_time = strtotime($date_def.$times[0]); $start_time = strtotime($date_def.$times[0]);
$end_time = strtotime($date_def.$times[1]); $end_time = strtotime($date_def.$times[1]);
$msg = "Your booking for doctor ".$doctr_data['name']." at time ".$data['time']." is in Waiting list";
$msg = "Your appointment was scheduled in the system as waiting, on ".date('d.m.Y',$start_time)." at ".date('H:i a',$start_time).", doctor ".$doctr_data['name'];
if($this->db->insert('tbl_booking',array('doctor_id'=>$data['doctor_id'],'clinic_id'=>$data['clinic_id'],'patient_id'=>$patientid['userid'],'ipok_fee'=>$ipokefees,'date'=>$data['date'],'time'=>$data['time'],'booking_status'=>'0','payment_status'=>$payment_status,'free_visit_status'=>$free_visit_status,'visit_type'=>$visit,'amount'=>$data['amount'],'promo_name'=>$promo_name,'promo_amount'=>$new_amnt,'payment_type'=>$data['payment_mode'],'total_sum'=>$diff,'time_start'=>$start_time,'time_end'=>$end_time,'requested_date'=>time()))){ if($this->db->insert('tbl_booking',array('doctor_id'=>$data['doctor_id'],'clinic_id'=>$data['clinic_id'],'patient_id'=>$patientid['userid'],'ipok_fee'=>$ipokefees,'date'=>$data['date'],'time'=>$data['time'],'booking_status'=>'0','payment_status'=>$payment_status,'free_visit_status'=>$free_visit_status,'visit_type'=>$visit,'amount'=>$data['amount'],'promo_name'=>$promo_name,'promo_amount'=>$new_amnt,'payment_type'=>$data['payment_mode'],'total_sum'=>$diff,'time_start'=>$start_time,'time_end'=>$end_time,'requested_date'=>time()))){
$insert_id = $this->db->insert_id(); $insert_id = $this->db->insert_id();
if($payment_status == '1'){ if($payment_status == '1'){
...@@ -1905,11 +1914,11 @@ CASE when tbl_doctors.gender='0' then 'MALE' when tbl_doctors.gender='1' then 'F ...@@ -1905,11 +1914,11 @@ CASE when tbl_doctors.gender='0' then 'MALE' when tbl_doctors.gender='1' then 'F
if($rslt){ if($rslt){
$this->db->select('name'); $this->db->select('name');
$doctr_data = $this->db->get_where('tbl_registration',array('id'=>$rslt->userid))->row(); $doctr_data = $this->db->get_where('tbl_registration',array('id'=>$rslt->userid))->row();
$msg = "Your have a new review from ".decrypt_data($doctr_data->name); $query = $this->db->get_where('tbl_booking',array('medical_record_id'=>$data['medical_record_id']))->row();
$msg = "The patient ".decrypt_data($doctr_data->name)." evaluated his consultation on ".date('d.m.Y',$query->time_start);
$data['reviewer_id'] = $rslt->userid; $data['reviewer_id'] = $rslt->userid;
$datetime = Date('Y-m-d h:i:s'); $datetime = Date('Y-m-d h:i:s');
$data['date'] = strtotime($datetime); $data['date'] = strtotime($datetime);
$query = $this->db->get_where('tbl_booking',array('medical_record_id'=>$data['medical_record_id']))->row();
if($query){ if($query){
if($query->medical_record_id != '' || $query->medical_record_id != '0'){ if($query->medical_record_id != '' || $query->medical_record_id != '0'){
$med_data = $this->db->get_where('tbl_medical_records',array('id'=>$data['medical_record_id']))->row(); $med_data = $this->db->get_where('tbl_medical_records',array('id'=>$data['medical_record_id']))->row();
...@@ -2200,11 +2209,14 @@ CASE when tbl_doctors.gender='0' then 'MALE' when tbl_doctors.gender='1' then 'F ...@@ -2200,11 +2209,14 @@ CASE when tbl_doctors.gender='0' then 'MALE' when tbl_doctors.gender='1' then 'F
} }
$nowin_server_addoffset = strtotime($nowin_server_addoffset); $nowin_server_addoffset = strtotime($nowin_server_addoffset);
$this->db->select('name,specialization'); $this->db->select('name,specialization');
$doctr_data = $this->db->get_where('tbl_doctors',array('id'=>$query['doctor_id']))->row_array(); $doctr_data = $this->db->get_where('tbl_doctors',array('id'=>$query['doctor_id']))->row_array();
$special = $this->db->get_where('tbl_specialization',array('id'=>$doctr_data['specialization']))->row(); $special = $this->db->get_where('tbl_specialization',array('id'=>$doctr_data['specialization']))->row();
$msg = "Your booking for doctor ".$doctr_data['name']." at time ".$query['time']."is Cancelled"; $msg = "Your appointment scheduled in the system, on ".date('d.m.Y',$query['time_start'])." at ".date('H:i a',$query['time_start']).", doctor ".$doctr_data['name'] ." is Canceled!";
$msg2 = "Your booking for doctor ".$doctr_data['name']." at time ".$query['time']." is confirmed";
$msg2 = "Your appointment was scheduled in the system, on ".date('d.m.Y',$query['time_start'])." at ".date('H:i a',$query['time_start']).", doctor ".$doctr_data['name'];
$conslt_time = date('Y-m-d h:i:s'); $conslt_time = date('Y-m-d h:i:s');
$conslt_time = strtotime($conslt_time); $conslt_time = strtotime($conslt_time);
if($nowin_server_addoffset < $new_date){ if($nowin_server_addoffset < $new_date){
...@@ -2244,7 +2256,9 @@ CASE when tbl_doctors.gender='0' then 'MALE' when tbl_doctors.gender='1' then 'F ...@@ -2244,7 +2256,9 @@ CASE when tbl_doctors.gender='0' then 'MALE' when tbl_doctors.gender='1' then 'F
$user_type = '1'; $user_type = '1';
$push = $this->push_sent($new,$user_type); $push = $this->push_sent($new,$user_type);
$msg3 = "You have a new booking on ".date('jS F Y',$query['date'])." at ".date('h:i A',$query['time_start']); $this->db->select('name');
$pat_data = $this->db->get_where('tbl_registration',array('id'=>$query['patient_id']))->row_array();
$msg3 = "A new appointment was scheduled in the system, on ".date('d.m.Y',$query['time_start'])." at ".date('H:i a',$query['time_start']).", patient ".decrypt_data($pat_data['name']);
$this->db->insert('tbl_doctor_notifications',array('doctor_id'=>$query['doctor_id'],'type'=>'2','message'=>$msg3,'time'=>$conslt_time,'read_status'=>'0')); $this->db->insert('tbl_doctor_notifications',array('doctor_id'=>$query['doctor_id'],'type'=>'2','message'=>$msg3,'time'=>$conslt_time,'read_status'=>'0'));
$doctor_insert_id = $this->db->insert_id(); $doctor_insert_id = $this->db->insert_id();
$fcm_doctor = $this->db->get_where('tbl_authtoken_doctors',array('doctor_id'=>$query['doctor_id']))->row(); $fcm_doctor = $this->db->get_where('tbl_authtoken_doctors',array('doctor_id'=>$query['doctor_id']))->row();
...@@ -3337,7 +3351,7 @@ CASE when tbl_doctors.gender='0' then 'MALE' when tbl_doctors.gender='1' then 'F ...@@ -3337,7 +3351,7 @@ CASE when tbl_doctors.gender='0' then 'MALE' when tbl_doctors.gender='1' then 'F
$doctr_data = $this->db->get_where('tbl_doctors',array('id'=>$id))->row_array(); $doctr_data = $this->db->get_where('tbl_doctors',array('id'=>$id))->row_array();
$special = $this->db->get_where('tbl_specialization',array('id'=>$doctr_data['specialization']))->row(); $special = $this->db->get_where('tbl_specialization',array('id'=>$doctr_data['specialization']))->row();
$conslt_time = strtotime(date('Y-m-d h:i:s')); $conslt_time = strtotime(date('Y-m-d h:i:s'));
$msg = "Sorry, Your booking at time ".$query->time." is cancelled by ".$doctr_data['name']; $msg = "Your appointment scheduled in the system, on ".date('d.m.Y',$query->time_start)." at ".date('H:i a',$query->time_start).", doctor ".$doctr_data['name'] ." is Canceled!";
if($query){ if($query){
if($query->doctor_id == $id){ if($query->doctor_id == $id){
$this->db->update('tbl_booking',array('booking_status'=>'4'),array('id'=>$data['booking_id'])); $this->db->update('tbl_booking',array('booking_status'=>'4'),array('id'=>$data['booking_id']));
......
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