|
@@ -10,6 +10,7 @@ use App\Models\Facility;
|
|
|
use App\Models\IncomingReport;
|
|
|
use App\Models\MBPayer;
|
|
|
use App\Models\ProProAccess;
|
|
|
+use App\Models\SupplyOrder;
|
|
|
use App\Models\Ticket;
|
|
|
use DateTime;
|
|
|
|
|
@@ -319,6 +320,12 @@ class HomeController extends Controller
|
|
|
->where('is_open', true)
|
|
|
->orderBy('created_at', 'ASC')
|
|
|
->get();
|
|
|
+ $supplyOrders = SupplyOrder::where('is_cleared_for_shipment', false)
|
|
|
+ ->where('is_cancelled', false)
|
|
|
+ ->whereRaw('created_by_session_id IN (SELECT id FROM app_session where pro_id = ?)', [$performer->pro->id])
|
|
|
+ ->orderBy('created_at', 'ASC')
|
|
|
+ ->get();
|
|
|
+
|
|
|
$numERx = Ticket::where('ordering_pro_id', $performerProID)
|
|
|
->where('category', 'erx')
|
|
|
->where('is_entry_error', false)
|
|
@@ -334,9 +341,14 @@ class HomeController extends Controller
|
|
|
->where('is_entry_error', false)
|
|
|
->where('is_open', true)
|
|
|
->count();
|
|
|
+ $numSupplyOrders = SupplyOrder::where('is_cleared_for_shipment', false)
|
|
|
+ ->where('is_cancelled', false)
|
|
|
+ ->whereRaw('created_by_session_id IN (SELECT id FROM app_session where pro_id = ?)', [$performer->pro->id])
|
|
|
+ ->count();
|
|
|
|
|
|
return view('app/dashboard', compact('keyNumbers', 'reimbursement', 'milliseconds', 'measurements', 'businessNumbers',
|
|
|
- 'incomingReports', 'tickets', 'numERx', 'numLabs', 'numImaging'));
|
|
|
+ 'incomingReports', 'tickets', 'supplyOrders',
|
|
|
+ 'numERx', 'numLabs', 'numImaging', 'numSupplyOrders'));
|
|
|
}
|
|
|
|
|
|
public function dashboardAppointments(Request $request, $from, $to) {
|