Sfoglia il codice sorgente

RPM admin - col + filter - days since last measurement

Vijayakrishnan 3 anni fa
parent
commit
104d3419ed

+ 7 - 0
app/Http/Controllers/PracticeManagementController.php

@@ -1943,6 +1943,12 @@ WHERE
             $conditions[] = "(care_month.rm_total_time_in_seconds_by_rmm_pro {$o} {$v})";
         }
 
+        if(trim($request->input('f_dslm_op')) && trim($request->input('f_dslm')) !== '') {
+            $o = trim($request->input('f_dslm_op'));
+            $v = trim($request->input('f_dslm'));
+            $conditions[] = "(DATE_PART('day', NOW() - client.most_recent_cellular_measurement_at) {$o} {$v})";
+        }
+
         if($request->input('not-enrolled')) {
             $conditions[] = "(client.is_enrolled_in_rm != 'YES')";
         }
@@ -1999,6 +2005,7 @@ SELECT client.name_first, client.name_last,
        client.cell_number,
        client.is_assigned_cellular_bp_device,
        client.is_assigned_cellular_weight_scale_device,
+       DATE_PART('day', NOW() - client.most_recent_cellular_measurement_at) as dslm,
        care_month.uid as care_month_uid,
        care_month.id as care_month_id,
        care_month.start_date,

+ 3 - 0
resources/views/app/practice-management/remote-monitoring-row-markup-for-admin.blade.php

@@ -51,6 +51,9 @@
             <span class="text-secondary">No</span>
         @endif
     </td>
+    <td>
+        {{$iPatient->dslm}}
+    </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 on-hover-opaque'}}"></i>

+ 1 - 0
resources/views/app/practice-management/rpm-matrix-for-admin-table.blade.php

@@ -33,6 +33,7 @@
                 {{--<th class="border-0">@include('app.practice-management._sort_header_multi', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => 'RPM?', 'key' => 'is_enrolled_in_rm'])</th>--}}
                 <th class="border-0 text-secondary">BP</th>
                 <th class="border-0 text-secondary">Scale</th>
+                <th class="border-0">@include('app.practice-management._sort_header_multi', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => 'DSLM', 'key' => 'dslm'])</th>
                 <th class="border-0">@include('app.practice-management._sort_header_multi', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => 'DSLV', 'key' => 'most_recent_completed_mcp_note_date'])</th>
                 <th class="border-0">@include('app.practice-management._sort_header_multi', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => '<i class="text-sm fa fa-phone rotateh"></i> MCP', 'key' => 'has_mcp_interacted_with_client_about_rm'])</th>
                 <th class="border-0">@include('app.practice-management._sort_header_multi', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => '<i class="text-sm fa fa-phone rotateh"></i> Any', 'key' => 'has_anyone_interacted_with_client_about_rm'])</th>

+ 16 - 28
resources/views/app/practice-management/rpm-matrix-for-admin.blade.php

@@ -199,16 +199,9 @@
                             </div>
                         </div>
 
-                        {{--<div>
-                            <label class="mb-0 text-sm {{request()->input('f_rpm') && request()->input('f_rpm') !== 'any' ? 'font-weight-bold text-info' : 'text-secondary'}}">RPM</label>
-                            <select name="f_rpm"
-                                    class="mr-2 form-control form-control-sm min-width-unset width-70px pl-0">
-                                <option {{request()->input('f_rpm') === 'any' ? 'selected' : ''}} value="any">Any</option>
-                                <option {{request()->input('f_rpm') === 'yes' ? 'selected' : ''}} value="yes">Yes</option>
-                                <option {{request()->input('f_rpm') === 'no' ? 'selected' : ''}} value="no">No</option>
-                            </select>
-                        </div>--}}
+                    </div>
 
+                    <div class="d-flex align-items-start mt-2">
                         <div>
                             <label class="mb-0 text-sm {{request()->input('f_cell_bp') && request()->input('f_cell_bp') !== 'any' ? 'font-weight-bold text-info' : 'text-secondary'}}">Cell. BP</label>
                             <select name="f_cell_bp"
@@ -318,27 +311,22 @@
                             </div>
                         </div>
 
-                        {{--
-                        <div>
-                            <label class="mb-0 text-sm {{request()->input('f_mcp_billable') && request()->input('f_mcp_billable') !== 'any' ? 'font-weight-bold text-info' : 'text-secondary'}}">MCP Billable</label>
-                            <select name="f_mcp_billable"
-                                    class="mr-2 form-control form-control-sm min-width-unset width-70px pl-0">
-                                <option {{request()->input('f_mcp_billable') === 'all' ? 'selected' : ''}} value="any">All</option>
-                                <option {{request()->input('f_mcp_billable') === 'yes' ? 'selected' : ''}} value="yes">Yes</option>
-                                <option {{request()->input('f_mcp_billable') === 'no' ? 'selected' : ''}} value="no">No</option>
-                            </select>
-                        </div>
-
                         <div>
-                            <label class="mb-0 text-sm {{request()->input('f_rmm_billable') && request()->input('f_rmm_billable') !== 'any' ? 'font-weight-bold text-info' : 'text-secondary'}}">RMM Billable</label>
-                            <select name="f_rmm_billable"
-                                    class="mr-2 form-control form-control-sm min-width-unset width-70px pl-0">
-                                <option {{request()->input('f_rmm_billable') === 'all' ? 'selected' : ''}} value="any">All</option>
-                                <option {{request()->input('f_rmm_billable') === 'yes' ? 'selected' : ''}} value="yes">Yes</option>
-                                <option {{request()->input('f_rmm_billable') === 'no' ? 'selected' : ''}} value="no">No</option>
-                            </select>
+                            <label class="mb-0 text-sm {{request()->input('f_dslm') ? 'font-weight-bold text-info' : 'text-secondary'}}">DSLM</label>
+                            <div class="d-flex align-items-start">
+                                <select name="f_dslm_op"
+                                        class="mr-1 form-control form-control-sm min-width-unset width-40px pl-0">
+                                    <option {{request()->input('f_dslm_op') === '=' ? 'selected' : ''}} value="=">&equals;</option>
+                                    <option {{request()->input('f_dslm_op') === '>' ? 'selected' : ''}} value=">">&gt;</option>
+                                    <option {{request()->input('f_dslm_op') === '<' ? 'selected' : ''}} value="<">&lt;</option>
+                                    <option {{request()->input('f_dslm_op') === '>=' ? 'selected' : ''}} value=">=">&ge;</option>
+                                    <option {{request()->input('f_dslm_op') === '<=' ? 'selected' : ''}} value="<=">&le;</option>
+                                </select>
+                                <input type="number" name="f_dslm"
+                                       value="{{request()->input('f_dslm')}}"
+                                       class="mr-2 form-control form-control-sm min-width-unset width-70px">
+                            </div>
                         </div>
-                        --}}
 
                         <div>
                             <label class="mb-0 text-sm text-secondary">&nbsp;</label>