= 4 лет назад
Родитель
Сommit
b7cf3952ab

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

@@ -850,4 +850,19 @@ class PracticeManagementController extends Controller
         return view('app.practice-management.claims-report');
     }
 
+    public function patientClaimSummary(Request $request){
+
+        //Patient | MCP | # Notes Total | # Notes without Billing Closed | # Notes without Claiming Closed
+        $patients = Client::where('is_dummy', '=' , false)
+            ->select('id','uid','name_first','name_last','mcp_pro_id',
+                DB::raw("(SELECT name_first||' '||name_last FROM pro where pro.id = client.mcp_pro_id) as mcp"),
+                DB::raw("(SELECT uid FROM pro where pro.id = mcp_pro_id) as mcp_pro_uid"),
+                DB::raw("(SELECT COUNT(*) FROM note where note.client_id = client.id) as notes_total"),
+                DB::raw("(SELECT COUNT(*) FROM note where note.client_id = client.id AND is_bill_closed IS NOT true) as notes_without_billing_closed"),
+                DB::raw("(SELECT COUNT(*) FROM note where note.client_id = client.id AND is_claim_closed IS NOT true) as notes_without_claiming_closed")
+        )->get();
+
+        return view('app.practice-management.patient-claim-summary', compact('patients'));
+    }
+
 }

+ 42 - 0
resources/views/app/practice-management/patient-claim-summary.blade.php

@@ -0,0 +1,42 @@
+@extends ('layouts/template')
+
+@section('content')
+
+    <div id="practice-bills" 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-user-injured"></i>
+                    Patient Claim Summary
+                </strong>
+            </div>
+            <div class="card-body p-0 border-0">
+{{--                Patient | MCP | # Notes Total | # Notes without Billing Closed | # Notes without Claiming Closed--}}
+                <table class="table table-striped table-condensed table-sm">
+                    <thead>
+                    <tr>
+                        <th>Patient</th>
+                        <th>MCP</th>
+                        <th>#Notes Total</th>
+                        <th>#Notes without Billing Closed</th>
+                        <th>#Notes without Claiming Closed</th>
+                    </tr>
+                    </thead>
+                    <tbody>
+                    @foreach($patients as  $patient)
+                        <tr>
+                            <td><a href="{{route('patients.view.claims-resolver', $patient->uid)}}">{{$patient->name_first}} {{$patient->name_last}}</a></td>
+                            <td>{{$patient->mcp}}</td>
+                            <td>{{$patient->notes_total}}</td>
+                            <td>{{$patient->notes_without_billing_closed}}</td>
+                            <td>{{$patient->notes_without_claiming_closed}}</td>
+                        </tr>
+                    @endforeach
+                    </tbody>
+                </table>
+            </div>
+        </div>
+    </div>
+
+@endsection

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

@@ -121,7 +121,8 @@
                             <a class="dropdown-item" href="{{ route('practice-management.cellularMeasurements') }}">Cellular Measurements</a>
                             <a class="dropdown-item" href="{{ route('practice-management.cellularDeviceManager') }}">Cellular Device Manager</a>
                             <a class="dropdown-item" href="{{ route('practice-management.claims') }}">Claims</a>
-{{--                            <a class="dropdown-item" href="{{ route('practice-management.hcpBillMatrix') }}">HCP Bill Matrix</a>--}}
+                            <a class="dropdown-item" href="{{ route('practice-management.patientClaimSummary') }}">Patient Claim Summary</a>
+                            {{--                            <a class="dropdown-item" href="{{ route('practice-management.hcpBillMatrix') }}">HCP Bill Matrix</a>--}}
                             <a class="dropdown-item" href="{{ route('practice-management.treatmentServiceUtil') }}">Treatment Service Util.</a>
                             <a class="dropdown-item" href="{{ route('practice-management.tickets') }}">Tickets</a>
                             <a class="dropdown-item" href="{{ route('practice-management.supply-orders') }}">Supply Orders</a>

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

@@ -123,6 +123,7 @@
                             <a class="dropdown-item" href="{{ route('practice-management.cellularMeasurements') }}">Cellular Measurements</a>
                             <a class="dropdown-item" href="{{ route('practice-management.cellularDeviceManager') }}">Cellular Device Manager</a>
                             <a class="dropdown-item" href="{{ route('practice-management.medicarePartBClaims') }}">Medicare Part B Claims</a>
+                            <a class="dropdown-item" href="{{ route('practice-management.patientClaimSummary') }}">Patient Claim Summary</a>
 {{--                            <a class="dropdown-item" href="{{ route('practice-management.hcpBillMatrix') }}">HCP Bill Matrix</a>--}}
                             <a class="dropdown-item" href="{{ route('practice-management.treatmentServiceUtil') }}">Treatment Service Util.</a>
                             <a class="dropdown-item" href="{{ route('practice-management.tickets') }}">Tickets</a>

+ 2 - 0
routes/web.php

@@ -96,6 +96,8 @@ Route::middleware('pro.auth')->group(function () {
 
         Route::middleware('pro.auth.admin')->group(function(){
 
+            Route::get('patient-claim-summary', 'PracticeManagementController@patientClaimSummary')->name('patientClaimSummary');
+
             Route::get('cellular-measurements', 'PracticeManagementController@cellularMeasurements')->name('cellularMeasurements');
 
             Route::get('processing-bill-matrix/{proUid?}', 'PracticeManagementController@processingBillMatrix')->name('processingBillMatrix');