|
@@ -77,6 +77,11 @@ class AdminController extends Controller
|
|
|
if ($request->input('next_appointment_category')) {
|
|
|
if($request->input('next_appointment_category') == 'NONE'){
|
|
|
$patients = $patients->whereNull('next_mcp_appointment_id');
|
|
|
+ }else{
|
|
|
+ $self = $this;
|
|
|
+ $patients = $patients->whereHas('nextMcpAppointment', function($pQry) use ($request, $self){
|
|
|
+ return $self->filterMultiQuery($request, $pQry, 'raw_date', 'next_appointment_category', 'next_appointment_value_1', 'next_appointment_value_2');
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
|