|
@@ -13,6 +13,9 @@
|
|
<b class="font-size-14">{{friendly_month(date((request()->input('y') ?: 'Y') . '-' . (request()->input('m') ?: 'm') . '-d'))}}</b>
|
|
<b class="font-size-14">{{friendly_month(date((request()->input('y') ?: 'Y') . '-' . (request()->input('m') ?: 'm') . '-d'))}}</b>
|
|
</span>
|
|
</span>
|
|
<?php
|
|
<?php
|
|
|
|
+
|
|
|
|
+use App\Models\Note;
|
|
|
|
+
|
|
$mStr = request()->input('m') ? request()->input('m') : date('m');
|
|
$mStr = request()->input('m') ? request()->input('m') : date('m');
|
|
$yStr = request()->input('y') ? request()->input('y') : date('Y');
|
|
$yStr = request()->input('y') ? request()->input('y') : date('Y');
|
|
$rcmStartDate = $yStr . '-' . $mStr . '-' . '01';
|
|
$rcmStartDate = $yStr . '-' . $mStr . '-' . '01';
|
|
@@ -84,10 +87,12 @@
|
|
<?php
|
|
<?php
|
|
|
|
|
|
$daysDiff = -1;
|
|
$daysDiff = -1;
|
|
|
|
+ $mostRecentCompletedMcpNote = null;
|
|
if($iPatient->most_recent_completed_mcp_note_date) {
|
|
if($iPatient->most_recent_completed_mcp_note_date) {
|
|
$careMonthLastDay = date_add(date_create($rcmStartDate), date_interval_create_from_date_string("1 month"));
|
|
$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"));
|
|
$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;
|
|
$daysDiff = date_diff($careMonthLastDay, date_create($iPatient->most_recent_completed_mcp_note_date))->days;
|
|
|
|
+ $mostRecentCompletedMcpNote = Note::where('id', $iPatient->most_recent_completed_mcp_note_id)->first();
|
|
}
|
|
}
|
|
$lastVisitWithin90Days = ($daysDiff !== -1 && $daysDiff <= 90);
|
|
$lastVisitWithin90Days = ($daysDiff !== -1 && $daysDiff <= 90);
|
|
|
|
|
|
@@ -125,7 +130,13 @@
|
|
<td>
|
|
<td>
|
|
<div class="d-flex align-items-baseline">
|
|
<div class="d-flex align-items-baseline">
|
|
<i class="mr-1 text-sm fa {{$lastVisitWithin90Days ? 'fa-check text-success' : 'fa-exclamation-triangle text-danger'}}"></i>
|
|
<i class="mr-1 text-sm fa {{$lastVisitWithin90Days ? 'fa-check text-success' : 'fa-exclamation-triangle text-danger'}}"></i>
|
|
- <span>{{$iPatient->most_recent_completed_mcp_note_date ? friendly_date($iPatient->most_recent_completed_mcp_note_date) : '-'}}</span>
|
|
|
|
|
|
+ @if($mostRecentCompletedMcpNote)
|
|
|
|
+ <a href = "{{route('patients.view.notes.view.dashboard', ['patient' => $iPatient->client_uid, 'note' => $mostRecentCompletedMcpNote])}}">
|
|
|
|
+ <span>{{$iPatient->most_recent_completed_mcp_note_date ? friendly_date($iPatient->most_recent_completed_mcp_note_date) : '-'}}</span>
|
|
|
|
+ </a>
|
|
|
|
+ @else
|
|
|
|
+ <span>-</span>
|
|
|
|
+ @endif
|
|
</div>
|
|
</div>
|
|
@if(!$lastVisitWithin90Days)
|
|
@if(!$lastVisitWithin90Days)
|
|
<div class="text-sm font-italic text-secondary">No visit in over 90 days</div>
|
|
<div class="text-sm font-italic text-secondary">No visit in over 90 days</div>
|