浏览代码

Manage eRx (pdf fix)

Vijayakrishnan 3 年之前
父节点
当前提交
2982ee6123
共有 1 个文件被更改,包括 13 次插入17 次删除
  1. 13 17
      resources/views/app/patient/prescriptions/pdf/DRUG.blade.php

+ 13 - 17
resources/views/app/patient/prescriptions/pdf/DRUG.blade.php

@@ -53,37 +53,33 @@
 <?php $clinical = json_decode($prescription->clinical_detail_json); ?>
 <div style="margin: 1.5rem 0 1rem; font-weight: bold; opacity: 0.5"><span style="font-size: 24px">R</span><span style="font-size: 16px">x</span></div>
 <section style="font-size: 15px;">
-    <table cellpadding="0" cellspacing="0" border="0" style="width: 100%">
+    <?php $count = 0; ?>
+    <?php foreach ($clinical->items as $item): ?>
+    <table cellpadding="0" cellspacing="0" border="0" style="width: 100%; margin-bottom: 5pt">
         <tr>
             <td style="width: 20px; vertical-align: top; opacity: 0.75; font-size: 14px">
-                <span>1. </span>
+                <span>{{ ++$count }}. </span>
             </td>
             <td style="vertical-align: top">
                 <div>
-                    <p style="margin: 0 0 0.5rem;">
-                        <b>{{ $clinical->medication }} {{ $clinical->strength }}
-                            @if($clinical->route)
-                                - {{ $clinical->route }}
-                            @endif
-                        </b>
+                    <p style="margin: 0">
+                        <b>{{ $item->medication }}</b>
                     </p>
                     <div style="">
-                        @if($clinical->frequency)
-                            <p style="margin: 0.5rem 0;">Frequency: {{ $clinical->frequency }}</p>
-                        @endif
-                        @if($clinical->dispense)
-                            <p style="margin: 0.5rem 0;">Dispense: {{ $clinical->dispense }}</p>
+                        @if(@$item->frequency)
+                            <p style="margin: 0.5rem 0;">Frequency: {{ $item->frequency }}</p>
                         @endif
-                        @if($clinical->refills)
-                            <p style="margin: 0.5rem 0;">Refills: {{ $clinical->refills }}</p>
+                        @if(@$item->dispense)
+                            <p style="margin: 0.5rem 0;">Dispense: {{ $item->dispense }}</p>
                         @endif
-                        @if($clinical->purpose)
-                            <p style="margin: 0.5rem 0;">Purpose: <b>{{ $clinical->purpose }}</b></p>
+                        @if(@$item->refills)
+                            <p style="margin: 0.5rem 0;">Refills: {{ $item->refills }}</p>
                         @endif
                     </div>
                 </div>
             </td>
         </tr>
     </table>
+    <?php endforeach; ?>
 </section>