Commit ce9149f8 by Jansa Jose

search doctor

parent afebd415
...@@ -1049,7 +1049,7 @@ class Webservice_model extends CI_Model { ...@@ -1049,7 +1049,7 @@ class Webservice_model extends CI_Model {
tbl_doctors.domiciliary_status, tbl_doctors.domiciliary_status,
tbl_doctors.online_status as online, tbl_doctors.online_status as online,
tbl_specialization.specialization_name AS specialisation, tbl_specialization.specialization_name AS specialisation,
tbl_clinic.id as clinic_id, DISTINCT(tbl_clinic.id) as clinic_id,
tbl_clinic.name as clinic_name, tbl_clinic.name as clinic_name,
ROUND(( 6371 * acos( cos( radians({$lat}) ) * cos( radians( `tbl_clinic`.`location_lattitude` ) ) * cos( radians( `tbl_clinic`.`location_longitude` ) - radians({$lng}) ) + sin( radians({$lat}) ) * sin( radians( `tbl_clinic`.`location_lattitude` ) ) ) )) AS distance ROUND(( 6371 * acos( cos( radians({$lat}) ) * cos( radians( `tbl_clinic`.`location_lattitude` ) ) * cos( radians( `tbl_clinic`.`location_longitude` ) - radians({$lng}) ) + sin( radians({$lat}) ) * sin( radians( `tbl_clinic`.`location_lattitude` ) ) ) )) AS distance
"); ");
...@@ -1125,7 +1125,7 @@ class Webservice_model extends CI_Model { ...@@ -1125,7 +1125,7 @@ class Webservice_model extends CI_Model {
} }
$query = $this->db->get(); $query = $this->db->get();
//echo $this->db->last_query();exit(); echo $this->db->last_query();exit();
//print_r($this->db->last_query());die(); //print_r($this->db->last_query());die();
if ($query->num_rows() > 0) { if ($query->num_rows() > 0) {
$return_array = array('status'=>'success','data'=>$query->result_array()); $return_array = array('status'=>'success','data'=>$query->result_array());
...@@ -2614,7 +2614,7 @@ class Webservice_model extends CI_Model { ...@@ -2614,7 +2614,7 @@ class Webservice_model extends CI_Model {
$result->patient_review_id = $res->id; $result->patient_review_id = $res->id;
$result->patient_review = $res->patient_review; $result->patient_review = decrypt_data($res->patient_review);
$result->medical_record_id = $res->id; $result->medical_record_id = $res->id;
$result->medical_record_date = $result->date; $result->medical_record_date = $result->date;
$payment = array(); $payment = array();
...@@ -2631,7 +2631,7 @@ class Webservice_model extends CI_Model { ...@@ -2631,7 +2631,7 @@ class Webservice_model extends CI_Model {
unset($result->amount); unset($result->amount);
$anamnese = array(); $anamnese = array();
$anamse_details = json_decode($res->diseases); $anamse_details = decrypt_data(json_decode($res->diseases));
//echo"<pre>";print_r($anamse_details->anamnese);echo"</pre>";exit(); //echo"<pre>";print_r($anamse_details->anamnese);echo"</pre>";exit();
foreach ($anamse_details->anamnese as $key => $value) { foreach ($anamse_details->anamnese as $key => $value) {
$ke = strtolower($key); $ke = strtolower($key);
...@@ -2639,8 +2639,8 @@ class Webservice_model extends CI_Model { ...@@ -2639,8 +2639,8 @@ class Webservice_model extends CI_Model {
} }
unset($anamse_details->anamnese); unset($anamse_details->anamnese);
$anamse_details->anamnese = (object)$new; $anamse_details->anamnese = (object)$new;
$anamse_details->anamnese->principal_problem = $res->main_complaint; $anamse_details->anamnese->principal_problem = decrypt_data($res->main_complaint);
$anamse_details->anamnese->description = strip_tags($res->description); $anamse_details->anamnese->description = decrypt_data(strip_tags($res->description));
if(in_array('hepatitis',$anamse_details->anamnese->others)){ if(in_array('hepatitis',$anamse_details->anamnese->others)){
$anamse_details->anamnese->has_hepatitis= true; $anamse_details->anamnese->has_hepatitis= true;
...@@ -2668,7 +2668,7 @@ class Webservice_model extends CI_Model { ...@@ -2668,7 +2668,7 @@ class Webservice_model extends CI_Model {
unset($anamse_details->anamnese->others); unset($anamse_details->anamnese->others);
$result->anamnese = $anamse_details->anamnese; $result->anamnese = $anamse_details->anamnese;
$prescrib = json_decode($res->prescribtions); $prescrib = decrypt_data(json_decode($res->prescribtions));
$med = array(); $med = array();
foreach ($prescrib as $key => $value) { foreach ($prescrib as $key => $value) {
$med_data = $this->db->get_where('tbl_medicine',array('medicine_name'=>$value->name,'medicine_dosage'=>$value->quantity))->row(); $med_data = $this->db->get_where('tbl_medicine',array('medicine_name'=>$value->name,'medicine_dosage'=>$value->quantity))->row();
...@@ -2679,7 +2679,7 @@ class Webservice_model extends CI_Model { ...@@ -2679,7 +2679,7 @@ class Webservice_model extends CI_Model {
} }
$result->prescriptions = $med; $result->prescriptions = $med;
$exams = json_decode($res->exams); $exams = decrypt_data(json_decode($res->exams));
$exam = array(); $exam = array();
foreach ($exams as $key => $value) { foreach ($exams as $key => $value) {
$exam[$key]['exam'] = $value->procedure; $exam[$key]['exam'] = $value->procedure;
...@@ -2687,7 +2687,7 @@ class Webservice_model extends CI_Model { ...@@ -2687,7 +2687,7 @@ class Webservice_model extends CI_Model {
} }
$result->exams = $exam; $result->exams = $exam;
$budgett = json_decode($res->budget); $budgett = decrypt_data(json_decode($res->budget));
$budgt = array(); $budgt = array();
$budget=array(); $budget=array();
$sum = 0; $sum = 0;
...@@ -2702,14 +2702,14 @@ class Webservice_model extends CI_Model { ...@@ -2702,14 +2702,14 @@ class Webservice_model extends CI_Model {
$result->budget = $budget; $result->budget = $budget;
$medical = array(); $medical = array();
$medi = json_decode($res->letters); $medi = decrypt_data(json_decode($res->letters));
$medical[0]['title'] = ''; $medical[0]['title'] = '';
$medical[0]['certificate'] = strip_tags($medi->certificate); $medical[0]['certificate'] = strip_tags($medi->certificate);
$result->medical_certificates = $medical; $result->medical_certificates = $medical;
$photos = json_decode($res->images); $photos = json_decode($res->images);
$result->attached_images = $photos; $result->attached_images = $photos;
$result->other_observations = strip_tags($res->other_observations); $result->other_observations = decrypt_data(strip_tags($res->other_observations));
//echo "<pre>";print_r($result);echo"</pre>";exit(); //echo "<pre>";print_r($result);echo"</pre>";exit();
$return_array = array('status'=>'success','data'=>$result); $return_array = array('status'=>'success','data'=>$result);
......
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