浏览代码

added claims resolver view

unknown 4 年之前
父节点
当前提交
fa2da90271
共有 1 个文件被更改,包括 31 次插入12 次删除
  1. 31 12
      resources/views/app/patient/claims-resolver.blade.php

+ 31 - 12
resources/views/app/patient/claims-resolver.blade.php

@@ -1,6 +1,7 @@
 @extends ('layouts.patient')
 
 @section('inner-content')
+    <?php $patient = $patient; ?>
     <h1>Here is the story of all the notes, bills, and claims for this patient.</h1>
     <h2>HCP notes signed: {{$hcpSignedNotesCount}}</h2>
     <h2>All Notes:</h2>
@@ -8,37 +9,55 @@
         <thead>
         <tr>
             <th>Date</th>
-            <th>Days Later</th>
-            <th>Signed</th>
-            <th></th>
+            <th>Day in Program</th>
+            <th>Days since Prv. Note</th>
+            <th>Signed By HCP?</th>
+            <th>Content</th>
             <th></th>
         </tr>
         </thead>
         <tbody>
-        @php $lastDate = null; @endphp
-        @foreach($patient->notesAscending as $note)
+        <?php
+            $firstDate = null;
+            $lastDate = null;
+        ?>
+        <?php foreach($patient->notesAscending as $note) ?>
+
             <?php
-                $lastDate = $lastDate == null ? $note->effective_dateest : $lastDate;
-                $daysLater = (strtotime($note->effective_dateest) - strtotime($lastDate)) / (60 * 60 * 24);
+
+                if($note->hcpPro->is_mcp) {
+                    $firstDate = $firstDate ? $firstDate : $note->effective_dateest;
+                    $lastDate = $lastDate ? $lastDate : $note->effective_dateest;
+                }
+
+                $dayInProgram = (strtotime($note->effective_dateest) - strtotime($firstDate)) / (60 * 60 * 24);
+
+                $daysSincePreviousNote = null;
+
+                if($note->hcpPro->is_mcp) {
+                    $daysSincePreviousNote = (strtotime($note->effective_dateest) - strtotime($lastDate)) / (60 * 60 * 24);
+                    $lastDate = $note->effective_dateest;
+                }
             ?>
+
             <tr>
                 <td>
                     {{ $note->effective_dateest }}
                 </td>
                 <td>
-                    {{ $daysLater }}
+                    {{ $dayInProgram }}
                 </td>
                 <td>
-
+                    {{ $daysSincePreviousNote }}
                 </td>
                 <td>
-
+                    {{ $note->is_signed_by_hcp }}
                 </td>
                 <td>
-
+                    CONTENT WILL GO HERE
                 </td>
             </tr>
-        @endforeach
+        <? endforeach; ?>
         </tbody>
     </table>
 @endsection