diff --git a/admin/application/models/Webservice_model.php b/admin/application/models/Webservice_model.php
index 2e248e9..1d9883e 100644
--- a/admin/application/models/Webservice_model.php
+++ b/admin/application/models/Webservice_model.php
@@ -1049,7 +1049,7 @@ class Webservice_model extends CI_Model {
 							tbl_doctors.domiciliary_status,
 							tbl_doctors.online_status as online,
 							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,
 							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 {
  		}
  		
  		$query = $this->db->get(); 
-		//echo $this->db->last_query();exit();
+		echo $this->db->last_query();exit();
 		//print_r($this->db->last_query());die();
 		if ($query->num_rows() > 0) {
 			$return_array = array('status'=>'success','data'=>$query->result_array());
@@ -2614,7 +2614,7 @@ class Webservice_model extends CI_Model {
 		
 
 			$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_date = $result->date;
 			$payment = array();
@@ -2631,7 +2631,7 @@ class Webservice_model extends CI_Model {
 			 unset($result->amount);
 
 			 $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();
 			  foreach ($anamse_details->anamnese as $key => $value) {
 			 	$ke = strtolower($key);
@@ -2639,8 +2639,8 @@ class Webservice_model extends CI_Model {
 			 }
 			 unset($anamse_details->anamnese);
 			 $anamse_details->anamnese = (object)$new;
-			 $anamse_details->anamnese->principal_problem = $res->main_complaint;
-			 $anamse_details->anamnese->description = strip_tags($res->description);
+			 $anamse_details->anamnese->principal_problem = decrypt_data($res->main_complaint);
+			 $anamse_details->anamnese->description = decrypt_data(strip_tags($res->description));
 
          	if(in_array('hepatitis',$anamse_details->anamnese->others)){
          		 $anamse_details->anamnese->has_hepatitis= true;
@@ -2668,7 +2668,7 @@ class Webservice_model extends CI_Model {
          	unset($anamse_details->anamnese->others);
           	$result->anamnese = $anamse_details->anamnese;
           	
-          	$prescrib = json_decode($res->prescribtions);
+          	$prescrib = decrypt_data(json_decode($res->prescribtions));
           	$med = array();
           	foreach ($prescrib as $key => $value) {
           		$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 {
             }
           	$result->prescriptions = $med;
 
-          	$exams = json_decode($res->exams);
+          	$exams = decrypt_data(json_decode($res->exams));
           	$exam = array();
           	foreach ($exams as $key => $value) {
             	$exam[$key]['exam'] = $value->procedure;
@@ -2687,7 +2687,7 @@ class Webservice_model extends CI_Model {
             }
           	$result->exams = $exam;
 
-          	$budgett = json_decode($res->budget);
+          	$budgett = decrypt_data(json_decode($res->budget));
           	$budgt = array();
           	$budget=array();
           	$sum = 0;
@@ -2702,14 +2702,14 @@ class Webservice_model extends CI_Model {
             $result->budget = $budget;
 
             $medical = array();
-			$medi = json_decode($res->letters);
+			$medi = decrypt_data(json_decode($res->letters));
             $medical[0]['title'] = '';
             $medical[0]['certificate'] = strip_tags($medi->certificate);
             $result->medical_certificates = $medical;
 
             $photos = json_decode($res->images);
             $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();
 			$return_array = array('status'=>'success','data'=>$result);