Ver código fonte

updated claims-resolver

unknown 4 anos atrás
pai
commit
8b6ff0f420
1 arquivos alterados com 23 adições e 5 exclusões
  1. 23 5
      resources/views/app/patient/claims-resolver.blade.php

+ 23 - 5
resources/views/app/patient/claims-resolver.blade.php

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