Преглед на файлове

Client RM status matrix for MCPs

Vijayakrishnan преди 3 години
родител
ревизия
5ed13c5bc6

+ 5 - 0
app/Http/Controllers/PracticeManagementController.php

@@ -2496,6 +2496,11 @@ ORDER BY c.name_last, c.name_first
         $filters = $request->all();
         $patients = Client::whereNull('shadow_pro_id');
 
+        $pro = $this->performer()->pro;
+        if($pro->pro_type !== 'ADMIN') {
+            $patients = $patients->where('mcp_pro_id', $this->performer()->pro->id);
+        }
+
         // filters
         /*
         array:18 [▼

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

@@ -5,25 +5,42 @@
 				<th class="border-0">#</th>
 				<th class="border-0">Name</th>
 				<th class="border-0">DOB</th>
+				@if($pro->pro_type == 'ADMIN')
 				<th class="border-0">Age</th>
 				<th class="border-0">Sex</th>
 				<th class="border-0">BMI</th>
+				@endif
 				<th class="border-0">Insurance</th>
+				@if($pro->pro_type == 'ADMIN')
+					<th class="border-0">MCP</th>
+				@endif
+				<th class="border-0"># Visits</th>
 				<th class="border-0">Last Visit</th>
 				<th class="border-0">Next Appt.</th>
 				<th class="border-0">Status</th>
 
+				@if($pro->pro_type == 'ADMIN')
 				<th class="border-0">Is Eligible For CCM</th>
 				<th class="border-0">Is Enrolled In CCM</th>
 				<th class="border-0">CCM Setup Performed</th>
+				@endif
+
+				@if($pro->pro_type !== 'ADMIN')
+					<th class="border-0">Cellular BP</th>
+					<th class="border-0">Last BP</th>
+					<th class="border-0">Cellular Scale</th>
+					<th class="border-0">Last Weight</th>
+				@endif
 
-				<th class="border-0">Is Eligible For RM</th>
-				<th class="border-0">Is Enrolled In RM</th>
-				<th class="border-0">RM Setup Performed</th>
+				<th class="border-0">Eligible For RM</th>
+				<th class="border-0">Enrolled In RM</th>
+				<th class="border-0">RM Setup</th>
 
-				@if($pro->pro_type == 'ADMIN')
-				<th class="border-0">MCP</th>
+				@if($pro->pro_type !== 'ADMIN')
+					<th class="border-0"># Meas. days this mt.</th>
+					<th class="border-0">Spoken to this mt.?</th>
 				@endif
+
 			</tr>
 		</thead>
 		<tbody>
@@ -36,6 +53,7 @@
 				</td>
 				<td>{{$patient->displayName()}}</td>
 				<td>{{ friendly_date_time($patient->dob, false) }}</td>
+				@if($pro->pro_type == 'ADMIN')
 				<td>{{ $patient->age_in_years ?  $patient->age_in_years : '-' }}</td>
 				<td>{{ $patient->sex }}</td>
 				<td>
@@ -48,9 +66,16 @@
 						@endif
 					</div>
 				</td>
+				@endif
 				<td>
 					@include('app.patient.coverage_column_renderer', ['patient'=>$patient])
 				</td>
+				@if($pro->pro_type == 'ADMIN')
+					<td>{{$patient->mcp->display_name ?? '--'}}</td>
+				@endif
+				<td>
+					{{count($patient->activeNotes)}}
+				</td>
 				<td>
 					{{ friendly_date($patient->most_recent_completed_mcp_note_date) }}
 					{{-- {{$patient->lastMcpAppointment ? friendly_date_time($patient->lastMcpAppointment->raw_date.' '.$patient->lastMcpAppointment->raw_start_time) : '-'}}--}}
@@ -58,6 +83,7 @@
 				<td>{{$patient->nextMcpAppointment ? friendly_date_time($patient->nextMcpAppointment->raw_date.' '.$patient->nextMcpAppointment->raw_start_time) : '-'}}</td>
 				<td>{{$patient->nextMcpAppointment ? $patient->nextMcpAppointment->status : '-'}}</td>
 
+				@if($pro->pro_type == 'ADMIN')
 				<td>
 					<div>{{$patient->is_eligible_for_cm}}</div>
 					@if(!$patient->is_eligible_for_cm)
@@ -84,6 +110,33 @@
 						<a href="{{route('patients.view.notes.view.dashboard', ['patient' => $patient, 'note' => $patient->cmSetupNote])}}">CM Setup Note</a>
 					@endif
 				</td>
+				@endif
+
+				@if($pro->pro_type !== 'ADMIN')
+				<td>
+					<?php $bpDevice = $patient->firstCellularBPDevice(); ?>
+					{{!!$bpDevice ? 'Yes' : 'No'}}
+				</td>
+				<td>
+					@if(!!$bpDevice && $patient->most_recent_cellular_bp_dbp_mm_hg && $patient->most_recent_cellular_bp_sbp_mm_hg)
+						{{ $patient->most_recent_cellular_bp_sbp_mm_hg }} / {{ $patient->most_recent_cellular_bp_dbp_mm_hg }}
+					@else
+						-
+					@endif
+				</td>
+				<td>
+					<?php $weightDevice = $patient->firstCellularWeightDevice(); ?>
+					{{!!$weightDevice ? 'Yes' : 'No'}}
+				</td>
+				<td>
+					@if(!!$weightDevice && $patient->most_recent_cellular_weight_value)
+						{{ round($patient->most_recent_cellular_weight_value, 1) }}
+					@else
+						-
+					@endif
+				</td>
+				@endif
+
 				<td>
 					<div>{{$patient->is_eligible_for_rm}}</div>
 					@if(!$patient->is_eligible_for_rm)
@@ -106,10 +159,25 @@
 						<a href="{{route('patients.view.care-months.view.dashboard', ['patient' => $patient, 'careMonth' => $patient->rmSetupCareMonth])}}">RM Setup Care Month</a>
 					@endif
 				</td>
-				
-				@if($pro->pro_type == 'ADMIN')
-				<td>{{$patient->mcp->display_name ?? '--'}}</td>
+
+				@if($pro->pro_type !== 'ADMIN')
+					<?php $currentCareMonth = $patient->currentCareMonth(); ?>
+					<td>
+						@if(!!$currentCareMonth && !is_null($currentCareMonth->number_of_days_with_remote_measurements))
+							{{$currentCareMonth->number_of_days_with_remote_measurements}}
+						@else
+							0
+						@endif
+					</td>
+					<td>
+						@if(!!$currentCareMonth)
+							{{$currentCareMonth->has_anyone_interacted_with_client_about_rm_outside_note ? 'Yes' : 'No'}}
+						@else
+							No
+						@endif
+					</td>
 				@endif
+
 			</tr>
 			@endforeach
 

+ 5 - 1
resources/views/app/admin/client-ccm-rm-status.blade.php

@@ -7,7 +7,11 @@
         <div class="card-header px-3 py-2 d-flex align-items-center">
             <strong class="mr-4">
                 <i class="fas fa-user"></i>
-                Patients CCM/RM Status
+                @if($pro->pro_type == 'ADMIN')
+                    Client CCM/RM Status
+                @else
+                    Client RM Status
+                @endif
             </strong>
         </div>
 

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

@@ -28,6 +28,7 @@
 			<input name="name" class="form-control input-sm" v-model="filters.name">
 		</div>
 	</div>
+	@if($pro->pro_type == 'ADMIN')
 	<!-- AGE	 -->
 	<div class="sm-section">
 		<div class="form-group">
@@ -83,6 +84,7 @@
 			</div>
 		</div>
 	</div>
+	@endif
 
 	<!-- LAST VISIT -->
 	<div class="sm-section">
@@ -143,6 +145,7 @@
 		</div>
 	</div>
 
+	@if($pro->pro_type == 'ADMIN')
 	<!-- CM -->
 	<div class="sm-section">
 		<div class="form-group">
@@ -170,7 +173,7 @@
 
 	<div class="sm-section">
 		<div class="form-group">
-			<label>CM Setup Performed:</label>
+			<label>CM Setup:</label>
 			<select name="has_cm_setup_been_performed" class="form-control input-sm" v-model="filters.has_cm_setup_been_performed">
 				<option value="">All</option>
 				<option value="YES">Yes</option>
@@ -178,6 +181,7 @@
 			</select>
 		</div>
 	</div>
+	@endif
 
 	<div class="sm-section">
 		<div class="form-group">
@@ -205,7 +209,7 @@
 
 	<div class="sm-section">
 		<div class="form-group">
-			<label>RM Setup Performed:</label>
+			<label>RM Setup:</label>
 			<select name="has_rm_setup_been_performed" class="form-control input-sm" v-model="filters.has_rm_setup_been_performed">
 				<option value="">All</option>
 				<option value="YES">Yes</option>

+ 2 - 1
resources/views/layouts/template.blade.php

@@ -125,6 +125,7 @@
                     <div class="dropdown-menu mcp-theme-1 no-overflow-menu p-0" aria-labelledby="practice-management">
                         @if($pro->pro_type !== 'ADMIN')
                             <a class="dropdown-item" href="{{ route('practice-management.remote-monitoring') }}">Remote Monitoring</a>
+                            <a class="dropdown-item" href="{{ route('practice-management.client-ccm-rm-status') }}">Client RM Status</a>
                         @else
                             <a class="dropdown-item" href="{{ route('practice-management.remote-monitoring-admin') }}">Remote Monitoring (admin)</a>
                         @endif
@@ -159,7 +160,7 @@
                             <a class="dropdown-item" href="{{ route('practice-management.process-claims') }}">Process Claims</a>
                             <a class="dropdown-item" href="{{ route('practice-management.process-notes') }}">Process Notes</a>
                             <a class="dropdown-item" href="{{ route('practice-management.notes-processing-center') }}">Notes Processing Center</a>
-                            <a class="dropdown-item" href="{{ route('practice-management.client-ccm-rm-status') }}">Client CCM/RM Status</a>
+                            <a class="dropdown-item" href="{{ route('practice-management.client-ccm-rm-status') }}">Client CM/RM Status</a>
                             <a class="dropdown-item" href="{{ route('practice-management.rmActionReport') }}">RM Action Report</a>
                             <a class="dropdown-item" href="{{ route('practice-management.hcp-note-activity') }}">HCP Note Activity</a>