Pārlūkot izejas kodu

Merge branch 'dev' of rav.triplestart.com:jmudaka/stagfe2 into dev

= 3 gadi atpakaļ
vecāks
revīzija
e8f2a58b80

+ 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 - 3
resources/views/app/patient/care-month/dashboard.blade.php

@@ -569,7 +569,7 @@
                                     @endif
                                 </div>
 
-                                @if($careMonth->mcp && $pro->id === $careMonth->mcp->id)
+                                @if(0 && $careMonth->mcp && $pro->id === $careMonth->mcp->id)
                                 <div class="mt-2">
                                     <?php
                                     $minsBilled = 0;
@@ -629,8 +629,7 @@
 
                                 @if(($daysDiff !== -1 && $daysDiff <= 90) &&
                                     $careMonth->number_of_days_with_remote_measurements >= 16 &&
-                                    $careMonth->has_anyone_interacted_with_client_about_rm_outside_note &&
-                                    $minsBilled >= 20)
+                                    $careMonth->has_anyone_interacted_with_client_about_rm_outside_note)
                                     <div class="mt-2 border border-info p-2">
                                         @include('app.rm-bills.inline', ['patient' => $patient, 'entityType' => 'CareMonth', 'entityUid' => $careMonth->uid, 'label' => 'RM'])
                                     </div>

+ 29 - 0
resources/views/app/patient/note/rm-setup.blade.php

@@ -51,6 +51,35 @@
             </div>
         @endif
 
+        <?php $currentCareMonth = $patient->currentCareMonth(); ?>
+        @if($currentCareMonth && $pro->id === $currentCareMonth->mcp_pro_id)
+            <div class="d-flex align-items-baseline mb-3">
+                <?php $spoken = $currentCareMonth->has_anyone_interacted_with_client_about_rm_outside_note; ?>
+                <span class="min-width-140px">Comm. this month:</span>
+                <b class="{{$spoken ? 'text-success' : ''}}">
+                    {{$spoken ? 'Yes' : 'No'}}
+                    @if(!$spoken)
+                        <i class="fa fa-exclamation-triangle"></i>
+                    @else
+                        <i class="fa fa-check"></i>
+                    @endif
+                </b>
+                @if($currentCareMonth->mcp && $pro->id === $currentCareMonth->mcp->id)
+                    <div moe relative class="ml-2">
+                        <a href="#" start show class="">Toggle</a>
+                        <form url="/api/careMonth/setHasAnyoneInteractedWithClientAboutRmOutsideNoteTo{{$spoken ? 'False' : 'True'}}" right>
+                            <input type="hidden" name="uid" value="{{$currentCareMonth->uid}}">
+                            <p>Set to {{$spoken ? 'No' : 'Yes'}}?</p>
+                            <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
+            </div>
+        @endif
+
         <div class="d-flex align-items-baseline mb-3">
             <span class="min-width-140px">Enrollment:</span>
             <div class="">

+ 30 - 0
resources/views/layouts/patient.blade.php

@@ -583,6 +583,36 @@ $isOldClient = (date_diff(date_create(config('app.point_impl_date')), date_creat
 												@endif
 											</div>
 
+											<?php $currentCareMonth = $patient->currentCareMonth(); ?>
+											@if($currentCareMonth && $pro->id === $currentCareMonth->mcp_pro_id)
+												<div class="">
+													<?php $spoken = $currentCareMonth->has_anyone_interacted_with_client_about_rm_outside_note; ?>
+													<span class="">Communicated this month:</span>
+													<b class="{{$spoken ? 'text-success' : ''}}">
+														{{$spoken ? 'Yes' : 'No'}}
+														@if(!$spoken)
+															<i class="fa fa-exclamation-triangle"></i>
+														@else
+															<i class="fa fa-check"></i>
+														@endif
+													</b>
+													@if($currentCareMonth->mcp && $pro->id === $currentCareMonth->mcp->id)
+														<div moe relative class="ml-1">
+															<a href="#" start show class="text-sm">Toggle</a>
+															<form url="/api/careMonth/setHasAnyoneInteractedWithClientAboutRmOutsideNoteTo{{$spoken ? 'False' : 'True'}}" right>
+																<input type="hidden" name="uid" value="{{$currentCareMonth->uid}}">
+																<p>Set to {{$spoken ? 'No' : 'Yes'}}?</p>
+																<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
+												</div>
+											@endif
+
+
                                         </div>
                                     </section>
                                     <section class="hide-inside-popup screen-only vbox mt-2 align-self-start ml-3 pl-3 border-left mcp-theme-1">

+ 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>