|
@@ -70,7 +70,8 @@ class PracticeManagementController extends Controller
|
|
|
$isAdmin = $this->performer()->pro->pro_type == 'ADMIN';
|
|
|
//$rows = $isAdmin ? ClientMeasurementDaysPerMonth::all() : ClientMeasurementDaysPerMonth::where('mcp_pro_id', $proID)->orderBy('year_month', 'asc')->orderBy('num_of_days_with_measurement', 'asc')->get();
|
|
|
$query = CareMonth::whereNotNull('mcp_pro_id')
|
|
|
- ->where('number_of_days_with_remote_measurements', '>=', 16);
|
|
|
+ ->where('number_of_days_with_remote_measurements', '>=', 16)
|
|
|
+ ->where('days_between_most_recent_mcp_note_date_and_end_of_care_month', '<=', 90);
|
|
|
if(!$isAdmin) $query->where('mcp_pro_id', '=', $proID);
|
|
|
$rows = $query->orderByRaw(DB::raw('start_date DESC'))->paginate(50) ;
|
|
|
return view ('app.practice-management.remote-monitoring-report', compact('rows', 'isAdmin'));
|