|
@@ -116,7 +116,32 @@
|
|
border-left-width: 0 !important;
|
|
border-left-width: 0 !important;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|
|
-
|
|
|
|
|
|
+ <style>
|
|
|
|
+ #rpm-admin-stats-graph .stat-bg-total-light {
|
|
|
|
+ background-color: #fbe7ce;
|
|
|
|
+ }
|
|
|
|
+ #rpm-admin-stats-graph .stat-bg-total-dark {
|
|
|
|
+ background-color: #f6b26b;
|
|
|
|
+ }
|
|
|
|
+ #rpm-admin-stats-graph .stat-bg-recd-light {
|
|
|
|
+ background-color: #d8ead2;
|
|
|
|
+ }
|
|
|
|
+ #rpm-admin-stats-graph .stat-bg-recd-dark {
|
|
|
|
+ background-color: #69a751;
|
|
|
|
+ }
|
|
|
|
+ #rpm-admin-stats-graph .stat-bg-not-recd-light {
|
|
|
|
+ background-color: #f3cdcc;
|
|
|
|
+ }
|
|
|
|
+ #rpm-admin-stats-graph .stat-bg-not-recd-dark {
|
|
|
|
+ background-color: #e06665;
|
|
|
|
+ }
|
|
|
|
+ #rpm-admin-stats-graph .stat-bg-crit-light {
|
|
|
|
+ background-color: #dbd3eb;
|
|
|
|
+ }
|
|
|
|
+ #rpm-admin-stats-graph .stat-bg-crit-dark {
|
|
|
|
+ background-color: #aa98d5;
|
|
|
|
+ }
|
|
|
|
+ </style>
|
|
<div class="p-3 mcp-theme-1" id="practice-rpm-manager">
|
|
<div class="p-3 mcp-theme-1" id="practice-rpm-manager">
|
|
|
|
|
|
<div class="card h-100">
|
|
<div class="card h-100">
|
|
@@ -127,12 +152,12 @@
|
|
|
|
|
|
<div class="card-body p-0">
|
|
<div class="card-body p-0">
|
|
<div class="d-flex align-items-baseline p-2 border-bottom">
|
|
<div class="d-flex align-items-baseline p-2 border-bottom">
|
|
- <div class="d-inline-flex align-items-center">
|
|
|
|
- <form action="">
|
|
|
|
|
|
+ <form action="" class="flex-grow-1">
|
|
|
|
+ <div class="d-flex align-items-center">
|
|
<div class="mr-2 d-inline-flex align-items-center">
|
|
<div class="mr-2 d-inline-flex align-items-center">
|
|
<label class="mb-0 mr-1">Month</label>
|
|
<label class="mb-0 mr-1">Month</label>
|
|
<select name="m" class="form-control form-control-sm min-width-unset pl-0 font-weight-bold"
|
|
<select name="m" class="form-control form-control-sm min-width-unset pl-0 font-weight-bold"
|
|
- onchange="fastLoad('{{route('practice-management.rpm-manager')}}?' + $(this).closest('form').serialize())">
|
|
|
|
|
|
+ onchange="fastLoad('{{route('practice-management.rpm-manager')}}?' + $(this).closest('form').serialize())">
|
|
<option value="">All</option>
|
|
<option value="">All</option>
|
|
<option value="01" {{$month && intval($month) === 1 ? 'selected' : ''}}>Jan</option>
|
|
<option value="01" {{$month && intval($month) === 1 ? 'selected' : ''}}>Jan</option>
|
|
<option value="02" {{$month && intval($month) === 2 ? 'selected' : ''}}>Feb</option>
|
|
<option value="02" {{$month && intval($month) === 2 ? 'selected' : ''}}>Feb</option>
|
|
@@ -151,7 +176,7 @@
|
|
<div class="mr-2 d-inline-flex align-items-center">
|
|
<div class="mr-2 d-inline-flex align-items-center">
|
|
<label class="mb-0 mr-1">Year</label>
|
|
<label class="mb-0 mr-1">Year</label>
|
|
<select name="y" class="form-control form-control-sm min-width-unset pl-0 font-weight-bold"
|
|
<select name="y" class="form-control form-control-sm min-width-unset pl-0 font-weight-bold"
|
|
- onchange="fastLoad('{{route('practice-management.rpm-manager')}}?' + $(this).closest('form').serialize())">
|
|
|
|
|
|
+ onchange="fastLoad('{{route('practice-management.rpm-manager')}}?' + $(this).closest('form').serialize())">
|
|
<option value="">All</option>
|
|
<option value="">All</option>
|
|
<option value="2020" {{$year && intval($year) === 2020 ? 'selected' : ''}}>2020</option>
|
|
<option value="2020" {{$year && intval($year) === 2020 ? 'selected' : ''}}>2020</option>
|
|
<option value="2021" {{$year && intval($year) === 2021 ? 'selected' : ''}}>2021</option>
|
|
<option value="2021" {{$year && intval($year) === 2021 ? 'selected' : ''}}>2021</option>
|
|
@@ -162,7 +187,7 @@
|
|
<div class="mr-2 d-inline-flex align-items-center">
|
|
<div class="mr-2 d-inline-flex align-items-center">
|
|
<label class="mb-0 mr-1 text-nowrap">View As</label>
|
|
<label class="mb-0 mr-1 text-nowrap">View As</label>
|
|
<select name="viewingAs" class="form-control form-control-sm min-width-unset pl-0 font-weight-bold"
|
|
<select name="viewingAs" class="form-control form-control-sm min-width-unset pl-0 font-weight-bold"
|
|
- onchange="fastLoad('{{route('practice-management.rpm-manager')}}?' + $(this).closest('form').serialize())">
|
|
|
|
|
|
+ onchange="fastLoad('{{route('practice-management.rpm-manager')}}?' + $(this).closest('form').serialize())">
|
|
@foreach($proRoles as $proRole)
|
|
@foreach($proRoles as $proRole)
|
|
<option value="{{$proRole}}" {{$viewingAs === $proRole ? 'selected' : ''}}>{{$proRole}}</option>
|
|
<option value="{{$proRole}}" {{$viewingAs === $proRole ? 'selected' : ''}}>{{$proRole}}</option>
|
|
@endforeach
|
|
@endforeach
|
|
@@ -182,28 +207,101 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endif
|
|
@endif
|
|
- <div class="mr-3 d-inline-flex align-items-center">
|
|
|
|
|
|
+ {{--
|
|
|
|
+ <div class="mr-2 d-inline-flex align-items-center">
|
|
<label class="mb-0 mr-1 text-nowrap">Date</label>
|
|
<label class="mb-0 mr-1 text-nowrap">Date</label>
|
|
<input name="specificDate" class="form-control form-control-sm min-width-unset pl-1 font-weight-bold"
|
|
<input name="specificDate" class="form-control form-control-sm min-width-unset pl-1 font-weight-bold"
|
|
value="{{$specificDate}}"
|
|
value="{{$specificDate}}"
|
|
type="date" min="{{$cmStartDate}}" max="{{$cmEndDate}}"
|
|
type="date" min="{{$cmStartDate}}" max="{{$cmEndDate}}"
|
|
onchange="fastLoad('{{route('practice-management.rpm-manager')}}?' + $(this).closest('form').serialize())">
|
|
onchange="fastLoad('{{route('practice-management.rpm-manager')}}?' + $(this).closest('form').serialize())">
|
|
</div>
|
|
</div>
|
|
|
|
+ --}}
|
|
|
|
+ <div class="mr-2 d-inline-flex align-items-center">
|
|
|
|
+ <label class="mb-0 mr-1 text-nowrap">Mins.</label>
|
|
|
|
+ <select name="mins" class="form-control form-control-sm min-width-unset pl-0 font-weight-bold"
|
|
|
|
+ onchange="fastLoad('{{route('practice-management.rpm-manager')}}?' + $(this).closest('form').serialize())">
|
|
|
|
+ <option value="" {{!$mins ? 'selected' : ''}}>All</option>
|
|
|
|
+ <option value="<20" {{$mins === '<20' ? 'selected' : ''}}>Less than 20</option>
|
|
|
|
+ <option value="20-40" {{$mins === '20-40' ? 'selected' : ''}}>Betw. 20 & 40</option>
|
|
|
|
+ <option value="40+" {{$mins === '40+' ? 'selected' : ''}}>40 or more</option>
|
|
|
|
+ </select>
|
|
|
|
+ </div>
|
|
<a href="#" onclick="return fastLoad('{{route('practice-management.rpm-manager')}}')">Clear</a>
|
|
<a href="#" onclick="return fastLoad('{{route('practice-management.rpm-manager')}}')">Clear</a>
|
|
- </form>
|
|
|
|
- </div>
|
|
|
|
- @if($paginator->total())
|
|
|
|
- <div class="d-inline-flex align-items-baseline ml-auto mb-0-pagination">
|
|
|
|
- <div class="mr-2"><b>{{$paginator->firstItem()}}</b> to <b>{{$paginator->lastItem()}}</b> (page {{$paginator->currentPage()}}) of <b>{{$paginator->total()}}</b></div>
|
|
|
|
- {!! $paginator->onEachSide(1)->withQueryString()->links() !!}
|
|
|
|
- <select class="form-control form-control-sm min-width-unset width-140px px-2 ml-2" onchange="fastLoad('{{ route('practice-management.rpm-manager') }}?{{queryLineExcept(['per_page', 'page'])}}&per_page=' + this.value)">
|
|
|
|
- <option {{$perPage == 25 ? 'selected' : ''}} value="25">25/page</option>
|
|
|
|
- <option {{$perPage == 50 ? 'selected' : ''}} value="50">50/page</option>
|
|
|
|
- <option {{$perPage == 75 ? 'selected' : ''}} value="75">75/page</option>
|
|
|
|
- <option {{$perPage == 100 ? 'selected' : ''}} value="100">100/page</option>
|
|
|
|
- </select>
|
|
|
|
|
|
+ @if($paginator->total())
|
|
|
|
+ <div class="d-inline-flex align-items-baseline ml-auto mb-0-pagination">
|
|
|
|
+ <div class="mr-2"><b>{{$paginator->firstItem()}}</b> to <b>{{$paginator->lastItem()}}</b> (page {{$paginator->currentPage()}}) of <b>{{$paginator->total()}}</b></div>
|
|
|
|
+ {!! $paginator->onEachSide(1)->withQueryString()->links() !!}
|
|
|
|
+ <select class="form-control form-control-sm min-width-unset width-140px px-2 ml-2" onchange="fastLoad('{{ route('practice-management.rpm-manager') }}?{{queryLineExcept(['per_page', 'page'])}}&per_page=' + this.value)">
|
|
|
|
+ <option {{$perPage == 25 ? 'selected' : ''}} value="25">25/page</option>
|
|
|
|
+ <option {{$perPage == 50 ? 'selected' : ''}} value="50">50/page</option>
|
|
|
|
+ <option {{$perPage == 75 ? 'selected' : ''}} value="75">75/page</option>
|
|
|
|
+ <option {{$perPage == 100 ? 'selected' : ''}} value="100">100/page</option>
|
|
|
|
+ </select>
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
</div>
|
|
</div>
|
|
- @endif
|
|
|
|
|
|
+ <div id="rpm-admin-stats-graph" class="w-100">
|
|
|
|
+
|
|
|
|
+ <div class="mt-2 pt-2 border-top w-100">
|
|
|
|
+ <div class="d-flex align-items-stretch justify-content-center">
|
|
|
|
+ <div class="width-140px mr-3 stat-bg-total-light d-inline-flex flex-column">
|
|
|
|
+ <div class="flex-grow-1 py-1 d-flex align-items-end"><span class="w-100 text-center">Total Patients</span></div>
|
|
|
|
+ <div class="font-size-16 font-weight-bold stat-bg-total-dark w-100 py-1 text-center">
|
|
|
|
+ {{$stats['totalPatients']}}
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="width-140px mr-3 stat-bg-recd-light d-inline-flex flex-column">
|
|
|
|
+ <div class="flex-grow-1 py-1 d-flex align-items-end">
|
|
|
|
+ <span class="w-100 text-center">With Meas. On:</span>
|
|
|
|
+ </div>
|
|
|
|
+ <div style="padding: 0 1px">
|
|
|
|
+ <input type="date" name="wmo" class="border-0 py-0 px-1 w-100 rounded-0 text-center"
|
|
|
|
+ onchange="$('[name=nmo]').val(this.value); fastLoad('{{route('practice-management.rpm-manager')}}?' + $(this).closest('form').serialize());"
|
|
|
|
+ value="{{request()->input('wmo') ?: date('Y-m-d')}}">
|
|
|
|
+ </div>
|
|
|
|
+ <div class="font-size-16 font-weight-bold stat-bg-recd-dark w-100 py-1 text-center">
|
|
|
|
+ {{$stats['withMeasOn']}}
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="width-140px mr-3 stat-bg-not-recd-light d-inline-flex flex-column">
|
|
|
|
+ <div class="flex-grow-1 py-1 d-flex align-items-end"><span class="w-100 text-center">No Meas. On:</span></div>
|
|
|
|
+ <div style="padding: 0 1px">
|
|
|
|
+ <input type="date" name="nmo" class="border-0 py-0 px-1 w-100 rounded-0 text-center"
|
|
|
|
+ onchange="$('[name=wmo]').val(this.value); fastLoad('{{route('practice-management.rpm-manager')}}?' + $(this).closest('form').serialize());"
|
|
|
|
+ value="{{request()->input('wmo') ?: date('Y-m-d')}}">
|
|
|
|
+ </div>
|
|
|
|
+ <div class="font-size-16 font-weight-bold stat-bg-not-recd-dark w-100 py-1 text-center">
|
|
|
|
+ {{$stats['noMeasOn']}}
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="width-140px mr-3 stat-bg-crit-light d-inline-flex flex-column">
|
|
|
|
+ <div class="flex-grow-1 py-1 d-flex align-items-end"><span class="w-100 text-center">With >= 16 Meas. days</span></div>
|
|
|
|
+ <div class="font-size-16 font-weight-bold stat-bg-crit-dark w-100 py-1 text-center">
|
|
|
|
+ {{$stats['gt16MD']}}
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="width-140px mr-3 stat-bg-crit-light d-inline-flex flex-column">
|
|
|
|
+ <div class="flex-grow-1 py-1 d-flex align-items-end"><span class="w-100 text-center">With >= 20m Interaction</span></div>
|
|
|
|
+ <div class="font-size-16 font-weight-bold stat-bg-crit-dark w-100 py-1 text-center">
|
|
|
|
+ {{$stats['gt20M']}}
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="width-140px mr-3 stat-bg-crit-light d-inline-flex flex-column">
|
|
|
|
+ <div class="flex-grow-1 py-1 d-flex align-items-end"><span class="w-100 text-center">With >= 40m Interaction</span></div>
|
|
|
|
+ <div class="font-size-16 font-weight-bold stat-bg-crit-dark w-100 py-1 text-center">
|
|
|
|
+ {{$stats['gt40M']}}
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ @if(date('m') == $month && date('Y') == $year)
|
|
|
|
+ <div class="mt-2 font-size-14 text-center">
|
|
|
|
+ Days left in the month ({{friendly_month(date('Y-m-d'))}}):
|
|
|
|
+ <b class="font-size-14">{{date('t') - date('j')}}</b>
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
</div>
|
|
</div>
|
|
<div class="rpm-manager-table-container">
|
|
<div class="rpm-manager-table-container">
|
|
<table class="table table-sm table-bordered table-striped table-hover p-0 mb-4 min-width-1100px border-0" id="table-pm-manager-matrix">
|
|
<table class="table table-sm table-bordered table-striped table-hover p-0 mb-4 min-width-1100px border-0" id="table-pm-manager-matrix">
|
|
@@ -221,6 +319,10 @@
|
|
<th class="border-top-0 border-bottom-0 rmgr-name-column"></th>
|
|
<th class="border-top-0 border-bottom-0 rmgr-name-column"></th>
|
|
@endif
|
|
@endif
|
|
<th class="border-top-0 border-bottom-0"></th>
|
|
<th class="border-top-0 border-bottom-0"></th>
|
|
|
|
+ @if(date('m') == $month && date('Y') == $year) {{-- dslm --}}
|
|
|
|
+ <th class="border-top-0 border-bottom-0"></th>
|
|
|
|
+ @endif
|
|
|
|
+ <th class="border-top-0 border-bottom-0"></th>
|
|
<th class="border-top-0 border-bottom-0 bg-aliceblue text-nowrap" colspan="3"># Meas. Days</th>
|
|
<th class="border-top-0 border-bottom-0 bg-aliceblue text-nowrap" colspan="3"># Meas. Days</th>
|
|
<th class="border-top-0 border-bottom-0 text-nowrap" colspan="2">
|
|
<th class="border-top-0 border-bottom-0 text-nowrap" colspan="2">
|
|
@if($specificDate)
|
|
@if($specificDate)
|
|
@@ -246,7 +348,6 @@
|
|
@if($viewingAs === 'ADMIN' && !(date('m') == $month && date('Y') == $year))
|
|
@if($viewingAs === 'ADMIN' && !(date('m') == $month && date('Y') == $year))
|
|
<th class="border-top-0 border-bottom-0 bg-aliceblue v-sep-before" colspan="3">Claim</th>
|
|
<th class="border-top-0 border-bottom-0 bg-aliceblue v-sep-before" colspan="3">Claim</th>
|
|
@endif
|
|
@endif
|
|
- <th class="border-top-0 border-bottom-0"></th>
|
|
|
|
<th class="border-top-0 border-bottom-0 border-right-0 w-25"></th>
|
|
<th class="border-top-0 border-bottom-0 border-right-0 w-25"></th>
|
|
</tr>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
@@ -261,6 +362,10 @@
|
|
<th class="border-bottom-0 border-top">RMM</th>
|
|
<th class="border-bottom-0 border-top">RMM</th>
|
|
<th class="border-bottom-0 border-top">RME</th>
|
|
<th class="border-bottom-0 border-top">RME</th>
|
|
@endif
|
|
@endif
|
|
|
|
+ <th class="border-bottom-0 border-top">NV</th>
|
|
|
|
+ @if(date('m') == $month && date('Y') == $year)
|
|
|
|
+ <th class="border-bottom-0 border-top">DSLM</th>
|
|
|
|
+ @endif
|
|
<th class="border-bottom-0 border-top">DSLV</th>
|
|
<th class="border-bottom-0 border-top">DSLV</th>
|
|
|
|
|
|
<!--# Meas. Days-->
|
|
<!--# Meas. Days-->
|
|
@@ -276,7 +381,8 @@
|
|
<th class="border-bottom-0 border-top">Others</th>
|
|
<th class="border-bottom-0 border-top">Others</th>
|
|
@endif
|
|
@endif
|
|
|
|
|
|
- <th class="border-bottom-0 border-top">
|
|
|
|
|
|
+ <th class="border-bottom-0 border-top text-nowrap">
|
|
|
|
+ <i class="fa fa-phone rotateh text-sm opacity-60"></i>
|
|
@if($viewingAs === 'ADMIN')
|
|
@if($viewingAs === 'ADMIN')
|
|
Inter.
|
|
Inter.
|
|
@else
|
|
@else
|
|
@@ -315,7 +421,6 @@
|
|
<th class="border-bottom-0 border-top">8</th>
|
|
<th class="border-bottom-0 border-top">8</th>
|
|
@endif
|
|
@endif
|
|
|
|
|
|
- <th class="border-bottom-0 border-top">NV</th>
|
|
|
|
<th class="border-bottom-0 border-top border-right-0"></th>
|
|
<th class="border-bottom-0 border-top border-right-0"></th>
|
|
</tr>
|
|
</tr>
|
|
</thead>
|
|
</thead>
|
|
@@ -347,7 +452,19 @@
|
|
}
|
|
}
|
|
|
|
|
|
let popoverVisible = false,
|
|
let popoverVisible = false,
|
|
- popoverShowTimer = false;
|
|
|
|
|
|
+ wtPopoverVisibleForCM = false,
|
|
|
|
+ bpPopoverVisibleForCM = false,
|
|
|
|
+ wtPopoverShowTimer = false,
|
|
|
|
+ bpPopoverShowTimer = false,
|
|
|
|
+ wtPopoverHideTimer = false,
|
|
|
|
+ bpPopoverHideTimer = false;
|
|
|
|
+
|
|
|
|
+ function hideAllPopovers() {
|
|
|
|
+ $('.rpm-manager-popover').removeClass('show');
|
|
|
|
+ popoverVisible = false;
|
|
|
|
+ bpPopoverVisibleForCM = false;
|
|
|
|
+ wtPopoverVisibleForCM = false;
|
|
|
|
+ }
|
|
|
|
|
|
function init() {
|
|
function init() {
|
|
let parent = $('#practice-rpm-manager');
|
|
let parent = $('#practice-rpm-manager');
|
|
@@ -395,44 +512,99 @@
|
|
parent
|
|
parent
|
|
.off('mouseenter', '.rpm-manager-weight-popover-trigger')
|
|
.off('mouseenter', '.rpm-manager-weight-popover-trigger')
|
|
.on('mouseenter', '.rpm-manager-weight-popover-trigger', function() {
|
|
.on('mouseenter', '.rpm-manager-weight-popover-trigger', function() {
|
|
- if(popoverVisible) return false;
|
|
|
|
- if(popoverShowTimer) {
|
|
|
|
- clearTimeout(popoverShowTimer);
|
|
|
|
- popoverShowTimer = false;
|
|
|
|
|
|
+
|
|
|
|
+ let cmUID = $(this).closest('tr').attr('data-care-month-uid');
|
|
|
|
+
|
|
|
|
+ // if WT GP already visible for this care month, STOP
|
|
|
|
+ if(wtPopoverVisibleForCM === cmUID) {
|
|
|
|
+ console.log('Wt GP already visible for CM');
|
|
|
|
+ return false;
|
|
}
|
|
}
|
|
- popoverShowTimer = setTimeout(() => {
|
|
|
|
|
|
+ else {
|
|
|
|
+ hideAllPopovers();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // cancel any existing timers
|
|
|
|
+ if(wtPopoverShowTimer) { clearTimeout(wtPopoverShowTimer); wtPopoverShowTimer = false; }
|
|
|
|
+ if(bpPopoverShowTimer) { clearTimeout(bpPopoverShowTimer); bpPopoverShowTimer = false; }
|
|
|
|
+
|
|
|
|
+ wtPopoverShowTimer = setTimeout(() => {
|
|
$('.rpm-manager-popover').removeClass('show');
|
|
$('.rpm-manager-popover').removeClass('show');
|
|
$('#rpm-manager-weight-popover-' + $(this).attr('data-uid')).addClass('show');
|
|
$('#rpm-manager-weight-popover-' + $(this).attr('data-uid')).addClass('show');
|
|
prepareMeasurementsPopover($(this).attr('data-uid'), 'weight');
|
|
prepareMeasurementsPopover($(this).attr('data-uid'), 'weight');
|
|
popoverVisible = true;
|
|
popoverVisible = true;
|
|
|
|
+ wtPopoverVisibleForCM = cmUID;
|
|
|
|
+ bpPopoverVisibleForCM = false;
|
|
}, 500);
|
|
}, 500);
|
|
|
|
+
|
|
return false;
|
|
return false;
|
|
});
|
|
});
|
|
|
|
|
|
parent
|
|
parent
|
|
.off('mouseenter', '.rpm-manager-bp-popover-trigger')
|
|
.off('mouseenter', '.rpm-manager-bp-popover-trigger')
|
|
.on('mouseenter', '.rpm-manager-bp-popover-trigger', function() {
|
|
.on('mouseenter', '.rpm-manager-bp-popover-trigger', function() {
|
|
- if(popoverVisible) return false;
|
|
|
|
- if(popoverShowTimer) {
|
|
|
|
- clearTimeout(popoverShowTimer);
|
|
|
|
- popoverShowTimer = false;
|
|
|
|
|
|
+
|
|
|
|
+ let cmUID = $(this).closest('tr').attr('data-care-month-uid');
|
|
|
|
+
|
|
|
|
+ // if WT GP already visible for this care month, STOP
|
|
|
|
+ if(bpPopoverVisibleForCM === cmUID) {
|
|
|
|
+ console.log('BP GP already visible for CM');
|
|
|
|
+ return false;
|
|
}
|
|
}
|
|
- popoverShowTimer = setTimeout(() => {
|
|
|
|
|
|
+ else {
|
|
|
|
+ // hide any currently displays popups immediately
|
|
|
|
+ hideAllPopovers();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // cancel any existing timers
|
|
|
|
+ if(bpPopoverShowTimer) { clearTimeout(bpPopoverShowTimer); bpPopoverShowTimer = false; }
|
|
|
|
+ if(wtPopoverShowTimer) { clearTimeout(wtPopoverShowTimer); wtPopoverShowTimer = false; }
|
|
|
|
+
|
|
|
|
+ bpPopoverShowTimer = setTimeout(() => {
|
|
$('.rpm-manager-popover').removeClass('show');
|
|
$('.rpm-manager-popover').removeClass('show');
|
|
$('#rpm-manager-bp-popover-' + $(this).attr('data-uid')).addClass('show');
|
|
$('#rpm-manager-bp-popover-' + $(this).attr('data-uid')).addClass('show');
|
|
prepareMeasurementsPopover($(this).attr('data-uid'), 'bp');
|
|
prepareMeasurementsPopover($(this).attr('data-uid'), 'bp');
|
|
popoverVisible = true;
|
|
popoverVisible = true;
|
|
|
|
+ bpPopoverVisibleForCM = cmUID;
|
|
|
|
+ wtPopoverVisibleForCM = false;
|
|
}, 500);
|
|
}, 500);
|
|
|
|
+
|
|
return false;
|
|
return false;
|
|
|
|
+
|
|
});
|
|
});
|
|
|
|
|
|
parent
|
|
parent
|
|
- .off('mouseleave', '.rpm-manager-popover-trigger')
|
|
|
|
- .on('mouseleave', '.rpm-manager-popover-trigger', function() {
|
|
|
|
- if(popoverVisible) return false;
|
|
|
|
- if(popoverShowTimer) {
|
|
|
|
- clearTimeout(popoverShowTimer);
|
|
|
|
- popoverShowTimer = false;
|
|
|
|
|
|
+ .off('mouseleave', '.rpm-manager-weight-popover-trigger')
|
|
|
|
+ .on('mouseleave', '.rpm-manager-weight-popover-trigger', function() {
|
|
|
|
+ if(wtPopoverVisibleForCM) {
|
|
|
|
+ if(wtPopoverHideTimer) { clearTimeout(wtPopoverHideTimer); wtPopoverHideTimer = false; }
|
|
|
|
+ wtPopoverHideTimer = setTimeout(() => {
|
|
|
|
+ $('#rpm-manager-weight-popover-' + $(this).attr('data-uid')).removeClass('show');
|
|
|
|
+ popoverVisible = false;
|
|
|
|
+ wtPopoverVisibleForCM = false;
|
|
|
|
+ }, 750);
|
|
|
|
+ }
|
|
|
|
+ else if(wtPopoverShowTimer) {
|
|
|
|
+ clearTimeout(wtPopoverShowTimer);
|
|
|
|
+ wtPopoverShowTimer = false;
|
|
|
|
+ }
|
|
|
|
+ return false;
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ parent
|
|
|
|
+ .off('mouseleave', '.rpm-manager-bp-popover-trigger')
|
|
|
|
+ .on('mouseleave', '.rpm-manager-bp-popover-trigger', function() {
|
|
|
|
+ if(bpPopoverVisibleForCM) {
|
|
|
|
+ if(bpPopoverHideTimer) { clearTimeout(bpPopoverHideTimer); bpPopoverHideTimer = false; }
|
|
|
|
+ bpPopoverHideTimer = setTimeout(() => {
|
|
|
|
+ $('#rpm-manager-bp-popover-' + $(this).attr('data-uid')).removeClass('show');
|
|
|
|
+ popoverVisible = false;
|
|
|
|
+ bpPopoverVisibleForCM = false;
|
|
|
|
+ }, 750);
|
|
|
|
+ }
|
|
|
|
+ else if(bpPopoverShowTimer) {
|
|
|
|
+ clearTimeout(bpPopoverShowTimer);
|
|
|
|
+ bpPopoverShowTimer = false;
|
|
}
|
|
}
|
|
return false;
|
|
return false;
|
|
});
|
|
});
|
|
@@ -441,12 +613,11 @@
|
|
.off('mousedown.discard-popover')
|
|
.off('mousedown.discard-popover')
|
|
.on('mousedown.discard-popover', function(_e) {
|
|
.on('mousedown.discard-popover', function(_e) {
|
|
if(!($(_e.target).closest('.rpm-manager-popover').length) && $('.rpm-manager-popover.show').length) {
|
|
if(!($(_e.target).closest('.rpm-manager-popover').length) && $('.rpm-manager-popover.show').length) {
|
|
- $('.rpm-manager-popover').removeClass('show');
|
|
|
|
- popoverVisible = false;
|
|
|
|
- if(popoverShowTimer) {
|
|
|
|
- clearTimeout(popoverShowTimer);
|
|
|
|
- popoverShowTimer = false;
|
|
|
|
- }
|
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ hideAllPopovers();
|
|
|
|
+ if(bpPopoverShowTimer) { clearTimeout(bpPopoverShowTimer); bpPopoverShowTimer = false; }
|
|
|
|
+ if(wtPopoverShowTimer) { clearTimeout(wtPopoverShowTimer); wtPopoverShowTimer = false; }
|
|
|
|
+ }, 100);
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -455,12 +626,11 @@
|
|
.off('keydown.discard-bp-popover')
|
|
.off('keydown.discard-bp-popover')
|
|
.on('keydown.discard-bp-popover', function(_e) {
|
|
.on('keydown.discard-bp-popover', function(_e) {
|
|
if(_e.which === 27) {
|
|
if(_e.which === 27) {
|
|
- $('.rpm-manager-popover').removeClass('show');
|
|
|
|
- popoverVisible = false;
|
|
|
|
- if(popoverShowTimer) {
|
|
|
|
- clearTimeout(popoverShowTimer);
|
|
|
|
- popoverShowTimer = false;
|
|
|
|
- }
|
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ hideAllPopovers();
|
|
|
|
+ if(bpPopoverShowTimer) { clearTimeout(bpPopoverShowTimer); bpPopoverShowTimer = false; }
|
|
|
|
+ if(wtPopoverShowTimer) { clearTimeout(wtPopoverShowTimer); wtPopoverShowTimer = false; }
|
|
|
|
+ }, 100);
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -486,6 +656,13 @@
|
|
parent
|
|
parent
|
|
.off('click', '.rpm-manager-popover-trigger')
|
|
.off('click', '.rpm-manager-popover-trigger')
|
|
.on('click', '.rpm-manager-popover-trigger', function() {
|
|
.on('click', '.rpm-manager-popover-trigger', function() {
|
|
|
|
+ if(popoverVisible) {
|
|
|
|
+ $('.rpm-manager-popover').removeClass('show');
|
|
|
|
+ popoverVisible = false;
|
|
|
|
+ bpPopoverVisibleForCM = false;
|
|
|
|
+ wtPopoverVisibleForCM = false;
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
openDynamicStagPopup('/patients/view/' + $(this).attr('data-client-uid') + '/care-months/view/' + $(this).attr('data-uid'),
|
|
openDynamicStagPopup('/patients/view/' + $(this).attr('data-client-uid') + '/care-months/view/' + $(this).attr('data-uid'),
|
|
'care-month-dashboard-' + $(this).attr('data-client-uid'),
|
|
'care-month-dashboard-' + $(this).attr('data-client-uid'),
|
|
$(this).attr('data-cm-title'),
|
|
$(this).attr('data-cm-title'),
|