Explorar o código

added orderby on claims summary

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

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

@@ -878,13 +878,13 @@ class PracticeManagementController extends Controller
 
         //Patient | MCP | # Notes Total | # Notes without Billing Closed | # Notes without Claiming Closed
         $patientsQuery = Client::where('is_dummy', '=', false)
-            ->select('id', 'uid', 'name_first', 'name_last', 'mcp_pro_id',
+            ->select('id', 'uid', 'name_first', 'name_last', 'mcp_pro_id','is_part_b_primary','medicare_advantage_plan',
                 DB::raw("(SELECT name_first||' '||name_last FROM pro where pro.id = client.mcp_pro_id) as mcp"),
                 DB::raw("(SELECT uid FROM pro where pro.id = mcp_pro_id) as mcp_pro_uid"),
                 DB::raw("(SELECT COUNT(*) FROM note where note.client_id = client.id) as notes_total"),
                 DB::raw("(SELECT COUNT(*) FROM note where note.client_id = client.id AND is_bill_closed IS NOT true) as notes_without_billing_closed"),
                 DB::raw("(SELECT COUNT(*) FROM note where note.client_id = client.id AND is_claim_closed IS NOT true) as notes_without_claiming_closed")
-            )->orderBy('notes_without_claiming_closed', 'desc');
+            )->orderBy('is_part_b_primary', 'desc')->orderBy('notes_without_claiming_closed', 'desc');
 
             if($proUid){
                 $mcpPro = Pro::where('uid', $proUid)->first();