Browse Source

Merge branch 'master' into dev-vj

Vijayakrishnan 3 years ago
parent
commit
b2cf41e89e

+ 14 - 0
app/Helpers/helpers.php

@@ -272,6 +272,20 @@ if(!function_exists('friendly_date')) {
     }
     }
 }
 }
 
 
+if(!function_exists('friendly_date_month_year')) {
+    function friendly_date_month_year($value) {
+        if(!$value || empty($value)) return '';
+        try {
+            $result = strtotime($value);
+            $result = date("M Y", $result);
+            return $result;
+        }
+        catch (Exception $e) {
+            return $value;
+        }
+    }
+}
+
 if(!function_exists('friendlier_date')) {
 if(!function_exists('friendlier_date')) {
     function friendlier_date($value) {
     function friendlier_date($value) {
         if(!$value || empty($value)) return '';
         if(!$value || empty($value)) return '';

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

@@ -955,7 +955,7 @@ WHERE measurement.label NOT IN ('SBP', 'DBP')
     }
     }
 
 
     public function logInAs(Request $request)
     public function logInAs(Request $request)
-    {
+    {   
         if($this->pro->pro_type != 'ADMIN'){
         if($this->pro->pro_type != 'ADMIN'){
             return redirect()->to(route('dashboard'));
             return redirect()->to(route('dashboard'));
         }
         }

+ 22 - 12
resources/views/app/patient/care-month/dashboard.blade.php

@@ -364,9 +364,28 @@
                                     Need <b>{{16 - $careMonth->number_of_days_with_remote_measurements}} more days</b> with measurements before RM becomes billable.
                                     Need <b>{{16 - $careMonth->number_of_days_with_remote_measurements}} more days</b> with measurements before RM becomes billable.
                                 </div>
                                 </div>
                             @endif
                             @endif
+
+                            <div>
+                                {{-- rm reasons --}}
+                                <div class="mb-2">
+                                    @include('app/patient/care-month/rm-reasons')
+                                </div>
+                            </div>
+
+                            <div class="mb-2">
+                                @if($careMonth->rmBill && $careMonth->rmBill->code != 'RMB')
+                                    @if(true && 'TODO Check if MCP and echo as needed for rme/rmm')
+
+                                    @endif
+                                    @if($performer->pro->id == $careMonth->mcp_pro_id)
+                                        Reimbursement: {{ $careMonth->rmBill->hcp_payment_amount }}
+                                    @endif 
+                                @endif
+                            </div>
                         </div>
                         </div>
                     </div>
                     </div>
-                    <table class="table table-striped table-sm table-bordered mt-2 mb-0">
+
+                    <!-- <table class="table table-striped table-sm table-bordered mt-2 mb-0">
                         <thead>
                         <thead>
                         <tr>
                         <tr>
                             <th class="px-2 text-secondary">Effective Date</th>
                             <th class="px-2 text-secondary">Effective Date</th>
@@ -496,7 +515,7 @@
                             </tr>
                             </tr>
                         @endif
                         @endif
                         </tbody>
                         </tbody>
-                    </table>
+                    </table> -->
                 </div>
                 </div>
             </div>
             </div>
         </div>
         </div>
@@ -577,15 +596,6 @@
 
 
         <hr class="m-negator mt-4 mb-3">
         <hr class="m-negator mt-4 mb-3">
 
 
-        {{-- rm reasons --}}
-        <div class="mb-2">
-            @include('app/patient/care-month/rm-reasons')
-        </div>
-
-        <hr class="m-negator mt-0 mb-3">
-
-        <hr class="m-negator mt-0 mb-3">
-
         @if($pro->pro_type === 'ADMIN')
         @if($pro->pro_type === 'ADMIN')
             <div class="pb-3 screen-only">
             <div class="pb-3 screen-only">
                 <div class="ml-auto d-flex align-items-center">
                 <div class="ml-auto d-flex align-items-center">
@@ -1306,7 +1316,7 @@
 
 
 
 
             {{-- bills --}}
             {{-- bills --}}
-            @if(($pro->pro_type === 'ADMIN' || ($careMonth->mcp && $pro->id === $careMonth->mcp->id) ) && false)
+            @if($pro->pro_type === 'ADMIN' || ($careMonth->mcp && $pro->id === $careMonth->mcp->id && false))
                 @if($careMonth->bills->count())
                 @if($careMonth->bills->count())
                     <div class="">
                     <div class="">
                         <div class="d-flex align-items-center mb-2">
                         <div class="d-flex align-items-center mb-2">

+ 4 - 0
resources/views/app/practice-management/financial-transactions.blade.php

@@ -117,6 +117,10 @@
                                             {{ $transaction->bill->note->noteTemplate->title }}
                                             {{ $transaction->bill->note->noteTemplate->title }}
                                         @endif
                                         @endif
                                         </a>
                                         </a>
+                                    @elseif($transaction->bill && $transaction->bill->careMonth)
+                                        <a href="/patients/view/{{ $transaction->client->uid }}/care-months/view/{{ $transaction->bill->careMonth->uid }}">
+                                            Remote Monitoring, {{friendly_date_month_year($transaction->bill->careMonth->start_date)}}
+                                        </a>
                                     @else
                                     @else
                                         {{ $transaction->custom_memo ? $transaction->custom_memo : '-' }}
                                         {{ $transaction->custom_memo ? $transaction->custom_memo : '-' }}
                                     @endif
                                     @endif

+ 5 - 1
resources/views/app/practice-management/processing-bill-matrix.blade.php

@@ -119,7 +119,11 @@
                             <td>
                             <td>
                                 @if($row->note)
                                 @if($row->note)
                                     <a href="/patients/view/{{ $row->client->uid }}/notes/view/{{ $row->note->uid }}">
                                     <a href="/patients/view/{{ $row->client->uid }}/notes/view/{{ $row->note->uid }}">
-                                        Note Link
+                                        Note
+                                    </a>
+                                @elseif($row->careMonth)
+                                    <a href="/patients/view/{{$row->client->uid}}/care-months/view/{{$row->careMonth->uid}}">
+                                        Care Month
                                     </a>
                                     </a>
                                 @elseif($row->client)
                                 @elseif($row->client)
                                     <a href="/patients/view/{{ $row->client->uid }}">
                                     <a href="/patients/view/{{ $row->client->uid }}">

+ 6 - 0
resources/views/app/practice-management/rm-launch-and-clean.blade.php

@@ -72,6 +72,12 @@
                     {{@$keyNumbers['careMonthsEligibleForBillGeneration_RMB'] ? '' : 'perm-disabled'}}
                     {{@$keyNumbers['careMonthsEligibleForBillGeneration_RMB'] ? '' : 'perm-disabled'}}
                     data-ep="rm-admin-launch-rmb">Generate RMB ({{@$keyNumbers['careMonthsEligibleForBillGeneration_RMB']}})
                     data-ep="rm-admin-launch-rmb">Generate RMB ({{@$keyNumbers['careMonthsEligibleForBillGeneration_RMB']}})
             </button>
             </button>
+
+            <button class="btn btn-sm btn-primary btn-launch px-3 font-weight-bold mr-3"
+                    data-ep="rm-admin-launch-counts">Get counts
+            </button>
+
+           
         </div>
         </div>
         <div class="my-3 text-secondary text-sm text-monospace launch-result" style="white-space: pre;">
         <div class="my-3 text-secondary text-sm text-monospace launch-result" style="white-space: pre;">
         </div>
         </div>