Selaa lähdekoodia

Stats + matrix for bill flow

Vijayakrishnan 3 vuotta sitten
vanhempi
commit
468767292b

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

@@ -3887,7 +3887,7 @@ ORDER BY c.name_last, c.name_first
             ->where('is_active', true)
             ->where(function ($q) {
                 $q->whereNull('client_engagement_status_category')
-                    ->orWhere('client_engagement_status_category', 'DUMMY');
+                    ->orWhere('client_engagement_status_category', 'ACTIVE');
             })
             ->whereRaw('(default_mcp_company_pro_payer_id IS NULL OR default_mcp_company_location_id IS NULL)')
             ->orderBy('created_at', 'DESC')

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

@@ -127,7 +127,7 @@
                                             ->where('is_active', true)
                                             ->where(function ($q) {
                                                 $q->whereNull('client_engagement_status_category')
-                                                    ->orWhere('client_engagement_status_category', 'DUMMY');
+                                                    ->orWhere('client_engagement_status_category', 'ACTIVE');
                                             })
                                             ->whereRaw('(default_mcp_company_pro_payer_id IS NULL OR default_mcp_company_location_id IS NULL)')
                                             ->count();
@@ -140,8 +140,8 @@
                                            open-in-stag-popup
                                            popup-style="overflow-visible"
                                            update-parent=""
-                                           title="Clients without default company location / pro payer">
-                                            Clients without default company location / pro payer
+                                           title="Patients without default company location / pro payer">
+                                            Patients without default company location / pro payer
                                         </a>
                                     </th>
                                 </tr>

+ 39 - 32
resources/views/app/patient/note/partials/cpp-bills-claims-container.blade.php

@@ -361,38 +361,45 @@
                         @endif
                     </td>
                     <td> <!-- verification -->
-                        @if($pro->pro_type === 'ADMIN' && !$bill->is_cancelled)
-                            @if(!$bill->is_verified)
-                                <div class="text-warning-mellow font-weight-bold">Not Verified</div>
-                                <span class="d-block mt-1" moe>
-                                    <a href="" show start>Mark Verified</a>
-                                    <form url="/api/bill/markAsVerified">
-                                        <input type="hidden" name="uid" value="{{$bill->uid}}">
-                                        <p>Mark As Verfified?</p>
-                                        <div class="mb-0">
-                                            <button class="btn btn-primary btn-sm"
-                                                    submit>Submit</button>
-                                            <button class="btn btn-default border btn-sm"
-                                                    cancel>Cancel</button>
-                                        </div>
-                                    </form>
-                                </span>
-                            @else
-                                <div class="text-success font-weight-bold"><i class="fa fa-check"></i> Verified</div>
-                                <div class="text-muted">By: {{@$bill->markedVerifiedBySession && @$bill->markedVerifiedBySession->pro ? @$bill->markedVerifiedBySession->pro->displayName() : '-'}} on {{friendly_date_time(@$bill->marked_verified_at)}}</div>
-                                <span class="d-block mt-1" moe>
-                                    <a class="" href="" show start>Undo</a>
-                                    <form url="/api/bill/undoMarkAsVerified">
-                                        <input type="hidden" name="uid" value="{{$bill->uid}}">
-                                        <p>Undo Mark As Verfified?</p>
-                                        <div class="mb-0">
-                                            <button class="btn btn-primary btn-sm"
-                                                    submit>Submit</button>
-                                            <button class="btn btn-default border btn-sm"
-                                                    cancel>Cancel</button>
-                                        </div>
-                                    </form>
-                                </span>
+                        @if(!$bill->hcpCompanyPro)
+                            <div class="mb-1 text-danger">
+                                <i class="fa fa-exclamation-triangle"></i>
+                                Company Pro isn't set on the bill
+                            </div>
+                        @else
+                            @if($pro->pro_type === 'ADMIN' && !$bill->is_cancelled)
+                                @if(!$bill->is_verified)
+                                    <div class="text-warning-mellow font-weight-bold">Not Verified</div>
+                                    <span class="d-block mt-1" moe>
+                                        <a href="" show start>Mark Verified</a>
+                                        <form url="/api/bill/markAsVerified">
+                                            <input type="hidden" name="uid" value="{{$bill->uid}}">
+                                            <p>Mark As Verfified?</p>
+                                            <div class="mb-0">
+                                                <button class="btn btn-primary btn-sm"
+                                                        submit>Submit</button>
+                                                <button class="btn btn-default border btn-sm"
+                                                        cancel>Cancel</button>
+                                            </div>
+                                        </form>
+                                    </span>
+                                @else
+                                    <div class="text-success font-weight-bold"><i class="fa fa-check"></i> Verified</div>
+                                    <div class="text-muted">By: {{@$bill->markedVerifiedBySession && @$bill->markedVerifiedBySession->pro ? @$bill->markedVerifiedBySession->pro->displayName() : '-'}} on {{friendly_date_time(@$bill->marked_verified_at)}}</div>
+                                    <span class="d-block mt-1" moe>
+                                        <a class="" href="" show start>Undo</a>
+                                        <form url="/api/bill/undoMarkAsVerified">
+                                            <input type="hidden" name="uid" value="{{$bill->uid}}">
+                                            <p>Undo Mark As Verfified?</p>
+                                            <div class="mb-0">
+                                                <button class="btn btn-primary btn-sm"
+                                                        submit>Submit</button>
+                                                <button class="btn btn-default border btn-sm"
+                                                        cancel>Cancel</button>
+                                            </div>
+                                        </form>
+                                    </span>
+                                @endif
                             @endif
                         @endif
                     </td>

+ 19 - 0
resources/views/layouts/patient-header.blade.php

@@ -554,3 +554,22 @@ $addressParts .= implode(", ", $addressPart2);
 
   </div>
 </div>
+@if($pro->pro_type === 'ADMIN')
+  <?php
+  $missingDefaultMCPCPAndLocation = false;
+  if ($patient->is_active &&
+          (!$patient->client_engagement_status_category || $patient->client_engagement_status_category === 'ACTIVE') &&
+          (!$patient->default_mcp_company_pro_payer_id || !$patient->default_mcp_company_location_id)
+  ) {
+    $missingDefaultMCPCPAndLocation = true;
+  }
+  ?>
+  @if($missingDefaultMCPCPAndLocation)
+    <div class="mx-2 mb-2 alert alert-warning p-2 mcp-theme-1 d-flex align-items-baseline rounded-0 border-warning">
+      <i class="fa fa-exclamation-triangle"></i>
+      <span class="ml-2 font-weight-bold">This patient is missing the default MCP company pro and or location!</span>
+      <a href="{{route('patients.view.settings', ['patient' => $patient])}}" class="ml-2 font-weight-bold">Settings</a>
+    </div>
+  @endif
+@endif
+