فهرست منبع

Merge branch 'dev' of rav.triplestart.com:jmudaka/stagfe2 into dev

= 3 سال پیش
والد
کامیت
52e643b36d

+ 1 - 10
app/Http/Controllers/HomeController.php

@@ -966,15 +966,6 @@ WHERE cl.shadow_pro_id IS NULL
         return view('app/dashboard-dna', compact( 'milliseconds'));
     }
 
-    public function dashboard_PS(Request $request){
-        $performer = $this->performer();
-        $pro = $performer->pro;
-        $performerProID = $performer->pro->id;
-
-        $milliseconds = strtotime(date('Y-m-d')) . '000'; //required by the calendar
-        return view('app/dashboard-ps', compact( 'milliseconds'));
-    }
-
     public function dashboard_ADMIN(Request $request){
         $keyNumbers = [];
 
@@ -1408,7 +1399,7 @@ WHERE cl.shadow_pro_id IS NULL
             return $this->dashboard_DNA($request);
         }else{
             //check for physician supervisor here
-            return $this->dashboard_PS($request);
+            return redirect()->route('ps.dashboard');
         }
     }
 

+ 27 - 0
app/Http/Controllers/SupervisingPhysicianController.php

@@ -0,0 +1,27 @@
+<?php
+
+namespace App\Http\Controllers;
+
+
+use Illuminate\Http\Request;
+use App\Models\ClientReviewRequest;
+class SupervisingPhysicianController extends Controller
+{
+
+    public function dashboard(Request $request){
+        $performer = $this->performer();
+        $pro = $performer->pro;
+        $performerProID = $performer->pro->id;
+
+        $milliseconds = strtotime(date('Y-m-d')) . '000'; //required by the calendar
+        return view('app.ps.dashboard', compact( 'milliseconds'));
+    }
+
+    public function clientReviewRequests(Request $request){
+        $hideTitle = $request->get('hideTitle');
+        $performer = $this->performer();
+        $pro = $performer->pro;
+        $reviewRequests = ClientReviewRequest::where('pro_id', $pro->id)->where('is_active', true)->orderBy('created_at', 'DESC')->paginate(50);
+        return view('app.ps.review-requests.list', compact('reviewRequests', 'hideTitle'));
+    }
+}

+ 4 - 1
app/Models/Pro.php

@@ -1360,5 +1360,8 @@ ORDER BY cm.created_at DESC
         })->count();
     }
 
-
+    public function activeClientReviewRequests()
+    {
+        return $this->hasMany(ClientReviewRequest::class, 'pro_id')->where('is_active', true);
+    }
 }

+ 3 - 3
resources/views/app/dashboard-ps.blade.php → resources/views/app/ps/dashboard.blade.php

@@ -34,9 +34,9 @@
                             <table class="table table-sm mb-0">
                                 <tbody>
                                     <tr>
-                                        <th class="px-2 text-center">{{$pro->patientsCountAsDna()}}<th>  
+                                        <th class="px-2 text-center">{{$pro->activeClientReviewRequests->count()}}<th>  
                                         <th class="pl-2">
-                                            <a class="font-weight-normal" href="{{route('dna.my-patients')}}" native target="_blank" open-in-stag-popup popup-style="tall" title="Patients ">Charts Pending My Review </a>
+                                            <a class="font-weight-normal" href="{{route('ps.client-review-requests', ['hideTitle' => true])}}" native target="_blank" open-in-stag-popup popup-style="tall" title="Charts Pending My Review">Charts Pending My Review </a>
                                         </th>
                                     </tr>
                                     
@@ -93,7 +93,7 @@
                                     </strong>
                                 </div>
                                 <div class="card-body p-0">
-                                    @include('app.dna.dashboard.encounters_pending_my_review_dashboard')
+                                    @include('app.ps.dashboard.client-charts-pending-my-review')
                                 </div>
                             </div>
 

+ 62 - 0
resources/views/app/ps/dashboard/client-charts-pending-my-review.blade.php

@@ -0,0 +1,62 @@
+
+<?php 
+    $reviewRequests = $performer->pro->activeClientReviewRequests;
+?>
+@if(!count($reviewRequests))
+    <div class="mt-3 pl-2">
+        <p>No client review requests found.</p>
+    </div>
+@else
+<div class="table-responsive">
+    <table class="table table-striped table-sm table-bordered">
+        <thead class="bg-light">
+            <tr>
+                <th class="border-0 text-secondary text-nowrap">Created</th>
+                <th class="border-0 text-secondary">Chart #</th>
+                <th class="border-0 text-secondary">Scoped Month Start</th>
+                <th class="border-0 text-secondary">Access Start</th>
+                <th class="border-0 text-secondary">Access End</th>                
+                <th class="border-0 text-secondary">Is Active</th>
+                <th class="border-0 text-secondary">Status</th>
+            </tr>
+        </thead>
+        <tbody>
+            @foreach($reviewRequests as $rr)
+            <tr>
+                <td class="text-nowrap">{{ friendlier_date($rr->created_at) }}</td>
+                <td>
+                <a native target="_blank" href="{{route('patients.view.dashboard', $rr->client)}}">
+						{{$rr->client->chart_number}}
+					</a>
+                </td>
+                <td>{{ friendlier_date($rr->scoped_month_start_date) }}</td>
+                <td>{{ friendlier_date($rr->access_start_date) }}</td>
+                <td>{{ friendlier_date($rr->access_end_date) }}</td>                
+                <td>
+                    @if($rr->is_active)
+                    <span class="text-success mr-2">YES
+                        @if($rr->reactivation_memo)
+                        <i class="fas fa-info-circle text-muted" title="{{ $rr->reactivation_memo }}"></i>
+                        @endif
+                    </span>
+                    @else
+                    <span class="text-secondary mr-2">NO
+                        @if($rr->deactivation_memo)
+                        <i class="fas fa-info-circle text-muted" title="{{ $rr->deactivation_memo }}"></i>
+                        @endif
+                    </span>
+                    @endif
+                </td>
+                <td>
+                    <span class="mr-2">{{ $rr->status ?? '--' }}
+                        @if($rr->status_memo )
+                        <i class="fas fa-info-circle text-muted" title="{{ $rr->status_memo }}"></i>
+                        @endif
+                    </span>
+                </td>
+            </tr>
+            @endforeach
+        </tbody>
+    </table>
+</div>
+@endif

+ 69 - 0
resources/views/app/ps/review-requests/list.blade.php

@@ -0,0 +1,69 @@
+@extends ('layouts.template')
+@section('content')
+<div class="p-3 mcp-theme-1">
+    <div class="">
+        @if(!$hideTitle)
+        <div class="d-flex align-items-center pb-2">
+            <h4 class="font-weight-bold mb-0 mr-3">Review Requests</h4>
+        </div>
+        @endif
+        <table class="table table-striped table-sm table-bordered">
+            <thead class="bg-light">
+                <tr>
+                    <th class="border-0 text-secondary text-nowrap">Created At</th>
+                    <th class="border-0 text-secondary text-nowrap">Chart #</th>
+                    <th class="border-0 text-secondary">Scoped Month Start Date</th>
+                    <th class="border-0 text-secondary">Access Start Date</th>
+                    <th class="border-0 text-secondary">Access End Date</th>
+                    <th class="border-0 text-secondary">Pro</th>
+                    <th class="border-0 text-secondary">Created By</th>
+                    <th class="border-0 text-secondary">Is Active</th>
+                    <th class="border-0 text-secondary">Status</th>
+                </tr>
+            </thead>
+            <tbody>
+                @foreach($reviewRequests as $rr)
+                <tr>
+                    <td class="text-nowrap">{{ friendly_date_time($rr->created_at) }}</td>
+                    <td>
+                    <a native target="_blank" href="{{route('patients.view.dashboard', $rr->client)}}">
+						{{$rr->client->chart_number}}
+					</a>
+                    </td>
+                    <td>{{ friendly_date($rr->scoped_month_start_date) }}</td>
+                    <td>{{ friendly_date($rr->access_start_date) }}</td>
+                    <td>{{ friendly_date($rr->access_end_date) }}</td>
+                    <td>{{ $rr->pro->displayName() }}</td>
+                    <td>{{ $rr->createdBySession->pro->displayName() }}</td>
+                    <td>
+                        @if($rr->is_active)
+                        <span class="text-success mr-2">YES
+                            @if($rr->reactivation_memo)
+                            <i class="fas fa-info-circle text-muted" title="{{ $rr->reactivation_memo }}"></i>
+                            @endif
+                        </span>
+                        @else
+                        <span class="text-secondary mr-2">NO
+                            @if($rr->deactivation_memo)
+                            <i class="fas fa-info-circle text-muted" title="{{ $rr->deactivation_memo }}"></i>
+                            @endif
+                        </span>
+                        @endif
+                    </td>
+                    <td>
+                        <span class="mr-2">{{ $rr->status ?? '--' }}
+                            @if($rr->status_memo )
+                            <i class="fas fa-info-circle text-muted" title="{{ $rr->status_memo }}"></i>
+                            @endif
+                        </span>
+                    </td>
+                </tr>
+                @endforeach
+            </tbody>
+        </table>
+        <div class="p-3">
+            {{$reviewRequests->withQueryString()->links()}}
+        </div>
+    </div>
+</div>
+@endsection

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

@@ -147,7 +147,7 @@
                             <a class="dropdown-item" href="{{ route('practice-management.my-flyers') }}">My Flyers</a>
                             <a class="dropdown-item" href="{{ route('practice-management.notes-pending-physician-supervisor-stamping') }}">Notes Pending Physician Supervisor Stamping</a>
                         @else 
-                            <a class="dropdown-item" href="{{ route('practice-management.myFavorites') }}">My Patient Chart Review Requests</a>
+                            <a class="dropdown-item" href="{{ route('ps.client-review-requests') }}">My Patient Chart Review Requests</a>
                             <a class="dropdown-item" href="{{ route('practice-management.myTickets') }}">My Bills</a>
                             <a class="dropdown-item" href="{{ route('practice-management.financialTransactions') }}">Financial Transactions</a>
                         @endif
@@ -183,7 +183,6 @@
                             <a class="dropdown-item" href="{{ route('dna.myBills') }}">My Bills</a>
                             <a class="dropdown-item" href="{{ route('dna.myClinicalTeams') }}">My Clinical Teams</a>
                         @endif
-                       
                     </div>
                 </li>
 

+ 4 - 2
routes/web.php

@@ -1,6 +1,7 @@
 <?php
 
 use Illuminate\Support\Facades\Route;
+use App\Http\Controllers\SupervisingPhysicianController;
 
 /*
 |--------------------------------------------------------------------------
@@ -203,8 +204,9 @@ Route::middleware('pro.auth')->group(function () {
 
 
     Route::name('ps.')->prefix('ps')->group(function () {
-
-        Route::get('dashboard', 'HomeController@dashboard_PS')->name('dashboard');
+        Route::get('dashboard', [SupervisingPhysicianController::class, 'dashboard'])->name('dashboard');
+        Route::get('client-review-requests', [SupervisingPhysicianController::class, 'clientReviewRequests'])->name('client-review-requests');
+        
 
     });