Prechádzať zdrojové kódy

RPM admin matrix DSLV filter

Vijayakrishnan 3 rokov pred
rodič
commit
a3017765a5

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

@@ -2044,6 +2044,12 @@ WHERE
             $conditions[] = "(DATE_PART('day', NOW() - client.most_recent_cellular_measurement_at) {$o} {$v})";
         }
 
+        if(trim($request->input('f_dslv_op')) && trim($request->input('f_dslv')) !== '') {
+            $o = trim($request->input('f_dslv_op'));
+            $v = trim($request->input('f_dslv'));
+            $conditions[] = "(care_month.days_between_most_recent_mcp_note_date_and_end_of_care_month {$o} {$v})";
+        }
+
         if($request->input('not-enrolled')) {
             $conditions[] = "(care_month.is_client_enrolled_in_rm IS NOT TRUE)";
         }

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

@@ -345,6 +345,23 @@
                             </div>
                         </div>
 
+                        <div>
+                            <label class="mb-0 text-sm {{request()->input('f_dslv') ? 'font-weight-bold text-info' : 'text-secondary'}}">DSLV</label>
+                            <div class="d-flex align-items-start">
+                                <select name="f_dslv_op"
+                                        class="mr-1 form-control form-control-sm min-width-unset width-40px pl-0">
+                                    <option {{request()->input('f_dslv_op') === '=' ? 'selected' : ''}} value="=">&equals;</option>
+                                    <option {{request()->input('f_dslv_op') === '>' ? 'selected' : ''}} value=">">&gt;</option>
+                                    <option {{request()->input('f_dslv_op') === '<' ? 'selected' : ''}} value="<">&lt;</option>
+                                    <option {{request()->input('f_dslv_op') === '>=' ? 'selected' : ''}} value=">=">&ge;</option>
+                                    <option {{request()->input('f_dslv_op') === '<=' ? 'selected' : ''}} value="<=">&le;</option>
+                                </select>
+                                <input type="number" name="f_dslv"
+                                       value="{{request()->input('f_dslv')}}"
+                                       class="mr-2 form-control form-control-sm min-width-unset width-70px">
+                            </div>
+                        </div>
+
                         <div class="min-width-110px mr-2">
                             <label class="mb-0 text-sm {{request()->input('f_454') ? 'font-weight-bold text-info' : 'text-secondary'}}">454</label>
                             <div class="d-flex align-items-start">