Эх сурвалжийг харах

added billed amount on rpm matrix

= 3 жил өмнө
parent
commit
aa93dd4fa8

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

@@ -1371,9 +1371,13 @@ SELECT client.name_first, client.name_last,
        care_month.most_recent_cellular_bp_sbp_mm_hg,
        care_month.most_recent_cellular_bp_measurement_at,      
        care_month.most_recent_cellular_weight_value,
-       care_month.most_recent_cellular_weight_measurement_at
+       care_month.most_recent_cellular_weight_measurement_at,
+       care_month.mcp_rm_generic_bill_id,
+       bill.uid as mcp_rm_generic_bill_uid,
+       bill.generic_pro_expected_payment_amount as mcp_rm_generic_bill_expected_payment_amount 
 FROM care_month join client on care_month.client_id = client.id join note mrnote on client.most_recent_completed_mcp_note_id = mrnote.id
-     left join note mrmnote on mrmnote.id = (
+    left join bill  on care_month.mcp_rm_generic_bill_id = bill.id
+    left join note mrmnote on mrmnote.id = (
         select max(n.id) from note n 
         where 
               n.client_id = client.id AND 

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

@@ -336,7 +336,7 @@
                                 </div>
                                 @endif
 
-                                @if(($daysDiff !== -1 && $daysDiff <= 90) &&
+                                @if(($daysDiff !== -1 && $daysDiff <= 90) && 
                                     $careMonth->number_of_days_with_remote_measurements >= 16 &&
                                     $careMonth->has_mcp_interacted_with_client_about_rm)
                                     <div class="mt-2 border border-info p-2">

+ 4 - 1
resources/views/app/practice-management/remote-monitoring-row-markup-by-pro-type.blade.php

@@ -218,7 +218,10 @@
             @if($lastVisitWithin90Days && $iPatient->has_mcp_interacted_with_client_about_rm && $iPatient->number_of_days_with_remote_measurements >= 16 && $iPatient->rm_total_time_in_seconds_by_mcp >= 1200)
                 <span class="text-success font-weight-bold">
                     <i class="fa fa-check"></i>
-                    Yes
+                    Yes 
+                    @if($iPatient->mcp_rm_generic_bill_id)
+                    (Billed: ${{friendly_money($iPatient->mcp_rm_generic_bill_expected_payment_amount)}})
+                    @endif
                 </span>
             @else
                 <span class="text-danger font-weight-normal">

+ 1 - 0
resources/views/app/rm-bills/inline.blade.php

@@ -12,6 +12,7 @@ use App\Models\Client;
 /** @var $entityUid */
 
 $genericBills = genericBills($pro, @$patient, @$entityType, @$entityUid);
+
 ?>
 
 @if(!count($genericBills))