Browse Source

Patients list: Show only patients the pro has access to

Vijayakrishnan Krishnan 5 years ago
parent
commit
bb69a64d86
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/Http/Controllers/HomeController.php

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

@@ -75,7 +75,7 @@ class HomeController extends Controller
                     ->orWhere('cm_pro_id', $proID)
                     ->orWhere('rmm_pro_id', $proID)
                     ->orWhere('rme_pro_id', $proID)
-                    ->orWhereRaw('id IN (SELECT client_id FROM client_pro_access WHERE pro_id = ?)', [$proID]);
+                    ->orWhereRaw('id IN (SELECT client_id FROM client_pro_access WHERE is_active AND pro_id = ?)', [$proID]);
             })
             ->orderBy('name_last', 'asc')
             ->orderBy('name_first', 'asc')