|
@@ -75,17 +75,26 @@ class AdminController extends Controller
|
|
|
}
|
|
|
|
|
|
if ($request->input('mcp')) {
|
|
|
- $mcp = Pro::where('uid', trim($request->input('mcp')))->first();
|
|
|
- if ($mcp) {
|
|
|
- $patients = $patients->where('mcp_pro_id', $mcp->id);
|
|
|
+ if($request->input('mcp') == 'NO_MCP'){
|
|
|
+ $patients = $patients->whereNull('mcp_pro_id');
|
|
|
+ }else{
|
|
|
+ $mcp = Pro::where('uid', trim($request->input('mcp')))->first();
|
|
|
+ if ($mcp) {
|
|
|
+ $patients = $patients->where('mcp_pro_id', $mcp->id);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if ($request->input('na')) {
|
|
|
- $na = Pro::where('uid', trim($request->input('na')))->first();
|
|
|
- if ($na) {
|
|
|
- $patients = $patients->where('default_na_pro_id', $na->id);
|
|
|
+ if($request->input('na') == 'NO_NA'){
|
|
|
+ $patients = $patients->whereNull('default_na_pro_id');
|
|
|
+ }else{
|
|
|
+ $na = Pro::where('uid', trim($request->input('na')))->first();
|
|
|
+ if ($na) {
|
|
|
+ $patients = $patients->where('default_na_pro_id', $na->id);
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
|
|
|
if ($request->input('next_appointment_category')) {
|