Selaa lähdekoodia

fixed patient filter

= 3 vuotta sitten
vanhempi
commit
dae959d2de

+ 11 - 0
app/Http/Controllers/AdminController.php

@@ -82,6 +82,17 @@ class AdminController extends Controller
                 break;
         }
 
+        $initiative = $request->input('initiative');
+        if($initiative){
+            $wildCardedInitiative = '%'.$initiative.'%';
+            $patients->where('initiative', 'ilike', $wildCardedInitiative);
+        }
+
+        $include_test_records = $request->input('include_test_records');
+        if(!$include_test_records){
+            $patients->where('client_engagement_status_category', '<>', 'DUMMY');
+        }
+
         $patients = $patients->orderBy('created_at', 'DESC')->paginate(20);
         return view('app.mcp.patients', compact('patients', 'filters'));
     }

+ 2 - 0
app/Http/Controllers/McpController.php

@@ -110,6 +110,8 @@ class McpController extends Controller
             $patients->where('client_engagement_status_category', '<>', 'DUMMY');
         }
 
+        dd("HERE");
+
         $patients = $patients->orderBy('created_at', 'DESC')->paginate(50);
         return view('app.mcp.patients', compact('patients', 'filters'));
     }