Эх сурвалжийг харах

Section summaries - hide stuff that is empty

Vijayakrishnan 4 жил өмнө
parent
commit
aef6327654

+ 2 - 1
resources/views/app/patient/canvas-sections/allergies/summary.php

@@ -18,7 +18,8 @@ if(count($contentData['items'])) {
             <div class="">
                 <b><?= $item["title"] ?></b>
             </div>
-            <?php if(!!$item["detail"]): ?>
+
+            <?php if(isset($item["detail"]) && !empty($item["detail"])): ?>
                 <div class="text-secondary"><?= $item["detail"] ?></div>
             <?php endif; ?>
         </div>

+ 2 - 2
resources/views/app/patient/canvas-sections/dx/summary.php

@@ -31,11 +31,11 @@ if(count($dxContentData['items'])) {
                 <?= isset($item["icd"]) ? '/&nbsp;' . $item["icd"] : '' ?>
                 <?= isset($item["coa"]) ? '/&nbsp;' . $item["coa"] : '' ?>
             </div>
-            <?php if(isset($item["detail"])): ?>
+            <?php if(isset($item["detail"]) && !empty($item["detail"])): ?>
                 <div class="text-secondary font-weight-bold">Detail</div>
                 <div class="ml-2"><?= $item["detail"] ?></div>
             <?php endif; ?>
-            <?php if(isset($item["plan"])): ?>
+            <?php if(isset($item["plan"]) && !empty($item["plan"])): ?>
                 <div class="text-secondary font-weight-bold">Plan</div>
                 <div class="ml-2"><?= $item["plan"] ?></div>
             <?php endif; ?>

+ 4 - 2
resources/views/app/patient/canvas-sections/rx/summary.php

@@ -16,11 +16,13 @@ if(count($contentData['items'])) {
 ?>
         <div class="mb-2">
             <div class="">
-                <b><?= $item["title"] ?></b>
+                <?php if(isset($item["title"]) && !empty($item["title"])): ?>
+                    <b><?= $item["title"] ?></b>
+                <?php endif; ?>
                 <?= !!$item["strength"] ? '/&nbsp;' . $item["strength"] : '' ?>
                 <?= !!$item["frequency"] ? '/&nbsp;' . $item["frequency"] : '' ?>
             </div>
-            <?php if(!!$item["detail"]): ?>
+            <?php if(isset($item["detail"]) && !empty($item["detail"])): ?>
                 <div class="text-secondary"><?= $item["detail"] ?></div>
             <?php endif; ?>
         </div>