|
@@ -184,6 +184,7 @@ class HomeController extends Controller
|
|
|
//patients where performer is the mcp
|
|
|
$performer = $this->performer();
|
|
|
$performerProID = $performer->pro->id;
|
|
|
+ $isAdmin = ($performer->pro->pro_type === 'ADMIN');
|
|
|
|
|
|
$keyNumbers = [];
|
|
|
|
|
@@ -197,7 +198,6 @@ class HomeController extends Controller
|
|
|
})->count();
|
|
|
$keyNumbers['patientsNotSeenYet'] = $patientNotSeenYet;
|
|
|
|
|
|
-
|
|
|
$pendingBillsToSign = Bill::where(function ($query) use ($performerProID) {
|
|
|
$query->where('hcp_pro_id', $performerProID)->where('is_signed_by_hcp', false)->where('is_cancelled', false);
|
|
|
})
|
|
@@ -259,9 +259,14 @@ class HomeController extends Controller
|
|
|
$totalExpectedAmount = $expectedForHcp + $expectedForCm + $expectedForRme + $expectedForRmm + $expectedForNa;
|
|
|
$reimbursement['nextPaymentAmount'] = '$' . $totalExpectedAmount;
|
|
|
|
|
|
- $appointments = Appointment::where("pro_id", $performerProID)
|
|
|
- ->orderBy('start_time', 'asc')
|
|
|
- ->get();
|
|
|
+ if(!$isAdmin) {
|
|
|
+ $appointments = Appointment::where("pro_id", $performerProID)
|
|
|
+ ->orderBy('start_time', 'asc')
|
|
|
+ ->get();
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ $appointments = Appointment::orderBy('start_time', 'asc')->get();
|
|
|
+ }
|
|
|
|
|
|
foreach ($appointments as $appointment) {
|
|
|
$date = explode(" ", $appointment->start_time)[0];
|
|
@@ -270,6 +275,7 @@ class HomeController extends Controller
|
|
|
$appointment->dateYMD = date('Y-m-d', strtotime($appointment->start_time));
|
|
|
$appointment->clientName = $appointment->client->displayName();
|
|
|
$appointment->clientInitials = substr($appointment->client->name_first, 0, 1) . substr($appointment->client->name_last, 0, 1);
|
|
|
+ $appointment->proInitials = substr($appointment->pro->name_first, 0, 1) . substr($appointment->pro->name_last, 0, 1);
|
|
|
$appointment->friendlyStartTime = friendly_time($appointment->start_time);
|
|
|
$appointment->friendlyEndTime = friendly_time($appointment->end_time);
|
|
|
$appointment->clientSummary = friendly_date_time($appointment->client->dob, false) . ' (' .
|
|
@@ -288,6 +294,7 @@ class HomeController extends Controller
|
|
|
}
|
|
|
$appointment->clientUid = $appointment->client->uid;
|
|
|
$appointment->proUid = $appointment->pro->uid;
|
|
|
+ $appointment->proName = $appointment->pro->displayName();
|
|
|
}
|
|
|
|
|
|
$milliseconds = strtotime(date('Y-m-d')) . '000';
|