unknown 4 vuotta sitten
vanhempi
commit
4bea173cac
1 muutettua tiedostoa jossa 2 lisäystä ja 0 poistoa
  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);