Prechádzať zdrojové kódy

Admin: patients list - OB filter

Vijayakrishnan 3 rokov pred
rodič
commit
f035d24771

+ 8 - 0
app/Http/Controllers/AdminController.php

@@ -74,6 +74,14 @@ class AdminController extends Controller
            
         }
 
+        if ($request->input('ob')) {
+            if ($request->input('ob') == 'yes') {
+                $patients = $patients->where('has_mcp_done_onboarding_visit', 'YES');
+            } else {
+                $patients = $patients->where('has_mcp_done_onboarding_visit', '!=', 'YES');
+            }
+        }
+
         if ($request->input('next_appointment_category')) {
             if($request->input('next_appointment_category') == 'NONE'){
                 $patients = $patients->whereNull('next_mcp_appointment_id');

+ 13 - 0
resources/views/app/admin/patients_filters.blade.php

@@ -164,6 +164,18 @@
 		</div>
 	</div>
 
+	<!-- OB Visit -->
+	<div class="sm-section">
+		<div class="">
+			<label>OB Visit:</label>
+			<select name="ob" class="form-control input-sm" v-model="filters.ob">
+				<option value="">All</option>
+				<option value="yes">Done</option>
+				<option value="no">Not Done</option>
+			</select>
+		</div>
+	</div>
+
 	@if($performer->pro->pro_type == 'ADMIN')
 	<div class="sm-section">
 		<div class="">
@@ -401,6 +413,7 @@ $allFilterKeys = [
 	'next_appointment_value_1',
 	'sex',
 	'status',
+	'ob',
 	'initiative',
 	'insurance',
 	'include_test_records',