Browse Source

Universal medications - removal memo

Vijayakrishnan 4 years ago
parent
commit
dd8881c28f

+ 3 - 0
resources/views/app/patient/page-sections/v0521_rx/form.blade.php

@@ -41,6 +41,9 @@ use App\Models\Note;
                         <td class="px-2">{{ $page->key }}
                             <?php if(!!@$parsed->removed_during_note_uid): ?>
                                 <span class="text-warning-mellow text-sm mr-2 font-weight-bold">(Removed<?= @$parsed->removed_during_note_uid === $note->uid ? ' during this visit' : '' ?>)</span>
+                                <?php if(!!@$parsed->removal_memo): ?>
+                                    <div class="text-sm text-secondary font-italic mt-1"><?= $parsed->removal_memo ?></div>
+                                <?php endif; ?>
                             <?php elseif(!!@$parsed->was_existing_at_visit_start): ?>
                                 <span class="text-secondary text-sm mr-2 font-weight-bold">(Existing)</span>
                             <?php endif; ?>

+ 1 - 1
resources/views/app/patient/page-sections/v0521_rx/remove.blade.php

@@ -28,7 +28,7 @@
                     showMask();
                     let newData = {!! $page->data !!};
                     newData.removed_during_note_uid = '{{$note->uid}}';
-                    newData.removal_memo = form.find('[name="memo"]').val()
+                    newData.removal_memo = form.find('[name="removal_memo"]').val()
                     let payload = {
                         uid: '{{$page->uid}}',
                         newData: JSON.stringify(newData)

+ 8 - 4
resources/views/app/patient/page-sections/v0521_rx/summary.php

@@ -18,15 +18,19 @@ if($items && count($items)) {
                     <?= !!@$parsed->frequency ? '/&nbsp;' . @$parsed->frequency : '' ?>
                     <?php if(!!@$parsed->removed_during_note_uid): ?>
                         /&nbsp;<span class="text-warning-mellow text-sm mr-2 font-weight-bold">(Removed<?= @$parsed->removed_during_note_uid === $note->uid ? ' during this visit' : '' ?>)</span>
+                        <?php if(!!@$parsed->removal_memo): ?>
+                            <div class="text-sm text-secondary font-italic mt-1"><?= $parsed->removal_memo ?></div>
+                        <?php endif; ?>
                     <?php elseif(!!@$parsed->was_existing_at_visit_start): ?>
                         /&nbsp;<span class="text-secondary text-sm mr-2 font-weight-bold">(Existing)</span>
                     <?php endif; ?>
                 </div>
                 <?php
-                $detailPlain = @$parsed->detail ? $parsed->detail : '';
-                if(!!$detailPlain):
-                ?>
-                <div class="text-secondary"><?= $detailPlain ?></div>
+                if (!@$parsed->removed_during_note_uid):
+                    $detailPlain = @$parsed->detail ? $parsed->detail : '';
+                    if(!!$detailPlain): ?>
+                    <div class="text-secondary"><?= $detailPlain ?></div>
+                    <?php endif; ?>
                 <?php endif; ?>
             </div>
         <?php