|
@@ -5,9 +5,8 @@
|
|
|
|
|
|
@section('inner-content')
|
|
|
<?php
|
|
|
- $patient = $patient;
|
|
|
- ?>
|
|
|
- <?php
|
|
|
+ /** @var \App\Models\Client $patient */
|
|
|
+
|
|
|
$firstDateEverSeenByAnyone = null;
|
|
|
$firstDateEverSeenByMcpTypePro = null;
|
|
|
$firstDateEverSeenByCurrentMcp = null;
|
|
@@ -19,6 +18,9 @@
|
|
|
$loopLastContentByHcp = [];
|
|
|
$daysInMcpProgramTotal = null;
|
|
|
$hcpIdToProMap = [];
|
|
|
+ $totalNotes = 0;
|
|
|
+ $totalNotesWithBillingClosed = 0;
|
|
|
+ $totalNotesWithClaimingClosed = 0;
|
|
|
foreach($patient->notesAscending as $note){
|
|
|
$hcpIdToProMap[$note->hcp_pro_id] = $note->hcpPro;
|
|
|
$d = $note->effective_dateest;
|
|
@@ -29,7 +31,7 @@
|
|
|
$firstDateEverSeenByAnyone = $firstDateEverSeenByAnyone ? $firstDateEverSeenByAnyone : $d;
|
|
|
if($note->hcpPro->is_enrolled_as_mcp){
|
|
|
$firstDateEverSeenByMcpTypePro = $firstDateEverSeenByMcpTypePro ? $firstDateEverSeenByMcpTypePro : $d;
|
|
|
- if($note->hcpPro->id == $note->client->mcp->id){
|
|
|
+ if($note->client->mcp && $note->hcpPro->id == $note->client->mcp->id){
|
|
|
$firstDateEverSeenByCurrentMcp = $firstDateEverSeenByMcpTypePro;
|
|
|
}
|
|
|
}
|
|
@@ -43,13 +45,17 @@
|
|
|
if($note->hcpPro->is_enrolled_as_mcp){
|
|
|
$loopLastDateSeenByMcpTypePro = $d;
|
|
|
}
|
|
|
- $daysInMcpProgramTotal = $daysInMcpProgram;
|
|
|
- }
|
|
|
+ $daysInMcpProgramTotal = (strtotime(date('Y-m-d')) - strtotime($firstDateSeenByThisHcp)) / (60 * 60 * 24);
|
|
|
+
|
|
|
+ $totalNotes++;
|
|
|
+ if($note->is_bill_closed) $totalNotesWithBillingClosed++;
|
|
|
+ if($note->is_claim_closed) $totalNotesWithClaimingClosed++;
|
|
|
+ }
|
|
|
?>
|
|
|
<h2><strong>Numbers:</strong></h2>
|
|
|
<table class="table table-sm table-striped">
|
|
|
<tr>
|
|
|
- <td>First date ever seen by anyone:</td>
|
|
|
+ <td class="w-25">First date ever seen by anyone:</td>
|
|
|
<td>{{ friendly_date_time($firstDateEverSeenByAnyone, false) }}</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
@@ -68,6 +74,38 @@
|
|
|
<td>Days in MCP program:</td>
|
|
|
<td>{{ $daysInMcpProgramTotal }}</td>
|
|
|
</tr>
|
|
|
+ <tr>
|
|
|
+ <td>Total Notes:</td>
|
|
|
+ <td>{{ $totalNotes }}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>Total Notes With Billing Closed:</td>
|
|
|
+ <td>
|
|
|
+ <div class="d-flex">
|
|
|
+ <span class="fill-percent-content">{{ $totalNotesWithBillingClosed }} / {{$totalNotes}}</span>
|
|
|
+ <div class="d-inline-flex flex-grow-1 ml-3">
|
|
|
+ <span class="fill-percent-value">{{round($totalNotesWithBillingClosed * 100 / $totalNotes, 1)}}%</span>
|
|
|
+ <div class="flex-grow-1 position-relative fill-bar">
|
|
|
+ <div class="bg-info position-absolute" style="left: 0; top: 0; height: 100%; width: {{$totalNotesWithBillingClosed * 100 / $totalNotes}}%"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>Total Notes With Claiming Closed:</td>
|
|
|
+ <td>
|
|
|
+ <div class="d-flex align-items-center">
|
|
|
+ <span class="fill-percent-content">{{ $totalNotesWithClaimingClosed }} / {{$totalNotes}}</span>
|
|
|
+ <div class="d-inline-flex flex-grow-1 ml-3">
|
|
|
+ <span class="fill-percent-value">{{round($totalNotesWithClaimingClosed * 100 / $totalNotes, 1)}}%</span>
|
|
|
+ <div class="flex-grow-1 position-relative fill-bar">
|
|
|
+ <div class="bg-info position-absolute" style="left: 0; top: 0; height: 100%; width: {{$totalNotesWithClaimingClosed * 100 / $totalNotes}}%"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
</table>
|
|
|
<h2><strong>All HCPs:</strong></h2>
|
|
|
<table class="table table-sm table-condensed table-striped">
|
|
@@ -91,7 +129,7 @@
|
|
|
{{ $daysBetweenFirstAndLastVisit }}
|
|
|
</td>
|
|
|
<td>{{ $hcpNoteCountMap[$k] }}</td>
|
|
|
- <td> {{ round($daysBetweenFirstAndLastVisit / ($hcpNoteCountMap[$k] - 1), 2) }} </td>
|
|
|
+ <td> {{ ($hcpNoteCountMap[$k] - 1) ? round($daysBetweenFirstAndLastVisit / ($hcpNoteCountMap[$k] - 1), 2) : null }} </td>
|
|
|
</tr>
|
|
|
@endforeach
|
|
|
</table>
|
|
@@ -148,9 +186,10 @@
|
|
|
|
|
|
</style>
|
|
|
<div style="overflow: auto">
|
|
|
- <table class="table table-bordered table-condensed">
|
|
|
+ <table class="table table-bordered table-condensed" id="notes-table">
|
|
|
<thead>
|
|
|
<tr>
|
|
|
+ <th>#</th>
|
|
|
<th>HCP</th>
|
|
|
<th>Date</th>
|
|
|
{{-- <th>Days in Program</th>--}}
|
|
@@ -161,6 +200,8 @@
|
|
|
{{-- <th>Days Since Last MCP Type Visit</th>--}}
|
|
|
{{-- <th>Loop check</th>--}}
|
|
|
<th>Signed By HCP?</th>
|
|
|
+ <th>Billing Closed?</th>
|
|
|
+ <th>Claiming Closed?</th>
|
|
|
{{-- <th>Content</th>--}}
|
|
|
<th>Bills</th>
|
|
|
<th>Claims</th>
|
|
@@ -178,8 +219,11 @@
|
|
|
$hcpNoteCountMap = [];
|
|
|
$loopLastDateSeenByMcpTypePro = null;
|
|
|
$loopLastContentByHcp = [];
|
|
|
+ $rowIndex = 0;
|
|
|
foreach($patient->notesAscending as $note){
|
|
|
|
|
|
+ $rowIndex++;
|
|
|
+
|
|
|
$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;
|
|
@@ -217,11 +261,17 @@
|
|
|
|
|
|
?>
|
|
|
<tr>
|
|
|
+ <td>{{$rowIndex}}</td>
|
|
|
<td>
|
|
|
<strong>{{ $note->hcpPro->displayName() }}</strong>
|
|
|
</td>
|
|
|
<td>
|
|
|
- <a href="/patients/view/{{ $note->client->uid }}/notes/view/{{ $note->uid }}" class="font-weight-bold">
|
|
|
+ <a native target="_blank"
|
|
|
+ open-in-stag-popup
|
|
|
+ update-parent
|
|
|
+ mc-initer="note-single"
|
|
|
+ title="Note Details"
|
|
|
+ href="/patients/view/{{ $note->client->uid }}/notes/view/{{ $note->uid }}">
|
|
|
{{ friendly_date_time($d, false) }}
|
|
|
</a>
|
|
|
</td>
|
|
@@ -247,27 +297,29 @@
|
|
|
{{-- {{ $loopLastDateSeenByMcpTypePro }}--}}
|
|
|
{{-- </td>--}}
|
|
|
<td>
|
|
|
- {{ $note->is_signed_by_hcp }}
|
|
|
+ {{ $note->is_signed_by_hcp ? 'Yes' : 'No' }}
|
|
|
</td>
|
|
|
+ <td>{{ $note->is_bill_closed ? 'Yes' : 'No' }}</td>
|
|
|
+ <td>{{ $note->is_claim_closed ? 'Yes' : 'No' }}</td>
|
|
|
{{-- <td><div style="max-height: 200px; overflow-y: auto;">{!! $content !!}</div></td>--}}
|
|
|
|
|
|
- <td>
|
|
|
+ <td class="p-0">
|
|
|
<div>
|
|
|
- <table>
|
|
|
- @foreach($note->bills as $bill)
|
|
|
+ <table class="table table-sm m-0 border-0">
|
|
|
+ @foreach($note->bills as $bill)
|
|
|
<tr>
|
|
|
<td>{{$bill->code}}</td>
|
|
|
- <td>
|
|
|
+ <td style="width: 60px">
|
|
|
{{str_contains($bill->code, 'Treatment Services') ? floor((float) $bill->number_of_units * 60) . ' mins.' : $bill->number_of_units}}
|
|
|
</td>
|
|
|
</tr>
|
|
|
- @endforeach
|
|
|
+ @endforeach
|
|
|
</table>
|
|
|
</div>
|
|
|
</td>
|
|
|
- <td>
|
|
|
+ <td class="p-0">
|
|
|
<div>
|
|
|
- <table class="table table-sm">
|
|
|
+ <table class="table table-sm m-0 border-0">
|
|
|
@foreach($note->claims as $claim)
|
|
|
<?php if($claim->is_cancelled) continue; ?>
|
|
|
<tr>
|
|
@@ -276,20 +328,30 @@
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
- <td>
|
|
|
- <table class="table table-sm table-striped">
|
|
|
+ <td class="p-0">
|
|
|
+ <table class="table table-sm table-striped m-0">
|
|
|
@foreach($claim->lines as $line)
|
|
|
<tr>
|
|
|
- <td>{{ $line->cpt }}</td>
|
|
|
- <td>{{ $line->units }}</td>
|
|
|
- <td>
|
|
|
- <table class="table table-sm">
|
|
|
+ <td style="width: 80px">{{ $line->cpt }}</td>
|
|
|
+ <td style="width: 30px">{{ $line->units }}</td>
|
|
|
+ <td class="p-0">
|
|
|
+ <table class="table table-sm m-0 border-0">
|
|
|
@foreach($line->claimLineIcds as $icd)
|
|
|
<tr>
|
|
|
<td>{{ $icd->code }}</td>
|
|
|
<td>{{ $icd->description }}</td>
|
|
|
</tr>
|
|
|
@endforeach
|
|
|
+ @if(!$line->claimLineIcds || !count($line->claimLineIcds))
|
|
|
+ <tr>
|
|
|
+ <td colspan="2">
|
|
|
+ <b>
|
|
|
+ <i class="fa fa-exclamation-triangle"></i>
|
|
|
+ No ICDs
|
|
|
+ </b>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ @endif
|
|
|
</table>
|
|
|
</td>
|
|
|
</tr>
|
|
@@ -302,8 +364,13 @@
|
|
|
</div>
|
|
|
</td>
|
|
|
<td>
|
|
|
- <div style="max-height: 250px; overflow-y: auto;">
|
|
|
- <?php echo Diff::toTable(Diff::compare($lastContentText, $contentText)) ?>
|
|
|
+ <div moe large relative no-mask>
|
|
|
+ <a href="#" start show>Show Diff</a>
|
|
|
+ <div url="/dummy" right>
|
|
|
+ <div style="max-height: 250px; overflow-y: auto;">
|
|
|
+ <?php echo Diff::toTable(Diff::compare($lastContentText, $contentText)) ?>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</td>
|
|
|
</tr>
|
|
@@ -319,6 +386,20 @@
|
|
|
</tbody>
|
|
|
</table>
|
|
|
</div>
|
|
|
+
|
|
|
+ <script>
|
|
|
+ (function() {
|
|
|
+ function init() {
|
|
|
+ $('#notes-table').DataTable({
|
|
|
+ paging: false,
|
|
|
+ scrollY: 500,
|
|
|
+ scrollX: true
|
|
|
+ });
|
|
|
+ }
|
|
|
+ addMCInitializer('claims-resolver', init);
|
|
|
+ }).call(window);
|
|
|
+ </script>
|
|
|
+
|
|
|
@endsection
|
|
|
|
|
|
<?php
|