<?php

$mStr = request()->input('m') ? request()->input('m') : date('m');
$yStr = request()->input('y') ? request()->input('y') : date('Y');
$rcmStartDate = $yStr . '-' . $mStr . '-' . '01';
$m = +$mStr;
$y = +$yStr;

$daysDiff = -1;
if($iPatient->most_recent_completed_mcp_note_date) {
    $careMonthLastDay = date_add(date_create($rcmStartDate), date_interval_create_from_date_string("1 month"));
    $careMonthLastDay = date_sub($careMonthLastDay, date_interval_create_from_date_string("1 day"));
    $daysDiff = date_diff($careMonthLastDay, date_create($iPatient->most_recent_completed_mcp_note_date))->days;
}
$lastVisitWithinDays = ($iPatient->days_between_most_recent_mcp_note_date_and_end_of_care_month <= config('app.maxDaysSinceLastVisit'));

?>
@include('app.practice-management.remote-monitoring-row-markup-by-pro-type')