|
@@ -13,8 +13,11 @@
|
|
|
<b class="font-size-14">{{friendly_month(date((request()->input('y') ?: 'Y') . '-' . (request()->input('m') ?: 'm') . '-d'))}}</b>
|
|
|
</span>
|
|
|
<?php
|
|
|
- $m = request()->input('m') ? +(request()->input('m')) : +(date('m'));
|
|
|
- $y = request()->input('y') ? +(request()->input('y')) : +(date('Y'));
|
|
|
+ $mStr = request()->input('m') ? request()->input('m') : date('m');
|
|
|
+ $yStr = request()->input('y') ? request()->input('y') : date('Y');
|
|
|
+ $rcmStartDate = $yStr . '-' . $mStr . '-' . '01';
|
|
|
+ $m = +$mStr;
|
|
|
+ $y = +$yStr;
|
|
|
?>
|
|
|
<form class="ml-auto d-inline-flex flex-nowrap align-items-center" action="" method="GET">
|
|
|
<span class="mr-2">Month</span>
|
|
@@ -87,21 +90,32 @@
|
|
|
<tr>
|
|
|
<th class="border-0 pl-2">@include('app.practice-management._sort_header', ['route' => route("practice-management.remote-monitoring"), 'label' => 'Name', 'key' => 'client_name'])</th>
|
|
|
<th class="border-0">@include('app.practice-management._sort_header', ['route' => route("practice-management.remote-monitoring"), 'label' => 'DOB', 'key' => 'dob'])</th>
|
|
|
- <th class="border-0">@include('app.practice-management._sort_header', ['route' => route("practice-management.remote-monitoring"), 'label' => 'Enrolled in RPM?', 'key' => 'is_enrolled_in_rm'])</th>
|
|
|
+ <th class="border-0">@include('app.practice-management._sort_header', ['route' => route("practice-management.remote-monitoring"), 'label' => 'RPM Enrolled?', 'key' => 'is_enrolled_in_rm'])</th>
|
|
|
<th class="border-0">Cellular BP?</th>
|
|
|
<th class="border-0">Cellular Scale?</th>
|
|
|
<th class="border-0">Latest BP</th>
|
|
|
<th class="border-0">Latest Weight</th>
|
|
|
- <th class="border-0">@include('app.practice-management._sort_header', ['route' => route("practice-management.remote-monitoring"), 'label' => 'Latest Visit', 'key' => 'most_recent_completed_mcp_note_date'])</th>
|
|
|
+ <th class="border-0">@include('app.practice-management._sort_header', ['route' => route("practice-management.remote-monitoring"), 'label' => 'Last Visit', 'key' => 'most_recent_completed_mcp_note_date'])</th>
|
|
|
<th class="border-0">@include('app.practice-management._sort_header', ['route' => route("practice-management.remote-monitoring"), 'label' => 'Communicated?', 'key' => 'has_anyone_interacted_with_client_about_rm_outside_note'])</th>
|
|
|
- <th class="border-0">@include('app.practice-management._sort_header', ['route' => route("practice-management.remote-monitoring"), 'label' => '# Unstamped', 'key' => 'rm_num_measurements_not_stamped_by_mcp'])</th>
|
|
|
- <th class="border-0">@include('app.practice-management._sort_header', ['route' => route("practice-management.remote-monitoring"), 'label' => '# Meas. Days', 'key' => 'number_of_days_with_remote_measurements'])</th>
|
|
|
- <th class="border-0">@include('app.practice-management._sort_header', ['route' => route("practice-management.remote-monitoring"), 'label' => '# RPM Minutes', 'key' => 'rm_total_time_in_seconds_by_mcp'])</th>
|
|
|
+ <th class="border-0">@include('app.practice-management._sort_header', ['route' => route("practice-management.remote-monitoring"), 'label' => '#Meas. Days', 'key' => 'number_of_days_with_remote_measurements'])</th>
|
|
|
+ <th class="border-0">@include('app.practice-management._sort_header', ['route' => route("practice-management.remote-monitoring"), 'label' => '#Unstamped', 'key' => 'rm_num_measurements_not_stamped_by_mcp'])</th>
|
|
|
+ <th class="border-0">@include('app.practice-management._sort_header', ['route' => route("practice-management.remote-monitoring"), 'label' => '#RPM Mins.', 'key' => 'rm_total_time_in_seconds_by_mcp'])</th>
|
|
|
</tr>
|
|
|
</thead>
|
|
|
<tbody>
|
|
|
@foreach ($patients as $iPatient)
|
|
|
- <?php $oPatient = \App\Models\Client::where('uid', $iPatient->client_uid)->first(); ?>
|
|
|
+ <?php
|
|
|
+ $oPatient = \App\Models\Client::where('uid', $iPatient->client_uid)->first();
|
|
|
+
|
|
|
+ $daysDiff = -1;
|
|
|
+ if($oPatient->most_recent_completed_mcp_note_date) {
|
|
|
+ $careMonthLastDay = date_add(date_create($rcmStartDate), date_interval_create_from_date_string("1 month"));
|
|
|
+ $careMonthLastDay = date_sub($careMonthLastDay, date_interval_create_from_date_string("1 day"));
|
|
|
+ $daysDiff = date_diff($careMonthLastDay, date_create($oPatient->most_recent_completed_mcp_note_date))->days;
|
|
|
+ }
|
|
|
+ $lastVisitWithin90Days = ($daysDiff !== -1 && $daysDiff <= 90);
|
|
|
+
|
|
|
+ ?>
|
|
|
<tr>
|
|
|
<td class="pl-2">
|
|
|
<a href="/patients/view/{{ $iPatient->client_uid }}" class="text-nowrap">{{ $iPatient->client_name }}</a>
|
|
@@ -123,12 +137,61 @@
|
|
|
<div class="text-sm text-secondary text-nowrap">{{friendly_date_time($iPatient->most_recent_cellular_weight_measurement_at)}}</div>
|
|
|
@endif
|
|
|
</td>
|
|
|
- <td>{{$iPatient->most_recent_completed_mcp_note_date ? friendly_date($iPatient->most_recent_completed_mcp_note_date) : '-'}}</td>
|
|
|
- <td>{{$iPatient->has_anyone_interacted_with_client_about_rm_outside_note ? 'Yes' : 'No'}}</td>
|
|
|
- <td>{{$iPatient->rm_num_measurements_not_stamped_by_mcp}}</td>
|
|
|
- <td>{{$iPatient->number_of_days_with_remote_measurements ?: 0}}</td>
|
|
|
+ <td>
|
|
|
+ <div class="d-flex align-items-baseline">
|
|
|
+ <i class="mr-1 text-sm fa {{$lastVisitWithin90Days ? 'fa-check text-success' : 'fa-exclamation-triangle text-danger'}}"></i>
|
|
|
+ <span>{{$iPatient->most_recent_completed_mcp_note_date ? friendly_date($iPatient->most_recent_completed_mcp_note_date) : '-'}}</span>
|
|
|
+ </div>
|
|
|
+ @if(!$lastVisitWithin90Days)
|
|
|
+ <div class="text-sm font-italic text-secondary">Last visit > 90 days ago</div>
|
|
|
+ @endif
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <div class="d-flex align-items-baseline">
|
|
|
+ <i class="mr-1 text-sm fa {{$iPatient->has_anyone_interacted_with_client_about_rm_outside_note ? 'fa-check text-success' : 'fa-exclamation-triangle text-danger'}}"></i>
|
|
|
+ <span>{{$iPatient->has_anyone_interacted_with_client_about_rm_outside_note ? 'Yes' : 'No'}}</span>
|
|
|
+ <div moe relative class="ml-2">
|
|
|
+ <a href="#" start show class="text-sm">Toggle</a>
|
|
|
+ <form url="/api/careMonth/setHasAnyoneInteractedWithClientAboutRmOutsideNoteToTrue" right>
|
|
|
+ <input type="hidden" name="uid" value="{{$iPatient->care_month_uid}}">
|
|
|
+ <p>Set to 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>
|
|
|
+ </div>
|
|
|
+ @if(!$iPatient->has_anyone_interacted_with_client_about_rm_outside_note)
|
|
|
+ <div class="text-sm font-italic text-secondary">Not spoken to this month!</div>
|
|
|
+ @endif
|
|
|
+ </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'}}"></i>
|
|
|
+ <span>{{$iPatient->number_of_days_with_remote_measurements ?: 0}}</span>
|
|
|
+ </div>
|
|
|
+ @if($iPatient->number_of_days_with_remote_measurements < 16)
|
|
|
+ <div class="text-sm font-italic text-secondary">Meas. days < 16</div>
|
|
|
+ @endif
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <div class="d-flex align-items-baseline">
|
|
|
+ <span>{{$iPatient->rm_num_measurements_not_stamped_by_mcp}}</span>
|
|
|
+ @if($iPatient->rm_num_measurements_not_stamped_by_mcp)
|
|
|
+ <a href="{{ route('mcp.measurements_pending_stamping_in_care_month') }}?patientUid={{$iPatient->client_uid}}&careMonthUid={{$iPatient->care_month_uid}}"
|
|
|
+ native target="_blank"
|
|
|
+ open-in-stag-popup
|
|
|
+ update-parent
|
|
|
+ popup-style="tall overflow-visible"
|
|
|
+ class="ml-2 text-sm"
|
|
|
+ mc-initer="cm-matrix-{{$oPatient->id}}"
|
|
|
+ title="Measurements Pending Stamping">
|
|
|
+ Stamp
|
|
|
+ </a>
|
|
|
+ @endif
|
|
|
+ </td>
|
|
|
<td>{{floor($iPatient->rm_total_time_in_seconds_by_mcp / 60)}}</td>
|
|
|
-
|
|
|
</tr>
|
|
|
@endforeach
|
|
|
</tbody>
|