Browse Source

Admin: incoming reports not signed - new matrix + link

Vijayakrishnan 3 năm trước cách đây
mục cha
commit
c077163cba

+ 14 - 0
app/Http/Controllers/PracticeManagementController.php

@@ -9,6 +9,7 @@ use App\Models\ClaimEDI;
 use App\Models\ClientProChange;
 use App\Models\Company;
 use App\Models\Handout;
+use App\Models\IncomingReport;
 use App\Models\MBClaim;
 use App\Models\Measurement;
 use App\Models\Bill;
@@ -53,6 +54,19 @@ use App\Models\ClientReviewRequest;
 class PracticeManagementController extends Controller
 {
 
+    public function incomingReports(Request $request, $filter = '')
+    {
+        $incomingReports = IncomingReport::where('is_entry_error', '<>', true);
+        if($filter === 'not-signed') {
+            $incomingReports = $incomingReports->where('has_hcp_pro_signed', '<>', true);
+        }
+        else if($filter === 'signed') {
+            $incomingReports = $incomingReports->where('has_hcp_pro_signed', true);
+        }
+        $incomingReports = $incomingReports->paginate(25);
+        return view('app.practice-management.incoming-reports', compact('incomingReports', 'filter'));
+    }
+
     public function rpmMatrix(Request $request)
     {
         $proID = $this->performer()->pro->id;

+ 1 - 1
resources/views/app/dashboard-admin.blade.php

@@ -66,7 +66,7 @@
                                 </tr>
                                 <tr>
                                     <th class="px-2 text-center">{{$pro->get_incoming_reports_pending_signature_count_as_admin()}}</th>
-                                    <th class="pl-2 font-weight-normal">Reports Pending Signature</th>
+                                    <th class="pl-2 font-weight-normal"><a href="/practice-management/incoming-reports/not-signed">Reports Pending Signature</a></th>
                                 </tr>
 
                                 <tr>

+ 80 - 0
resources/views/app/practice-management/incoming-reports.blade.php

@@ -0,0 +1,80 @@
+@extends ('layouts/template')
+
+@section('content')
+
+    <div class="p-3 mcp-theme-1">
+
+        <div class="card">
+
+            <div class="card-header px-3 py-2 d-flex align-items-center">
+                <strong class="mr-4">
+                    <i class="fas fa-table"></i>
+                    Incoming Reports
+                </strong>
+                <select class="ml-auto max-width-300px form-control form-control-sm"
+                        onchange="fastLoad('/practice-management/incoming-reports/' + this.value, true, false, false)">
+                    <option value="">All</option>
+                    <option {{$filter === 'not-signed' ? 'selected' : ''}} value="not-signed">Not Signed</option>
+                    <option {{$filter === 'signed' ? 'selected' : ''}} value="signed">Signed</option>
+                </select>
+            </div>
+            <div class="card-body p-0">
+                <table class="table table-striped table-sm table-bordered mb-0">
+                    <thead>
+                    <tr>
+                        <th class="px-2 text-secondary">Created</th>
+                        <th class="px-2 text-secondary">Patient</th>
+                        <th class="px-2 text-secondary">Pro</th>
+                        <th class="px-2 text-secondary">Report Date</th>
+                        <th class="px-2 text-secondary">Report</th>
+                        <th class="px-2 text-secondary">Title</th>
+                        <th class="px-2 text-secondary">Category</th>
+                        <th class="px-2 text-secondary">Memo</th>
+                    </tr>
+                    </thead>
+                    <tbody>
+                    @foreach($incomingReports as $document)
+                        <tr class="{{$document->is_entry_error ? 'entry-error' : ''}}">
+                            <td class="px-2 text-nowrap">
+                                <a href="/patients/view/{{$document->patient->uid}}/incoming-reports/{{$document->uid}}">
+                                    <i class="fa fa-arrow-right"></i>
+                                    {{friendlier_date_time($document->created_at)}}
+                                </a>
+                            </td>
+                            <td class="px-2 text-nowrap">
+                                <a href="/patients/view/{{$document->patient->uid}}">
+                                    {{$document->patient->displayName()}}
+                                </a>
+                            </td>
+                            <td class="px-2">
+                                {{$document->hcp ? $document->hcp->displayName() : '-'}}
+                            </td>
+                            <td class="px-2">{{ friendly_date_time($document->report_date, false) }}</td>
+                            <td class="px-2">
+                                <div class="d-flex align-items-center">
+                                    <a class="pdf-viewer-trigger" native target="_blank"
+                                       href="/api/incomingReport/download/{{ $document->uid }}"
+                                       title="View">View</a>
+                                    @if($document->is_entry_error)
+                                        <span class="ml-auto text-danger on-hover-opaque" title="Entry Error">
+                            <i class="fa fa-exclamation-triangle"></i>
+                        </span>
+                                    @endif
+                                </div>
+                            </td>
+                            <td class="px-2">{{ $document->title }}</td>
+                            <td class="px-2">{{ $document->category }}{{ $document->subcategory ? ' / ' . $document->subcategory : '' }}</td>
+                            <td class="px-2">{{ $document->memo }}</td>
+                        </tr>
+                    @endforeach
+                    </tbody>
+                </table>
+                <div class="px-3 pt-3">
+                    {{$incomingReports->links()}}
+                </div>
+            </div>
+        </div>
+    </div>
+
+@endsection
+

+ 2 - 0
routes/web.php

@@ -322,6 +322,8 @@ Route::middleware('pro.auth')->group(function () {
 
         Route::middleware('pro.auth.admin')->group(function () {
 
+            Route::get('incoming-reports/{filter?}', 'PracticeManagementController@incomingReports')->name('incoming-reports');
+
             Route::get('segment-templates', 'PracticeManagementController@segmentTemplates')->name('segmentTemplates');
             Route::get('visit-templates', 'PracticeManagementController@visitTemplates')->name('visitTemplates');
             Route::get('visit-template/{visitTemplate}', 'PracticeManagementController@visitTemplate')->name('visitTemplate');