|
@@ -97,6 +97,24 @@ class PracticeManagementController extends Controller
|
|
|
});
|
|
|
break;
|
|
|
|
|
|
+ case 'previous':
|
|
|
+ $query = $query
|
|
|
+ ->where(function ($q) use($proID) {
|
|
|
+ $q->where(function ($q2) use ($proID) {
|
|
|
+ $q2->where('hcp_pro_id', $proID)->where('is_signed_by_hcp', true);
|
|
|
+ })
|
|
|
+ ->orWhere(function ($q2) use ($proID) {
|
|
|
+ $q2->where('cm_pro_id', $proID)->where('is_signed_by_cm', true);
|
|
|
+ })
|
|
|
+ ->orWhere(function ($q2) use ($proID) {
|
|
|
+ $q2->where('rme_pro_id', $proID)->where('is_signed_by_rme', true);
|
|
|
+ })
|
|
|
+ ->orWhere(function ($q2) use ($proID) {
|
|
|
+ $q2->where('rmm_pro_id', $proID)->where('is_signed_by_rmm', true);
|
|
|
+ });
|
|
|
+ });
|
|
|
+ break;
|
|
|
+
|
|
|
// more cases can be added as needed
|
|
|
default:
|
|
|
break;
|