|
@@ -416,7 +416,7 @@ WHERE
|
|
|
return Client::where('mcp_pro_id', $this->id)
|
|
|
->where(function($q){
|
|
|
$q->whereNull('next_mcp_appointment_id')
|
|
|
- ->orWhere('next_mcp_appointment_date', '<', DB::raw('NOW()::DATE'));
|
|
|
+ ->orWhere('next_mcp_appointment_date', '<=', DB::raw('NOW()::DATE'));
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -439,14 +439,15 @@ WHERE
|
|
|
function get_patients_without_remote_measurement_in_48_hours_count_as_mcp() {
|
|
|
}
|
|
|
|
|
|
+ function get_cancelled_appointments_pending_acknowledgement_count_as_mcp_query() {
|
|
|
+ // SELECT * FROM appointment WHERE hcp_pro_id = :me.id AND status = 'REJECTED' AND wasAcknowledgedByAppointmentPro IS NOT TRUE;
|
|
|
+ return Appointment::where('pro_id', $this->id)
|
|
|
+ ->where('latest_confirmation_decision_enum', 'REJECTED')
|
|
|
+ ->where('is_decision_acknowledgement_from_appointment_pro_pending', true);
|
|
|
+ }
|
|
|
function get_cancelled_appointments_pending_acknowledgement_count_as_mcp() {
|
|
|
// SELECT * FROM appointment WHERE hcp_pro_id = :me.id AND status = 'REJECTED' AND wasAcknowledgedByAppointmentPro IS NOT TRUE;
|
|
|
- /*return Appointment::where('pro_id', $this->id)
|
|
|
- ->where('status', 'REJECTED')
|
|
|
- ->where('was_acknowledged_by_appointment_pro', '<>', true)
|
|
|
- ->count();*/
|
|
|
- // TODO: once appointment.was_acknowledged_by_appointment_pro is in place
|
|
|
- return '**';
|
|
|
+ return $this->get_cancelled_appointments_pending_acknowledgement_count_as_mcp_query()->count();
|
|
|
}
|
|
|
|
|
|
function get_cancelled_bills_awaiting_review_count_as_mcp() {
|