unknown %!s(int64=4) %!d(string=hai) anos
pai
achega
4bea173cac
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      app/Http/Controllers/PracticeManagementController.php

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

@@ -990,6 +990,8 @@ class PracticeManagementController extends Controller
 
         $patientsQuery->whereRaw('(SELECT COUNT(*) FROM note where note.client_id = client.id) > 0');
 
+        $patientsQuery->whereRaw('((SELECT COUNT(*) FROM note where note.client_id = client.id AND is_bill_closed IS NOT true) != 0 && (SELECT COUNT(*) FROM note where note.client_id = client.id AND is_claim_closed IS NOT true) !=0)');
+
         $patientsQuery->orderBy('notes_without_claiming_closed', 'DESC');
 
         $patients = $patientsQuery->paginate(50);