|
@@ -31,8 +31,6 @@
|
|
</span>
|
|
</span>
|
|
<?php
|
|
<?php
|
|
|
|
|
|
- use App\Models\Note;
|
|
|
|
-
|
|
|
|
$mStr = request()->input('m') ? request()->input('m') : date('m');
|
|
$mStr = request()->input('m') ? request()->input('m') : date('m');
|
|
$yStr = request()->input('y') ? request()->input('y') : date('Y');
|
|
$yStr = request()->input('y') ? request()->input('y') : date('Y');
|
|
$rcmStartDate = $yStr . '-' . $mStr . '-' . '01';
|
|
$rcmStartDate = $yStr . '-' . $mStr . '-' . '01';
|
|
@@ -81,9 +79,21 @@
|
|
<div class="card-body p-0">
|
|
<div class="card-body p-0">
|
|
<div class="d-flex align-items-start m-0">
|
|
<div class="d-flex align-items-start m-0">
|
|
<div class="flex-grow-1 px-0 pt-2">
|
|
<div class="flex-grow-1 px-0 pt-2">
|
|
|
|
+ <?php $trIndex = 0; ?>
|
|
|
|
+ @foreach ($patients as $iPatient)
|
|
|
|
+ <script>
|
|
|
|
+ addMCHook(
|
|
|
|
+ 'refresh-rpm-row-{{$trIndex}}',
|
|
|
|
+ function () {
|
|
|
|
+ refreshRpmRow({{$trIndex}});
|
|
|
|
+ }
|
|
|
|
+ );
|
|
|
|
+ </script>
|
|
|
|
+ <?php $trIndex++; ?>
|
|
|
|
+ @endforeach
|
|
<table class="table table-sm table-striped table-hover p-0 m-0 border-top" id="table-rm-matrix">
|
|
<table class="table table-sm table-striped table-hover p-0 m-0 border-top" id="table-rm-matrix">
|
|
<thead class="bg-light">
|
|
<thead class="bg-light">
|
|
- <tr>
|
|
|
|
|
|
+ <tr stag-title="Click to sort. Shift+Click to multi-sort.">
|
|
<th class="border-0 pl-2">Name</th>
|
|
<th class="border-0 pl-2">Name</th>
|
|
<th class="border-0">DOB</th>
|
|
<th class="border-0">DOB</th>
|
|
<th class="border-0">RPM?</th>
|
|
<th class="border-0">RPM?</th>
|
|
@@ -100,16 +110,15 @@
|
|
</tr>
|
|
</tr>
|
|
</thead>
|
|
</thead>
|
|
<tbody>
|
|
<tbody>
|
|
|
|
+ <?php $trIndex = 0; ?>
|
|
@foreach ($patients as $iPatient)
|
|
@foreach ($patients as $iPatient)
|
|
<?php
|
|
<?php
|
|
|
|
|
|
$daysDiff = -1;
|
|
$daysDiff = -1;
|
|
- $mostRecentCompletedMcpNote = null;
|
|
|
|
if($iPatient->most_recent_completed_mcp_note_date) {
|
|
if($iPatient->most_recent_completed_mcp_note_date) {
|
|
$careMonthLastDay = date_add(date_create($rcmStartDate), date_interval_create_from_date_string("1 month"));
|
|
$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"));
|
|
$careMonthLastDay = date_sub($careMonthLastDay, date_interval_create_from_date_string("1 day"));
|
|
$daysDiff = date_diff($careMonthLastDay, date_create($iPatient->most_recent_completed_mcp_note_date))->days;
|
|
$daysDiff = date_diff($careMonthLastDay, date_create($iPatient->most_recent_completed_mcp_note_date))->days;
|
|
- $mostRecentCompletedMcpNote = Note::where('id', $iPatient->most_recent_completed_mcp_note_id)->first();
|
|
|
|
}
|
|
}
|
|
$lastVisitWithin90Days = ($daysDiff !== -1 && $daysDiff <= 90);
|
|
$lastVisitWithin90Days = ($daysDiff !== -1 && $daysDiff <= 90);
|
|
|
|
|
|
@@ -123,16 +132,16 @@
|
|
}
|
|
}
|
|
|
|
|
|
?>
|
|
?>
|
|
- <tr>
|
|
|
|
|
|
+ <tr data-client-uid="{{$iPatient->client_uid}}" data-care-month-uid="{{$iPatient->care_month_uid}}">
|
|
<td class="pl-2">
|
|
<td class="pl-2">
|
|
<a href="/patients/view/{{ $iPatient->client_uid }}/care-months/view/{{$iPatient->care_month_uid}}" class="text-nowrap"
|
|
<a href="/patients/view/{{ $iPatient->client_uid }}/care-months/view/{{$iPatient->care_month_uid}}" class="text-nowrap"
|
|
native target="_blank"
|
|
native target="_blank"
|
|
open-in-stag-popup
|
|
open-in-stag-popup
|
|
- update-parent
|
|
|
|
|
|
+ update-parent="refresh-rpm-row-{{$trIndex}}"
|
|
popup-style="tall overflow-visible"
|
|
popup-style="tall overflow-visible"
|
|
mc-initer="care-month-dashboard-{{$iPatient->client_uid}}"
|
|
mc-initer="care-month-dashboard-{{$iPatient->client_uid}}"
|
|
title="{{$iPatient->client_name}}"
|
|
title="{{$iPatient->client_name}}"
|
|
- >{{ $iPatient->client_name }}</a>
|
|
|
|
|
|
+ ><span class="sort-data">{{ $iPatient->client_name }}</span></a>
|
|
</td>
|
|
</td>
|
|
|
|
|
|
<td>{{friendly_date($iPatient->dob)}}</td>
|
|
<td>{{friendly_date($iPatient->dob)}}</td>
|
|
@@ -140,28 +149,32 @@
|
|
<td>{!! $iPatient->is_assigned_cellular_bp_device ? '<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>{!! $iPatient->is_assigned_cellular_weight_scale_device ? '<i class="fa fa-check text-success"></i>' : 'No' !!}</td>
|
|
<td>
|
|
<td>
|
|
- {{$iPatient->most_recent_cellular_bp_sbp_mm_hg ?: '-'}}/{{$iPatient->most_recent_cellular_bp_dbp_mm_hg ?: '-'}}
|
|
|
|
- @if($iPatient->most_recent_cellular_bp_measurement_at)
|
|
|
|
- <span class="text-sm text-secondary text-nowrap ml-1"
|
|
|
|
- title="{{friendly_date_time($iPatient->most_recent_cellular_bp_measurement_at)}}">({{friendly_date($iPatient->most_recent_cellular_bp_measurement_at)}})</span>
|
|
|
|
- @endif
|
|
|
|
|
|
+ <div class="text-nowrap">
|
|
|
|
+ <span class="sort-data">{{$iPatient->most_recent_cellular_bp_sbp_mm_hg ?: '-'}}</span>/{{$iPatient->most_recent_cellular_bp_dbp_mm_hg ?: '-'}}
|
|
|
|
+ @if($iPatient->most_recent_cellular_bp_measurement_at)
|
|
|
|
+ <span class="text-sm text-secondary text-nowrap ml-1"
|
|
|
|
+ title="{{friendly_date_time($iPatient->most_recent_cellular_bp_measurement_at)}}">({{friendly_date($iPatient->most_recent_cellular_bp_measurement_at)}})</span>
|
|
|
|
+ @endif
|
|
|
|
+ </div>
|
|
</td>
|
|
</td>
|
|
<td>
|
|
<td>
|
|
- {{$iPatient->most_recent_cellular_weight_value ? round($iPatient->most_recent_cellular_weight_value, 1) : '-'}}
|
|
|
|
- @if($iPatient->most_recent_cellular_weight_measurement_at)
|
|
|
|
- <span class="text-sm text-secondary text-nowrap ml-1"
|
|
|
|
- title="{{friendly_date_time($iPatient->most_recent_cellular_weight_measurement_at)}}">({{friendly_date($iPatient->most_recent_cellular_weight_measurement_at)}})</span>
|
|
|
|
- @endif
|
|
|
|
|
|
+ <div class="text-nowrap">
|
|
|
|
+ <span class="sort-data">{{$iPatient->most_recent_cellular_weight_value ? round($iPatient->most_recent_cellular_weight_value, 1) : '-'}}</span>
|
|
|
|
+ @if($iPatient->most_recent_cellular_weight_measurement_at)
|
|
|
|
+ <span class="text-sm text-secondary text-nowrap ml-1"
|
|
|
|
+ title="{{friendly_date_time($iPatient->most_recent_cellular_weight_measurement_at)}}">({{friendly_date($iPatient->most_recent_cellular_weight_measurement_at)}})</span>
|
|
|
|
+ @endif
|
|
|
|
+ </div>
|
|
</td>
|
|
</td>
|
|
<td>
|
|
<td>
|
|
<div class="d-flex align-items-baseline">
|
|
<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>
|
|
<i class="mr-1 text-sm fa {{$lastVisitWithin90Days ? 'fa-check text-success' : 'fa-exclamation-triangle text-danger'}}"></i>
|
|
- @if($mostRecentCompletedMcpNote)
|
|
|
|
- <a href = "{{route('patients.view.notes.view.dashboard', ['patient' => $iPatient->client_uid, 'note' => $mostRecentCompletedMcpNote])}}">
|
|
|
|
- <span>{{$iPatient->most_recent_completed_mcp_note_date ? friendly_date($iPatient->most_recent_completed_mcp_note_date) : '-'}}</span>
|
|
|
|
|
|
+ @if($iPatient->most_recent_completed_mcp_note_uid)
|
|
|
|
+ <a href = "/patients/view/{{$iPatient->client_uid}}/notes/view/{{$iPatient->most_recent_completed_mcp_note_uid}}">
|
|
|
|
+ <span class="sort-data">{{$iPatient->most_recent_completed_mcp_note_date ? friendly_date($iPatient->most_recent_completed_mcp_note_date) : '-'}}</span>
|
|
</a>
|
|
</a>
|
|
@else
|
|
@else
|
|
- <span>-</span>
|
|
|
|
|
|
+ <span class="sort-data">-</span>
|
|
@endif
|
|
@endif
|
|
</div>
|
|
</div>
|
|
{{--@if(!$lastVisitWithin90Days)
|
|
{{--@if(!$lastVisitWithin90Days)
|
|
@@ -175,7 +188,7 @@
|
|
@if($performerRole === 'MCP')
|
|
@if($performerRole === 'MCP')
|
|
<div moe large relative class="ml-2">
|
|
<div moe large relative class="ml-2">
|
|
<a start show class="py-0 mb-3 text-sm">Edit</a>
|
|
<a start show class="py-0 mb-3 text-sm">Edit</a>
|
|
- <form url="/api/careMonthEntry/createForRm" right>
|
|
|
|
|
|
+ <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="careMonthUid" value="{{ $iPatient->care_month_uid }}">
|
|
<input type="hidden" name="proUid" value="{{ $pro->uid }}">
|
|
<input type="hidden" name="proUid" value="{{ $pro->uid }}">
|
|
<div class="mb-2">
|
|
<div class="mb-2">
|
|
@@ -234,7 +247,7 @@
|
|
<td>
|
|
<td>
|
|
<div class="d-flex align-items-baseline">
|
|
<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>
|
|
<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>
|
|
|
|
|
|
+ <span class="sort-data">{{$iPatient->number_of_days_with_remote_measurements ?: 0}}</span>
|
|
@if($iPatient->number_of_days_with_remote_measurements < 16)
|
|
@if($iPatient->number_of_days_with_remote_measurements < 16)
|
|
<div moe relative class="ml-2">
|
|
<div moe relative class="ml-2">
|
|
<a href="#" start show class="text-sm">SMS</a>
|
|
<a href="#" start show class="text-sm">SMS</a>
|
|
@@ -263,12 +276,12 @@
|
|
<td>
|
|
<td>
|
|
<div class="d-flex align-items-baseline">
|
|
<div class="d-flex align-items-baseline">
|
|
@if($performerRole === 'MCP')
|
|
@if($performerRole === 'MCP')
|
|
- <span>{{$iPatient->rm_num_measurements_not_stamped_by_mcp}}</span>
|
|
|
|
|
|
+ <span class="sort-data">{{$iPatient->rm_num_measurements_not_stamped_by_mcp}}</span>
|
|
@if($iPatient->rm_num_measurements_not_stamped_by_mcp)
|
|
@if($iPatient->rm_num_measurements_not_stamped_by_mcp)
|
|
<a href="{{ route('practice-management.rpm_work_matrix') }}?patientUid={{$iPatient->client_uid}}&careMonthUid={{$iPatient->care_month_uid}}"
|
|
<a href="{{ route('practice-management.rpm_work_matrix') }}?patientUid={{$iPatient->client_uid}}&careMonthUid={{$iPatient->care_month_uid}}"
|
|
native target="_blank"
|
|
native target="_blank"
|
|
open-in-stag-popup
|
|
open-in-stag-popup
|
|
- update-parent
|
|
|
|
|
|
+ update-parent="refresh-rpm-row-{{$trIndex}}"
|
|
popup-style="tall overflow-visible"
|
|
popup-style="tall overflow-visible"
|
|
class="ml-2 text-sm"
|
|
class="ml-2 text-sm"
|
|
mc-initer="rpm-work-matrix"
|
|
mc-initer="rpm-work-matrix"
|
|
@@ -277,12 +290,12 @@
|
|
</a>
|
|
</a>
|
|
@endif
|
|
@endif
|
|
@elseif($performerRole === 'RMM')
|
|
@elseif($performerRole === 'RMM')
|
|
- <span>{{$iPatient->rm_num_measurements_not_stamped_by_rmm}}</span>
|
|
|
|
|
|
+ <span class="sort-data">{{$iPatient->rm_num_measurements_not_stamped_by_rmm}}</span>
|
|
@if($iPatient->rm_num_measurements_not_stamped_by_rmm)
|
|
@if($iPatient->rm_num_measurements_not_stamped_by_rmm)
|
|
<a href="{{ route('practice-management.rpm_work_matrix') }}?patientUid={{$iPatient->client_uid}}&careMonthUid={{$iPatient->care_month_uid}}"
|
|
<a href="{{ route('practice-management.rpm_work_matrix') }}?patientUid={{$iPatient->client_uid}}&careMonthUid={{$iPatient->care_month_uid}}"
|
|
native target="_blank"
|
|
native target="_blank"
|
|
open-in-stag-popup
|
|
open-in-stag-popup
|
|
- update-parent
|
|
|
|
|
|
+ update-parent="refresh-rpm-row-{{$trIndex}}"
|
|
popup-style="tall overflow-visible"
|
|
popup-style="tall overflow-visible"
|
|
class="ml-2 text-sm"
|
|
class="ml-2 text-sm"
|
|
mc-initer="rpm-work-matrix"
|
|
mc-initer="rpm-work-matrix"
|
|
@@ -298,6 +311,7 @@
|
|
<div class="d-flex align-items-baseline">
|
|
<div class="d-flex align-items-baseline">
|
|
<i class="mr-1 text-sm fa {{$iPatient->rm_total_time_in_seconds_by_mcp >= 1200 ? 'fa-check text-success' : 'fa-exclamation-triangle text-danger'}}"></i>
|
|
<i class="mr-1 text-sm fa {{$iPatient->rm_total_time_in_seconds_by_mcp >= 1200 ? 'fa-check text-success' : 'fa-exclamation-triangle text-danger'}}"></i>
|
|
<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="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>
|
|
</div>
|
|
{{--@if($iPatient->rm_total_time_in_seconds_by_mcp < 1200)
|
|
{{--@if($iPatient->rm_total_time_in_seconds_by_mcp < 1200)
|
|
<div class="text-sm font-italic text-secondary">Entry mins. < 20</div>
|
|
<div class="text-sm font-italic text-secondary">Entry mins. < 20</div>
|
|
@@ -306,6 +320,7 @@
|
|
<div class="d-flex align-items-baseline">
|
|
<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'}}"></i>
|
|
<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'}}"></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="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>
|
|
</div>
|
|
{{--@if($iPatient->rm_total_time_in_seconds_by_rmm_pro < 1200)
|
|
{{--@if($iPatient->rm_total_time_in_seconds_by_rmm_pro < 1200)
|
|
<div class="text-sm font-italic text-secondary">Entry mins. < 20</div>
|
|
<div class="text-sm font-italic text-secondary">Entry mins. < 20</div>
|
|
@@ -338,6 +353,7 @@
|
|
@endif
|
|
@endif
|
|
</td>
|
|
</td>
|
|
</tr>
|
|
</tr>
|
|
|
|
+ <?php $trIndex++; ?>
|
|
@endforeach
|
|
@endforeach
|
|
</tbody>
|
|
</tbody>
|
|
</table>
|
|
</table>
|
|
@@ -348,11 +364,64 @@
|
|
</div>
|
|
</div>
|
|
<script>
|
|
<script>
|
|
(function() {
|
|
(function() {
|
|
|
|
+ let dataTableInst = null;
|
|
|
|
+ window.refreshRpmRow = function(_index) {
|
|
|
|
+ let tr = $('#table-rm-matrix tbody tr:eq(' + _index + ')');
|
|
|
|
+ if(!tr.length) return;
|
|
|
|
+ let clientUid = tr.attr('data-client-uid'), careMonthUid = tr.attr('data-care-month-uid');
|
|
|
|
+ $.get('/rpm-matrix-row?m={{$mStr}}&y={{$yStr}}&clientUid=' + clientUid + '&careMonthUid=' + careMonthUid + '&trIndex=' + _index, _data => {
|
|
|
|
+ let row = $(_data);
|
|
|
|
+ row.find('>td').each(function(_columnIndex) {
|
|
|
|
+ dataTableInst.cell(_index, _columnIndex).data(this.innerHTML); //.draw();
|
|
|
|
+ });
|
|
|
|
+ $('#practice-remote-monitoring [moe][initialized]').removeAttr('initialized');
|
|
|
|
+ initMoes();
|
|
|
|
+ tr.addClass('post-refresh-highlight');
|
|
|
|
+ setTimeout(function() {
|
|
|
|
+ tr.removeClass('post-refresh-highlight');
|
|
|
|
+ }, 1000);
|
|
|
|
+ });
|
|
|
|
+ }
|
|
function init() {
|
|
function init() {
|
|
- $('#table-rm-matrix').DataTable({
|
|
|
|
- "pageLength": 100
|
|
|
|
|
|
+ dataTableInst = $('#table-rm-matrix').DataTable({
|
|
|
|
+ paging: false,
|
|
|
|
+ columnDefs: [
|
|
|
|
+ {
|
|
|
|
+ targets: 0,
|
|
|
|
+ type: 'string',
|
|
|
|
+ render: function (data, type, row, meta) {
|
|
|
|
+ if(type === 'sort') {
|
|
|
|
+ return $(data).find('.sort-data').first().text();
|
|
|
|
+ }
|
|
|
|
+ return data;
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ {targets: 1, type: 'date'},
|
|
|
|
+ {
|
|
|
|
+ targets: 7,
|
|
|
|
+ type: 'date',
|
|
|
|
+ render: function (data, type, row, meta) {
|
|
|
|
+ if(type === 'sort') {
|
|
|
|
+ return $(data).find('.sort-data').first().text();
|
|
|
|
+ }
|
|
|
|
+ return data;
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ targets: [5, 6, 9, 10, 11],
|
|
|
|
+ type: 'num',
|
|
|
|
+ render: function (data, type, row, meta) {
|
|
|
|
+ if(type === 'sort') {
|
|
|
|
+ return +($(data).find('.sort-data').first().text());
|
|
|
|
+ }
|
|
|
|
+ return data;
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ ]
|
|
});
|
|
});
|
|
$('#practice-remote-monitoring').removeAttr('v-cloak');
|
|
$('#practice-remote-monitoring').removeAttr('v-cloak');
|
|
|
|
+ $('#practice-remote-monitoring [moe][initialized]').removeAttr('initialized');
|
|
|
|
+ initMoes();
|
|
}
|
|
}
|
|
addMCInitializer('practice-remote-monitoring', init, '#practice-remote-monitoring');
|
|
addMCInitializer('practice-remote-monitoring', init, '#practice-remote-monitoring');
|
|
}).call(window);
|
|
}).call(window);
|