소스 검색

ERx update lab & imaging PDF templates to work with new DS

Vijayakrishnan 3 년 전
부모
커밋
257b312e6e

+ 2 - 1
app/Http/Controllers/PatientController.php

@@ -419,7 +419,8 @@ class PatientController extends Controller
         if(!!$currentErx) {
             $currentErx = Erx::where('uid', $currentErx)->first();
         }
-        return view('app.patient.prescriptions.index', compact('patient', 'type', 'currentErx'));
+        $note = $patient->coreNote;
+        return view('app.patient.prescriptions.index', compact('patient', 'type', 'currentErx', 'note'));
     }
 
     public function prescriptionsPopup(Request $request, Client $patient, String $type = '', String $currentErx = '') {

+ 1 - 1
resources/views/app/patient/prescriptions/list.blade.php

@@ -1286,7 +1286,7 @@ GROUP BY erx_category");
                         if(this.addDrugToErxMode === 'new') {
                             Vue.nextTick(() => {
 
-                                let parentSegment = $('#prescriptions-popup-{{$patient->id}}');
+                                let parentSegment = $('#prescriptions-{{$patient->id}}');
 
                                 parentSegment.find('[stag-suggest-initialized]').removeAttr('stag-suggest-initialized');
                                 initStagSuggest();

+ 22 - 6
resources/views/app/patient/prescriptions/pdf/IMAGING.blade.php

@@ -162,11 +162,19 @@
 
     <table cellpadding="0" cellspacing="0" border="0" style="width: 100%; font-size: 14px;">
         <tr>
-            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;">Fasting:</td>
-            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;">Yes&nbsp;&nbsp;/&nbsp;&nbsp;No</td>
-            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;">ICD Codes:</td>
-            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;">
-                {{@$clinical->icds ? implode(", ", @$clinical->icds) : '-'}}
+            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75; vertical-align: top">Fasting:</td>
+            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; vertical-align: top font-weight: bold;">Yes&nbsp;&nbsp;/&nbsp;&nbsp;No</td>
+            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75; vertical-align: top">ICD Codes:</td>
+            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold; vertical-align: top">
+                @if(@($clinical->items) && count($clinical->items))
+                    @foreach($clinical->items as $item)
+                        @if(@($item->icds) && count($item->icds))
+                            {!! implode("<br>", array_map(function($_x) { return $_x->code; }, $item->icds)) !!}<br>
+                        @endif
+                    @endforeach
+                @else
+                    -
+                @endif
             </td>
         </tr>
         <tr>
@@ -190,7 +198,15 @@
     <table cellpadding="0" cellspacing="0" border="0" style="width: 100%">
         <tr>
             <td style="vertical-align: top">
-                {!! @$clinical->tests ? implode("<br>", @$clinical->tests) : '-' !!}
+                @if(@($clinical->items) && count($clinical->items))
+                    @foreach($clinical->items as $item)
+                        @if(@($item->tests) && count($item->tests))
+                            {!! implode("<br>", array_map(function($_x) { return $_x->desc; }, $item->tests)) !!}<br>
+                        @endif
+                    @endforeach
+                @else
+                    -
+                @endif
             </td>
         </tr>
     </table>

+ 22 - 6
resources/views/app/patient/prescriptions/pdf/LAB.blade.php

@@ -162,11 +162,19 @@
 
     <table cellpadding="0" cellspacing="0" border="0" style="width: 100%; font-size: 14px;">
         <tr>
-            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;">Fasting:</td>
-            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;">Yes&nbsp;&nbsp;/&nbsp;&nbsp;No</td>
-            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;">ICD Codes:</td>
-            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;">
-                {{@$clinical->icds ? implode(", ", @$clinical->icds) : '-'}}
+            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75; vertical-align: top">Fasting:</td>
+            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; vertical-align: top font-weight: bold;">Yes&nbsp;&nbsp;/&nbsp;&nbsp;No</td>
+            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75; vertical-align: top">ICD Codes:</td>
+            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold; vertical-align: top">
+                @if(@($clinical->items) && count($clinical->items))
+                    @foreach($clinical->items as $item)
+                        @if(@($item->icds) && count($item->icds))
+                            {!! implode("<br>", array_map(function($_x) { return $_x->code; }, $item->icds)) !!}<br>
+                        @endif
+                    @endforeach
+                @else
+                    -
+                @endif
             </td>
         </tr>
         <tr>
@@ -190,7 +198,15 @@
     <table cellpadding="0" cellspacing="0" border="0" style="width: 100%">
         <tr>
             <td style="vertical-align: top">
-                {!! @$clinical->tests ? implode("<br>", @$clinical->tests) : '-' !!}
+                @if(@($clinical->items) && count($clinical->items))
+                    @foreach($clinical->items as $item)
+                        @if(@($item->tests) && count($item->tests))
+                            {!! implode("<br>", array_map(function($_x) { return $_x->desc; }, $item->tests)) !!}<br>
+                        @endif
+                    @endforeach
+                @else
+                    -
+                @endif
             </td>
         </tr>
     </table>