|
@@ -13,6 +13,7 @@
|
|
|
<th>Days in Program</th>
|
|
|
<th>Days in MCP Program</th>
|
|
|
<th>Days with HCP</th>
|
|
|
+ <th>Note Count</th>
|
|
|
<th>Days Since Last Note by HCP</th>
|
|
|
<th>Days Since Last MCP Type Visit</th>
|
|
|
<th>Loop check</th>
|
|
@@ -27,11 +28,13 @@
|
|
|
$firstDateEverSeenByMcpTypePro = null;
|
|
|
$firstDateSeenByHcpMap = [];
|
|
|
$loopLastDateSeenByHcpMap = [];
|
|
|
+ $hcpNoteCountMap = [];
|
|
|
$loopLastDateSeenByMcpTypePro = null;
|
|
|
foreach($patient->notesAscending as $note){
|
|
|
|
|
|
$d = $note->effective_dateest;
|
|
|
$firstDateSeenByHcpMap[$note->hcp_pro_id] = isset($firstDateSeenByHcpMap[$note->hcp_pro_id]) ? $firstDateSeenByHcpMap[$note->hcp_pro_id] : $d;
|
|
|
+ $noteCount = $hcpNoteCountMap[$note->hcp_pro_id] = isset($hcpNoteCountMap[$note->hcp_pro_id]) ? $hcpNoteCountMap[$note->hcp_pro_id] + 1 : 1;
|
|
|
|
|
|
$firstDateSeenByThisHcp = $firstDateSeenByHcpMap[$note->hcp_pro_id];
|
|
|
|
|
@@ -66,6 +69,9 @@
|
|
|
<td>
|
|
|
{{ $daysWithHcp }}
|
|
|
</td>
|
|
|
+ <td>
|
|
|
+ {{ $noteCount }}
|
|
|
+ </td>
|
|
|
<td>
|
|
|
{{$daysSinceLastNoteByThisHcp}}
|
|
|
</td>
|