Преглед на файлове

formatted rm action report

= преди 3 години
родител
ревизия
345f23171f
променени са 2 файла, в които са добавени 19 реда и са изтрити 2 реда
  1. 2 2
      app/Http/Controllers/PracticeManagementController.php
  2. 17 0
      resources/views/app/practice-management/rm-action-report.blade.php

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

@@ -2482,11 +2482,11 @@ ORDER BY c.name_last, c.name_first
         if($hasRecentVisit){
             if($hasRecentVisit == 'YES'){
                 $cmQuery = $cmQuery->whereHas('client', function($clientQuery) {
-                    return $clientQuery->whereRaw("most_recent_completed_mcp_note_date::DATE >= ((NOW() - interval '60 days')::DATE)");
+                    return $clientQuery->whereRaw("most_recent_completed_mcp_note_date::DATE >= ((NOW() - interval '90 days')::DATE)");
                 });
             }else{
                 $cmQuery = $cmQuery->whereHas('client', function($clientQuery) {
-                    return $clientQuery->whereRaw("most_recent_completed_mcp_note_date::DATE < ((NOW() - interval '60 days')::DATE)");
+                    return $clientQuery->whereRaw("most_recent_completed_mcp_note_date::DATE < ((NOW() - interval '90 days')::DATE)");
                 });
             }
         }

+ 17 - 0
resources/views/app/practice-management/rm-action-report.blade.php

@@ -93,6 +93,8 @@
                         <th>Care Month</th>
                         <th>MCP</th>
                         <th>Number of Measurement Days</th>
+                        <th>Has Been Spoken To This Month</th>
+                        <th>Days Since Last Visit</th>
                         <th>Last Visit Date</th>
                     </tr>
                 </thead>
@@ -119,6 +121,21 @@
                         <td>
                             {{$row->number_of_days_with_remote_measurements}}
                         </td>
+                        <td>
+                            {{$row->has_anyone_interacted_with_client_about_rm_outside_note? 'YES': 'NO'}}
+                        </td>
+                        <td>
+                            @if($row->client->most_recent_completed_mcp_note_date)
+                                @php 
+                                    $date1 = new DateTime(friendly_date($row->client->most_recent_completed_mcp_note_date));
+                                    $date2 = new DateTime(get_current_date());
+                                    $diff = $date1->diff($date2);
+                                @endphp 
+                                {{ $diff->days}}
+                            @else 
+                            --
+                            @endif
+                        </td>
                         <td>
                             @if($row->client->mostRecentCompletedMcpNote)
                             <a href="/patients/view/{{$row->client->uid}}/notes/view/{{$row->client->mostRecentCompletedMcpNote->uid}}">