Peter Muturi 1 سال پیش
والد
کامیت
27d7d5bdf4

+ 8 - 8
app/Models/CareMonth.php

@@ -175,11 +175,11 @@ class CareMonth extends Model
 
     public function calculateBillabilityForMcp(){
 
-        $tier1Strategy = $this->mcp_rpm_payment_tier_one_strategy;
-        $tier2Strategy = $this->mcp_rpm_payment_tier_two_strategy;
+        $tier1Strategy = $this->mcp_rpm_payment_strategy_tier_one;
+        $tier2Strategy = $this->mcp_rpm_payment_strategy_tier_two;
         if(!$tier1Strategy || !$tier2Strategy){
             return [
-                'billable' => false, 
+                'billable' => false,
                 'reason' => 'MCP RPM strategy has not been set.'
             ];
         }
@@ -195,18 +195,18 @@ class CareMonth extends Model
 
         if($tier == 'TIER_1'){
             return [
-                'billable' => true, 
-                'amount' => $this->mcp_rpm_payment_tier_one_amount
+                'billable' => true,
+                'amount' => $this->mcp_rpm_payment_amount_tier_one
             ];
         }
 
         if($tier == 'TIER_2'){
             return [
-                'billable' => true, 
-                'amount' => $this->mcp_rpm_payment_tier_two_amount
+                'billable' => true,
+                'amount' => $this->mcp_rpm_payment_amount_tier_two
             ];
         }
-    
+
     }
 
     public function calculateBillabilityForRmm(){

+ 3 - 0
public/css/style.css

@@ -63,6 +63,9 @@
 .bg-warning-mellow {
     background-color: #ffc10755 !important;
 }
+.bg-success-mellow {
+    background-color: #86c97e !important;
+}
 .text-link {
     color: rgb(13, 89, 175) !important;
 }

+ 10 - 7
resources/views/app/patient/care-month/partials/tier-explainer.blade.php

@@ -1,16 +1,19 @@
+@if (!determineTier($careMonth))
 <div class="on-hover-show d-inline-block on-hover-opaque">
-    @if (!determineTier($careMonth))
-        <i class="fa fa-exclamation-triangle"></i>
-    @else
-        <i class="fa fa-check"></i>
-    @endif
+        <i class="fa fa-info-circle"></i>
     <div class="on-hover-content p-2 text-dark width-200px">
         @if (!$careMonth->tier())
-            <h5 class="mb-2 font-weight-bold">Tier 1 Qualification:</h5>
+            <h5 class="mb-2 font-weight-bold">Goal Qualification:</h5>
             <p class="m-0 text-muted">Minimum of <b>7 days</b>, <b>10 mins</b> and <b>interaction</b> is required.</p>
         @elseif($careMonth->tier() === 'TIER_1')
-            <h5 class="mb-2 font-weight-bold">Tier 2 Qualification:</h5>
+            <h5 class="mb-2 font-weight-bold">Partial Qualification:</h5>
             <p class="m-0 text-muted">Minimum of <b>16 days</b>, <b>20 mins</b> and <b>interaction</b> is required.</p>
         @endif
     </div>
 </div>
+@endif
+@if($careMonth->tier() === 'TIER_1')
+<span class="text-muted">(Goal <i class="fa fa-check text-success"></i>)</span>
+@elseif($careMonth->tier() === 'TIER_2')
+<span class="text-muted">(Partial <i class="fa fa-check text-success"></i>)</span>
+@endif

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

@@ -5,7 +5,10 @@
 @elseif($mode === 'rmm')
     <?php $strategy = $pro->rme_payment_strategy; ?>
 @endif
-<tr data-client-uid="{{$iPatient->client_uid}}" data-care-month-uid="{{$iPatient->care_month_uid}}">
+@php
+  $careMonth = \App\Models\CareMonth::where('uid', $iPatient->care_month_uid)->first();
+@endphp
+<tr class="{{($careMonth->tier() === 'TIER_1' && !$careMonth->mcpRmGenericBill) ? 'bg-warning-mellow' : (($careMonth->tier() == 'TIER_2' && !$careMonth->mcpRmGenericBill) ? 'bg-success-mellow' : '')}}" data-client-uid="{{$iPatient->client_uid}}" data-care-month-uid="{{$iPatient->care_month_uid}}">
     <td class="pl-2">
         <a href="/patients/view/{{ $iPatient->client_uid }}/care-months/view/{{$iPatient->care_month_uid}}" class="text-nowrap"
            native target="_blank"
@@ -47,70 +50,68 @@
     </td>
 
     @if($mode === 'mcp' || $mode === 'rmm')
-        @if($strategy === 'X16_DAYS_20_MINS_ON_OWN_MCP_COM_DURING_CM')
-            <td>
-                <div class="d-flex align-items-baseline">
-                    <i class="mr-1 text-sm fa {{$iPatient->has_mcp_interacted_with_client_about_rm ? 'fa-check text-success' : 'fa-exclamation-triangle text-danger on-hover-opaque'}}"></i>
-                    <span class="sort-data">{{$iPatient->has_mcp_interacted_with_client_about_rm ? 'Yes' : 'No'}}</span>
-                    @if(!request()->input('not-enrolled'))
-                        @if($mode === 'mcp')
-                            <div moe large relative class="ml-2">
-                                <a start show class="py-0 mb-3 text-sm">Entry</a>
-                                <form url="/api/careMonthEntry/createForRm" right hook="refresh-rpm-row-{{$trIndex}}">
-                                    <input type="hidden" name="careMonthUid" value="{{ $iPatient->care_month_uid }}">
-                                    <input type="hidden" name="proUid" value="{{ $pro->uid }}">
-                                    <div class="mb-2">
-                                        <div class="row">
-                                            <div class="col-6 pr-0">
-                                                <?php
-                                                $sD = strtotime($rcmStartDate);
-                                                $y = date('Y', $sD);
-                                                $m0 = date('m', $sD);
-                                                $d = date('t', $sD);
-                                                $defaultED = $sD >= strtotime(date('Y-m-d')) ? date('Y-m-d') : $rcmStartDate;
-                                                ?>
-                                                <label class="text-sm text-secondary mb-1">Effective Date</label>
-                                                <input autofocus type="date" min="{{ date($y . '-' . $m0 . '-01') }}" max="{{ date($y . '-' . $m0 . '-' . $d) }}"
-                                                       value="{{$defaultED}}"
-                                                       class="form-control form-control-sm w-100" name="effectiveDate"
-                                                       placeholder="Effective Date" required>
-                                            </div>
-                                            <div class="col-6">
-                                                <label class="text-sm text-secondary mb-1">Seconds</label>
-                                                <input type="number" min="75" max="300" class="form-control form-control-sm w-100 cm-time-value" name="timeInSeconds"
-                                                       value="75" placeholder="Time (secs.)" required>
-                                            </div>
-                                        </div>
-                                    </div>
-                                    <div class="mb-2 border border-info p-2 mt-2 bg-light">
-                                        <span>I have had interactive communication with <b>{{$iPatient->client_name}}</b>.</span>
-                                        <div class="d-flex border-top mt-2">
-                                            <label class="mt-2 mb-0 d-inline-flex align-items-center mr-3">
-                                                <input type="radio" class="mr-2" name="didProInteractWithClientAboutRm" value="true" required>
-                                                <span>Yes</span>
-                                            </label>
-                                            <label class="mt-2 mb-0 d-inline-flex align-items-center">
-                                                <input type="radio" class="mr-2" name="didProInteractWithClientAboutRm" value="false" required>
-                                                <span>No</span>
-                                            </label>
-                                        </div>
-                                    </div>
-                                    <div class="mb-2">
-                                        <label class="text-sm text-secondary mb-1">Memo</label>
-                                        <textarea class="form-control form-control-sm w-100" name="contentText"
-                                                  required>Interacted with the patient</textarea>
-                                    </div>
-                                    <div class="d-flex align-items-center">
-                                        <button class="btn btn-sm btn-primary mr-2" submit>Save</button>
-                                        <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
-                                    </div>
-                                </form>
-                            </div>
-                        @endif
-                    @endif
+        <td>
+          <div class="d-flex align-items-baseline">
+            <i class="mr-1 text-sm fa {{$iPatient->has_mcp_interacted_with_client_about_rm ? 'fa-check text-success' : 'fa-exclamation-triangle text-danger on-hover-opaque'}}"></i>
+            <span class="sort-data">{{$iPatient->has_mcp_interacted_with_client_about_rm ? 'Yes' : 'No'}}</span>
+            @if(!request()->input('not-enrolled'))
+            @if($mode === 'mcp')
+            <div moe large relative class="ml-2">
+              <a start show class="py-0 mb-3 text-sm">Entry</a>
+              <form url="/api/careMonthEntry/createForRm" right hook="refresh-rpm-row-{{$trIndex}}">
+                <input type="hidden" name="careMonthUid" value="{{ $iPatient->care_month_uid }}">
+                <input type="hidden" name="proUid" value="{{ $pro->uid }}">
+                <div class="mb-2">
+                  <div class="row">
+                    <div class="col-6 pr-0">
+                      <?php
+                      $sD = strtotime($rcmStartDate);
+                      $y = date('Y', $sD);
+                      $m0 = date('m', $sD);
+                      $d = date('t', $sD);
+                      $defaultED = $sD >= strtotime(date('Y-m-d')) ? date('Y-m-d') : $rcmStartDate;
+                      ?>
+                      <label class="text-sm text-secondary mb-1">Effective Date</label>
+                      <input autofocus type="date" min="{{ date($y . '-' . $m0 . '-01') }}" max="{{ date($y . '-' . $m0 . '-' . $d) }}"
+                      value="{{$defaultED}}"
+                      class="form-control form-control-sm w-100" name="effectiveDate"
+                      placeholder="Effective Date" required>
+                    </div>
+                    <div class="col-6">
+                      <label class="text-sm text-secondary mb-1">Seconds</label>
+                      <input type="number" min="75" max="300" class="form-control form-control-sm w-100 cm-time-value" name="timeInSeconds"
+                      value="75" placeholder="Time (secs.)" required>
+                    </div>
+                  </div>
                 </div>
-            </td>
-        @endif
+                <div class="mb-2 border border-info p-2 mt-2 bg-light">
+                  <span>I have had interactive communication with <b>{{$iPatient->client_name}}</b>.</span>
+                  <div class="d-flex border-top mt-2">
+                    <label class="mt-2 mb-0 d-inline-flex align-items-center mr-3">
+                      <input type="radio" class="mr-2" name="didProInteractWithClientAboutRm" value="true" required>
+                      <span>Yes</span>
+                    </label>
+                    <label class="mt-2 mb-0 d-inline-flex align-items-center">
+                      <input type="radio" class="mr-2" name="didProInteractWithClientAboutRm" value="false" required>
+                      <span>No</span>
+                    </label>
+                  </div>
+                </div>
+                <div class="mb-2">
+                  <label class="text-sm text-secondary mb-1">Memo</label>
+                  <textarea class="form-control form-control-sm w-100" name="contentText"
+                  required>Interacted with the patient</textarea>
+                </div>
+                <div class="d-flex align-items-center">
+                  <button class="btn btn-sm btn-primary mr-2" submit>Save</button>
+                  <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
+                </div>
+              </form>
+            </div>
+            @endif
+            @endif
+          </div>
+        </td>
         <td>
             <div class="d-flex align-items-baseline">
                 <i class="mr-1 text-sm fa {{$iPatient->number_of_days_with_remote_measurements >= 16 ? 'fa-check text-success' : 'fa-exclamation-triangle text-danger on-hover-opaque'}}"></i>
@@ -139,7 +140,7 @@
                 @endif--}}
             </div>
         </td>
-    @elseif($mode === 'rme')
+    @elseif($mode === 'rme' && false)
         <td>
             <div class="d-flex align-items-baseline">
                 <i class="mr-1 text-sm fa {{$iPatient->number_of_days_with_remote_measurements >= 16 ? 'fa-check text-success' : 'fa-exclamation-triangle text-danger on-hover-opaque'}}"></i>
@@ -176,13 +177,14 @@
                 <span class="text-nowrap">{{round($iPatient->rm_total_time_in_seconds_by_mcp / 60)}}m {{round($iPatient->rm_total_time_in_seconds_by_mcp % 60)}}s</span>
                 <span class="sort-data d-none">{{$iPatient->rm_total_time_in_seconds_by_mcp}}</span>
             </div>
-        @elseif($mode === 'rmm')
+
+        @elseif($mode === 'rmm' && false)
             <div class="d-flex align-items-baseline">
                 <i class="mr-1 text-sm fa {{$iPatient->rm_total_time_in_seconds_by_rmm_pro >= 1200 ? 'fa-check text-success' : 'fa-exclamation-triangle text-danger on-hover-opaque'}}"></i>
                 <span class="text-nowrap">{{round($iPatient->rm_total_time_in_seconds_by_rmm_pro / 60)}}m {{round($iPatient->rm_total_time_in_seconds_by_rmm_pro % 60)}}s</span>
                 <span class="sort-data d-none">{{$iPatient->rm_total_time_in_seconds_by_rmm_pro}}</span>
             </div>
-        @elseif($mode === 'rmm')
+        @elseif($mode === 'rmm' && false)
             <div class="d-flex align-items-baseline">
                 <i class="mr-1 text-sm fa {{$iPatient->rm_total_time_in_seconds_by_rme_pro >= 1200 ? 'fa-check text-success' : 'fa-exclamation-triangle text-danger on-hover-opaque'}}"></i>
                 <span class="text-nowrap">{{round($iPatient->rm_total_time_in_seconds_by_rme_pro / 60)}}m {{round($iPatient->rm_total_time_in_seconds_by_rme_pro % 60)}}s</span>
@@ -193,10 +195,7 @@
     @if(!request()->input('not-enrolled'))
     <td>
         @if($mode === 'mcp')
-            @php
-              $careMonth = \App\Models\CareMonth::where('uid', $iPatient->care_month_uid)->first();
-            @endphp
-            @if($lastVisitWithinDays && $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)
+            @if($lastVisitWithinDays && $careMonth->tier())
                 @if($careMonth->mcpRmGenericBill == null )
 
                     @php

+ 2 - 2
resources/views/app/practice-management/rpm-matrix-by-pro-type.blade.php

@@ -71,14 +71,14 @@
                           <div class="">
                             <span class="ml-3 mr-1 text-secondary">Goal:</span>
                             @if($mode === 'mcp')
-                            {{strategy_display($pro->mcp_rpm_payment_strategy_tier_one, $mode)}} <span class="text-muted">({{$pro->mcp_rpm_payment_amount_tier_one ?? '-'}} per patient)</span>
+                            {{strategy_display($pro->mcp_rpm_payment_strategy_tier_one, $mode)}} <span class="text-muted">(${{$pro->mcp_rpm_payment_amount_tier_one ?? '-'}} per patient)</span>
                             <?php $strategy = $pro->mcp_rpm_payment_strategy_tier_one; ?>
                             @endif
                           </div>
                           <div class="">
                             <span class="ml-3 mr-1 text-secondary">Partial:</span>
                             @if($mode === 'mcp')
-                            {{strategy_display($pro->mcp_rpm_payment_strategy_tier_two, $mode)}} <span class="text-muted">({{$pro->mcp_rpm_payment_amount_tier_two ?? '-'}} per patient)</span>
+                            {{strategy_display($pro->mcp_rpm_payment_strategy_tier_two, $mode)}} <span class="text-muted">(${{$pro->mcp_rpm_payment_amount_tier_two ?? '-'}} per patient)</span>
                             <?php $strategy = $pro->mcp_rpm_payment_strategy_tier_two; ?>
                             @endif
                           </div>