|
@@ -919,6 +919,24 @@ WHERE measurement.label NOT IN ('SBP', 'DBP')
|
|
|
->orWhereRaw('cell_number LIKE ?', ['%' . $term . '%']);
|
|
|
});
|
|
|
|
|
|
+ $type = $request->input('type') ? trim($request->input('type')) : '';
|
|
|
+ if(!!$type) {
|
|
|
+ switch(strtolower($type)) {
|
|
|
+ case 'hcp':
|
|
|
+ $pros->where('is_hcp', true);
|
|
|
+ break;
|
|
|
+ case 'default-na': // TODO: fix condition for NA
|
|
|
+ $pros->where('is_hcp', false)->where('pro_type', '!=', 'ADMIN');
|
|
|
+ break;
|
|
|
+ case 'admin':
|
|
|
+ $pros->where('pro_type', 'ADMIN');
|
|
|
+ break;
|
|
|
+ case 'non-admin':
|
|
|
+ $pros->where('pro_type', '!=', 'ADMIN');
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if($this->performer->pro && $this->performer->pro->pro_type != 'ADMIN'){
|
|
|
$accessiblePros = ProProAccess::where('owner_pro_id', $this->performer->pro->id);
|
|
|
$accessibleProIds = [];
|