logicpowerhouse 4 жил өмнө
parent
commit
70a41b854a

+ 2 - 2
app/Http/Controllers/PracticeManagementController.php

@@ -430,13 +430,13 @@ class PracticeManagementController extends Controller
         } else {
             $targetPro = $performerPro;
         }
-        $bills = [];
+        $rows = [];
         if ($targetPro) {
             $rows = DB::select(DB::raw("SELECT * FROM aemish_bill_report WHERE hcp_pro_id = :targetProID"), ['targetProID' => $targetPro->id]);
         } else {
             $rows = DB::select(DB::raw("SELECT * FROM aemish_bill_report"));
         }
-        return view('app.practice-management.hcp-bill-matrix', compact('bills', 'allPros', 'expectedForHcp', 'targetPro', 'proUid'));
+        return view('app.practice-management.hcp-bill-matrix', compact('rows', 'allPros', 'expectedForHcp', 'targetPro', 'proUid'));
     }
 
     public function billingManager(Request $request, $proUid = null)

+ 40 - 104
resources/views/app/practice-management/hcp-bill-matrix.blade.php

@@ -23,122 +23,58 @@
                 <table class="table table-sm table-condensed p-0 m-0">
                     <thead class="bg-light">
                     <tr>
-                        <th class="border-0">Patient</th>
-                        <th class="border-0">Note Eff. Date</th>
-
-
-                        <th class="border-0">HCP</th>
-
-                        <th class="border-0">Note Signed?</th>
-
-                        <th>Service</th>
-                        <th># of units</th>
-                        <th>Bill Signed?</th>
-                        <th>Cancelled?</th>
-                        <th>HCP ex. amount</th>
-
-                        @if($performer->pro->pro_type == 'ADMIN' && false)
-                            <th class="border-0">Assessments</th>
-                        @endif
-
-                        @if($performer->pro->pro_type == 'ADMIN' && false)
-                            <th class="border-0">Claims</th>
-                        @endif
-                        <th class="px-3 border-0">Created</th>
+                        <th>Name Last</th>
+                        <th>Name First</th>
+                        <th>Client Link</th>
+                        <th>Eff. Date</th>
+                        <th>New/FU</th>
+                        <th>Note Signed by HCP?</th>
+                        <th>Note Link</th>
+                        <th>Note Cancelled?</th>
+                        <th>HCP Last</th>
+                        <th>HCP First</th>
+                        <th>HCP Pro Link</th>
+                        <th>Bill Signed by HCP?</th>
+                        <th>Code</th>
+                        <th># Units</th>
+                        <th>HCP Expected Payment</th>
+                        <th>HCP Paid?</th>
+                        <th>HCP Paid Amount</th>
+                        <th>Bill UID</th>
+                        <th>Bill Cancelled?</th>
                     </tr>
                     </thead>
                     <tbody>
                     @foreach ($rows as $row)
                         <tr class="">
-                            <td class="">
+                            <td>{{$row->name_last}}</td>
+                            <td>{{$row->name_first}}</td>
+                            <td>{{$row->client_uid}}</td>
+                            <td>{{$row->effective_dateest}}</td>
+                            <td>{{$row->new_or_fu_or_na}}</td>
+                            <td>{{$row->is_note_signed_by_hcp}}</td>
+                            <td>
                                 <a href="/patients/view/{{ $row->client_uid }}/notes/view/{{ $row->note_uid }}">
-                                    {{ $row->client->name_last . ', ', $row->name_first }}
+                                    Note Link
                                 </a>
                             </td>
-                            <td class="">
-                                <a href="/patients/view/{{ $row->client_uid }}/notes/view/{{ $row->note_uid }}"
-                                   class="font-weight-bold">
-                                    {{ friendly_date_time($row->effective_dateest, false) }}
-                                </a>
-                                <span class="ml-1">{{ $row->is_note_cancelled ? '[cancelled]' : '' }}</span>
-                            </td>
-                            <td>{{$row->hcpPro->name_first}} {{$note->hcpPro->name_first}}</td>
-                            <td>{{$note->is_signed_by_hcp?'Yes':'No'}}</td>
-
-
-                            <td>{{$bill->code}}</td>
-                            @if($bill->code == 'Treatment Services')
-                                <td>{{floor($bill->number_of_units*60)}}m</td>
-                            @else
-                                <td>{{$bill->number_of_units}}</td>
-                            @endif
-                            <td>{{$bill->is_signed_by_hcp?'Yes':'No'}}</td>
-                            <td>{{ $bill->is_cancelled ?'Yes':'No'}}</td>
-                            <td>{{ $bill->hcp_expected_payment_amount }}</td>
-
-                            @if($performer->pro->pro_type == 'ADMIN' && false)
-                                <td>
-                                    <table class="table table-sm table-condensed table-stripe">
-                                        <thead>
-                                        <tr>
-                                            <th>Code</th>
-                                            <th>Description</th>
-                                        </tr>
-                                        </thead>
-                                        <tbody>
-                                        @foreach($note->reasons as $reason)
-                                            <tr>
-                                                <td>{{$reason->code}}</td>
-                                                <td>{{$reason->description}}</td>
-                                            </tr>
-                                        @endforeach
-                                        </tbody>
-                                    </table>
-                                </td>
-                            @endif
-                            @if($performer->pro->pro_type == 'ADMIN' && false)
-                                <td>
-                                    <table class="table table-sm table-condensed table-stripe">
-                                        <tbody>
-                                        @foreach($note->claims as $claim)
-                                            <tr>
-                                                <td>{{$claim->iid}}</td>
-                                                <td>{{$claim->was_submitted?'Yes':'No'}}</td>
-                                            </tr>
-                                            <tr>
-                                                <td colspan="2">
-                                                    <strong>Claim Lines</strong>
-                                                    <table class="table table-sm table-condensed table-striped">
-                                                        <tr>
-                                                            <th>CPT</th>
-                                                            <th>ICDs</th>
-                                                            <th>Date of Service</th>
-                                                        </tr>
-                                                        @foreach($claim->lines as $claimLine)
-                                                            <tr>
-                                                                <td>{{$claimLine->cpt}}</td>
-                                                                <td>{{$claimLine->icds()}}</td>
-                                                                <td>{{$claimLine->date_of_service}}</td>
-                                                            </tr>
-                                                        @endforeach
-                                                    </table>
-                                                </td>
-                                            </tr>
-                                        @endforeach
-                                        </tbody>
-                                    </table>
-                                </td>
-                            @endif
-                            <td class="px-3">
-                                {{ friendly_date_time($note->created_at, true) }}
-                            </td>
+                            <td>{{$row->is_note_cancelled}}</td>
+                            <td>{{$row->hcp_last}}</td>
+                            <td>{{$row->hcp_first}}</td>
+                            <td>{{$row->hcp_pro_id}}</td>
+                            <td>{{$row->hcp_pro_uid}}</td>
+                            <td>{{$row->is_bill_signed_by_hcp}}</td>
+                            <td>{{$row->code}}</td>
+                            <td>{{$row->number_of_units}}</td>
+                            <td>{{$row->hcp_expected_payment_amount}}</td>
+                            <td>{{$row->has_hcp_been_paid}}</td>
+                            <td>{{$row->hcp_payment_amount}}</td>
+                            <td>{{$row->bill_uid}}</td>
+                            <td>{{$row->is_bill_cancelled}}</td>
                         </tr>
                     @endforeach
                     </tbody>
                 </table>
-                <div>
-                    {{$bills->links()}}
-                </div>
             </div>
         </div>
     </div>