|
@@ -591,10 +591,15 @@ WHERE mcp_pro_id = :pro_id
|
|
|
|
|
|
function get_patients_without_appointment_count_as_admin() {
|
|
function get_patients_without_appointment_count_as_admin() {
|
|
return Client::whereNull('shadow_pro_id')
|
|
return Client::whereNull('shadow_pro_id')
|
|
|
|
+ ->where('is_active', true)
|
|
|
|
+ ->where(function ($q) {
|
|
|
|
+ $q->whereNull('client_engagement_status_category')
|
|
|
|
+ ->orWhere('client_engagement_status_category', '<>', 'DUMMY');
|
|
|
|
+ })
|
|
->whereNull('today_mcp_appointment_date')
|
|
->whereNull('today_mcp_appointment_date')
|
|
->where(function($q){
|
|
->where(function($q){
|
|
$q->whereNull('next_mcp_appointment_id')
|
|
$q->whereNull('next_mcp_appointment_id')
|
|
- ->orWhere('next_mcp_appointment_date', '<=', DB::raw('NOW()::DATE'));
|
|
|
|
|
|
+ ->orWhere('next_mcp_appointment_date', '<', DB::raw('NOW()::DATE'));
|
|
})->count();
|
|
})->count();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1078,6 +1083,10 @@ WHERE
|
|
return $this->hasOne(NotePickupForProcessing::class, 'id', 'current_note_pickup_for_processing_id');
|
|
return $this->hasOne(NotePickupForProcessing::class, 'id', 'current_note_pickup_for_processing_id');
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public function get_patients_not_seen_in_45_days_count_as_admin() {
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
public function get_patients_not_seen_in_45_days_count_as_mcp(){
|
|
public function get_patients_not_seen_in_45_days_count_as_mcp(){
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|