浏览代码

Treatment Service Utilization - link to day's notes on billing manager

Vijayakrishnan 4 年之前
父节点
当前提交
11feae90a0

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

@@ -531,6 +531,10 @@ class PracticeManagementController extends Controller
             $notes = Note::where('id', '>', 0);
         }
 
+        if($request->input('date')) {
+            $notes = $notes->where('effective_dateest', $request->input('date'));
+        }
+
         $filters = [];
         $filters['bills_created'] = $request->input('bills_created');
         $filters['is_billing_marked_done'] = $request->input('is_billing_marked_done');
@@ -583,7 +587,7 @@ class PracticeManagementController extends Controller
                 true);
         }
 
-        $notes = $notes->orderBy('effective_dateest', 'desc')->paginate();
+        $notes = $notes->orderBy('effective_dateest', 'desc')->paginate(10);
 
         return view('app.practice-management.billing-manager', compact('notes', 'allPros', 'expectedForHcp', 'targetPro', 'proUid', 'filters'));
     }

+ 1 - 1
public/js/mc.js

@@ -18,7 +18,7 @@ $(document).ready(function () {
 
     if(!window.noMc){
         if (window.location.pathname === window.top.location.pathname) {
-            window.top.location.href = '/mc' + window.location.pathname;
+            window.top.location.href = '/mc' + window.location.pathname + window.location.search;
             return;
         }
     }

+ 11 - 4
resources/views/app/practice-management/billing-manager.blade.php

@@ -7,10 +7,14 @@
         <div class="card">
 
             <div class="card-header px-3 py-2 d-flex align-items-center">
-                <strong class="mr-4">
+                <strong class="mr-4 font-size-14">
                     <i class="fas fa-user-injured"></i>
                     Billing Manager
+                    @if(request()->input('date'))
+                        - Notes on {{friendlier_date(request()->input('date'))}}
+                    @endif
                 </strong>
+                @if(!request()->input('popupmode'))
                 <select class="ml-auto max-width-300px form-control form-control-sm"
                         onchange="fastLoad('/practice-management/billing-manager/' + this.value, true, false, false)">
                     <option value="" {{ $proUid === '' ? 'selected' : '' }}>All Pros</option>
@@ -18,7 +22,9 @@
                         <option value="{{$_pro->uid}}" {{ $proUid === $_pro->uid ? 'selected' : '' }}>{{$_pro->displayName()}}</option>
                     @endforeach
                 </select>
+                @endif
             </div>
+            @if(!request()->input('popupmode'))
             <div class="bg-aliceblue border-bottom px-3 py-2 d-flex align-items-center">
                 <div class="d-inline-flex align-items-center">
                     <span class="border-bottom c-pointer" title="Filter notes with/without bills on them">Bills Created</span>
@@ -76,6 +82,7 @@
                 </div>
                 <a href="/practice-management/billing-manager" class="ml-auto">Clear Filters</a>
             </div>
+            @endif
             <div class="card-body p-0">
                 <table class="table table-sm table-condensed p-0 m-0">
                     <thead class="bg-light">
@@ -98,7 +105,7 @@
                     @foreach ($notes as $note)
                         <tr class="{{ $note->is_cancelled ? 'cancelled-item always-clickable' : '' }}">
                             <td class="">
-                                <a href="/patients/view/{{ $note->client->uid }}">{{ $note->client->displayName() }}</a>
+                                <a {{ request()->input('popupmode') ? 'native target="_blank"' : '' }} href="/patients/view/{{ $note->client->uid }}">{{ $note->client->displayName() }}</a>
                             </td>
                             <td class="">
                                 <div class="font-weight-bold">{{ friendly_date_time($note->effective_dateest, false) }}</div>
@@ -108,7 +115,7 @@
                                     <i class="fa fa-eye"></i>
                                     View
                                 </a>
-                                <a href="/patients/view/{{ $note->client->uid }}/notes/view/{{ $note->uid }}"
+                                <a {{ request()->input('popupmode') ? 'native target="_blank"' : '' }} href="/patients/view/{{ $note->client->uid }}/notes/view/{{ $note->uid }}"
                                    class="d-block text-nowrap mt-1">
                                     <i class="fa fa-external-link-alt"></i>
                                     Open
@@ -212,7 +219,7 @@
                     </tbody>
                 </table>
                 <div>
-                    {{$notes->links()}}
+                    {{$notes->withQueryString()->links()}}
                 </div>
             </div>
         </div>

+ 10 - 1
resources/views/app/practice-management/treatment-services-util.blade.php

@@ -34,7 +34,16 @@
                                 {{ $dowMap[date('w', strtotime($x->effective_date))] }}
                             </td>
                             <td>{{$x->total_hrs}}</td>
-                            <td>{{$x->total_bills}}</td>
+                            <td>
+                                <span class="d-inline-block width-50px">{{$x->total_bills}}</span>
+                                <a native target="_blank"
+                                   class="text-sm"
+                                   title="Billing Manager - Notes on {{friendlier_date($x->effective_date)}}"
+                                   href="/practice-management/billing-manager?date={{$x->effective_date}}">
+                                    <i class="fa fa-external-link-alt"></i>
+                                    &nbsp;View
+                                </a>
+                            </td>
                             <td>{{$x->total_pros}}</td>
                         </tr>
                     @endforeach