|
@@ -12,6 +12,7 @@
|
|
$firstDateEverSeenByMcpTypePro = null;
|
|
$firstDateEverSeenByMcpTypePro = null;
|
|
$firstDateEverSeenByCurrentMcp = null;
|
|
$firstDateEverSeenByCurrentMcp = null;
|
|
$firstDateSeenByHcpMap = [];
|
|
$firstDateSeenByHcpMap = [];
|
|
|
|
+ $lastDateSeenByHcpMap = [];
|
|
$loopLastDateSeenByHcpMap = [];
|
|
$loopLastDateSeenByHcpMap = [];
|
|
$hcpNoteCountMap = [];
|
|
$hcpNoteCountMap = [];
|
|
$loopLastDateSeenByMcpTypePro = null;
|
|
$loopLastDateSeenByMcpTypePro = null;
|
|
@@ -22,6 +23,7 @@
|
|
$hcpIdToProMap[$note->hcp_pro_id] = $note->hcpPro;
|
|
$hcpIdToProMap[$note->hcp_pro_id] = $note->hcpPro;
|
|
$d = $note->effective_dateest;
|
|
$d = $note->effective_dateest;
|
|
$firstDateSeenByHcpMap[$note->hcp_pro_id] = isset($firstDateSeenByHcpMap[$note->hcp_pro_id]) ? $firstDateSeenByHcpMap[$note->hcp_pro_id] : $d;
|
|
$firstDateSeenByHcpMap[$note->hcp_pro_id] = isset($firstDateSeenByHcpMap[$note->hcp_pro_id]) ? $firstDateSeenByHcpMap[$note->hcp_pro_id] : $d;
|
|
|
|
+ $lastDateSeenByHcpMap[$note->hcp_pro_id] = $d;
|
|
$noteCount = $hcpNoteCountMap[$note->hcp_pro_id] = isset($hcpNoteCountMap[$note->hcp_pro_id]) ? $hcpNoteCountMap[$note->hcp_pro_id] + 1 : 1;
|
|
$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];
|
|
$firstDateSeenByThisHcp = $firstDateSeenByHcpMap[$note->hcp_pro_id];
|
|
$firstDateEverSeenByAnyone = $firstDateEverSeenByAnyone ? $firstDateEverSeenByAnyone : $d;
|
|
$firstDateEverSeenByAnyone = $firstDateEverSeenByAnyone ? $firstDateEverSeenByAnyone : $d;
|
|
@@ -44,9 +46,6 @@
|
|
$daysInMcpProgramTotal = $daysInMcpProgram;
|
|
$daysInMcpProgramTotal = $daysInMcpProgram;
|
|
}
|
|
}
|
|
?>
|
|
?>
|
|
- <h2>
|
|
|
|
- <strong>HCP notes signed: </strong>{{$hcpSignedNotesCount}}
|
|
|
|
- </h2>
|
|
|
|
<h2><strong>Numbers:</strong></h2>
|
|
<h2><strong>Numbers:</strong></h2>
|
|
<table class="table table-sm table-striped">
|
|
<table class="table table-sm table-striped">
|
|
<tr>
|
|
<tr>
|
|
@@ -61,19 +60,38 @@
|
|
<td>First date ever seen by current MCP:</td>
|
|
<td>First date ever seen by current MCP:</td>
|
|
<td>{{ $firstDateEverSeenByCurrentMcp }}</td>
|
|
<td>{{ $firstDateEverSeenByCurrentMcp }}</td>
|
|
</tr>
|
|
</tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td>HCP notes signed:</td>
|
|
|
|
+ <td>{{$hcpSignedNotesCount}}</td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td>Days in MCP program:</td>
|
|
|
|
+ <td>{{ $daysInMcpProgramTotal }}</td>
|
|
|
|
+ </tr>
|
|
</table>
|
|
</table>
|
|
<h2><strong>All HCPs:</strong></h2>
|
|
<h2><strong>All HCPs:</strong></h2>
|
|
<table class="table table-sm table-condensed table-striped">
|
|
<table class="table table-sm table-condensed table-striped">
|
|
<tr>
|
|
<tr>
|
|
<th>Pro</th>
|
|
<th>Pro</th>
|
|
|
|
+ <th>First Visit Date</th>
|
|
|
|
+ <th>Last Visit Date</th>
|
|
|
|
+ <th>Days Between First & Last Visit</th>
|
|
<th>Note Count</th>
|
|
<th>Note Count</th>
|
|
- <th></th>
|
|
|
|
|
|
+ <th>Days / Visit (avg.)</th>
|
|
</tr>
|
|
</tr>
|
|
@foreach($hcpIdToProMap as $k => $v)
|
|
@foreach($hcpIdToProMap as $k => $v)
|
|
|
|
+ <?php
|
|
|
|
+ $daysBetweenFirstAndLastVisit = (strtotime($lastDateSeenByHcpMap[$k]) - strtotime($firstDateSeenByHcpMap[$k])) / (60 * 60 * 24);
|
|
|
|
+ ?>
|
|
<tr>
|
|
<tr>
|
|
<td>{{ $v->displayName() }}</td>
|
|
<td>{{ $v->displayName() }}</td>
|
|
|
|
+ <td>{{ $firstDateSeenByHcpMap[$k] }}</td>
|
|
|
|
+ <td>{{ $lastDateSeenByHcpMap[$k] }}</td>
|
|
|
|
+ <td>
|
|
|
|
+ {{ $daysBetweenFirstAndLastVisit }}
|
|
|
|
+ </td>
|
|
<td>{{ $hcpNoteCountMap[$k] }}</td>
|
|
<td>{{ $hcpNoteCountMap[$k] }}</td>
|
|
- <td></td>
|
|
|
|
|
|
+ <td> {{ $daysBetweenFirstAndLastVisit / ($hcpNoteCountMap[$k] - 1) }} </td>
|
|
</tr>
|
|
</tr>
|
|
@endforeach
|
|
@endforeach
|
|
</table>
|
|
</table>
|