|
@@ -589,11 +589,12 @@ WHERE measurement.label NOT IN ('SBP', 'DBP')
|
|
|
$pro = $this->pro;
|
|
|
$term = $request->input('term') ? trim($request->input('term')) : '';
|
|
|
if (empty($term)) return '';
|
|
|
- $clientQuery= Client::where(function ($q) use ($term) {
|
|
|
- $q->where('name_first', 'ILIKE', '%' . $term . '%')
|
|
|
- ->orWhere('name_last', 'ILIKE', '%' . $term . '%')
|
|
|
- ->orWhere('cell_number', 'ILIKE', '%' . $term . '%');
|
|
|
- });
|
|
|
+ $clientQuery= Client::whereNull('shadow_pro_id')
|
|
|
+ ->where(function ($q) use ($term) {
|
|
|
+ $q->where('name_first', 'ILIKE', '%' . $term . '%')
|
|
|
+ ->orWhere('name_last', 'ILIKE', '%' . $term . '%')
|
|
|
+ ->orWhere('cell_number', 'ILIKE', '%' . $term . '%');
|
|
|
+ });
|
|
|
|
|
|
if($pro->pro_type != 'ADMIN') {
|
|
|
$clientQuery->where(function ($q) use ($pro) {
|