Explorar el Código

Visit UI - PDF - footer

Vijayakrishnan hace 3 años
padre
commit
f2a30e8e49
Se han modificado 1 ficheros con 84 adiciones y 55 borrados
  1. 84 55
      resources/views/app/patient/note/pdf.blade.php

+ 84 - 55
resources/views/app/patient/note/pdf.blade.php

@@ -6,8 +6,39 @@
           content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">
     <title>Note</title>
+    <style>
+      /** Define the margins of your page **/
+      @page {
+        margin: 50px 20px;
+      }
+
+      footer {
+        position: fixed;
+        bottom: -50px;
+        left: 0px;
+        right: 0px;
+        height: 50px;
+      }
+      .page-number:before {
+        content: "Page: " counter(page);
+      }
+    </style>
 </head>
 <body>
+
+<footer>
+    <table style="border: 0; width: 100%; font-size: 12px" border="0">
+        <tr>
+            <td style="vertical-align: top; width: 50%; text-align: left">
+                Printed on: {{friendly_date_time(date('Y-m-d H:i:s'))}}
+            </td>
+            <td style="vertical-align: top; width: 50%; text-align: right">
+                <div class="page-number"></div>
+            </td>
+        </tr>
+    </table>
+</footer>
+
 <div style="margin: 0; padding: 1rem; font-family: serif">
     <!-- header/smg info -->
     <div style="text-align: right; margin-bottom: 1.5rem; font-family: sans-serif">
@@ -37,12 +68,10 @@
 
     <!-- patient info -->
     <div style="padding: 1rem; border-bottom: 1px solid #ddd;">
+        <div style="font-size: 18px; font-weight:bold; padding-bottom: 0.75rem; font-family: sans-serif">
+            {{implode(', ', array_filter([$patient->name_last, $patient->name_first]))}}
+        </div>
         <table style="border: 0; width: 100%; border: 0" border="0" cellspacing="0" cellpadding="0">
-            <tr>
-                <td colspan="2" style="font-size: 18px; font-weight:bold; padding-bottom: 0.75rem; font-family: sans-serif">
-                    {{implode(', ', array_filter([$patient->name_last, $patient->name_first]))}}
-                </td>
-            </tr>
             <tr>
                 <td style="width: 60%; text-align: left;">
                     <table style="border: 0; width: 100%;" border="0" cellspacing="0" cellpadding="0">
@@ -233,56 +262,56 @@
                             <?php
                             $review = json_decode($childReview->data);
                             ?>
-                                <table style="border: 0; width: 100%; border: 0" border="0" cellspacing="0" cellpadding="0">
-                                    <tr class="mb-1">
-                                        <td style="width: 50%">Explain the problem.</td>
-                                        <td class="ml-2" data-name="problem_explanation"><?= $review && @$review->problem_explanation ? @$review->problem_explanation : '-' ?></td>
-                                    </tr>
-                                    <tr class="mb-1">
-                                        <td style="width: 50%">What happened between today and our last visit?</td>
-                                        <td class="ml-2" data-name="events_between_last_visit_and_this"><?= $review && @$review->events_between_last_visit_and_this ? @$review->events_between_last_visit_and_this : '-' ?></td>
-                                    </tr>
-                                    <tr class="mb-1">
-                                        <td style="width: 50%">How did it go with the plan I gave you?</td>
-                                        <td class="ml-2" data-name="current_plan_status"><?= $review && @$review->current_plan_status ? @$review->current_plan_status : '-' ?></td>
-                                    </tr>
-                                    <tr class="mb-1">
-                                        <td style="width: 50%">What barriers have you felt following the plan?</td>
-                                        <td class="ml-2" data-name="barriers_following_current_plan"><?= $review && @$review->barriers_following_current_plan ? @$review->barriers_following_current_plan : '-' ?></td>
-                                    </tr>
-                                    <tr class="mb-1">
-                                        <td style="width: 50%">How long have you had this?</td>
-                                        <td class="ml-2" data-name="how_long"><?= $review && @$review->how_long ? @$review->how_long : '-' ?></td>
-                                    </tr>
-                                    <tr class="mb-1">
-                                        <td style="width: 50%">When does it get worse?</td>
-                                        <td class="ml-2" data-name="when_worse"><?= $review && @$review->when_worse ? @$review->when_worse : '-' ?></td>
-                                    </tr>
-                                    <tr class="mb-1">
-                                        <td style="width: 50%">When does it get better?</td>
-                                        <td class="ml-2" data-name="when_better"><?= $review && @$review->when_better ? @$review->when_better : '-' ?></td>
-                                    </tr>
-                                    <tr class="mb-1">
-                                        <td style="width: 50%">What have you done for treatment?</td>
-                                        <td class="ml-2" data-name="treatments_done"><?= $review && @$review->treatments_done ? @$review->treatments_done : '-' ?></td>
-                                    </tr>
-                                    <tr class="mb-1">
-                                        <td style="width: 50%">How does it affect your ADLs?</td>
-                                        <td class="ml-2" data-name="how_it_affects_ADLs"><?= $review && @$review->how_it_affects_ADLs ? @$review->how_it_affects_ADLs : '-' ?></td>
-                                    </tr>
-                                    <tr class="mb-1">
-                                        <td style="width: 50%">How do you cope?</td>
-                                        <td class="ml-2" data-name="how_cope"><?= $review && @$review->how_cope ? @$review->how_cope : '-' ?></td>
-                                    </tr>
-                                    <tr class="mb-1">
-                                        <td style="width: 50%">How does this affect you emotionally?</td>
-                                        <td class="ml-2" data-name="how_affect_emotionally"><?= $review && @$review->how_affect_emotionally ? @$review->how_affect_emotionally : '-' ?></td>
-                                    </tr>
-                                    <div class="">
-                                        <td style="width: 50%">Memo</td>
-                                        <td class="ml-2" data-name="memo"><?= $review && @$review->memo ? @$review->memo : '-' ?></td>
-                                    </div>
-                                </table>
+                            <table style="border: 0; width: 100%; border: 0" border="0" cellspacing="0" cellpadding="0">
+                                <tr class="mb-1">
+                                    <td style="width: 50%">Explain the problem.</td>
+                                    <td class="ml-2" data-name="problem_explanation"><?= $review && @$review->problem_explanation ? @$review->problem_explanation : '-' ?></td>
+                                </tr>
+                                <tr class="mb-1">
+                                    <td style="width: 50%">What happened between today and our last visit?</td>
+                                    <td class="ml-2" data-name="events_between_last_visit_and_this"><?= $review && @$review->events_between_last_visit_and_this ? @$review->events_between_last_visit_and_this : '-' ?></td>
+                                </tr>
+                                <tr class="mb-1">
+                                    <td style="width: 50%">How did it go with the plan I gave you?</td>
+                                    <td class="ml-2" data-name="current_plan_status"><?= $review && @$review->current_plan_status ? @$review->current_plan_status : '-' ?></td>
+                                </tr>
+                                <tr class="mb-1">
+                                    <td style="width: 50%">What barriers have you felt following the plan?</td>
+                                    <td class="ml-2" data-name="barriers_following_current_plan"><?= $review && @$review->barriers_following_current_plan ? @$review->barriers_following_current_plan : '-' ?></td>
+                                </tr>
+                                <tr class="mb-1">
+                                    <td style="width: 50%">How long have you had this?</td>
+                                    <td class="ml-2" data-name="how_long"><?= $review && @$review->how_long ? @$review->how_long : '-' ?></td>
+                                </tr>
+                                <tr class="mb-1">
+                                    <td style="width: 50%">When does it get worse?</td>
+                                    <td class="ml-2" data-name="when_worse"><?= $review && @$review->when_worse ? @$review->when_worse : '-' ?></td>
+                                </tr>
+                                <tr class="mb-1">
+                                    <td style="width: 50%">When does it get better?</td>
+                                    <td class="ml-2" data-name="when_better"><?= $review && @$review->when_better ? @$review->when_better : '-' ?></td>
+                                </tr>
+                                <tr class="mb-1">
+                                    <td style="width: 50%">What have you done for treatment?</td>
+                                    <td class="ml-2" data-name="treatments_done"><?= $review && @$review->treatments_done ? @$review->treatments_done : '-' ?></td>
+                                </tr>
+                                <tr class="mb-1">
+                                    <td style="width: 50%">How does it affect your ADLs?</td>
+                                    <td class="ml-2" data-name="how_it_affects_ADLs"><?= $review && @$review->how_it_affects_ADLs ? @$review->how_it_affects_ADLs : '-' ?></td>
+                                </tr>
+                                <tr class="mb-1">
+                                    <td style="width: 50%">How do you cope?</td>
+                                    <td class="ml-2" data-name="how_cope"><?= $review && @$review->how_cope ? @$review->how_cope : '-' ?></td>
+                                </tr>
+                                <tr class="mb-1">
+                                    <td style="width: 50%">How does this affect you emotionally?</td>
+                                    <td class="ml-2" data-name="how_affect_emotionally"><?= $review && @$review->how_affect_emotionally ? @$review->how_affect_emotionally : '-' ?></td>
+                                </tr>
+                                <tr class="">
+                                    <td style="width: 50%">Memo</td>
+                                    <td class="ml-2" data-name="memo"><?= $review && @$review->memo ? @$review->memo : '-' ?></td>
+                                </tr>
+                            </table>
                         </div>
                     @endif
                 @endforeach