Эх сурвалжийг харах

Patient lists/search etc. don't show if "no longer interested"

Vijayakrishnan 3 жил өмнө
parent
commit
d01eb906a6

+ 1 - 1
app/Http/Controllers/AdminController.php

@@ -38,7 +38,7 @@ class AdminController extends Controller
     public function patients(Request $request)
     {
         $filters = $request->all();
-        $patients = Client::whereNull('shadow_pro_id');
+        $patients = Client::whereNull('shadow_pro_id')->where('client_engagement_status_category', '!=', 'NO_LONGER_INTERESTED');
 
         // filters
         /*

+ 1 - 1
app/Http/Controllers/DnaController.php

@@ -39,7 +39,7 @@ class DnaController extends Controller
     public function patients(Request $request)
     {
         $filters = $request->all();
-        $patients = Client::whereNull('shadow_pro_id')->where('default_na_pro_id', $this->performer->pro->id);
+        $patients = Client::whereNull('shadow_pro_id')->where('default_na_pro_id', $this->performer->pro->id)->where('client_engagement_status_category', '!=', 'NO_LONGER_INTERESTED');
 
         if ($request->input('name')) {
             $name = trim($request->input('name'));

+ 1 - 0
app/Http/Controllers/HomeController.php

@@ -1707,6 +1707,7 @@ WHERE measurement.label NOT IN ('SBP', 'DBP')
         }
 
         $clientQuery= Client::whereNull('shadow_pro_id')
+            ->where('client_engagement_status_category', '!=', 'NO_LONGER_INTERESTED')
             ->where(function ($q) use ($term, $phoneNumberTerm) {
                 $q->where('name_first', 'ILIKE', '%' . $term . '%')
                     ->orWhere('name_last', 'ILIKE', '%' . $term . '%')

+ 1 - 1
app/Http/Controllers/McpController.php

@@ -39,7 +39,7 @@ class McpController extends Controller
     public function patients(Request $request)
     {
         $filters = $request->all();
-        $patients = Client::whereNull('shadow_pro_id');
+        $patients = Client::whereNull('shadow_pro_id')->where('client_engagement_status_category', '!=', 'NO_LONGER_INTERESTED');
         
         //TODO: implement in admin controller 
         if($this->performer->pro->pro_type != 'ADMIN'){

+ 1 - 1
resources/views/app/dna/DnaController.php

@@ -36,7 +36,7 @@ class DnaController extends Controller
     public function patients(Request $request)
     {
         $filters = $request->all();
-        $patients = Client::whereNull('shadow_pro_id')->where('default_na_pro_id', $this->performer->pro->id);
+        $patients = Client::whereNull('shadow_pro_id')->where('default_na_pro_id', $this->performer->pro->id)->where('client_engagement_status_category', '!=', 'NO_LONGER_INTERESTED');
 
         if ($request->input('name')) {
             $name = trim($request->input('name'));