Browse Source

Visit UI - PDF (wip)

Vijayakrishnan 3 years ago
parent
commit
dd43df5b72
1 changed files with 44 additions and 1 deletions
  1. 44 1
      resources/views/app/patient/note/pdf.blade.php

+ 44 - 1
resources/views/app/patient/note/pdf.blade.php

@@ -342,7 +342,7 @@
         @else
             <?php $problems = \App\Models\Point::getPlanPointsOfCategory($patient, 'PROBLEM', $note); ?>
             @if(!$problems || !count($problems)))
-                Unavailable
+
             @endif
             @foreach($problems as $problem)
                 <?php $childPlans = $problem->childPlans; ?>
@@ -364,6 +364,49 @@
         @endif
     </div>
 
+    <!-- signature -->
+    <?php
+    $bills = \App\Models\Bill::where('note_id', $note->id)
+        ->where('bill_service_type', 'NOTE')
+        ->where('code', 'Treatment Services')
+        ->where('is_cancelled', false)
+        ->where('hcp_pro_id', $note->hcpPro->id)
+        ->get();
+    $totalSeconds = 0;
+    foreach ($bills as $bill) {
+        $totalSeconds += $bill->number_of_units * 3600;
+    }
+    ?>
+    <div style="padding: 1rem; padding-bottom: 0;">
+        <p><b style="font-size: 18px">Signature</b></p>
+        <table style="border: 0; width: 100%;" border="0" cellspacing="0" cellpadding="0">
+            <tr style="background-color: #d9d9d9">
+                <td style="font-weight:bold;border-top: 1px solid #222; border-bottom: 1px solid #222; padding: 0.25rem 0.5rem; vertical-align: top" width="20%">Date of Service</td>
+                <td style="font-weight:bold;border-top: 1px solid #222; border-bottom: 1px solid #222; padding: 0.25rem 0.5rem; vertical-align: top" width="30%">Service</td>
+                <td style="font-weight:bold;border-top: 1px solid #222; border-bottom: 1px solid #222; padding: 0.25rem 0.5rem; vertical-align: top" width="50%">Place of Service</td>
+            </tr>
+            <tr>
+                <td style="padding: 0.25rem 0.5rem; vertical-align: top" width="20%">{{friendly_date($note->effective_dateest)}}</td>
+                <td style="padding: 0.25rem 0.5rem; vertical-align: top" width="30%">Treatment Services</td>
+                <td style="padding: 0.25rem 0.5rem; vertical-align: top" width="50%">133 Rollins Ave, Suite 3, Rockville, MD 20852</td>
+            </tr>
+            <tr style="background-color: #d9d9d9">
+                <td style="font-weight:bold;border-top: 1px solid #222; border-bottom: 1px solid #222; padding: 0.25rem 0.5rem; vertical-align: top" width="20%">Total time spent</td>
+                <td style="font-weight:bold;border-top: 1px solid #222; border-bottom: 1px solid #222; padding: 0.25rem 0.5rem; vertical-align: top" width="30%">Provider (HCP)</td>
+                <td style="font-weight:bold;border-top: 1px solid #222; border-bottom: 1px solid #222; padding: 0.25rem 0.5rem; vertical-align: top" width="50%">Signature</td>
+            </tr>
+            <tr>
+                <td style="border-bottom: 1px solid #222; padding: 0.25rem 0.5rem; vertical-align: top" width="20%">{{round($totalSeconds/60)}} minutes</td>
+                <td style="border-bottom: 1px solid #222; padding: 0.25rem 0.5rem; vertical-align: top" width="30%">{{$note->hcpPro->displayName()}}</td>
+                <td style="border-bottom: 1px solid #222; padding: 0.25rem 0.5rem; vertical-align: top" width="50%">
+                    <span style="color: green">✓</span> Signed
+                </td>
+            </tr>
+        </table>
+        <div style="text-align: right; font-size: 13px; padding-top: 2px">Signed electronically on {{friendlier_date_time($note->signed_by_hcp_at)}}</div>
+    </div>
+
+    <div style="padding-top: 2rem; text-align: center">********</div>
 
 </div>
 </body>