|
@@ -311,14 +311,33 @@ SELECT effective_date, count(*), sum(number_of_units) as units FROM bill WHERE c
|
|
|
$filters = $request->all();
|
|
|
|
|
|
$this->filterMultiQuery($request, $query, 'created_at', 'created_at_category', 'created_at_value_1', 'created_at_value_2');
|
|
|
- $this->filterMultiQuery($request, $query, 'effective_time', 'effective_date_category', 'effective_date_value_1', 'effective_date_value_2');
|
|
|
+ $this->filterMultiQuery($request, $query, 'effective_dateest', 'effective_date_category', 'effective_date_value_1', 'effective_date_value_2');
|
|
|
|
|
|
+ $filterByProsIDs = $request->get('pros');
|
|
|
+ if($filterByProsIDs && count($filterByProsIDs)){
|
|
|
+ $query = $query->whereIn('hcp_pro_id', $filterByProsIDs);
|
|
|
+ }
|
|
|
+
|
|
|
+ $filterByPatientsIDs = $request->get('patients');
|
|
|
+ if($filterByPatientsIDs && count($filterByPatientsIDs)){
|
|
|
+ $query = $query->whereIn('client_id', $filterByPatientsIDs);
|
|
|
+ }
|
|
|
|
|
|
+ $status = $request->get('status');
|
|
|
+ if($status){
|
|
|
+ if($status == 'CANCELLED') $query = $query->where('is_cancelled', true);
|
|
|
+ }
|
|
|
|
|
|
- $notes = $query->orderBy('created_at', 'desc')->paginate(30);
|
|
|
+
|
|
|
$allProsWithNotesIDs = Note::pluck('hcp_pro_id')->toArray();
|
|
|
- $allProsWithNotes = Pro::whereIn('id', $allProsWithNotesIDs)->get();
|
|
|
- return view('app.practice-management.all-notes', compact('notes', 'filters','allProsWithNotes'));
|
|
|
+ $allProsWithNotes = Pro::whereIn('id', $allProsWithNotesIDs)->get();
|
|
|
+
|
|
|
+ $allPatientsWithNotesIDs = Note::pluck('client_id')->toArray();
|
|
|
+ $allPatientsWithNotes = Client::whereIn('id', $allPatientsWithNotesIDs)->get();
|
|
|
+
|
|
|
+ $notes = $query->orderBy('created_at', 'desc')->paginate(30);
|
|
|
+
|
|
|
+ return view('app.practice-management.all-notes', compact('notes', 'filters','allProsWithNotes', 'allPatientsWithNotes'));
|
|
|
}
|
|
|
|
|
|
public function dnaNotesPendingMcpSign(Request $request)
|