Ver código fonte

updated claims-resolver

unknown 4 anos atrás
pai
commit
f3c9af582e

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

@@ -864,6 +864,10 @@ class PracticeManagementController extends Controller
         $notesTotalWithBillingClosed = DB::select(DB::raw("SELECT COUNT(*) FROM note WHERE is_cancelled IS NOT TRUE AND is_bill_closed IS TRUE"))[0]->count;
         $notesTotalWithClaimingClosed = DB::select(DB::raw("SELECT COUNT(*) FROM note WHERE is_cancelled IS NOT TRUE AND is_claim_closed IS TRUE"))[0]->count;
 
+        $patientsTotal = DB::select(DB::raw("SELECT COUNT(*) FROM client WHERE is_active IS TRUE"))[0]->count;
+        $patientsTotalWithBillingClosed = DB::select(DB::raw("SELECT COUNT(*) FROM client WHERE is_active IS TRUE AND (SELECT COUNT(*) FROM note WHERE is_cancelled IS NOT TRUE AND is_bill_closed IS NOT TRUE AND note.client_id = client.id) = 0"))[0]->count;
+        $patientsTotalWithClaimingClosed = DB::select(DB::raw("SELECT COUNT(*) FROM client WHERE is_active IS TRUE AND (SELECT COUNT(*) FROM note WHERE is_cancelled IS NOT TRUE AND is_claim_closed IS NOT TRUE AND note.client_id = client.id) = 0"))[0]->count;
+
         $performerPro = $this->performer->pro;
         $allPros = [];
         if ($performerPro->pro_type == 'ADMIN') {
@@ -897,7 +901,10 @@ class PracticeManagementController extends Controller
                 'allPros' => $allPros,
                 'notesTotal' => $notesTotal,
                 'notesTotalWithBillingClosed' => $notesTotalWithBillingClosed,
-                'notesTotalWithClaimingClosed' => $notesTotalWithClaimingClosed
+                'notesTotalWithClaimingClosed' => $notesTotalWithClaimingClosed,
+                'patientsTotal' => $patientsTotal,
+                'patientsTotalWithBillingClosed' => $patientsTotalWithBillingClosed,
+                'patientsTotalWithClaimingClosed' => $patientsTotalWithClaimingClosed
             ];
 
         return view('app.practice-management.patient-claim-summary', $data);

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

@@ -42,6 +42,37 @@
                             </div>
                         </td>
                     </tr>
+
+
+                    <tr>
+                        <th class="border-top-0 pl-2" style="width: 250px;">Total patients</th>
+                        <td class="border-top-0 px-2"  style="width: 100px;">{{$patientsTotal}}</td>
+                        <td></td>
+                    </tr>
+                    <tr>
+                        <th class="pl-2">Patients with billing closed</th>
+                        <td class="px-2">{{$patientsTotalWithBillingClosed}} / {{ $patientsTotal }}</td>
+                        <td>
+                            <div class="d-flex align-items-center">
+                                <span class="fill-percent-value">{{round(($patientsTotalWithBillingClosed) *100/ $patientsTotal, 1)}}%</span>
+                                <div class="flex-grow-1 position-relative fill-bar">
+                                    <div class="bg-info position-absolute" style="left: 0; top: 0; height: 100%; width: {{ ($patientsTotalWithBillingClosed) * 100/ $patientsTotal }}%"></div>
+                                </div>
+                            </div>
+                        </td>
+                    </tr>
+                    <tr>
+                        <th class="pl-2">Patients with claiming closed</th>
+                        <td class="px-2">{{patientsTotalWithClaimingClosed}} / {{ $patientsTotal }}</td>
+                        <td>
+                            <div class="d-flex align-items-center">
+                                <span class="fill-percent-value">{{round((patientsTotalWithClaimingClosed) *100/ $patientsTotal, 1)}}%</span>
+                                <div class="flex-grow-1 position-relative fill-bar">
+                                    <div class="bg-info position-absolute" style="left: 0; top: 0; height: 100%; width: {{ (patientsTotalWithClaimingClosed) * 100/ $patientsTotal }}%"></div>
+                                </div>
+                            </div>
+                        </td>
+                    </tr>
                     </tbody>
                 </table>
             </div>