Browse Source

care_month->is_client_enrolled_in_rm in queries (all places applic.)

Vijayakrishnan 3 years ago
parent
commit
3fa8fe2f40
27 changed files with 69 additions and 501 deletions
  1. 1 1
      app/Http/Controllers/GsheetController.php
  2. 1 1
      app/Http/Controllers/McpController.php
  3. 31 26
      app/Http/Controllers/PracticeManagementController.php
  4. 1 1
      app/Models/Client.php
  5. 1 1
      app/Models/Pro.php
  6. 2 2
      resources/views/app/admin/client-ccm-rm-status-table.blade.php
  7. 2 2
      resources/views/app/admin/client_ccm_rm_status_filters.blade.php
  8. 0 1
      resources/views/app/admin/patients-table-extended.blade.php
  9. 1 1
      resources/views/app/admin/patients-table.blade.php
  10. 4 4
      resources/views/app/dna/patients-table.blade.php
  11. 1 1
      resources/views/app/mcp/new_patients_awaiting_visit.blade.php
  12. 0 1
      resources/views/app/mcp/patients-table.blade.php
  13. 2 2
      resources/views/app/patient/care-month/_matrix.blade.php
  14. 2 2
      resources/views/app/patient/care-month/_work_matrix.blade.php
  15. 2 6
      resources/views/app/patient/dashboard.blade.php
  16. 7 5
      resources/views/app/patient/note/rm-setup.blade.php
  17. 0 430
      resources/views/app/patient/partials/rm-setup.blade.php
  18. 1 1
      resources/views/app/patient/segment-templates/disclaimers/edit.blade.php
  19. 1 1
      resources/views/app/patient/segment-templates/disclaimers/summary.blade.php
  20. 3 3
      resources/views/app/patient/settings.blade.php
  21. 1 1
      resources/views/app/practice-management/remote-monitoring-admin-row-markup.blade.php
  22. 0 1
      resources/views/app/practice-management/remote-monitoring-row-markup-by-pro-type.blade.php
  23. 1 1
      resources/views/app/practice-management/remote-monitoring-row-markup.blade.php
  24. 2 2
      resources/views/app/practice-management/rm-action-report.blade.php
  25. 0 1
      resources/views/app/practice-management/rpm-matrix-by-pro-type-table.blade.php
  26. 0 1
      resources/views/app/practice-management/rpm-matrix-for-admin-table.blade.php
  27. 2 2
      resources/views/layouts/patient-header.blade.php

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

@@ -22,7 +22,7 @@ class GsheetController extends Controller
        (mcp_pro.name_first || ' ' || mcp_pro.name_last) as mcp_pro_name,
        (rmm_pro.name_first || ' ' || rmm_pro.name_last) as rmm_pro_name,
        client.dob,
-       client.is_enrolled_in_rm,
+       care_month.is_client_enrolled_in_rm,
        client.most_recent_completed_mcp_note_date,
        client.most_recent_completed_mcp_note_id,
        mrmnote.effective_dateest::date as most_recent_completed_mcp_note_date_cm,

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

@@ -465,7 +465,7 @@ FROM
     client join care_month on client.id = care_month.client_id
 WHERE
     care_month.start_date = '{$cmStartDate}'
-    AND client.is_enrolled_in_rm = 'YES'
+    AND care_month.is_client_enrolled_in_rm
     AND care_month.has_mcp_interacted_with_client_about_rm IS NOT TRUE
     AND care_month.mcp_pro_id = {$this->performer->pro->id}
     AND (client.client_engagement_status_category IS NULL OR client.client_engagement_status_category != 'DUMMY')

+ 31 - 26
app/Http/Controllers/PracticeManagementController.php

@@ -1243,7 +1243,7 @@ SELECT client.name_first, client.name_last,
        (client.name_first || ' ' || client.name_last) as client_name,
        client.uid as client_uid, 
        client.dob,
-       client.is_enrolled_in_rm,
+       care_month.is_client_enrolled_in_rm,
        client.most_recent_completed_mcp_note_date,
        client.most_recent_completed_mcp_note_id,
        mrmnote.effective_dateest::date as most_recent_completed_mcp_note_date_cm,
@@ -1311,7 +1311,7 @@ SELECT client.name_first, client.name_last,
        (client.name_first || ' ' || client.name_last) as client_name,
        client.uid as client_uid, 
        client.dob,
-       client.is_enrolled_in_rm,
+       care_month.is_client_enrolled_in_rm,
        client.most_recent_completed_mcp_note_date,
        client.most_recent_completed_mcp_note_id,
        mrmnote.effective_dateest::date as most_recent_completed_mcp_note_date_cm,
@@ -1371,7 +1371,7 @@ SELECT client.name_first, client.name_last,
        (client.name_first || ' ' || client.name_last) as client_name,
        client.uid as client_uid, 
        client.dob,
-       client.is_enrolled_in_rm,
+       care_month.is_client_enrolled_in_rm,
        client.most_recent_completed_mcp_note_date,
        client.most_recent_completed_mcp_note_id,
        mrmnote.effective_dateest::date as most_recent_completed_mcp_note_date_cm,
@@ -1431,7 +1431,7 @@ SELECT client.name_first, client.name_last,
        (client.name_first || ' ' || client.name_last) as client_name,
        client.uid as client_uid, 
        client.dob,
-       client.is_enrolled_in_rm,
+       care_month.is_client_enrolled_in_rm,
        client.most_recent_completed_mcp_note_date,
        client.most_recent_completed_mcp_note_id,
        mrmnote.effective_dateest::date as most_recent_completed_mcp_note_date_cm,
@@ -1555,10 +1555,10 @@ WHERE care_month.uid = '{$careMonthUid}' AND client.uid = '{$clientUid}'
         if(trim($request->input('f_rpm'))) {
             $v = trim($request->input('f_rpm'));
             if($v === 'yes') {
-                $conditions[] = "(client.is_enrolled_in_rm IS NOT NULL AND client.is_enrolled_in_rm = 'YES')";
+                $conditions[] = "(care_month.is_client_enrolled_in_rm IS TRUE)";
             }
             elseif($v === 'no') {
-                $conditions[] = "(client.is_enrolled_in_rm IS NULL OR client.is_enrolled_in_rm != 'YES')";
+                $conditions[] = "(care_month.is_client_enrolled_in_rm IS NOT TRUE)";
             }
         }
         if(trim($request->input('f_cell_bp'))) {
@@ -1628,10 +1628,10 @@ WHERE care_month.uid = '{$careMonthUid}' AND client.uid = '{$clientUid}'
         }
 
         if($request->input('not-enrolled')) {
-            $conditions[] = "(client.is_enrolled_in_rm != 'YES')";
+            $conditions[] = "(care_month.is_client_enrolled_in_rm IS NOT TRUE)";
         }
         else {
-            $conditions[] = "(client.is_enrolled_in_rm = 'YES')";
+            $conditions[] = "(care_month.is_client_enrolled_in_rm IS TRUE)";
         }
 
         $proTypeCondition = '';
@@ -1672,7 +1672,7 @@ SELECT client.name_first, client.name_last,
        (client.name_first || ' ' || client.name_last) as client_name,
        client.uid as client_uid, 
        client.dob,
-       client.is_enrolled_in_rm,
+       care_month.is_client_enrolled_in_rm,
        client.most_recent_completed_mcp_note_date,
        client.most_recent_completed_mcp_note_id,
        mrmnote.effective_dateest::date as most_recent_completed_mcp_note_date_cm,
@@ -1851,10 +1851,10 @@ WHERE
         if(trim($request->input('f_rpm'))) {
             $v = trim($request->input('f_rpm'));
             if($v === 'yes') {
-                $conditions[] = "(client.is_enrolled_in_rm IS NOT NULL AND client.is_enrolled_in_rm = 'YES')";
+                $conditions[] = "(care_month.is_client_enrolled_in_rm IS TRUE)";
             }
             elseif($v === 'no') {
-                $conditions[] = "(client.is_enrolled_in_rm IS NULL OR client.is_enrolled_in_rm != 'YES')";
+                $conditions[] = "(care_month.is_client_enrolled_in_rm IS NOT TRUE)";
             }
         }
         if(trim($request->input('f_cell_bp'))) {
@@ -1950,10 +1950,10 @@ WHERE
         }
 
         if($request->input('not-enrolled')) {
-            $conditions[] = "(client.is_enrolled_in_rm != 'YES')";
+            $conditions[] = "(care_month.is_client_enrolled_in_rm IS NOT TRUE)";
         }
         else {
-            $conditions[] = "(client.is_enrolled_in_rm = 'YES')";
+            $conditions[] = "(care_month.is_client_enrolled_in_rm IS TRUE)";
         }
 
         if($request->input('f_claim_closed')) {
@@ -2017,7 +2017,7 @@ SELECT client.name_first, client.name_last,
        client.uid as client_uid, 
        client.dob,
        client.age_in_years,
-       client.is_enrolled_in_rm,
+       care_month.is_client_enrolled_in_rm,
        client.most_recent_completed_mcp_note_date,
        client.most_recent_completed_mcp_note_id,
        client.cell_number,
@@ -2233,7 +2233,7 @@ WHERE
            (client.name_first || ' ' || client.name_last) as client_name,
            client.uid as client_uid, 
            client.dob,
-           client.is_enrolled_in_rm,
+           care_month.is_client_enrolled_in_rm,
            client.most_recent_completed_mcp_note_date,
            care_month.uid as care_month_uid,
            care_month.id as care_month_id,
@@ -2331,7 +2331,7 @@ SELECT client.name_first, client.name_last,
        client.uid as client_uid,
        client.chart_number, 
        client.dob,
-       client.is_enrolled_in_rm,
+       care_month.is_client_enrolled_in_rm,
        client.most_recent_completed_mcp_note_date,
        client.most_recent_completed_mcp_note_id,
        mrmnote.effective_dateest::date as most_recent_completed_mcp_note_date_cm,
@@ -2407,7 +2407,7 @@ WHERE
 SELECT count(*)
 FROM care_month join client on care_month.client_id = client.id
 WHERE
-      client.shadow_pro_id is null AND client.is_enrolled_in_rm = 'YES'
+      client.shadow_pro_id is null AND care_month.is_client_enrolled_in_rm IS TRUE
       AND EXTRACT(MONTH from care_month.start_date) = " . ($request->input('m') ?: 'EXTRACT(MONTH from now())') . "
       AND EXTRACT(YEAR from care_month.start_date) = " . ($request->input('y') ?: 'EXTRACT(YEAR from now())') . "
       " . (count($conditions) > 0 ? 'AND ' . implode(" AND ", $conditions) : '')
@@ -2421,7 +2421,7 @@ WHERE
         $conditions = [];
 
         $c_isMCP = "client.mcp_pro_id = {$performer->pro->id}";
-        $c_enrolledInRPM = "client.is_enrolled_in_rm = 'YES'";
+        $c_enrolledInRPM = "care_month.is_client_enrolled_in_rm IS TRUE";
         $c_hasDevice = "(SELECT COUNT(client_bdt_device.id) FROM client_bdt_device JOIN bdt_device bd on client_bdt_device.device_id = bd.id WHERE client_bdt_device.client_id = client.id) > 0";
         $c_lastVisitBefore90Days = "DATE_PART('day', care_month.start_date::timestamp - client.most_recent_completed_mcp_note_date::timestamp) > 90";
         $c_lastVisitWithin90Days = "DATE_PART('day', care_month.start_date::timestamp - client.most_recent_completed_mcp_note_date::timestamp) <= 90";
@@ -2475,7 +2475,7 @@ WHERE
     private function rpmConditionsAdmin($performer, $rc, $rc2) {
         $conditions = [];
 
-        $c_enrolledInRPM = "client.is_enrolled_in_rm = 'YES'";
+        $c_enrolledInRPM = "care_month.is_client_enrolled_in_rm IS TRUE";
         $c_hasDevice = "(SELECT COUNT(client_bdt_device.id) FROM client_bdt_device JOIN bdt_device bd on client_bdt_device.device_id = bd.id WHERE client_bdt_device.client_id = client.id) > 0";
         $c_lastVisitBefore90Days = "DATE_PART('day', care_month.start_date::timestamp - client.most_recent_completed_mcp_note_date::timestamp) > 90";
         $c_lastVisitWithin90Days = "DATE_PART('day', care_month.start_date::timestamp - client.most_recent_completed_mcp_note_date::timestamp) <= 90";
@@ -3771,12 +3771,12 @@ ORDER BY c.name_last, c.name_first
         $pro = $this->performer()->pro;
         if($pro->pro_type !== 'ADMIN') {
             if($pro->is_hcp){
-               $patients = $patients->where('mcp_pro_id', $this->performer()->pro->id); 
+               $patients = $patients->where('mcp_pro_id', $this->performer()->pro->id);
             }
             if($pro->is_considered_for_dna){
-                $patients = $patients->where('default_na_pro_id', $this->performer()->pro->id); 
+                $patients = $patients->where('default_na_pro_id', $this->performer()->pro->id);
              }
-            
+
 
         }
 
@@ -3839,8 +3839,8 @@ ORDER BY c.name_last, c.name_first
             $patients->where('is_eligible_for_rm', '=', $request->input('is_eligible_for_rm'));
         }
 
-        if($request->input('is_enrolled_in_rm')){
-            $patients->where('is_enrolled_in_rm', '=', $request->input('is_enrolled_in_rm'));
+        if($request->input('is_enrolled_in_rm')){  /*-- correct --*/
+            $patients->where('is_enrolled_in_rm', '=', $request->input('is_enrolled_in_rm')); /*-- correct --*/
         }
 
         if($request->input('has_rm_setup_been_performed')){
@@ -3899,7 +3899,12 @@ ORDER BY c.name_last, c.name_first
             $conditions[] = "(c.is_eligible_for_rm = '" . $request->input('rm_eligible') . "')";
         }
         if($request->input('rm_enrolled')) {
-            $conditions[] = "(c.is_enrolled_in_rm = '" . $request->input('rm_enrolled') . "')";
+            if($request->input('rm_enrolled') === 'YES') {
+                $conditions[] = "(cm.is_client_enrolled_in_rm IS TRUE)";
+            }
+            else {
+                $conditions[] = "(cm.is_client_enrolled_in_rm IS NOT TRUE)";
+            }
         }
         if($request->input('rm_setup')) {
             $conditions[] = "(c.has_rm_setup_been_performed IS " . ($request->input('rm_setup') === 'YES' ? 'TRUE' : 'FALSE') . ")";
@@ -3976,7 +3981,7 @@ ORDER BY c.name_last, c.name_first
             cm.start_date,
             c.uid as client_uid,
             c.is_eligible_for_rm,
-            c.is_enrolled_in_rm,
+            cm.is_client_enrolled_in_rm,
             c.has_rm_setup_been_performed,
             (c.name_first || ' ' || c.name_last) as client_name,
             (mcp.name_first || ' ' || mcp.name_last) as mcp_name,

+ 1 - 1
app/Models/Client.php

@@ -314,9 +314,9 @@ class Client extends Model
     // returns the current care-month, if in fact patient is awaiting mcp rm interaction
     public function isAwaitingRMCommunicationFromMCP() {
         // if patient is enrolled in rm AND has current care month AND $careMonth->has_mcp_interacted_with_client_about_rm IS FALSE
-        if($this->is_enrolled_in_rm !== 'YES') return false;
         $careMonth = $this->currentCareMonth();
         if(!$careMonth) return false;
+        if(!$careMonth->is_client_enrolled_in_rm) return false;
         return $careMonth->has_mcp_interacted_with_client_about_rm ? false : $careMonth;
     }
 

+ 1 - 1
app/Models/Pro.php

@@ -745,7 +745,7 @@ FROM
     client join care_month on client.id = care_month.client_id
 WHERE
     care_month.start_date = '{$cmStartDate}'
-    AND client.is_enrolled_in_rm = 'YES'
+    AND care_month.is_client_enrolled_in_rm IS TRUE
     AND care_month.has_mcp_interacted_with_client_about_rm IS NOT TRUE
     AND care_month.mcp_pro_id = {$this->id}
     AND (client.client_engagement_status_category IS NULL OR client.client_engagement_status_category != 'DUMMY')

+ 2 - 2
resources/views/app/admin/client-ccm-rm-status-table.blade.php

@@ -111,8 +111,8 @@
 					@endif 
 				</td>
 				<td>
-					<div>{{$patient->is_enrolled_in_rm}}</div>
-					@if(!$patient->is_enrolled_in_rm)
+					<div>{{$patient->is_enrolled_in_rm}}</div> {{-- correct --}}
+					@if(!$patient->is_enrolled_in_rm) {{-- correct --}}
 						<div>
 							@if($patient->why_not_enrolled_in_rm_category)[{{$patient->why_not_enrolled_in_rm_category}}] @endif {{$patient->why_not_enrolled_in_rm_memo}}
 						</div>

+ 2 - 2
resources/views/app/admin/client_ccm_rm_status_filters.blade.php

@@ -160,7 +160,7 @@
 	<div class="sm-section">
 		<div class="form-group">
 			<label>Enrolled In RM:</label>
-			<select name="is_enrolled_in_rm" class="form-control input-sm" v-model="filters.is_enrolled_in_rm">
+			<select name="is_enrolled_in_rm" class="form-control input-sm" v-model="filters.is_enrolled_in_rm"> {{-- correct --}}
 				<option value="">All</option>
 				<option value="YES">Yes</option>
 				<option value="NO">No</option>
@@ -214,7 +214,7 @@ $allFilterKeys = [
 	'sex',
 	'status',
 	'is_eligible_for_rm',
-	'is_enrolled_in_rm',
+	'is_enrolled_in_rm', // -- correct --
 	'has_rm_setup_been_performed',
 ];
 for ($i=0; $i < count($allFilterKeys); $i++) {

+ 0 - 1
resources/views/app/admin/patients-table-extended.blade.php

@@ -332,7 +332,6 @@
                 {{--<td><?= $patient->most_recent_cellular_bp_value_irregular ? '<i class="fa fa-heartbeat"></i>' : '' ?></td>--}}
                 {{--<td>{{ $patient->most_recent_cellular_bp_value_pulse }}</td>--}}
                 {{--<td>{{ $patient->most_recent_cellular_weight_value ? round($patient->most_recent_cellular_weight_value, 2) : '--' }}</td>--}}
-                {{-- <td>{{$patient->is_enrolled_in_rm ? 'Yes' : 'No'}}</td>--}}
                 {{--<td class="d-none text-nowrap">
                     <?php $m = $patient->lastMeasurementOfType('Wt. (lbs.)'); ?>
                     {{$m && $m->value ? round($m->value, 2) : '-'}}

+ 1 - 1
resources/views/app/admin/patients-table.blade.php

@@ -96,7 +96,7 @@
 
 				<td>{{ friendlier_date_time($patient->most_recent_cellular_weight_measurement_at, false) }}</td>
 
-				{{-- <td>{{$patient->is_enrolled_in_rm ? 'Yes' : 'No'}}</td>--}}
+
 				<td class="d-none text-nowrap">
 					<?php $m = $patient->lastMeasurementOfType('Wt. (lbs.)'); ?>
 					{{$m && $m->value ? round($m->value, 2) : '-'}}

+ 4 - 4
resources/views/app/dna/patients-table.blade.php

@@ -77,9 +77,9 @@
 			   <div class="">
 				   <div class="on-hover-show d-inline-block">
 					   <span>Enrolled:
-						   @if($patient->is_enrolled_in_rm === 'YES')
+						   @if($patient->is_enrolled_in_rm === 'YES') {{-- correct --}}
 							   <i class="fas fa-check-circle text-success" data-toggle="tooltip" data-placement="bottom" title="YES"></i>
-						   @elseif($patient->is_enrolled_in_rm === 'NO')
+						   @elseif($patient->is_enrolled_in_rm === 'NO') {{-- correct --}}
 							   <i
 									   class="fas fa-times-circle text-danger"
 									   tabindex="0"
@@ -87,7 +87,7 @@
 									   title="No"
 									   data-target="#enrollment-{{ $patient->uid }}"
 							   ></i>
-						   @elseif($patient->is_enrolled_in_rm === 'UNKNOWN')
+						   @elseif($patient->is_enrolled_in_rm === 'UNKNOWN') {{-- correct --}}
 							   <i
 									   tabindex="0"
 									   data-toggle="popover"
@@ -99,7 +99,7 @@
 						   @endif
 						</span>
 					   	<div id="enrollment-{{ $patient->uid }}" class="on-hover-content">
-						   	<h6 class="mt-2 font-weight-bold">{{ $patient->is_enrolled_in_rm }}</h6>
+						   	<h6 class="mt-2 font-weight-bold">{{ $patient->is_enrolled_in_rm }}</h6> {{-- correct --}}
 							<span>Is Eligible for RM: {{ $patient->is_eligible_for_rm }}</span><br>
 							<span>Why not eligible: {{ $patient->why_not_eligible_for_rm_category ?? '---' }}</span><br>
 							<span>{{ $patient->why_not_eligible_for_rm_memo }}</span>

+ 1 - 1
resources/views/app/mcp/new_patients_awaiting_visit.blade.php

@@ -48,7 +48,7 @@
                             <td>{{$row->lastMcpAppointment() ? @$row->lastMcpAppointment()->start_date : '-'}}</td>
                             <td>{{$row->nextMcpAppointment() ? @$row->nextMcpAppointment()->start_date : '-'}}</td>
                             <td>{{$row->nextMcpAppointment() ? @$row->nextMcpAppointment()->status : '-'}}</td>
-                            <td>{{$row->is_enrolled_in_rm ? 'Yes' : 'No'}}</td>
+                            <td>{{$row->currentCareMonth() && $row->currentCareMonth()->is_client_enrolled_in_rm ? 'Yes' : 'No'}}</td>
                             <td class="d-none">
                                 <?php $m = $row->lastMeasurementOfType('Wt. (lbs.)'); ?>
                                 {{$m && $m->value ? round($m->value, 2) : '-'}}

+ 0 - 1
resources/views/app/mcp/patients-table.blade.php

@@ -69,7 +69,6 @@
 
 				<td>{{ friendlier_date_time($patient->most_recent_cellular_weight_measurement_at, false) }}</td>
 
-				{{-- <td>{{$patient->is_enrolled_in_rm ? 'Yes' : 'No'}}</td>--}}
 				<td class="d-none text-nowrap">
 					<?php $m = $patient->lastMeasurementOfType('Wt. (lbs.)'); ?>
 					{{$m && $m->value ? round($m->value, 2) : '-'}}

+ 2 - 2
resources/views/app/patient/care-month/_matrix.blade.php

@@ -204,7 +204,7 @@ foreach ($days as $k => $day) {
                                         $dayTotalMinutes += round($entry->time_in_seconds / 60);
                                     }
                                     $autoCheckEntry = false;
-                                    $autoCheckEntry = ($dayTotalMinutes < 2 && $patient->is_enrolled_in_rm);
+                                    $autoCheckEntry = ($dayTotalMinutes < 2 && $careMonth->is_client_enrolled_in_rm);
                                     ?>
                                     <div class="mb-2">
                                         <div class="mb-2">
@@ -275,7 +275,7 @@ foreach ($days as $k => $day) {
                                         $dayTotalMinutes += round($entry->time_in_seconds / 60);
                                     }
                                     $autoCheckEntry = false;
-                                    $autoCheckEntry = ($dayTotalMinutes < 2 && $patient->is_enrolled_in_rm);
+                                    $autoCheckEntry = ($dayTotalMinutes < 2 && $careMonth->is_client_enrolled_in_rm);
                                     ?>
                                     <div class="p-2 border border-info bg-light mb-2">
                                         <div class="mb-2">

+ 2 - 2
resources/views/app/patient/care-month/_work_matrix.blade.php

@@ -229,7 +229,7 @@ $days = $daysWithUnstamped;
                                             $dayTotalMinutes += round($entry->time_in_seconds / 60);
                                         }
                                         $autoCheckEntry = false;
-                                        $autoCheckEntry = ($dayTotalMinutes < 2 && $patient->is_enrolled_in_rm);
+                                        $autoCheckEntry = ($dayTotalMinutes < 2 && $careMonth->is_client_enrolled_in_rm);
                                         ?>
                                         <div class="mb-2">
                                             <div class="mb-2">
@@ -300,7 +300,7 @@ $days = $daysWithUnstamped;
                                             $dayTotalMinutes += round($entry->time_in_seconds / 60);
                                         }
                                         $autoCheckEntry = false;
-                                        $autoCheckEntry = ($dayTotalMinutes < 2 && $patient->is_enrolled_in_rm);
+                                        $autoCheckEntry = ($dayTotalMinutes < 2 && $careMonth->is_client_enrolled_in_rm);
                                         ?>
                                         <div class="p-2 border border-info bg-light mb-2">
                                             <div class="mb-2">

+ 2 - 6
resources/views/app/patient/dashboard.blade.php

@@ -82,12 +82,8 @@ foreach ($pro->allShortcuts() as $shortcut) {
             </div>
             @endif
             {{-- rpm summary for current caremonth --}}
-            @if($patient->is_enrolled_in_rm === 'YES')
-            @if($patient->currentCareMonth())
-            @include('app/patient/partials/caremonth-summary', ['careMonth' => $patient->currentCareMonth()])
-            @else
-            <div class="alert alert-info">No caremonth for this month.</div>
-            @endif
+            @if($patient->currentCareMonth() && $patient->currentCareMonth()->is_client_enrolled_in_rm)
+                @include('app/patient/partials/caremonth-summary', ['careMonth' => $patient->currentCareMonth()])
             @endif
 
             {{-- appointments --}}

+ 7 - 5
resources/views/app/patient/note/rm-setup.blade.php

@@ -56,12 +56,12 @@
 
                 <div class="d-flex align-items-center">
                     <span class="mr-1 text-secondary">Enrollment:</span>
-                    <span>{{ ucwords($patient->is_enrolled_in_rm ? $patient->is_enrolled_in_rm : '-') }}</span>
-                    @if($patient->is_enrolled_in_rm === 'NO' && $patient->why_not_enrolled_in_rm_category)
+                    <span>{{ ucwords($patient->is_enrolled_in_rm ? $patient->is_enrolled_in_rm : '-') }}</span> {{-- correct --}}
+                    @if($patient->is_enrolled_in_rm === 'NO' && $patient->why_not_enrolled_in_rm_category) {{-- correct --}}
                         <span class="text-sm ml-2">({{$patient->why_not_enrolled_in_rm_category}})</span>
                     @endif
 
-                    @if($patient->is_enrolled_in_rm === 'NO' || $patient->is_enrolled_in_rm === 'UNKNOWN')
+                    @if($patient->is_enrolled_in_rm === 'NO' || $patient->is_enrolled_in_rm === 'UNKNOWN') {{-- correct --}}
                         <span class="ml-2 text-secondary">|</span>
                         <div moe wide class="ml-2">
                             <a start show>Enroll</a>
@@ -98,10 +98,12 @@
 
                     <span class="ml-2 text-secondary">|</span>
                     <div moe class="ml-2">
-                        <a start show>{{$patient->is_enrolled_in_rm === 'YES' ? 'Un-enroll' : ($patient->is_enrolled_in_rm === 'NO' ? 'Edit Reason' : 'Not interested/other')}}</a>
+                        <a start show>{{$patient->is_enrolled_in_rm === 'YES' ? 'Un-enroll' : ($patient->is_enrolled_in_rm === 'NO' ? 'Edit Reason' : 'Not interested/other')}}</a> {{-- correct --}}
                         <form url="/api/client/setIsEnrolledInRmToFalse" class="mcp-theme-1">
                             <input type="hidden" name="uid" value="{{$patient->uid}}">
-                            <p class="mb-2 text-nowrap">{{$patient->is_enrolled_in_rm === 'YES' ? 'Mark as not enrolled' : ($patient->is_enrolled_in_rm === 'NO' ? 'Edit Reason' : 'Not interested/other')}}</p>
+                            <p class="mb-2 text-nowrap">
+                                {{$patient->is_enrolled_in_rm === 'YES' ? 'Mark as not enrolled' : ($patient->is_enrolled_in_rm === 'NO' ? 'Edit Reason' : 'Not interested/other')}} {{-- correct --}}
+                            </p>
                             <div class="mb-2">
                                 <label class="text-secondary text-sm mb-1">Reason</label>
                                 <select name="whyNotEnrolledInRmCategory" class="form-control" required>

+ 0 - 430
resources/views/app/patient/partials/rm-setup.blade.php

@@ -1,430 +0,0 @@
-<div class="row">
-    <div class="col-5">
-        <div class="d-flex mb-2">
-          @if($pro->pro_type === 'ADMIN')
-              <div class="d-flex align-items-center">
-                  <div class="d-flex align-items-center">
-                    <span class="mr-2 text-secondary">Eligible for RM?</span>
-                    <span class="mr-1">{{ ucwords($patient->is_eligible_for_rm ? $patient->is_eligible_for_rm : '-') }}</span>
-                    <div moe>
-                      <a start show><i class="fa fa-edit on-hover-opaque"></i></a>
-                      <form url="/api/client/updateRmEligibility" class="mcp-theme-1">
-                        <input type="hidden" name="uid" value="{{$patient->uid}}">
-                        <div class="mb-2">
-                          <label class="text-sm mb-1 text-secondary">Is Eligible?</label>
-                          <select name="isEligibleForRm"
-                          class="form-control form-control-sm"
-                          onchange="toggleDisabledAsNeeded(this, 'NO', 'not-eligible-for-rm')">
-                          <option value="">-- Select Status --</option>
-                          <option value="YES" {{ $patient->is_eligible_for_rm === 'YES' ? 'selected' : '' }}>YES</option>
-                          <option value="NO" {{ $patient->is_eligible_for_rm === 'NO' ? 'selected' : '' }}>NO</option>
-                          <option value="UNKNOWN" {{ $patient->is_eligible_for_rm === 'UNKNOWN' ? 'selected' : '' }}>UNKNOWN</option>
-                        </select>
-                      </div>
-                      <div class="mb-2">
-                        <label class="text-sm mb-1 text-secondary">Why not eligible category</label>
-                        <input type="text" class="not-eligible-for-rm form-control form-control-sm"
-                        {{$patient->is_eligible_for_rm === 'NO' ? '' : 'disabled' }}
-                        name="whyNotEligibleForRmCategory" value="{{$patient->why_not_eligible_for_rm_category}}">
-                      </div>
-                      <div class="mb-2">
-                        <label class="text-sm mb-1 text-secondary">Why not eligible memo</label>
-                        <input type="text" class="not-eligible-for-rm form-control form-control-sm"
-                        {{$patient->is_eligible_for_rm === 'NO' ? '' : 'disabled' }}
-                        name="whyNotEligibleForRmMemo" value="{{$patient->why_not_eligible_for_rm_memo}}">
-                      </div>
-                      <div>
-                        <button submit class="btn btn-sm btn-primary mr-1">Submit</button>
-                        <button cancel class="btn btn-sm btn-default border">Cancel</button>
-                      </div>
-                    </form>
-                  </div>
-                  @if($patient->is_eligible_for_rm === 'NO')
-                  <span class="ml-1 on-hover-show d-inline-block on-hover-opaque">
-                      <i class="fa fa-info-circle"></i>
-                      <div class="on-hover-content py-2 pl-3 text-nowrap text-dark" style="left:0;right:auto;">
-                          <div>
-                              <small class="text-sm"><b>Category:</b> {{$patient->why_not_eligible_for_rm_category ?: '-'}}</small>
-                          </div>
-                          <div>
-                              <small class="text-sm"><b>Memo:</b> {{$patient->why_not_eligible_for_rm_memo ?: '-'}}</small>
-                          </div>
-                      </div>
-                  </span>
-                  @endif
-                  </div>
-              </div>
-              <span class="text-secondary mx-2">|</span>
-          @endif
-
-          <div class="d-flex align-items-center">
-              <span class="mr-1 text-secondary">Enrollment:</span>
-              <span>{{ ucwords($patient->is_enrolled_in_rm ? $patient->is_enrolled_in_rm : '-') }}</span>
-              @if($patient->is_enrolled_in_rm === 'NO' && $patient->why_not_enrolled_in_rm_category)
-                  <span class="text-sm ml-2">({{$patient->why_not_enrolled_in_rm_category}})</span>
-              @endif
-              @if($patient->is_enrolled_in_rm === 'YES')
-                  <div moe wide class="ml-2">
-                      <a start show><i class="fa fa-edit on-hover-opaque"></i></a>
-                      <form url="/api/client/setIsEnrolledInRmToFalse" class="mcp-theme-1">
-                          <input type="hidden" name="uid" value="{{$patient->uid}}">
-                          <h2 class="alert alert-warning"><i class="fa fa-warning"></i> RPM Enrollment Cancellation</h2>
-                          <div class="mb-2">
-                              <label class="text-secondary text-sm mb-1">Reason</label>
-                              <select name="whyNotEnrolledInRmCategory" class="form-control" required>
-                                  <option value="">-- select --</option>
-                                  <option value="Withdrawn">Withdrawn</option>
-                                  <option value="Inactive">Inactive</option>
-                                  <option value="Entry Error">Entry Error</option>
-                                  <option value="Test Chart">Test Chart</option>
-                                  <option value="Deceased">Deceased</option>
-                                  <option value="No Longer Eligible">No Longer Eligible</option>
-                              </select>
-                          </div>
-                          <div class="mb-2">
-                              <label class="text-secondary text-sm mb-1">Memo</label>
-                              <textarea type="text" name="whyNotEnrolledInRmMemo" class="form-control"></textarea>
-                          </div>
-                          <div>
-                              <button submit class="btn btn-sm btn-primary mr-1">Submit</button>
-                              <button cancel class="btn btn-sm btn-default border">Cancel</button>
-                          </div>
-                      </form>
-                  </div>
-              @else
-                  <div moe wide class="ml-2">
-                      <a start show><i class="fa fa-edit on-hover-opaque"></i></a>
-                      <form url="/api/client/setIsEnrolledInRmToTrue" class="mcp-theme-1">
-                          <input type="hidden" name="uid" value="{{$patient->uid}}">
-                          <h2>RPM Enrollment:</h2>
-                          <h3>Please confirm the following with patient:</h3>
-                          <p class="mb-2">I understand that:</p>
-                          <ul style="list-style:none;" class="pl-2">
-                              <li class="d-flex mb-1">
-                                  <input type="checkbox" required="true" class="mt-1 mr-2" id="x" name="x">
-                                  <label class="c-pointer" for="x">I am the only person who should be using the remote monitoring equipment as instructed. I will
-                                  not use the device for reasons other than my own personal health monitoring. I understand that
-                                  I can only participate in this program with one Medical Provider at a time.</label>
-                              </li>
-                              <li class="d-flex mb-1">
-                                  <input type="checkbox" required="true" class="mt-1 mr-2" id="y" name="y">
-                                  <label class="c-pointer" for="y">I will not tamper with the equipment. I understand that I am responsible for any fees associated
-                                  with misuse of the equipment.</label>
-                              </li>
-                              <li class="d-flex mb-1">
-                                  <input type="checkbox" required="true" class="mt-1 mr-2" id="z" name="z">
-                                  <label class="c-pointer" for="z">I understand the devices are only designed for the RPM program.</label>
-                              </li>
-                          </ul>
-
-                          <div class="mb-2">
-                              <button submit class="btn btn-sm btn-primary mr-1">Submit</button>
-                              <button cancel class="btn btn-sm btn-default border">Cancel</button>
-                          </div>
-                      </form>
-                  </div>
-              @endif
-          </div>
-        </div>
-
-        <div class="d-flex align-items-start flex-column mb-2">
-            <div>
-                <span class="mr-2 text-secondary">RM Reasons:</span>
-                @include('app.patient.partials.put-rm-reasons', ['recordType' => 'CLIENT', 'record' => $patient])
-            </div>
-            <div class="pl-3 mt-1">
-                @include('app.patient.partials.rm-reasons-display', ['recordType' => 'CLIENT', 'record' => $patient])
-            </div>
-        </div>
-
-        {{--<div class="d-flex align-items-baseline mb-3">
-            <span>RM Reasons:</span>
-            <div class="ml-3">
-                @if(!$patient->rmReasons || !count($patient->rmReasons))
-                    <span class="text-secondary">None</span>
-                @else
-                    <div>
-                        @foreach($patient->rmReasons as $reason)
-                            <div class="border-bottom pb-1 mb-1 d-flex align-items-start">
-                                <b class="width-90px">{{$reason->code}}</b>
-                                <span class="width-200px mr-3">{{$reason->description}}</span>
-                                <div moe>
-                                    <a start show>Edit</a>
-                                    <form url="/api/clientCmRmReason/updateBasic" class="mcp-theme-1">
-                                        <input type="hidden" name="uid" value="{{$reason->uid}}">
-                                        <div class="mb-2">
-                                            <label class="text-sm mb-1 text-secondary">Code *</label>
-                                            <input type="text" class="form-control form-control-sm"
-                                                   icd-autocomplete-code
-                                                   name="code" value="{{$reason->code}}" required>
-                                        </div>
-                                        <div class="mb-2">
-                                            <label class="text-sm mb-1 text-secondary">Description</label>
-                                            <input type="text" class="form-control form-control-sm"
-                                                   icd-autocomplete-description
-                                                   name="description" value="{{$reason->description}}">
-                                        </div>
-                                        <div>
-                                            <button submit class="btn btn-sm btn-primary mr-1">Submit</button>
-                                            <button cancel class="btn btn-sm btn-default border">Cancel</button>
-                                        </div>
-                                    </form>
-                                </div>
-                            </div>
-                        @endforeach
-                    </div>
-                @endif
-                <div>
-                    <div moe>
-                        <a start show>+ Add</a>
-                        <form url="/api/clientCmRmReason/create" class="mcp-theme-1">
-                            <input type="hidden" name="clientUid" value="{{$patient->uid}}">
-                            <input type="hidden" name="cmOrRm" value="RM">
-                            <div class="mb-2">
-                                <label class="text-sm mb-1 text-secondary">Code *</label>
-                                <input type="text" class="form-control form-control-sm"
-                                       icd-autocomplete-code
-                                       name="code" value="" required>
-                            </div>
-                            <div class="mb-2">
-                                <label class="text-sm mb-1 text-secondary">Description</label>
-                                <input type="text" class="form-control form-control-sm"
-                                       icd-autocomplete-description
-                                       name="description" value="">
-                            </div>
-                            <div>
-                                <button submit class="btn btn-sm btn-primary mr-1">Submit</button>
-                                <button cancel class="btn btn-sm btn-default border">Cancel</button>
-                            </div>
-                        </form>
-                    </div>
-                </div>
-            </div>
-        </div>--}}
-
-        @if($pro->pro_type === 'ADMIN')
-            <div class="d-flex align-items-center mb-2">
-                <span class="text-secondary">RME Pro:</span>
-                <span>{{ $patient->rme ? $patient->rme->displayName() : '-' }}</span>
-                <div moe class="ml-2">
-                    <a start show><i class="fa fa-edit on-hover-opaque"></i></a>
-                    <form url="/api/client/putRmePro" class="mcp-theme-1">
-                        <input type="hidden" name="uid" value="{{$patient->uid}}">
-                        <div class="mb-2">
-                            <label class="text-secondary text-sm">RME Pro</label>
-                            <select provider-search data-pro-uid="{{ @$patient->rme->uid }}" name="rmeProUid" class="form-control form-control-sm">
-                                <option value=""> --select--</option>
-                            </select>
-                        </div>
-                        <div>
-                            <button submit class="btn btn-sm btn-primary mr-1">Submit</button>
-                            <button cancel class="btn btn-sm btn-default border">Cancel</button>
-                        </div>
-                    </form>
-                </div>
-                @if($patient->rme)
-                    <div moe class="ml-2">
-                        <a start show><i class="fa fa-trash-alt text-danger on-hover-opaque"></i></a>
-                        <form url="/api/client/removeRmePro" class="mcp-theme-1">
-                            <input type="hidden" name="uid" value="{{$patient->uid}}">
-                            <p>Remove RME Pro?</p>
-                            <div>
-                                <button submit class="btn btn-sm btn-primary mr-1">Submit</button>
-                                <button cancel class="btn btn-sm btn-default border">Cancel</button>
-                            </div>
-                        </form>
-                    </div>
-                @endif
-            </div>
-            <div class="d-flex align-items-center mb-2">
-                <span class="text-secondary">RMM Pro:</span>
-                <span>{{ $patient->rmm ? $patient->rmm->displayName() : '-' }}</span>
-                <div moe class="ml-2">
-                    <a start show><i class="fa fa-edit on-hover-opaque"></i></a>
-                    <form url="/api/client/putRmmPro" class="mcp-theme-1">
-                        <input type="hidden" name="uid" value="{{$patient->uid}}">
-                        <div class="mb-2">
-                            <label class="text-secondary text-sm">RMM Pro</label>
-                            <select provider-search data-pro-uid="{{ @$patient->rmm->uid }}" name="rmmProUid" class="form-control form-control-sm">
-                                <option value=""> --select--</option>
-                            </select>
-                        </div>
-                        <div>
-                            <button submit class="btn btn-sm btn-primary mr-1">Submit</button>
-                            <button cancel class="btn btn-sm btn-default border">Cancel</button>
-                        </div>
-                    </form>
-                </div>
-                @if($patient->rmm)
-                    <div moe class="ml-2">
-                        <a start show><i class="fa fa-trash-alt text-danger on-hover-opaque"></i></a>
-                        <form url="/api/client/removeRmmPro" class="mcp-theme-1">
-                            <input type="hidden" name="uid" value="{{$patient->uid}}">
-                            <p>Remove RMM Pro?</p>
-                            <div>
-                                <button submit class="btn btn-sm btn-primary mr-1">Submit</button>
-                                <button cancel class="btn btn-sm btn-default border">Cancel</button>
-                            </div>
-                        </form>
-                    </div>
-                @endif
-            </div>
-        @endif
-        {{--<div class="border-top mt-2 pt-2">
-            @include('app.patient.partials.client_bp_weight_phone_number_status')
-        </div>--}}
-    </div>
-    <div class="col-5 border-left">
-        <?php
-        $bpDevice = null;
-        $weightScale = null;
-        if(count($patient->devices)) {
-            foreach($patient->devices as $device) {
-                if(!$bpDevice && $device->device->category === 'BP') {
-                    $bpDevice = $device;
-                }
-                elseif(!$weightScale && $device->device->category === 'WEIGHT') {
-                    $weightScale = $device;
-                }
-                if($bpDevice && $weightScale) break;
-            }
-        }
-        $bpMeasurements = [];
-        if($bpDevice) {
-            $bpMeasurements["first"] = \App\Models\Measurement
-                ::where('imei', $bpDevice->device->imei)
-                ->where('client_id', $patient->id)
-                ->where('is_cellular_zero', false)
-                ->orderBy('ts')
-                ->first();
-            $bpMeasurements["last"] = \App\Models\Measurement
-                ::where('imei', $bpDevice->device->imei)
-                ->where('client_id', $patient->id)
-                ->where('is_cellular_zero', false)
-                ->orderBy('ts', 'DESC')
-                ->first();
-        }
-        $weightMeasurements = [];
-        if($weightScale) {
-            $weightMeasurements["first"] = \App\Models\Measurement
-                ::where('imei', $weightScale->device->imei)
-                ->where('client_id', $patient->id)
-                ->where('is_cellular_zero', false)
-                ->orderBy('ts')
-                ->first();
-            $weightMeasurements["last"] = \App\Models\Measurement
-                ::where('imei', $weightScale->device->imei)
-                ->where('client_id', $patient->id)
-                ->where('is_cellular_zero', false)
-                ->orderBy('ts', 'DESC')
-                ->first();
-        }
-        $careMonth = $patient->currentCareMonth();
-        ?>
-
-        @if($bpDevice)
-            <div class="mb-2">
-                <table class="table table-sm table-bordered mb-0">
-                    <tr class="bg-light">
-                        <td class="text-secondary" style="width: 125px;">Cellular BP Device</td>
-                        <td colspan="2">Yes <i>({{$bpDevice->device->imei}})</i></td>
-                    </tr>
-                    <tr>
-                        <td class="text-secondary">Arrived</td>
-                        <td colspan="2">Yes</td>
-                    </tr>
-                    <tr>
-                        <td class="text-secondary">First Meas.</td>
-                        @if($bpMeasurements["first"])
-                        <td class="">{{ $bpMeasurements["first"]->sbp_mm_hg . '/' . $bpMeasurements["first"]->dbp_mm_hg . '' }}</td>
-                        <td class="">{{friendly_date_short(date("Y-m-d", $bpMeasurements["first"]->ts/1000))}} <i class="text-muted">- {{date_diff(date_create(date("Y-m-d", $bpMeasurements["first"]->ts/1000)), date_create('now'))->days}} <small class="text-sm">days ago</small></i></td>
-                        @else
-                            <td colspan="3">-</td>
-                        @endif
-                    </tr>
-                    <tr>
-                        <td class="text-secondary">Last Meas.</td>
-                        @if($bpMeasurements["last"])
-                            <td>{{ $bpMeasurements["last"]->sbp_mm_hg . '/' . $bpMeasurements["last"]->dbp_mm_hg . '' }}</td>
-                            <td>{{friendly_date_short(date("Y-m-d", $bpMeasurements["last"]->ts/1000))}} <i class="text-muted">- {{date_diff(date_create(date("Y-m-d", $bpMeasurements["last"]->ts/1000)), date_create('now'))->days}} <small class="text-sm">days ago</small></i></td>
-                        @else
-                           <td colspan="3">-</td>
-                        @endif
-                    </tr>
-                    {{--
-                    <tr>
-                        <td class="text-secondary">How often to measure</td>
-                        <td colspan="2">-</td>
-                    </tr>
-                    <tr>
-                        <td class="text-secondary">SMS reminders</td>
-                        <td colspan="2">-</td>
-                    </tr>
-                    --}}
-                </table>
-            </div>
-        @else
-            <div class="d-flex align-items-baseline mb-3">
-                <span class="min-width-200px">Cellular BP Device</span>
-                <b class="ml-3">No</b>
-            </div>
-        @endif
-
-        @if($weightScale)
-            <div class="mb-2">
-            <table class="table table-sm table-bordered mb-0">
-                <tr class="bg-light">
-                    <td class="text-secondary">Cellular Wt. Scale</td>
-                    <td colspan="3">Yes <i>({{$weightScale->device->imei}})</i></td>
-                </tr>
-                <tr>
-                    <td class="text-secondary">Arrived</td>
-                    <td colspan="3">Yes</td>
-                </tr>
-                <tr>
-                    <td class="text-secondary">First Meas.</td>
-                    @if($weightMeasurements["first"])
-                        <td>{{ round($weightMeasurements["first"]->value, 2) . ' lbs' }}</td>
-                        <td colspan="2">{{ friendly_date_short(date("Y-m-d", $weightMeasurements["first"]->ts/1000)) }} <i class="text-muted">- {{date_diff(date_create(date("Y-m-d", $weightMeasurements["first"]->ts/1000)), date_create('now'))->days}} <small class="text-asm">days ago</small></i></td>
-                    @else
-                        <td colspan="4"></td>
-                    @endif
-                </tr>
-                <tr>
-                        <td class="text-secondary">Last Meas.</td>
-                        @if($weightMeasurements["last"])
-                            <td>{{ round($weightMeasurements["last"]->value, 2) . ' lbs' }}</td>
-                            <td>{{ friendly_date_short(date("Y-m-d", $weightMeasurements["last"]->ts/1000)) }} <i class="text-muted">- {{date_diff(date_create(date("Y-m-d", $weightMeasurements["last"]->ts/1000)), date_create('now'))->days}} <small class="text-sm">days ago</small></i></td>
-                        @else
-                            <td colspan="4">-</td>
-                        @endif
-                    </tr>
-                    {{--
-                    <tr>
-                        <td class="text-secondary">How often to measure</td>
-                        <td colspan="3">-</td>
-                    </tr>
-                    <tr>
-                        <td class="text-secondary">SMS reminders:</td>
-                        <td colspan="3">-</td>
-                    </tr>
-                    --}}
-            </table>
-            </div>
-        @else
-            <div class="d-flex align-items-baseline mb-3">
-                <span class="min-width-200px">Cellular Weight Scale</span>
-                <b class="ml-3">No</b>
-            </div>
-        @endif
-
-        @if($careMonth && ($bpDevice || $weightScale))
-            <div class="d-flex align-items-baseline mb-1">
-                <span class="min-width-200px">Measurement days this month:</span>
-                <div class="ml-3">
-                    <b>{{$careMonth->number_of_days_with_remote_measurements}} days</b>
-                </div>
-            </div>
-        @endif
-    </div>
-</div>

+ 1 - 1
resources/views/app/patient/segment-templates/disclaimers/edit.blade.php

@@ -77,7 +77,7 @@ if (!!@$point->data) {
             <p class="mb-2">Patient elects to participate in Chronic Care Management.</p>
         @endif
 
-        @if($note->hcp_pro_id == $patient->mcp_pro_id && $patient->is_enrolled_in_rm === 'YES')
+        @if($note->hcp_pro_id == $patient->mcp_pro_id && $patient->is_enrolled_in_rm === 'YES') {{-- correct --}}
             <p class="mb-2">Patient elects to participate in Remote Patient Monitoring.</p>
         @endif
 

+ 1 - 1
resources/views/app/patient/segment-templates/disclaimers/summary.blade.php

@@ -89,7 +89,7 @@ if (!!@$point->data) {
     <p class="mb-2">Patient elects to participate in Chronic Care Management.</p>
 @endif
 
-@if($note->hcp_pro_id == $patient->mcp_pro_id && $patient->is_enrolled_in_rm === 'YES')
+@if($note->hcp_pro_id == $patient->mcp_pro_id && $patient->is_enrolled_in_rm === 'YES') {{-- correct --}}
     <p class="mb-2">Patient elects to participate in Remote Patient Monitoring.</p>
 @endif
 

+ 3 - 3
resources/views/app/patient/settings.blade.php

@@ -605,13 +605,13 @@
 
                 <hr class="m-negator-3 my-3">
                 <div>
-                    <p>Is enrolled to RM: {{$patient->is_enrolled_in_rm}}</p>
-                    @if($patient->is_enrolled_in_rm == 'NO')
+                    <p>Is enrolled to RM: {{$patient->is_enrolled_in_rm}}</p> {{-- correct --}}
+                    @if($patient->is_enrolled_in_rm == 'NO') {{-- correct --}}
                         <p>Why Not Enrolled In RM Category:   {{$patient->why_not_enrolled_in_rm_category}}</p>
 		                <p>Why Not Enrolled In RM Memo:   {{$patient->why_not_enrolled_in_rm_memo}}</p>
                     @endif
                 </div>
-                @if($patient->is_enrolled_in_rm == 'YES')
+                @if($patient->is_enrolled_in_rm == 'YES') {{-- correct --}}
                 <div moe class="ml-2">
                     <a start show><i class="fa fa-edit"></i> Set is enrolled to RM to false</a>
                     <form url="/api/client/setIsEnrolledInRmToFalse" class="mcp-theme-1">

+ 1 - 1
resources/views/app/practice-management/remote-monitoring-admin-row-markup.blade.php

@@ -22,7 +22,7 @@
     </td>
 
     <td>{{friendly_date($iPatient->dob)}}</td>
-    <td>{!! $iPatient->is_enrolled_in_rm === 'YES' ? '<i class="fa fa-check text-success"></i>' : 'No' !!}</td>
+    <td>{!! $iPatient->is_client_enrolled_in_rm ? '<i class="fa fa-check text-success"></i>' : 'No' !!}</td>
     <td>{!! $iPatient->is_assigned_cellular_bp_device ? '<i class="fa fa-check text-success"></i>' : 'No' !!}</td>
     <td>{!! $iPatient->is_assigned_cellular_weight_scale_device ? '<i class="fa fa-check text-success"></i>' : 'No' !!}</td>
     <td>

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

@@ -18,7 +18,6 @@
     </td>
 
     <td>{{friendly_date($iPatient->dob)}}</td>
-    {{--<td>{!! $iPatient->is_enrolled_in_rm === 'YES' ? '<i class="fa fa-check text-success"></i>' : 'No' !!}</td>--}}
     <td>{!! $iPatient->is_assigned_cellular_bp_device ? '<i class="fa fa-check text-success"></i>' : 'No' !!}</td>
     <td>{!! $iPatient->is_assigned_cellular_weight_scale_device ? '<i class="fa fa-check text-success"></i>' : 'No' !!}</td>
     <td>

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

@@ -11,7 +11,7 @@
     </td>
 
     <td>{{friendly_date($iPatient->dob)}}</td>
-    <td>{!! $iPatient->is_enrolled_in_rm === 'YES' ? '<i class="fa fa-check text-success"></i>' : 'No' !!}</td>
+    <td>{!! $iPatient->is_client_enrolled_in_rm ? '<i class="fa fa-check text-success"></i>' : 'No' !!}</td>
     <td>{!! $iPatient->is_assigned_cellular_bp_device ? '<i class="fa fa-check text-success"></i>' : 'No' !!}</td>
     <td>{!! $iPatient->is_assigned_cellular_weight_scale_device ? '<i class="fa fa-check text-success"></i>' : 'No' !!}</td>
     <td>

+ 2 - 2
resources/views/app/practice-management/rm-action-report.blade.php

@@ -166,7 +166,7 @@
                         <th>@include('app.practice-management._sort_header_multi', ['route' => route("practice-management.rmActionReport"), 'label' => 'Month', 'key' => 'start_date'])</th>
                         <th>@include('app.practice-management._sort_header_multi', ['route' => route("practice-management.rmActionReport"), 'label' => 'Patient', 'key' => 'client_name'])</th>
                         <th>@include('app.practice-management._sort_header_multi', ['route' => route("practice-management.rmActionReport"), 'label' => 'RM<br>Elig.', 'key' => 'is_eligible_for_rm'])</th>
-                        <th>@include('app.practice-management._sort_header_multi', ['route' => route("practice-management.rmActionReport"), 'label' => 'RM<br>Enrol', 'key' => 'is_enrolled_in_rm'])</th>
+                        <th>@include('app.practice-management._sort_header_multi', ['route' => route("practice-management.rmActionReport"), 'label' => 'RM<br>Enrol', 'key' => 'is_client_enrolled_in_rm'])</th>
                         <th>@include('app.practice-management._sort_header_multi', ['route' => route("practice-management.rmActionReport"), 'label' => 'RM<br>Setup', 'key' => 'has_rm_setup_been_performed'])</th>
                         <th>@include('app.practice-management._sort_header_multi', ['route' => route("practice-management.rmActionReport"), 'label' => 'MCP', 'key' => 'mcp_name'])</th>
                         <th>@include('app.practice-management._sort_header_multi', ['route' => route("practice-management.rmActionReport"), 'label' => 'RMM', 'key' => 'rmm_name'])</th>
@@ -203,7 +203,7 @@
                             </a>
                         </td>
                         <td>{{ucwords(strtolower($row->is_eligible_for_rm))}}</td>
-                        <td>{{ucwords(strtolower($row->is_enrolled_in_rm))}}</td>
+                        <td>{{ucwords(strtolower($row->is_client_enrolled_in_rm))}}</td>
                         <td>{{$row->has_rm_setup_been_performed ? 'Yes' : 'No'}}</td>
                         <td>
                             {{$row->mcp_name}}

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

@@ -22,7 +22,6 @@
             <tr>
                 <th class="border-0 pl-2">@include('app.practice-management._sort_header', ['route' => route("practice-management.rpm-matrix-" . $mode), 'label' => 'Name', 'key' => 'client_name'])</th>
                 <th class="border-0">@include('app.practice-management._sort_header', ['route' => route("practice-management.rpm-matrix-" . $mode), 'label' => 'DOB', 'key' => 'dob'])</th>
-                {{--<th class="border-0">@include('app.practice-management._sort_header', ['route' => route("practice-management.rpm-matrix-" . $mode), 'label' => 'RPM?', 'key' => 'is_enrolled_in_rm'])</th>--}}
                 <th class="border-0 text-secondary">Cell. BP?</th>
                 <th class="border-0 text-secondary">Cell. Scale?</th>
                 <th class="border-0 text-secondary">Latest BP</th>

+ 0 - 1
resources/views/app/practice-management/rpm-matrix-for-admin-table.blade.php

@@ -29,7 +29,6 @@
                 <th class="border-0">@include('app.practice-management._sort_header_multi', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => 'Insurance', 'key' => 'payer_name'])</th>
                 <th class="border-0">@include('app.practice-management._sort_header_multi', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => 'State', 'key' => 'mailing_address_state'])</th>
                 <th class="border-0">@include('app.practice-management._sort_header_multi', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => 'CM MCP', 'key' => 'mcp_name'])</th>
-                {{--<th class="border-0">@include('app.practice-management._sort_header_multi', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => 'RPM?', 'key' => 'is_enrolled_in_rm'])</th>--}}
                 <th class="border-0 text-secondary">BP</th>
                 <th class="border-0 text-secondary">Scale</th>
                 <th class="border-0">@include('app.practice-management._sort_header_multi', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => 'DSLM', 'key' => 'dslm'])</th>

+ 2 - 2
resources/views/layouts/patient-header.blade.php

@@ -75,8 +75,8 @@ $addressParts .= implode(", ", $addressPart2);
         </span>
       </h6>
       <div class="d-flex border-left pl-2 ml-2">
-        <div class="mr-2">RPM: <b>{{ucwords(strtolower($patient->is_enrolled_in_rm))}}</b>
-          @if($patient->is_enrolled_in_rm === 'NO' && $patient->why_not_enrolled_in_rm_category)
+        <div class="mr-2">RPM: <b>{{ucwords(strtolower($patient->is_enrolled_in_rm))}}</b> {{-- correct --}}
+          @if($patient->is_enrolled_in_rm === 'NO' && $patient->why_not_enrolled_in_rm_category) {{-- correct --}}
             <span class="text-sm">({{$patient->why_not_enrolled_in_rm_category}})</span>
           @endif
         </div>