|
@@ -11,7 +11,7 @@
|
|
<th>Date</th>
|
|
<th>Date</th>
|
|
<th>Day in Program</th>
|
|
<th>Day in Program</th>
|
|
<th>Day in MCP Program</th>
|
|
<th>Day in MCP Program</th>
|
|
- <th>Days since Prv. Note</th>
|
|
|
|
|
|
+ <th>Days Since Last Note by HCP</th>
|
|
<th>Signed By HCP?</th>
|
|
<th>Signed By HCP?</th>
|
|
<th>Content</th>
|
|
<th>Content</th>
|
|
<th></th>
|
|
<th></th>
|
|
@@ -34,41 +34,29 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
$dayInProgram = (strtotime($d) - strtotime($firstDateEverSeenByAnyone)) / (60 * 60 * 24);
|
|
$dayInProgram = (strtotime($d) - strtotime($firstDateEverSeenByAnyone)) / (60 * 60 * 24);
|
|
- $dayInProgram = (strtotime($d) - strtotime($firstDateEverSeenByMcpTypePro)) / (60 * 60 * 24);
|
|
|
|
- }
|
|
|
|
- ?>
|
|
|
|
- @foreach($patient->notesAscending as $note)
|
|
|
|
-
|
|
|
|
- <?php
|
|
|
|
- $date = $note->effective_dateest;
|
|
|
|
- $firstDateEverSeenByAnyone = $firstDateEverSeenByAnyone ? $firstDateEverSeenByAnyone : $date;
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- if ($note->hcpPro->is_mcp) {
|
|
|
|
- $firstDate = $firstDate ? $firstDate : $note->effective_dateest;
|
|
|
|
- $lastDate = $lastDate ? $lastDate : $note->effective_dateest;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- $dayInProgram = null;
|
|
|
|
- $daysSincePreviousNote = null;
|
|
|
|
- if ($firstDate) {
|
|
|
|
- $dayInProgram = (strtotime($note->effective_dateest) - strtotime($firstDate)) / (60 * 60 * 24);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if ($note->hcpPro->is_mcp) {
|
|
|
|
- $daysSincePreviousNote = (strtotime($note->effective_dateest) - strtotime($lastDate)) / (60 * 60 * 24);
|
|
|
|
- $lastDate = $note->effective_dateest;
|
|
|
|
- }
|
|
|
|
- ?>
|
|
|
|
|
|
+ $dayInMcpProgram = (strtotime($d) - strtotime($firstDateEverSeenByMcpTypePro)) / (60 * 60 * 24);
|
|
|
|
+ $daysSinceLastMcpVisit = null;
|
|
|
|
+ if($note->hcpPro->is_mcp){
|
|
|
|
+ $daysSinceLastMcpTypeVisit = (strtotime($d) - strtotime($loopLastDateSeenByMcpTypePro)) / (60 * 60 * 24);
|
|
|
|
+ }
|
|
|
|
+ $lastVisitWithHcp = isset($loopLastDateSeenByHcpMap[$note->hcp_pro_id]) ? $loopLastDateSeenByHcpMap[$note->hcp_pro_id] : null;
|
|
|
|
+ $daysSinceLastHcpVisit = null;
|
|
|
|
+ if($lastVisitWithHcp){
|
|
|
|
+ $daysSinceLastHcpVisit = (strtotime($d) - strtotime($lastVisitWithHcp)) / (60 * 60 * 24);
|
|
|
|
+ }
|
|
|
|
+ ?>
|
|
<tr>
|
|
<tr>
|
|
<td>
|
|
<td>
|
|
- {{ $note->effective_dateest }}
|
|
|
|
|
|
+ {{ $d }}
|
|
</td>
|
|
</td>
|
|
<td>
|
|
<td>
|
|
{{ $dayInProgram }}
|
|
{{ $dayInProgram }}
|
|
</td>
|
|
</td>
|
|
<td>
|
|
<td>
|
|
- {{ $daysSincePreviousNote }}
|
|
|
|
|
|
+ {{ $dayInMcpProgram }}
|
|
|
|
+ </td>
|
|
|
|
+ <td>
|
|
|
|
+ {{$daysSinceLastHcpVisit}}
|
|
</td>
|
|
</td>
|
|
<td>
|
|
<td>
|
|
{{ $note->is_signed_by_hcp }}
|
|
{{ $note->is_signed_by_hcp }}
|
|
@@ -78,7 +66,14 @@
|
|
</td>
|
|
</td>
|
|
<td></td>
|
|
<td></td>
|
|
</tr>
|
|
</tr>
|
|
- <? endforeach; ?>
|
|
|
|
|
|
+ <?php
|
|
|
|
+ $loopLastDateSeenByHcpMap[$note->hcpPro->id] = $d;
|
|
|
|
+ if($note->hcpPro->is_mcp){
|
|
|
|
+ $loopLastDateSeenByMcpTypePro = $d;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ ?>
|
|
|
|
+
|
|
</tbody>
|
|
</tbody>
|
|
</table>
|
|
</table>
|
|
@endsection
|
|
@endsection
|