Jelajahi Sumber

Vitals settings - ICD summary UI update

Vijayakrishnan 3 tahun lalu
induk
melakukan
d87bb5f0b4

+ 15 - 27
resources/views/app/patient/vitals-settings/bmi-management-summary.blade.php

@@ -48,33 +48,21 @@
     <span><?= vsValue('has_heart_failure_dx', $patient) ?></span>
 </div>
 
-<div class="mb-1">
+<div class="mb-2">
     <span class="text-secondary">ICDs:</span>
+    <?php
+    $icds = [];
+    for ($i = 1; $i <= 4; $i++) {
+        if($patient->{'why_is_weight_monitoring_needed_icd' . $i}) {
+            $icd = '[' . $patient->{'why_is_weight_monitoring_needed_icd' . $i} . ']';
+            if($patient->{'why_is_weight_monitoring_needed_description' . $i}) {
+                $icd .= ' ' . $patient->{'why_is_weight_monitoring_needed_description' . $i};
+            }
+            $icds[] = $icd;
+        }
+    }
+    $icds = implode(', ', $icds);
+    ?>
+    <span>{{$icds}}</span>
 </div>
-<table class="table table-sm table-striped table-bordered m-0">
-    <thead>
-    <tr class="bg-light text-secondary">
-        <th class="border-bottom-0 w-25">Code</th>
-        <th class="border-bottom-0">Description</th>
-    </tr>
-    </thead>
-    <tbody>
-    <tr>
-        <td><?= vsValue('why_is_weight_monitoring_needed_icd1', $patient) ?></td>
-        <td><?= vsValue('why_is_weight_monitoring_needed_description1', $patient) ?></td>
-    </tr>
-    <tr>
-        <td><?= vsValue('why_is_weight_monitoring_needed_icd2', $patient) ?></td>
-        <td><?= vsValue('why_is_weight_monitoring_needed_description2', $patient) ?></td>
-    </tr>
-    <tr>
-        <td><?= vsValue('why_is_weight_monitoring_needed_icd3', $patient) ?></td>
-        <td><?= vsValue('why_is_weight_monitoring_needed_description3', $patient) ?></td>
-    </tr>
-    <tr>
-        <td><?= vsValue('why_is_weight_monitoring_needed_icd4', $patient) ?></td>
-        <td><?= vsValue('why_is_weight_monitoring_needed_description4', $patient) ?></td>
-    </tr>
-    </tbody>
-</table>
 

+ 17 - 34
resources/views/app/patient/vitals-settings/bp-management-summary.blade.php

@@ -206,37 +206,20 @@
     </div>
 </div>
 
-<hr class="my-3">
-
-<div class="text-secondary min-width-140px mb-1">ICDs</div>
-<table class="table table-sm table-striped table-bordered mb-3">
-    <thead>
-    <tr class="bg-light text-secondary">
-        <th class="border-bottom-0 width-30px">#</th>
-        <th class="border-bottom-0 w-25">Code</th>
-        <th class="border-bottom-0">Description</th>
-    </tr>
-    </thead>
-    <tbody>
-    <tr>
-        <td class="p-0 align-middle text-center">1</td>
-        <td class="p-0 align-middle pl-1 py-1"><?= vsValue('why_is_bp_monitoring_needed_icd1', $patient) ?></td>
-        <td class="p-0 align-middle pl-1 py-1"><?= vsValue('why_is_bp_monitoring_needed_description1', $patient) ?></td>
-    </tr>
-    <tr>
-        <td class="p-0 align-middle text-center">2</td>
-        <td class="p-0 align-middle pl-1 py-1"><?= vsValue('why_is_bp_monitoring_needed_icd2', $patient) ?></td>
-        <td class="p-0 align-middle pl-1 py-1"><?= vsValue('why_is_bp_monitoring_needed_description2', $patient) ?></td>
-    </tr>
-    <tr>
-        <td class="p-0 align-middle text-center">3</td>
-        <td class="p-0 align-middle pl-1 py-1"><?= vsValue('why_is_bp_monitoring_needed_icd3', $patient) ?></td>
-        <td class="p-0 align-middle pl-1 py-1"><?= vsValue('why_is_bp_monitoring_needed_description3', $patient) ?></td>
-    </tr>
-    <tr>
-        <td class="p-0 align-middle text-center">4</td>
-        <td class="p-0 align-middle pl-1 py-1"><?= vsValue('why_is_bp_monitoring_needed_icd4', $patient) ?></td>
-        <td class="p-0 align-middle pl-1 py-1"><?= vsValue('why_is_bp_monitoring_needed_description4', $patient) ?></td>
-    </tr>
-    </tbody>
-</table>
+<div class="mb-2">
+    <span class="text-secondary">ICDs:</span>
+    <?php
+    $icds = [];
+    for ($i = 1; $i <= 4; $i++) {
+        if($patient->{'why_is_bp_monitoring_needed_icd' . $i}) {
+            $icd = '[' . $patient->{'why_is_bp_monitoring_needed_icd' . $i} . ']';
+            if($patient->{'why_is_bp_monitoring_needed_description' . $i}) {
+                $icd .= ' ' . $patient->{'why_is_bp_monitoring_needed_description' . $i};
+            }
+            $icds[] = $icd;
+        }
+    }
+    $icds = implode(', ', $icds);
+    ?>
+    <span>{{$icds}}</span>
+</div>