Prechádzať zdrojové kódy

RPM logic and UI updates

Vijayakrishnan 3 rokov pred
rodič
commit
b86a0fd93e

+ 3 - 0
public/css/style.css

@@ -343,6 +343,9 @@ body>nav.navbar {
     min-width: unset;
     max-width: 100%;
 }
+.mcp-theme-1 .rotateh {
+    transform: rotateY(180deg);
+}
 .mcp-theme-1 .width-200px {
     width: 200px !important;
 }

+ 1 - 1
resources/views/app/dashboard/measurements.blade.php

@@ -78,7 +78,7 @@
                                     </div>
                                     @if($measurement->mcp_pro_id !== $pro->id)
                                         <div class="mb-2 border border-info p-2 mt-2 bg-light">
-                                            <span>I have had interactive communication with {{$measurement->name_first}} {{$measurement->name_last}} during this care month.</span>
+                                            <span>I have had interactive communication with {{$measurement->name_first}} {{$measurement->name_last}}.</span>
                                             <div class="d-flex border-top mt-2">
                                                 <label class="mt-2 mb-0 d-inline-flex align-items-center mr-3">
                                                     <input type="radio" class="mr-2" name="communicatedToPatient" value="true">

+ 16 - 16
resources/views/app/patient/care-month/_matrix.blade.php

@@ -107,7 +107,7 @@ foreach ($days as $k => $day) {
                                         </div>
                                     </div>
                                     <!--<div class="mb-2 border border-info p-2 mt-2 bg-light">
-                                        <span>I have had interactive communication with <b>{{$patient->displayName()}}</b> during this care month.</span>
+                                        <span>I have had interactive communication with <b>{{$patient->displayName()}}</b>.</span>
                                         <div class="d-flex border-top mt-2">
                                             <label class="mt-2 mb-0 d-inline-flex align-items-center mr-3">
                                                 <input type="radio" class="mr-2" name="communicatedToPatient" value="true" required>
@@ -231,7 +231,7 @@ foreach ($days as $k => $day) {
                                         </div>
                                     </div>
                                     <div class="mb-2 border border-info p-2 mt-2 bg-light">
-                                        <span>I have had interactive communication with <b>{{$patient->displayName()}}</b> during this care month.</span>
+                                        <span>I have had interactive communication with <b>{{$patient->displayName()}}</b>.</span>
                                         <div class="d-flex border-top mt-2">
                                             <label class="mt-2 mb-0 d-inline-flex align-items-center mr-3">
                                                 <input type="radio" class="mr-2" name="didProInteractWithClientAboutRm" value="true" required {{$careMonth->has_mcp_interacted_with_client_about_rm ? 'checked' : ''}}>
@@ -362,20 +362,20 @@ foreach ($days as $k => $day) {
                             </div>
                             @if($entry->pro_id === $pro->id)
                                 <div class="d-flex align-items-baseline">
-                                    @if($performerRole === 'MCP')
-                                        <div moe relative class="mr-2">
-                                            <a href="#" start show class="text-sm">Mark as {{$entry->did_pro_interact_with_client_about_rm ? 'Not ' : ''}}Interacted</a>
-                                            <form url="/api/careMonthEntry/setDidProInteractWithClientAboutRmTo{{$entry->did_pro_interact_with_client_about_rm ? 'False' : 'True '}}">
-                                                <input type="hidden" name="uid" value="{{$entry->uid}}">
-                                                <p class="text-nowrap">Mark as {{$entry->did_pro_interact_with_client_about_rm ? 'Not ' : ''}}Interacted?</p>
-                                                <div class="d-flex align-items-center flex-nowrap">
-                                                    <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 moe relative>
+                                    <i class="fa fa-phone rotateh {{$entry->did_pro_interact_with_client_about_rm ? 'text-success' : 'text-danger'}} mr-1"></i>
+                                    <span class="mr-2 text-sm">{{!$entry->did_pro_interact_with_client_about_rm ? 'Not ' : ''}}Interacted</span>
+                                    <div moe relative class="mr-2">
+                                        <a href="#" start show class="text-sm">{{$entry->did_pro_interact_with_client_about_rm ? 'Undo' : 'Change'}}</a>
+                                        <form url="/api/careMonthEntry/setDidProInteractWithClientAboutRmTo{{$entry->did_pro_interact_with_client_about_rm ? 'False' : 'True '}}">
+                                            <input type="hidden" name="uid" value="{{$entry->uid}}">
+                                            <p class="text-nowrap">Mark as {{$entry->did_pro_interact_with_client_about_rm ? 'Not ' : ''}}Interacted?</p>
+                                            <div class="d-flex align-items-center flex-nowrap">
+                                                <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 moe relative class="ml-3">
                                         <a href="#" start show class="text-sm text-danger">Remove</a>
                                         <form url="/api/careMonthEntry/remove">
                                             <input type="hidden" name="uid" value="{{$entry->uid}}">

+ 14 - 14
resources/views/app/patient/care-month/_work_matrix.blade.php

@@ -256,7 +256,7 @@ $days = $daysWithUnstamped;
                                             </div>
                                         </div>
                                         <div class="mb-2 border border-info p-2 mt-2 bg-light">
-                                            <span>I have had interactive communication with <b>{{$patient->displayName()}}</b> during this care month.</span>
+                                            <span>I have had interactive communication with <b>{{$patient->displayName()}}</b>.</span>
                                             <div class="d-flex border-top mt-2">
                                                 <label class="mt-2 mb-0 d-inline-flex align-items-center mr-3">
                                                     <input type="radio" class="mr-2" name="didProInteractWithClientAboutRm" value="true" required {{$careMonth->has_mcp_interacted_with_client_about_rm ? 'checked' : ''}}>
@@ -348,19 +348,19 @@ $days = $daysWithUnstamped;
                                 </div>
                                 @if($entry->pro_id === $pro->id)
                                     <div>
-                                        @if($performerRole === 'MCP')
-                                            <div moe relative class="mr-2">
-                                                <a href="#" start show class="text-sm">Mark as {{$entry->did_pro_interact_with_client_about_rm ? 'Not ' : ''}}Interacted</a>
-                                                <form url="/api/careMonthEntry/setDidProInteractWithClientAboutRmTo{{$entry->did_pro_interact_with_client_about_rm ? 'False' : 'True '}}">
-                                                    <input type="hidden" name="uid" value="{{$entry->uid}}">
-                                                    <p class="text-nowrap">Mark as {{$entry->did_pro_interact_with_client_about_rm ? 'Not ' : ''}}Interacted?</p>
-                                                    <div class="d-flex align-items-center flex-nowrap">
-                                                        <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
+                                        <i class="fa fa-phone rotateh {{$entry->did_pro_interact_with_client_about_rm ? 'text-success' : 'text-danger'}} mr-1"></i>
+                                        <span class="mr-2 text-sm">{{!$entry->did_pro_interact_with_client_about_rm ? 'Not ' : ''}}Interacted</span>
+                                        <div moe relative class="mr-2">
+                                            <a href="#" start show class="text-sm">{{$entry->did_pro_interact_with_client_about_rm ? 'Undo' : 'Change'}}</a>
+                                            <form url="/api/careMonthEntry/setDidProInteractWithClientAboutRmTo{{$entry->did_pro_interact_with_client_about_rm ? 'False' : 'True '}}">
+                                                <input type="hidden" name="uid" value="{{$entry->uid}}">
+                                                <p class="text-nowrap">Mark as {{$entry->did_pro_interact_with_client_about_rm ? 'Not ' : ''}}Interacted?</p>
+                                                <div class="d-flex align-items-center flex-nowrap">
+                                                    <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 moe relative>
                                             <a href="#" start show class="text-sm">Update Content</a>
                                             <form url="/api/careMonthEntry/updateContent">

+ 13 - 17
resources/views/app/patient/care-month/dashboard.blade.php

@@ -468,23 +468,19 @@
                                                     {{ friendly_date_time_short_with_tz_from_timestamp($timestampInSec, 'EASTERN') }} EST
                                                 </div>
                                             </div>
-                                            @if($measurement->mcp_pro_id !== $pro->id)
-                                                <div class="mb-2 border border-info p-2 mt-2 bg-light">
-                                                    <span>I have had interactive communication with {{$measurement->name_first}} {{$measurement->name_last}} during this care month.</span>
-                                                    <div class="d-flex border-top mt-2">
-                                                        <label class="mt-2 mb-0 d-inline-flex align-items-center mr-3">
-                                                            <input type="radio" class="mr-2" name="communicatedToPatient" value="true">
-                                                            <span>Yes</span>
-                                                        </label>
-                                                        <label class="mt-2 mb-0 d-inline-flex align-items-center">
-                                                            <input type="radio" class="mr-2" name="communicatedToPatient" value="false" checked>
-                                                            <span>No</span>
-                                                        </label>
-                                                    </div>
+                                            <div class="mb-2 border border-info p-2 mt-2 bg-light">
+                                                <span>I have had interactive communication with {{$measurement->name_first}} {{$measurement->name_last}}.</span>
+                                                <div class="d-flex border-top mt-2">
+                                                    <label class="mt-2 mb-0 d-inline-flex align-items-center mr-3">
+                                                        <input type="radio" class="mr-2" name="communicatedToPatient" value="true">
+                                                        <span>Yes</span>
+                                                    </label>
+                                                    <label class="mt-2 mb-0 d-inline-flex align-items-center">
+                                                        <input type="radio" class="mr-2" name="communicatedToPatient" value="false" checked>
+                                                        <span>No</span>
+                                                    </label>
                                                 </div>
-                                            @else
-                                                <input type="hidden" name="communicatedToPatient" value="false">
-                                            @endif
+                                            </div>
                                             <div class="mb-2">
                                                 <label class="mb-1 text-secondary text-sm">Memo</label>
                                                 <textarea class="form-control form-control-sm" name="memo"></textarea>
@@ -1942,7 +1938,7 @@
                     }
                 });
 
-                window.setTimeout(() => { measurementsCalendar.render();}, 10);
+                window.setTimeout(() => { measurementsCalendar.render(); window.dispatchEvent(new Event('resize'));}, 10);
 
             }
 

+ 1 - 1
resources/views/app/patient/send_email.blade.php

@@ -109,6 +109,6 @@
                 }
             });
         }
-        addMCInitializer('outgoingEmailTemplate', init);
+        addMCInitializer('outgoingEmailTemplate', init, '#htmlBody');
     })();
 </script>

+ 2 - 2
resources/views/app/practice-management/remote-monitoring-measurements.blade.php

@@ -26,7 +26,7 @@
                 <p class="mb-1">Stamp all measurements?</p>
                 @if($measurement->mcp_pro_id !== $pro->id)
                     <div class="mb-2 border border-info p-2 mt-2 bg-light width-300px">
-                        <span>I have had interactive communication with {{$measurement->name_first}} {{$measurement->name_last}} during this care month.</span>
+                        <span>I have had interactive communication with {{$measurement->name_first}} {{$measurement->name_last}}.</span>
                         <div class="d-flex border-top mt-2">
                             <label class="mt-2 mb-0 d-inline-flex align-items-center mr-3">
                                 <input type="radio" class="mr-2" name="communicatedToPatient" value="true">
@@ -123,7 +123,7 @@
                                             </div>
                                             @if($measurement->mcp_pro_id !== $pro->id)
                                                 <div class="mb-2 border border-info p-2 mt-2 bg-light">
-                                                    <span>I have had interactive communication with {{$measurement->name_first}} {{$measurement->name_last}} during this care month.</span>
+                                                    <span>I have had interactive communication with {{$measurement->name_first}} {{$measurement->name_last}}.</span>
                                                     <div class="d-flex border-top mt-2">
                                                         <label class="mt-2 mb-0 d-inline-flex align-items-center mr-3">
                                                             <input type="radio" class="mr-2" name="communicatedToPatient" value="true">

+ 59 - 29
resources/views/app/practice-management/remote-monitoring.blade.php

@@ -2,6 +2,19 @@
 
 @section('content')
 
+    <link rel="stylesheet" href="https://cdn.datatables.net/1.11.5/css/jquery.dataTables.min.css">
+    <script src="https://cdn.datatables.net/1.11.5/js/jquery.dataTables.min.js"></script>
+    <style>
+        #table-rm-matrix_length, #table-rm-matrix_info {
+            padding-left: 0.5rem;
+        }
+        #table-rm-matrix_filter {
+            padding-right: 0.5rem;
+        }
+        #table-rm-matrix_paginate {
+            padding: 0.5rem;
+        }
+    </style>
     <div class="p-3 mcp-theme-1" id="practice-remote-monitoring">
 
         <div class="card">
@@ -14,7 +27,7 @@
                 </span>
                 <?php
 
-use App\Models\Note;
+                use App\Models\Note;
 
                 $mStr = request()->input('m') ? request()->input('m') : date('m');
                 $yStr = request()->input('y') ? request()->input('y') : date('Y');
@@ -63,22 +76,22 @@ use App\Models\Note;
 
             <div class="card-body p-0">
                 <div class="d-flex align-items-start m-0">
-                    <div class="flex-grow-1 p-0">
-                        <table class="table table-sm table-striped table-hover p-0 m-0">
+                    <div class="flex-grow-1 px-0 pt-2">
+                        <table class="table table-sm table-striped table-hover p-0 m-0 border-top" id="table-rm-matrix">
                             <thead class="bg-light">
                             <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' => 'RPM?', 'key' => 'is_enrolled_in_rm'])</th>
-                                <th class="border-0">@include('app.practice-management._sort_header', ['route' => route("practice-management.remote-monitoring"), 'label' => 'Cell. BP?', 'key' => 'is_assigned_cellular_bp_device'])</th>
-                                <th class="border-0">@include('app.practice-management._sort_header', ['route' => route("practice-management.remote-monitoring"), 'label' => 'Cell. Scale?', 'key' => 'is_assigned_cellular_weight_scale_device'])</th>
-                                <th class="border-0">@include('app.practice-management._sort_header', ['route' => route("practice-management.remote-monitoring"), 'label' => 'Last BP', 'key' => 'most_recent_cellular_bp_measurement_at'])</th>
-                                <th class="border-0">@include('app.practice-management._sort_header', ['route' => route("practice-management.remote-monitoring"), 'label' => 'Last Wt', 'key' => 'most_recent_cellular_weight_measurement_at'])</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' => 'Interacted?', 'key' => 'has_mcp_interacted_with_client_about_rm'])</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>
+                                <th class="border-0 pl-2">Name</th>
+                                <th class="border-0">DOB</th>
+                                <th class="border-0">RPM?</th>
+                                <th class="border-0">Cell. BP?</th>
+                                <th class="border-0">Cell. Scale?</th>
+                                <th class="border-0">Last BP</th>
+                                <th class="border-0">Last Wt</th>
+                                <th class="border-0">Last Visit</th>
+                                <th class="border-0">Interacted?</th>
+                                <th class="border-0">#Meas. Days</th>
+                                <th class="border-0">#Unstamped</th>
+                                <th class="border-0">#RPM Mins.</th>
                                 <th class="border-0">Billable</th>
                             </tr>
                             </thead>
@@ -108,7 +121,14 @@ use App\Models\Note;
                                 ?>
                                 <tr>
                                     <td class="pl-2">
-                                        <a href="/patients/view/{{ $iPatient->client_uid }}" class="text-nowrap">{{ $iPatient->client_name }}</a>
+                                        <a href="/patients/view/{{ $iPatient->client_uid }}/care-months/view/{{$iPatient->care_month_uid}}" class="text-nowrap"
+                                           native target="_blank"
+                                           open-in-stag-popup
+                                           update-parent
+                                           popup-style="tall overflow-visible"
+                                           mc-initer="care-month-dashboard-{{$iPatient->client_uid}}"
+                                           title="{{$iPatient->client_name}}"
+                                        >{{ $iPatient->client_name }}</a>
                                     </td>
 
                                     <td>{{friendly_date($iPatient->dob)}}</td>
@@ -118,13 +138,15 @@ use App\Models\Note;
                                     <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)
-                                            <div class="text-sm text-secondary text-nowrap">{{friendly_date_time($iPatient->most_recent_cellular_bp_measurement_at)}}</div>
+                                            <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
                                     </td>
                                     <td>
                                         {{$iPatient->most_recent_cellular_weight_value ? round($iPatient->most_recent_cellular_weight_value, 1) : '-'}}
                                         @if($iPatient->most_recent_cellular_weight_measurement_at)
-                                            <div class="text-sm text-secondary text-nowrap">{{friendly_date_time($iPatient->most_recent_cellular_weight_measurement_at)}}</div>
+                                            <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
                                     </td>
                                     <td>
@@ -138,9 +160,9 @@ use App\Models\Note;
                                                 <span>-</span>
                                             @endif
                                         </div>
-                                        @if(!$lastVisitWithin90Days)
+                                        {{--@if(!$lastVisitWithin90Days)
                                             <div class="text-sm font-italic text-secondary">No visit in over 90 days</div>
-                                        @endif
+                                        @endif--}}
                                     </td>
                                     <td>
                                         <div class="d-flex align-items-baseline">
@@ -176,7 +198,7 @@ use App\Models\Note;
                                                             </div>
                                                         </div>
                                                         <div class="mb-2 border border-info p-2 mt-2 bg-light">
-                                                            <span>I have had interactive communication with <b>{{$iPatient->client_name}}</b> during this care month.</span>
+                                                            <span>I have had interactive communication with <b>{{$iPatient->client_name}}</b>.</span>
                                                             <div class="d-flex border-top mt-2">
                                                                 <label class="mt-2 mb-0 d-inline-flex align-items-center mr-3">
                                                                     <input type="radio" class="mr-2" name="didProInteractWithClientAboutRm" value="true" required>
@@ -201,9 +223,9 @@ use App\Models\Note;
                                                 </div>
                                             @endif
                                         </div>
-                                        @if(!$iPatient->has_mcp_interacted_with_client_about_rm)
+                                        {{--@if(!$iPatient->has_mcp_interacted_with_client_about_rm)
                                             <div class="text-sm font-italic text-secondary">{{$performerRole === 'MCP' ? 'Not' : "MCP hasn't"}} interacted this month!</div>
-                                        @endif
+                                        @endif--}}
                                     </td>
                                     <td>
                                         <div class="d-flex align-items-baseline">
@@ -230,9 +252,9 @@ use App\Models\Note;
                                                 </div>
                                             @endif
                                         </div>
-                                        @if($iPatient->number_of_days_with_remote_measurements < 16)
+                                        {{--@if($iPatient->number_of_days_with_remote_measurements < 16)
                                             <div class="text-sm font-italic text-secondary">Meas. days < 16</div>
-                                        @endif
+                                        @endif--}}
                                     </td>
                                     <td>
                                         <div class="d-flex align-items-baseline">
@@ -273,17 +295,17 @@ use App\Models\Note;
                                                 <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>
                                             </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>
-                                            @endif
+                                            @endif--}}
                                         @elseif($performerRole === 'RMM')
                                             <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>
                                                 <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>
                                             </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>
-                                            @endif
+                                            @endif--}}
                                         @endif
                                     </td>
                                     <td>
@@ -320,4 +342,12 @@ use App\Models\Note;
             </div>
         </div>
     </div>
+    <script>
+        (function() {
+            function init() {
+                $('#table-rm-matrix').DataTable();
+            }
+            addMCInitializer('practice-remote-monitoring', init, '#practice-remote-monitoring');
+        }).call(window);
+    </script>
 @endsection

+ 1 - 1
resources/views/layouts/patient.blade.php

@@ -14,7 +14,7 @@ $isOldClient = (date_diff(date_create(config('app.point_impl_date')), date_creat
 	}
 </style>
 @section('content')
-	<div class="container-fluid h-100">
+	<div class="container-fluid h-100 popup-content-container">
 		<div class="main-row h-100 {{ !request()->input('popupmode') ? '' : 'px-0' }} {{$isVisitNote ? 'autohide-leftnav' : ''}}">
 			@if(!request()->input('popupmode'))
 			<nav id="sidebarMenu" class="d-block bg-light sidebar collapse px-0">