Samson Mutunga 3 éve
szülő
commit
d8d3bd1926

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

@@ -300,6 +300,14 @@ SELECT effective_date, count(*), sum(number_of_units) as units FROM bill WHERE c
                 break;
         }
 
+        $notes = $query->orderBy('created_at', 'desc')->paginate(30);
+        return view('app.practice-management.notes', compact('notes', 'filter'));
+    }
+
+    public function allNotes(Request $request)
+    {
+        $query = Note::query();
+        
         $filters = $request->all();
 
         $this->filterMultiQuery($request, $query, 'created_at', 'created_at_category', 'created_at_value_1', 'created_at_value_2');
@@ -310,7 +318,7 @@ SELECT effective_date, count(*), sum(number_of_units) as units FROM bill WHERE c
         $notes = $query->orderBy('created_at', 'desc')->paginate(30);
         $allProsWithNotesIDs = Note::pluck('hcp_pro_id')->toArray();
          $allProsWithNotes = Pro::whereIn('id', $allProsWithNotesIDs)->get();
-        return view('app.practice-management.notes', compact('notes', 'filters', 'filter','allProsWithNotes'));
+        return view('app.practice-management.all-notes', compact('notes', 'filters','allProsWithNotes'));
     }
 
     public function dnaNotesPendingMcpSign(Request $request)

+ 65 - 0
resources/views/app/practice-management/all-notes.blade.php

@@ -0,0 +1,65 @@
+@extends ('layouts/template')
+
+@section('content')
+
+<div class="p-3 mcp-theme-1">
+    <div class="card">
+
+        <div class="card-header p-0">
+            <div class="d-flex align-items-center border-bottom px-2 py-1">
+                <strong class="mr-4">
+                    <i class="fas fa-notes-medical"></i>
+                    All Notes
+                </strong>
+            </div>
+            <div class="px-2 py-1">
+                @include('app.practice-management.notes_filters')
+            </div>
+        </div>
+        <div class="card-body p-0">
+
+            <table class="table table-sm table-striped p-0 m-0">
+                <thead class="bg-light">
+                    <tr>
+                        <th class="px-3 border-0">Created</th>
+                        <th class="border-0">Effective Date</th>
+                        <th class="border-0">Patient</th>
+                        <th class="border-0 w-50">Content</th>
+                    </tr>
+                </thead>
+                <tbody>
+                    @foreach ($notes as $note)
+                    <tr class="{{ $note->is_cancelled ? 'cancelled-item always-clickable' : '' }}">
+                        <td class="px-3">
+                            {{ friendly_date_time($note->created_at, true) }}
+                        </td>
+                        <td class="">
+                            <a href="/patients/view/{{ $note->client->uid }}/notes/view/{{ $note->uid }}">
+                                {{ friendly_date_time($note->effective_dateest, false) }}
+                            </a>
+                            <span class="ml-1">{{ $note->is_cancelled ? '[cancelled]' : '' }}</span>
+                        </td>
+                        <td class="">
+                            <a href="/patients/view/{{ $note->client->uid }}">{{ $note->client->displayName() }}</a>
+                        </td>
+                        <td class="">
+                            <?php
+                            $textContent = strip_tags($note->free_text_html);
+                            if (strlen($textContent) > 200) {
+                                $textContent = substr($textContent, 0, 200) . '…';
+                            }
+                            ?>
+                            {!! empty($textContent) ? '-' : $textContent !!}
+                        </td>
+                    </tr>
+                    @endforeach
+                </tbody>
+            </table>
+            <div class="mt-3">
+                {{ $notes->appends(request()->input())->links() }}
+            </div>
+        </div>
+    </div>
+</div>
+
+@endsection

+ 0 - 3
resources/views/app/practice-management/notes.blade.php

@@ -21,9 +21,6 @@
                     </div>
                 </div>
             </div>
-            <div class="px-2 py-1">
-                @include('app.practice-management.notes_filters')
-            </div>
         </div>
         <div class="card-body p-0">
 

+ 1 - 1
resources/views/layouts/template.blade.php

@@ -165,7 +165,7 @@
                             <a class="dropdown-item" href="{{ route('practice-management.client-ccm-rm-status') }}">Client RM Status</a>
                             <a class="dropdown-item" href="{{ route('practice-management.rmActionReport') }}">RM Action Report</a>
                             <a class="dropdown-item" href="{{ route('practice-management.hcp-note-activity') }}">HCP Note Activity</a>
-                            <a class="dropdown-item" href="{{ route('practice-management.notes') }}">Notes</a>
+                            <a class="dropdown-item" href="{{ route('practice-management.allNotes') }}">All Notes</a>
                             
                             @if($pro->id == '1' || $pro->id == '16')
                                 <a class="dropdown-item" href="{{ route('practice-management.treatmentServiceUtil') }}">Treatment Service Util.</a>

+ 1 - 0
routes/web.php

@@ -244,6 +244,7 @@ Route::middleware('pro.auth')->group(function () {
         Route::get('w9', 'PracticeManagementController@w9')->name('w9');
         Route::get('contract', 'PracticeManagementController@contract')->name('contract');
         Route::get('notes/{filter?}', 'PracticeManagementController@notes')->name('notes');
+        Route::get('all-notes', 'PracticeManagementController@allNotes')->name('allNotes');
         Route::get('dna-notes-pending-mcp-sign', 'PracticeManagementController@dnaNotesPendingMcpSign')->name('dna-notes-pending-mcp-sign');
         Route::get('na-billable-signed-notes/{filter?}', 'PracticeManagementController@naBillableSignedNotes')->name('na-billable-signed-notes');
         Route::get('bills/{filter?}', 'PracticeManagementController@bills')->name('bills');