Commit ae831db4 by Jansa Jose

start consultation

parent 0791305a
......@@ -3511,6 +3511,10 @@ CASE when tbl_doctors.gender='0' then 'MALE' when tbl_doctors.gender='1' then 'F
$query = $this->db->get_where('tbl_booking',array('id'=>$data['booking_id']))->row();
if($query){
$this->db->update('tbl_booking',array('booking_status'=>'2'),array('id'=>$data['booking_id']));
$new['main_complaint'] = null;
$this->db->insert('tbl_medical_records',$new);
$last_id = $this->db->insert_id();
$this->db->update('tbl_booking',array('medical_record_id'=>$last_id),array('id'=>$data['booking_id']));
$result = array('status'=>'success');
}else{
$result = array('status'=>'failed','message'=>'Invalid Booking Id');
......@@ -3685,7 +3689,7 @@ CASE when tbl_doctors.gender='0' then 'MALE' when tbl_doctors.gender='1' then 'F
}else{
$return = array('status'=>'failed','message'=>'Something Went Wrong..Try Again Later!');
}
}else{
}/*else{
$this->db->insert('tbl_medical_records',$new);
$last_id = $this->db->insert_id();
if($this->db->update('tbl_booking',array('medical_record_id'=>$last_id),array('id'=>$data['booking_id']))){
......@@ -3693,7 +3697,7 @@ CASE when tbl_doctors.gender='0' then 'MALE' when tbl_doctors.gender='1' then 'F
}else{
$return = array('status'=>'failed','message'=>'Something Went Wrong..Try Again Later!');
}
}
}*/
}else{
$return = array('status'=>'failed','message'=>'Invalid Doctor');
}
......
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