Samson Mutunga 3 vuotta sitten
vanhempi
commit
83a3022faf

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

@@ -2888,7 +2888,7 @@ ORDER BY c.name_last, c.name_first
         $claimingClosed = $request->get('claiming_closed');
         if($claimingClosed){
             if($claimingClosed === 'YES') $cmQuery = $cmQuery->where('is_claim_closed', true);
-            if($claimingClosed === 'YES') $cmQuery = $cmQuery->where('is_claim_closed', false);
+            if($claimingClosed === 'NO') $cmQuery = $cmQuery->where('is_claim_closed', false);
         }
 
         $rows = $cmQuery->paginate(50);

+ 4 - 0
app/Models/Bill.php

@@ -25,6 +25,10 @@ class Bill extends Model
         return $this->hasOne(Pro::class, 'id', 'hcp_pro_id');
     }
 
+    public function rmmPro() {
+        return $this->hasOne(Pro::class, 'id', 'rmm_pro_id');
+    }
+
     public function ally() {
         return $this->hasOne(Pro::class, 'id', 'na_pro_id');
     }

+ 19 - 5
resources/views/app/practice-management/rm-action-report.blade.php

@@ -23,6 +23,9 @@
 	.sm-section {
 		width: 250px !important;
 	}
+    thead.border-bottom-0 tr th {
+        border-bottom: none;
+    }
 </style>
 <div id="rm-action-report" class="p-3 mcp-theme-1">
     <div class="card">
@@ -105,7 +108,7 @@
                 </form>
             </div> 
             <table class="table table-sm table-striped table-bordered border-0 p-0 m-0 text-nowrap">
-                <thead class="bg-light">
+                <thead class="bg-light border-bottom-0">
                     <tr>
                         <th>Care Month</th>
                         <th>Patient</th>                        
@@ -146,15 +149,15 @@
                             </a>
                         </td>                        
                         <td>
-                            @if($row->client->mcp)
-                                {{$row->client->mcp->name_first}} {{$row->client->mcp->name_last}}
+                            @if($row->mcp)
+                                {{$row->mcp->name_first}} {{$row->mcp->name_last}}
                             @else 
                                 --
                             @endif
                         </td>
                         <td>
-                            @if($row->client->rmm)
-                                {{$row->client->rmm->name_first}} {{$row->client->rmm->name_last}}
+                            @if($row->rmmPro)
+                                {{$row->rmmPro->name_first}} {{$row->rmmPro->name_last}}
                             @else 
                                 --
                             @endif
@@ -164,24 +167,35 @@
                         </td>
                         <td>
                             <!-- Most Recent Visit -->
+                            @if($row->client->mostRecentCompletedMcpNote)
+                            <a href="/patients/view/{{ $row->patient->uid }}/notes/view/{{ $row->client->mostRecentCompletedMcpNote->uid }}">{{ friendly_date($row->client->most_recent_completed_mcp_note_date) }}</a>
+                            @else
+                                -
+                            @endif
                         </td>
                         <td>
                             <!-- Most Recent Visit Days Before EOM -->
+                            {{ $row->days_between_most_recent_mcp_note_date_and_end_of_care_month ?? '-' }}
                         </td>
                         <td>
                             <!-- # Minutes Billed by MCP -->
+                            {{ $row->rm_total_time_in_seconds_by_mcp / 60 }}
                         </td>
                         <td>
                             <!-- # Minutes Billed by RMM -->
+                            {{ $row->rm_total_time_in_seconds_by_rmm / 60 }}
                         </td>
                         <td>
                             <!-- # Minutes Billed Total -->
+                            {{ $row->rmTotalTimeInSeconds / 60 }}
                         </td>
                         <td>
                             <!-- Has Admin interacted? -->
+                            {{ $row->has_admin_interacted_with_client_about_rm }}
                         </td>
                         <td>
                             <!-- Has MCP interacted? -->
+                            {{ $row->has_mcp_interacted_with_client_about_rm }}
                         </td>
                         <td>
                             <!-- Is Payable to MCP? -->